拓扑图如上,该实验需要实现LSW3和LSW4互为vlan2和vlan3的主网关,且做到热机互备,另外需要实现vlan2通过R1去AR1,vlan3通过R2去AR1。
一、二层配置
1.vlan的创建及将接口划入相应的vlan
LSW1
vlan batch 2 to 3
interface GigabitEthernet0/0/3
[s1-GigabitEthernet0/0/3] port link-type access
port default vlan 2
stp edged-port enable
interface GigabitEthernet0/0/4
[s1-GigabitEthernet0/0/3] port link-type access
port default vlan 3
stp edged-port enable
LSW2
interface GigabitEthernet0/0/3
[s1-GigabitEthernet0/0/3] port link-type access
port default vlan 2
stp edged-port enable
interface GigabitEthernet0/0/4
[s1-GigabitEthernet0/0/3] port link-type access
port default vlan 3
stp edged-port enable
2.干道及链路聚合
[s1]interface g0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
[s1]interface g0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
[s2]interface g0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
[s2]interface g0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
LSW3
[s3]interface Eth-Trunk 0
[s3-Eth-Trunk0]trunkport g0/0/1
[s3-Eth-Trunk0]trunkport g0/0/2
port link-type trunk