Got it

Understanding of VLAN - Example for Configuring Interface-based VLAN Assignment

Latest reply: Jun 20, 2021 12:19:43 224 32 20 0 5

OBJECTIVE


The purpose of this post is to present an introduction to Example for Configuring Interface-based VLAN Assignment.


Networking Requirements


An enterprise requires departments in charge of the same service to communicate with each other while isolating departments in charge of different services.


As shown in Figure 1, an enterprise has four departments. Department 1 is connected to

RouterA, which is connected to Ethernet 2/0/1 of the Router. Department 2 is connected to

RouterB, which is connected to Ethernet 2/0/2 of the Router. Department 3 is connected to

RouterC, which is connected to Ethernet 2/0/3 of the Router. Department 4 is connected to

RouterD, which is connected to Ethernet 2/0/4 of the Router. The requirements are as follows:


Department 1 and Department 2 in VLAN 2 are isolated from Department 3 and Department 4 in VLAN 3.


Department 1 and Department 2 in VLAN 2 can communicate with each other.


Department 3 and Department 4 in VLAN 3 can communicate with each other.


01

Figure 1 - Network diagram of interface-based VLAN assignment


Configuration Roadmap


The configuration roadmap is as follows:


1. Create VLANs.


2. Add interfaces to the VLAN.


Procedure


1. Configure the Router.


# Create VLAN 2.

<Huawei> system-view
[Huawei]
vlan 2
[Huawei-vlan2] quit                      


# Set the link type of Ethernet 2/0/1 to trunk and add Ethernet 2/0/1 to VLAN 2.

[Huawei] interface ethernet 2/0/1
[Huawei-Ethernet2/0/1] port link-type trunk
[Huawei-Ethernet2/0/1] port trunk allow-pass vlan 2
[Huawei-Ethernet2/0/1] quit                     


# Set the link type of Ethernet 2/0/2 to trunk and add Ethernet 2/0/2 to VLAN 2.

[Huawei] interface ethernet 2/0/2
[Huawei-Ethernet2/0/2] port link-type trunk
[Huawei-Ethernet2/0/2] port trunk allow-pass vlan 2
[Huawei-Ethernet2/0/2] quit                     


# Create VLAN 3.

[Huawei] vlan 3
[Huawei-vlan3] quit                    


# Set the link type of Ethernet 2/0/3 to trunk and add Ethernet 2/0/3 to VLAN 3.

[Huawei] interface ethernet 2/0/3
[Huawei-Ethernet2/0/3] port link-type trunk
[Huawei-Ethernet2/0/3] port trunk allow-pass vlan 3
[Huawei-Ethernet2/0/3] quit                     


# Set the link type of Ethernet 2/0/4 to trunk and add Ethernet 2/0/4 to VLAN 3.

[Huawei] interface ethernet 2/0/4
[Huawei-Ethernet2/0/4] port link-type trunk
[Huawei-Ethernet2/0/4] port trunk allow-pass vlan 3
[Huawei-Ethernet2/0/4] quit                     


2. Verify the configuration.


Ping any host in VLAN 3 from a host in VLAN 2. The ping operation fails, indicating that Department 1 and Department 2 are isolated from Department 3 and Department 4.


Ping any host in Department 2 from a host in Department 1. The ping operation is successful, indicating that Department 1 and Department 2 can communicate with each other.


Ping any host in Department 4 from a host in Department 3. The ping operation is successful, indicating that Department 3 and Department 4 can communicate with each other.


Configuration Files


  • Configuration file of the Router

#
vlan batch 2 to 3
#
interface Ethernet2/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
interface Ethernet2/0/2
port link-type trunk
port trunk allow-pass vlan 2
#
interface Ethernet2/0/3
port link-type trunk
port trunk allow-pass vlan 3
#
interface Ethernet2/0/4
port link-type trunk
port trunk allow-pass vlan 3
#
return          



--- End

  • x
  • convention:

Unicef
MVE Created Jun 15, 2021 14:57:07

GOOD
View more
  • x
  • convention:

andersoncf1
andersoncf1 Created Jun 15, 2021 18:07:34 (0) (0)
 
carlosalcosta
Created Jun 18, 2021 13:26:07

Very good, I'm learning a lot with this. Thanks.
View more
  • x
  • convention:

wissal
MVE Created Jun 18, 2021 14:33:26

Knowing
View more
  • x
  • convention:

Adriale
Adriale Created Jun 18, 2021 16:02:13 (0) (0)
 
lucian2003
lucian2003 Reply Adriale  Created Jun 19, 2021 01:02:19 (0) (0)
 
Faridrami
Created Jun 18, 2021 16:07:56

great Understanding of VLAN - Example for Configuring Interface-based VLAN Assignment-3978995-1
View more
  • x
  • convention:

shakeela
shakeela Created Jun 18, 2021 19:06:30 (1) (0)
 
Faridrami
Faridrami Reply shakeela  Created Jun 20, 2021 16:29:44 (0) (0)
 
LilStylz237
Created Jun 18, 2021 16:13:57

Vlan, neccesary network technologie
View more
  • x
  • convention:

Serges_armel
Serges_armel Created Jun 19, 2021 11:30:25 (0) (0)
of course  
Herediano
Created Jun 18, 2021 17:21:44

Thank you
View more
  • x
  • convention:

Vlada85
MVE Author Created Jun 18, 2021 17:28:00

Thank you
View more
  • x
  • convention:

lucian2003
lucian2003 Created Jun 19, 2021 01:02:01 (0) (0)
 
clecio_pinange
Created Jun 18, 2021 17:53:13

Excellent!
View more
  • x
  • convention:

shakeela
Created Jun 18, 2021 19:06:22

Nice
View more
  • x
  • convention:

123
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.