拓扑图
按照上图vlan及端口类型,操控vlan标签,实现PC1、PC2、PC3互通。
配置
sysname SW1
#
vlan 10
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/24
port link-type access
port default vlan 10
#
sysname SW2
#
vlan 20
#
interface GigabitEthernet0/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet0/0/23
port link-type trunk
port trunk pvid vlan 20
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/24
port link-type access
port default vlan 20
#
sysname SW3
#
vlan 30
#
interface GigabitEthernet0/0/1
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/23
port link-type trunk
port trunk pvid vlan 30
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 30
#
sysname AR1
#
interface GigabitEthernet0/0/0.30
dot1q termination vid 30
ip address 10.1.10.254 255.255.255.0
arp broadcast enable
#