NPAR + QinQ
The following uses the MZ520s and CX320s as an example to describe the NPAR+QinQ application in the networking. Figure 5-22 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 QinQ configurations, see Configuring NPAR and Configuring QinQ, respectively. The configuration of each MZ520 is listed as follows.
MZ520 (1):
Port 0:
Configure PVID 10 for PF0.
Configure PVID 20 for PF2.
Configure PVID 30 for PF4.
Configure PVID 40 for PF6.
Port 1:
Configure PVID 11 for PF1.
Configure PVID 21 for PF3.
Configure PVID 31 for PF5.
Configure PVID 41 for PF7.
MZ520 (2):
Port 0:
Configure PVID 10 for PF0.
Configure PVID 20 for PF2.
Configure PVID 30 for PF4.
Configure PVID 40 for PF6.
Port 1:
Configure PVID 11 for PF1.
Configure PVID 21 for PF3.
Configure PVID 31 for PF5.
Configure PVID 41 for PF7.
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 of port 0 of MZ520 (1) and 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.
MZ520 (2):
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.11/24, which belongs to VLAN 101.
Set the IP address of enp4s0f0.102 to 192.168.102.11/24, which belongs to VLAN 102.
Set the IP address of enp4s0f0.103 to 192.168.103.11/24, which belongs to VLAN 103.
Set the IP address of enp4s0f0.104 to 192.168.104.11/24, which belongs to VLAN 104.
Set the CX320 port connected to the MZ520 to trunk mode, and specify the VLANs that can pass through the port. Set the CX320 port connected to the CE6800 uplink switch to dot1q-tunnel mode and set the port VLAN (outer tag) to the same value as the PVID of the PF of the connected MZ520 port (used to transparently transmit the inner VLAN). The following uses CX320 (1) as an example.
CX320 (1):
[HUAWEI]vlan 10 [HUAWEI]vlan 20 [HUAWEI]vlan 30 [HUAWEI]vlan 40 [HUAWEI]interface 10GE2/1/1 [HUAWEI-10GE2/1/1]port link-type trunk [HUAWEI-10GE2/1/1]port trunk allow-pass vlan 10 20 30 40 [HUAWEI]interface 10GE2/2/1 [HUAWEI-10GE2/2/1]port link-type trunk [HUAWEI-10GE2/2/1]port trunk allow-pass vlan 10 20 30 40 [HUAWEI]interface 10GE2/17/1 [HUAWEI-10GE2/17/1]port link-type dot1q-tunnel [HUAWEI-10GE2/17/1]port default vlan 10
In the preceding example, the 2/17/1 port of CX320 (1) is dot1q-tunnel and the port VLAN is 10. The port VLAN is the same as the PVID of PF0 for port 0 of MZ520 (1) and MZ520 (2). Therefore, the 2/17/1 port can be used as the tunnel to associate with the PF0 for port 0 of MZ520 (1) and MZ520 (2) and transparently transmit the inner VLAN (service VLAN configured on the OS) to the uplink switch.
Set the port of the CE6800 uplink switch connected to CX320 (1) to trunk mode, and specify the VLANs that can pass through the port.
CE6800:
[HUAWEI]vlan 101 [HUAWEI]vlan 102 [HUAWEI]vlan 103 [HUAWEI]vlan 104 [HUAWEI]interface 10GE1/0/1 [HUAWEI-10GE1/0/1]port link-type trunk [HUAWEI-10GE1/0/1]port trunk allow-pass vlan 101 to 104
After the configuration is complete:
VLANs 101-104, which correspond to PF0 of port 0 of MZ520 (1) and MZ520 (2), can communicate with each other.
VLANs 101-104, which correspond to the CE6800 uplink switch and PF0 of port 0 of MZ520 (1) and MZ520 (2), can communicate with each other.
The PVIDs for different PFs of the same MZ520 port are different. Therefore, the VLANs are isolated from each other. The inner VLANs (service VLAN configured on the OS) of different PFs can overlap.