拓扑图:
实验要求
PC1属于vlan10 PC2属于vlan20 pc1流量通过r1走 pc2 流量通过SW2走,当主路由器挂了,流量可以自动切换通过备路由器通信
配置文件
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 22.0.0.2 24
[r2-GigabitEthernet0/0/1]int loo 0
[r2]rip
[r2-rip-1]version 2
[r2-rip-1]undo summary
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 22.0.0.0
[r2-rip-1]network 1.0.0.0
[sw1]vlan bat 10 20
[sw1]int e0/0/1
[sw1-Ethernet0/0/1]port link-