产品
产品中心
< 返回主菜单
产品

交换机

交换机所有产品
< 返回产品
交换机
查看交换机首页 >

无线

无线所有产品
< 返回产品
无线
查看无线首页 >

云桌面

云桌面产品方案中心
< 返回产品
云桌面
查看云桌面首页 >

安全

安全所有产品
< 返回产品
安全
查看安全首页 >
产品中心首页 >
行业
行业中心
< 返回主菜单
行业
行业中心首页 >

【RSR】RSR如何添加浮动静态路由

发布时间:2013-09-11
点击量:3796

功能介绍:

当网络中存在多条相同路由前缀时,会优先选取AD值(路由可信度,值越小,路由越优先)小的路由为主用路由,AD值大的路由为备份路由。当主用路由的下一跳不可达时,主用路由消失,备用路由生效切换为主用。当网络中有多条路径到达目的网络时,可以通过配置多条静态路由,修改静态路由的AD值,来实现主备链路的备份,该功能即为浮动静态路由。

应用场景:

企业有两个出口线路,需要实现两个出口线路一主一备,正常情况下从主用线路上网,当主用线路出现故障时,能够自动切换到备份线路,保证网络正常运行,此时可以在路由器上启用浮动静态路由功能。

一、组网需求

  1、路由器有两条路径可以到达目的网络

  2、当主线路(示例主用线路为F0/0)失效时(接口down或线路断开),备用线路切换为主用 

二、组网拓扑

   

三、配置要点

    1、配置路由器R1接口IP

    2、配置路由器R2接口IP

    3、配置路由器R1静态路由

    4、配置路由器R2静态路由 

四、配置步骤

    1、配置路由器R1接口IP

       Ruijie>enable                

       Ruijie#configure terminal    

       Ruijie(config)#interface fastethernet 0/2

       Ruijie(config-if-FastEthernet 0/2)#ip address 192.168.4.1 255.255.255.0

       Ruijie(config-if-FastEthernet 0/2)#interface fastethernet 0/1

       Ruijie(config-if-FastEthernet 0/1)#ip address 192.168.1.254 255.255.255.0

       Ruijie(config-if-FastEthernet 0/1)#interface fastethernet 0/0

       Ruijie(config-if-FastEthernet 0/0)#ip address 192.168.3.1 255.255.255.0

       Ruijie(config-if-FastEthernet 0/0)#exit

    2、配置路由器R2接口IP

       Ruijie>enable                

       Ruijie#configure terminal    

       Ruijie(config)#interface fastethernet 0/2

       Ruijie(config-if-FastEthernet 0/2)#ip address 192.168.4.2 255.255.255.0

       Ruijie(config-if-FastEthernet 0/2)#interface fastethernet 0/1

       Ruijie(config-if-FastEthernet 0/1)#ip address 192.168.2.254 255.255.255.0

       Ruijie(config-if-FastEthernet 0/1)#interface fastethernet 0/0

       Ruijie(config-if-FastEthernet 0/0)#ip address 192.168.3.2 255.255.255.0

       Ruijie(config-if-FastEthernet 0/0)#exit

    3、配置路由器R1静态路由

注意:

1)配置静态路由的下一跳有2种表现形式(下一跳ip地址和本地出接口),若配置为本地出接口,则认为该静态路由为直连路由,在以太网链路,需要解析每个目的地址的arp信息,若在网络出口配置默认路由,下一跳为本地出接口,则会有大量的arp解析,占用大量的arp表,若对方关闭arp代理功能,甚至导致网络不通。若配置为下一跳ip地址,则为普通的递归路由。

2)建议在以太网链路,配置静态路由的时候,配置为下一跳的ip地址,若是在网络出口配置默认路由,切勿配置为本地出接口。

3)若是在ppp、hdlc广域网链路,静态路由配置为本地出接口和下一跳ip地址均可以,因为ppp、hdlc为点到点链路,不涉及二层地址解析。

4)静态路由的下一跳配置为本地出接口,则认为该静态路由为直连路由,默认管理距离为 0;若下一跳配置为下一跳的ip地址,则认为该静态路由为普通递归路由,默认的管理距离为 1。

Ruijie(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2      //目的地址是192.168.2.0/24的数据包,转发给192.168.3.2

Ruijie(config)#ip route 192.168.2.0 255.255.255.0 192.168.4.2 10    //目的地址是192.168.2.0/24的数据包,转发给192.168.4.2,管理距离是10(默认管理距离为1,越小越优先)

    4、配置路由器R2静态路由

Ruijie(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1   //目的地址是192.168.1.0/24的数据包,转发给192.168.3.1

Ruijie(config)#ip route 192.168.1.0 255.255.255.0 192.168.4.1 10   //目的地址是192.168.1.0/24的数据包,转发给192.168.4.1,管理距离是10(默认管理距离为1,越小越优先)

 

五、配置验证

1、当主用线路(F0/0)正常时,使用命令 Ruijie#show  ip route 查看路由

举例R1:

Ruijie#show ip route

Codes:  C - connected, S - static, R - RIP, B - BGP

        O - OSPF, IA - OSPF inter area

        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

        E1 - OSPF external type 1, E2 - OSPF external type 2

        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

        ia - IS-IS inter area, * - candidate default

Gateway of last resort is no set

S    192.168.2.0/24 [1/0] via 192.168.3.2        //去往192.168.2.0 走主用线路F0/0,下一跳为192.168.3.2

C    192.168.1.0/24 is directly connected, FastEthernet 0/1

C    192.168.1.254/32 is local host.

C    192.168.3.0/24 is directly connected, FastEthernet 0/0

C    192.168.3.1/32 is local host.

C    192.168.4.0/24 is directly connected, FastEthernet 0/2

C    192.168.4.1/32 is local host.

2、拔掉R1 主用线路(F0/0接口)的线缆,确认路由是否切换到备份线路,使用命令 Ruijie#show  ip route 查看路由

举例R1:

Ruijie#sho ip route

Codes:  C - connected, S - static, R - RIP, B - BGP

        O - OSPF, IA - OSPF inter area

        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

        E1 - OSPF external type 1, E2 - OSPF external type 2

        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

        ia - IS-IS inter area, * - candidate default

Gateway of last resort is no set

S    192.168.2.0/24 [10/0] via 192.168.4.2 //去往192.168.2.0走备用线路F0/2,下一跳192.168.4.2,主备线路正常切换

C    192.168.1.0/24 is directly connected, FastEthernet 0/1

C    192.168.1.254/32 is local host.

C    192.168.4.0/24 is directly connected, FastEthernet 0/2

C    192.168.4.2/32 is local host.

 

 

相关产品

返回顶部

请选择服务项目
关闭咨询页
售前咨询 售前咨询
售前咨询
售后服务 售后服务
售后服务
意见反馈 意见反馈
意见反馈
更多联系方式