NPAR + VLAN Filter
The following uses the MZ520s and CX320s as an example to describe the NPAR+VLAN filter application in the networking. Figure 5-21 shows the networking topology of the MZ520s 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 MZ520 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, respectively. The configuration of each MZ520 is listed as follows. Figure 5-21 takes PF0 of port 0 of MZ520 (1) and PF2 of port 0 of MZ520 (2) as an example.
MZ520 (1):
Port 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:
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.
MZ520 (2):
Port 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:
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.
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 MZ520 (1) and PF2 and PF4 of port 0 of MZ520 (2) as an example.
MZ520 (1):
Configure VLANs 101-104 for the enp4s0f0 network port corresponding to PF0 of port 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 of port 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.
MZ520 (2):
Configure VLANs 101-104 for the enp4s0f2 network port corresponding to PF2 of port 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 of port 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 MZ520 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]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/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
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 of MZ520 (1) and PF2 of port 0 of MZ520 (2), can communicate with each other.
VLAN 111 and VLAN 112, which correspond to PF2 of port 0 of MZ520 (1) and PF0 of port 0 of MZ520 (2), can communicate with each other.
VLAN 121 and VLAN 122, which correspond to PF4 of port 0 of MZ520 (1) and PF4 of port 0 of MZ520 (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.