为天地立心,为生民立命,为往圣继绝学,为万世开太平。
pc配置如图所示
lsw1配置
vlan batch 13 222 444 555 1313
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Eth-Trunk2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/1
port link-type access
port default vlan 1313
#
interface Ethernet0/0/2
port link-type access
port default vlan 222
#
interface Ethernet0/0/3
eth-trunk 1
#
interface Ethernet0/0/4
eth-trunk 1
#
interface Ethernet0/0/5
eth-trunk 2
#
interface Ethernet0/0/6
eth-trunk 2
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 1313
AR1配置
vlan batch 222 444 555 1313
interface Vlanif222
ip address 10.1.2.254 255.255.255.0
#
interface Vlanif444
ip address 10.1.4.254 255.255.255.0
#
interface Vlanif555
ip address 10.1.5.254 255.255.255.0
#
interface Vlanif1313
ip address 10.1.1.254 255.255.255.0
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/0
eth-trunk 1
#
interface Ethernet0/0/1
eth-trunk 1
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
lsw2配置
vlan batch 222 444 555 1313
interface Eth-Trunk2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/1
eth-trunk 2
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/3
port link-type access
port default vlan 1313
#
interface Ethernet0/0/4
port link-type access
port default vlan 444
#
interface Ethernet0/0/5
port link-type access
port default vlan 555
#
interface Ethernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/7
eth-trunk 2
PC1 ping PC 2 3 4 5