《 浮动路由配置实验》

               实验目的:

                        将动态路由的管理距离优先级修改为低,手动添加的静态路由优先级修改为高。当动态路由出现问题时,原有的路由会失效,路由器会自动选择静态路由,保证网  络不中断,实现冗余备份!



     实验拓扑:

浮动路由配置(华为)_第1张图片

    实验编址:

        

实验设备
设备端口

ip地址

子网掩码
网关


路由器R1

GigabitEthernet0/0/0
192.168.10.254
255.255.255.0
N/A
GigabitEthernet0/0/1 192.168.2.1
255.255.255.0 N/A
GigabitEthernet0/0/2 192.168.3.1
255.255.255.0 N/A


路由器R2

GigabitEthernet0/0/0 192.168.40.254 255.255.255.0 N/A
GigabitEthernet0/0/1 192.168.2.2 255.255.255.0 N/A
GigabitEthernet0/0/2 192.168.3.2 255.255.255.0 N/A
计算机pc1
Ethernet0/0/0 192.168.10.1
255.255.255.0 192.168.10.254
计算机pc2
Ethernet0/0/0 192.168.40.1
255.255.255.0 192.168.40.254

                                      



实验步骤:


1、配置两台pc的ip地址子网掩码和网关

   

2、配置两台路由器上配上ip

命令如下:

路由R1配置

system-view
[Huawei]interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.10.254 24

[Huawei-GigabitEthernet0/0/0]quit

 

[Huawei]interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.1 24
[Huawei-GigabitEthernet0/0/1]quit


[Huawei]interface GigabitEthernet0/0/2
[Huawei-GigabitEthernet0/0/2]ip address 192.168.3.1 24

路由器R2配置

[Huawei]interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.40.254 24

[Huawei-GigabitEthernet0/0/0]quit

 

[Huawei]interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.2 24
[Huawei-GigabitEthernet0/0/1]quit


[Huawei]interface GigabitEthernet0/0/2
[Huawei-GigabitEthernet0/0/2]ip address 192.168.3.2 24


3、配置两台路由的浮动路由:

命令如下

路由器R1

[Huawei]ip route-static 192.168.40.0  24 192.168.2.2 preference 80
[Huawei]ip route-static 192.168.40.0 24 192.168.3.2 preference 90




路由器R2
[Huawei]ip route-static 192.168.10.0 24 192.168.2.1 preference 80
[Huawei]ip route-static 192.168.10.0 24 192.168.3.1 preference 90


4、测试

断开主链路测试连通性

浮动路由配置(华为)_第2张图片