How Do I Configure Interface-based VLAN Assignment?

Created Apr 17, 2018 16:15:56 539 0 0 0
QHow Do I Configure Interface-based VLAN Assignment?
A: In Figure1, many users connect to switches in the data center and users with the same services access the network through different devices.To ensure communication security and prevent broadcast storms, administrators require that only users with the same services can communicate with each other.
To meet this requirement, VLANs can be assigned based on interfaces of switches and interfaces connected to users with the same services can be added to the same VLAN. In this situation, users in the same VLAN can communicate with each other, but users in different VLANs cannot communicate at Layer 2.
Figure1 Interface-based VLAN assignment 


Configuration Roadmap
The configuration roadmap is as follows:
  • Create VLANs and add interfaces connected to users to the VLANs to isolate Layer 2 traffic between users with different services.
  • Set the link type and allowed VLANs for interfaces between SwitchA and SwitchB to allow users with the same services to communicate through SwitchA and SwitchB.

Procedure
Step1: Create VLAN 2 and VLAN 3 on SwitchA and add interfaces connected to users to the VLANs. The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[*HUAWEI] commit
[SwitchA] vlan batch 2 3
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port default vlan 2
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port default vlan 3
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

Step2: Set the link type and allowed VLANs for the interface connecting SwitchA to SwitchB. The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
[SwitchA] interface 10ge 1/0/3
[SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 2 3
[*SwitchA-10GE1/0/3] commit

Step3: Verify the configuration.
Configure User1 and User2 on the same network segment, for example, 192.168.100.0/24, and configure User3 and User4 on the same network segment, for example, 192.168.200.0/24.User1 and User2 can ping each other successfully but they cannot ping User3 and User4. User3 and User4 can ping each other successfully but they cannot ping User1 and User2. 

You can also find the answer in Common VLAN Operations in Common Operation Guide.
This post was last edited by user_2718035 at 2018-5-9 16:52.

This article contains more resources

You need to log in to download or view. No account?Register

x
  • x
  • convention:

Responses

Reply
You need to log in to reply to the post Login | Register

Notice:To ensure 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 not limited to politically sensitive content, content concerning pornography, gambling, drug abuse and trafficking, content that may disclose or infringe upon others' intellectual properties, including commercial secrets, 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 Policy.”
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top