LSW1的配置如下:
u t m
sys
sys SW1
vlan batch 10 20 30
int e0/0/1
p l a
p d v 10
undo shutdown
int e0/0/2
p l a
p d v 20
undo shutdown
int e0/0/3
p l a
p d v 30
undo shutdown
int e0/0/4
p l t
p t a v a
undo shutdown
LSW2的配置如下:
u t m
sys
sys SW2
vlan batch 10 20 30 40
int g0/0/1
p l t
p t a v a
int g0/0/2
p l a
p d v 40
vlan batch 10 20 30 40
int Vlanif10
ip add 192.168.1.254 24
int Vlanif20
ip add 192.168.2.254 24
int Vlanif30
ip add 192.168.3.254 24
int Vlanif40
ip add 192.168.4.1 24
q
ip route-static 192.168.5.0 24 192.168.4.2//静态路由
R1的配置如下所示:
u t m
sys
sys R1
int g0/0/0
ip add 192.168.4.2 24
int g0/0/1
ip add 192.168.5.254 24
q
ip route-static 0.0.0.0 0 192.168.4.1//默认路由