159
Secondary VLAN Layer 3 communication configuration
example
Network requirements
As shown in
, configure the private VLAN feature to meet the following requirements:
•
Primary VLAN 10 on Device B is associated with secondary VLANs 2 and 3.
•
The uplink port GigabitEthernet 1/0/1 is in VLAN 10.
•
The IP address of VLAN-interface 10 is 192.168.1.1/24.
•
The ports GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 are in VLAN 2 and VLAN 3,
respectively.
•
Secondary VLANs are isolated at Layer 2 but interoperable at Layer 3.
Figure 47 Network diagram
Configuration procedure
# Create VLAN 2 and VLAN 3.
<DeviceB> system-view
[DeviceB] vlan 2 to 3
# Configure VLAN 10 as a primary VLAN, and associate VLAN 2 and VLAN 3 with primary VLAN 10
as secondary VLANs.
[DeviceB] vlan 10
[DeviceB-vlan10] private-vlan primary
[DeviceB-vlan10] private-vlan secondary 2 3
[DeviceB-vlan10] quit
# Configure the uplink port GigabitEthernet 1/0/1 as a promiscuous port of VLAN 10.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port private-vlan 10 promiscuous
[DeviceB-GigabitEthernet1/0/1] quit
# Assign the downlink port GigabitEthernet 1/0/2 to VLAN 2, and configure the port as a host port.
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] port access vlan 2
[DeviceB-GigabitEthernet1/0/2] port private-vlan host
[DeviceB-GigabitEthernet1/0/2] quit
# Assign the downlink port GigabitEthernet 1/0/3 to VLAN 3, and configure the port as a host port.
[DeviceB] interface gigabitethernet 1/0/3