实验需求
实验拓扑
实验配置
SW1
<sw1>DISPLAY current-configuration
#
sysname sw1
#
vlan batch 2 to 6
#
interface Vlanif1
#
interface Ethernet0/0/1
port link-type access
port default vlan 2
#
interface Ethernet0/0/2
port hybrid pvid vlan 3
port hybrid untagged vlan 3 to 6
#
interface Ethernet0/0/3
port link-type access
port default vlan 2
#
interface Ethernet0/0/4
port hybrid pvid vlan 4
port hybrid untagged vlan 3 to 4
#
interface Ethernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 6
#
interface Ethernet0/0/6
port hybrid tagged vlan 2
port hybrid untagged vlan 3 to 6
SW3
<sw2>DISPLAY current-configuration
#
sysname sw2
#
vlan batch 2 to 6
#
interface Vlanif1
#
interface Ethernet0/0/1
port hybrid tagged vlan 2 to 6
#
interface Ethernet0/0/5
port hybrid pvid vlan 5
port hybrid untagged vlan 3 5
#
interface Ethernet0/0/6
port hybrid pvid vlan 6
port hybrid untagged vlan 3 6
R1
<r1>DISPLAY current-configuration
[V200R003C00]
#
sysname r1
#
dhcp enable
#
ip pool v2
gateway-list 192.168.2.1
network 192.168.2.0 mask 255.255.255.0
#
ip pool v3-v6
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/0.1
dot1q termination vid 2
ip address 192.168.2.1 255.255.255.0
arp broadcast enable
dhcp select global
实验结果
PC1
PC2
PC4