1,实验名称:配置浮动路由
2,实验目的:PC1和PC2互通
3,实验拓扑:
4,实验步骤:
<Huawei>undo terminal monitor
<Huawei>system-view
[Huawei]sysname R1
[R1]interface gi0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 255.255.255.0
[R1-GigabitEthernet0/0/0]undo shutdown
[R1-GigabitEthernet0/0/0]interface gi0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.2.1 255.255.255.0
[R1-GigabitEthernet0/0/1]undo shutdown
[R1-GigabitEthernet0/0/1]interface gi0/0/2
[R1-GigabitEthernet0/0/2]ip add 192.168.3.1 255.255.255.0
[R1-GigabitEthernet0/0/2]undo shutdown
[R1-GigabitEthernet0/0/2]q
[R1]ip route-static 192.168.4.0 255.255.255.0 192.168.2.2 preference 80 (值越小越好)
[R1]ip route-static 192.168.4.0 255.255.255.0 192.168.3.2 preference 90(值越小越好)
[R1]
R2
<Huawei>UNDO terminal monitor
<Huawei>system-view
[Huawei]sysname R2
[R2]interface gi0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.2.2 255.255.255.0
[R2-GigabitEthernet0/0/1]undo shutdown
[R2-GigabitEthernet0/0/1]interface gi0/0/2
[R2-GigabitEthernet0/0/2]ip add 192.168.3.2 255.255.255.0
[R2-GigabitEthernet0/0/2]undo shutdown
[R2-GigabitEthernet0/0/2]interface gi0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.4.254 255.255.255.0
[R2-GigabitEthernet0/0/0]undo shutdown
[R2-GigabitEthernet0/0/0]q
[R2]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1 preference 80
[R2]ip route-static 192.168.1.0 255.255.255.0 192.168.3.1 preference 90
5,验证及测试:
6,总结: 配置思路: (1)配置PC机IP地址 (2)配置路由器R1和R2的IP地址 (3)配置下一跳和链路冗余 (4)验证