NPAR + VLAN Filter
The following uses the MZ522s and CX320s as an example to describe the NPAR+VLAN filter application in the networking. Figure 5-21 shows the networking topology of the MZ522s and CX320s.
The CH121 V5 (1) is installed in slot Blade1 of the E9000 chassis, and the CH121 V5 (2) is installed in slot Blade2. The MZ522 is installed in slot Mezz1 on the CH121 V5, and the two physical ports connect to two CX320s, respectively. The CX320 (1) is installed in slot 2X of the E9000 chassis, and the CX320 (2) is installed in slot 3X. The CH121 V5 uses the RHEL 7.2 OS.
For details about the NPAR and VLAN filter configurations, see Configuring NPAR and Configuring VLAN filter. The configuration of each MZ522 is listed as follows. Figure 5-21 takes PF0 of port 0 for controller 0 of MZ522 (1) and PF2 of port 0 for controller 0 of MZ522 (2) as an example.
MZ522 (1):
Port 0 of controller 0:
Configure VLANs 101-104 for PF0 and do not set the PVID.
Configure VLANs 111-112 for PF2 and do not set the PVID.
Configure VLANs 121-122 for PF4 and set the PVID to 121.
Configure VLANs 131-133 for PF6 and do not set the PVID.
Port 1 of controller 0:
Configure VLANs 201-204 for PF1 and do not set the PVID.
Configure VLANs 211-218 for PF3 and do not set the PVID.
Configure VLANs 221-226 for PF5 and set the PVID to 221.
Configure VLANs 231-235 for PF7 and do not set the PVID.
Port 0 of controller 1:
Configure VLANs 141-142 for PF0 and do not set the PVID.
Configure VLANs 151-152 for PF2 and do not set the PVID.
Configure VLANs 161-162 for PF4 and set the PVID to 161.
Configure VLANs 171-172 for PF6 and do not set the PVID.
Port 1 of controller 1:
Configure VLANs 241-244 for PF1 and do not set the PVID.
Configure VLANs 251-258 for PF3 and do not set the PVID.
Configure VLANs 261-266 for PF5 and set the PVID to 261.
Configure VLANs 271-275 for PF7 and do not set the PVID.
MZ522 (2):
Port 0 of controller 0:
Configure VLANs 111-113 for PF0 and do not set the PVID.
Configure VLANs 101-104 for PF2 and do not set the PVID.
Configure VLANs 121-122 for PF4 and set the PVID to 121.
Configure VLANs 141-142 for PF6 and do not set the PVID.
Port 1 of controller 0:
Configure VLANs 211-220 for PF1 and do not set the PVID.
Configure VLANs 201-204 for PF3 and do not set the PVID.
Configure VLANs 221-226 for PF5 and set the PVID to 221.
Configure VLANs 261-265 for PF7 and do not set the PVID.
Port 0 of controller 1:
Configure VLANs 142-143 for PF0 and do not set the PVID.
Configure VLANs 152-153 for PF2 and do not set the PVID.
Configure VLANs 161-162 for PF4 and set the PVID to 161.
Configure VLANs 172-173 for PF6 and do not set the PVID.
Port 1 of controller 1:
Configure VLANs 241-240 for PF1 and do not set the PVID.
Configure VLANs 251-254 for PF3 and do not set the PVID.
Configure VLANs 281-286 for PF5 and set the PVID to 221.
Configure VLANs 291-295 for PF7 and do not set the PVID.
For details about the VLAN configuration on the OS, see Configuring VLANs in Linux. The following describes the VLAN configurations of the CH121 V5 (1) and CH121 V5 (2) by taking the network ports corresponding to PF0 and PF4 of port 0 of MZ522 (1) and PF2 and PF4 of port 0 of MZ522 (2) as an example.
MZ522 (1):
Configure VLANs 101-104 for the enp4s0f0 network port corresponding to PF0 for port 0 of controller 0, and configure the IP addresses as follows:
Set the IP address of enp4s0f0.101 to 192.168.101.10/24, which belongs to VLAN 101.
Set the IP address of enp4s0f0.102 to 192.168.102.10/24, which belongs to VLAN 102.
Set the IP address of enp4s0f0.103 to 192.168.103.10/24, which belongs to VLAN 103.
Set the IP address of enp4s0f0.104 to 192.168.104.10/24, which belongs to VLAN 104.
Configure VLAN 122 for the enp4s0f4 network port corresponding to PF4 for port 0 of controller 0, and configure the IP addresses as follows:
Set the IP address of enp4s0f4 to 192.168.121.10/24.
Set the IP address of enp4s0f4.122 to 192.168.122.10/24, which belongs to VLAN 122.
In the preceding example, no VLAN is configured for enp4s0f4, that is, the packet is untagged. In this case, PVID 121 configured by PF4 is used.
MZ522 (2):
Configure VLANs 101-104 for the enp4s0f2 network port corresponding to PF2 for port 0 of controller 0, and configure the IP addresses as follows:
Set the IP address of enp4s0f2.101 to 192.168.101.11/24, which belongs to VLAN 101.
Set the IP address of enp4s0f2.102 to 192.168.102.11/24, which belongs to VLAN 102.
Set the IP address of enp4s0f2.103 to 192.168.103.11/24, which belongs to VLAN 103.
Set the IP address of enp4s0f2.104 to 192.168.104.11/24, which belongs to VLAN 104.
Configure VLAN 122 for the network port corresponding to PF4 for port 0 of controller 0, and configure the IP addresses as follows:
Set the IP address of enp4s0f4 to 192.168.121.11/24.
Set the IP address of enp4s0f4.122 to 192.168.122.11/24, which belongs to VLAN 122.
Set the CX320 port connected to the MZ522 to trunk mode, and specify the VLANs that can pass through the port. The following uses CX320 (1) as an example.
CX320 (1):
[HUAWEI]vlan 101 [HUAWEI]vlan 102 [HUAWEI]vlan 103 [HUAWEI]vlan 104 [HUAWEI]vlan 111 [HUAWEI]vlan 112 [HUAWEI]vlan 113 [HUAWEI]vlan 121 [HUAWEI]vlan 122 [HUAWEI]vlan 131 [HUAWEI]vlan 132 [HUAWEI]vlan 133 [HUAWEI]vlan 141 [HUAWEI]vlan 142 [HUAWEI]vlan 143 [HUAWEI]vlan 151 [HUAWEI]vlan 152 [HUAWEI]vlan 153 [HUAWEI]vlan 161 [HUAWEI]vlan 162 [HUAWEI]vlan 171 [HUAWEI]vlan 172 [HUAWEI]vlan 173 [HUAWEI]interface 10GE2/1/1 [HUAWEI-10GE2/1/1]port link-type trunk [HUAWEI-10GE2/1/1]port trunk allow-pass vlan 101 to 104 111 112 121 122 131 to 133 [HUAWEI]interface 10GE2/1/2 [HUAWEI-10GE2/1/1]port link-type trunk [HUAWEI-10GE2/1/1]port trunk allow-pass vlan 141 142 151 152 161 162 171 172 [HUAWEI]interface 10GE2/2/1 [HUAWEI-10GE2/2/1]port link-type trunk [HUAWEI-10GE2/2/1]port trunk allow-pass vlan 101 to 104 111 to 113 121 122 141 142 [HUAWEI]interface 10GE2/2/2 [HUAWEI-10GE2/2/1]port link-type trunk [HUAWEI-10GE2/2/1]port trunk allow-pass vlan 142 143 152 153 161 162 172 173
The configuration of CX320 (2) is similar to that of CX320 (1).
After the configuration is complete:
VLANs 101-104, which correspond to PF0 of port 0 for controller 0 of MZ522 (1) and PF2 of port 0 for controller 0 of MZ522 (2), can communicate with each other.
VLAN 111 and VLAN 112, which correspond to PF2 of port 0 for controller 0 of MZ522 (1) and PF0 of port 0 for controller 0 of MZ522 (2), can communicate with each other.
VLAN 121 and VLAN 122, which correspond to PF4 of port 0 for controller 0 of MZ522 (1) and PF4 of port 0 for controller 0 of MZ522 (2), can communicate with each other.
Different VLANs are isolated from each other. That is, the VLANs corresponding to different PFs of the same port are isolated.