打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
在route-map中使用verify-availability确保路由可用性
单独一句:
set ip next-hop verfily-availability
定义该句以后,route-map中进行match后,若是set ip next-hop,则路由器首先检查next-hop是否可达。这对路由备份十分有效,因为路由器可以自己判断当前路由是否有效。当然使用track可以判断远端目标,而不仅仅是next-hop,这是后话,其实是还没有学会:-(

在R2、R3各起一个换回口做测试,R2:lo0 2.2.2.2 R3:lo0 3.3.3.3

需求分析:A公司申请了两条线路ISP1(电信)ISP2(网通),公司内网只有192.168.1.0/24一个网段,要求奇数IP段走R1的S1/1走,偶数IP段走R1的S1/0走,当出现任何一个接口Down掉时,自动切换到另一条线路上去,实现冗余。

技术背景:模拟两个运营商,ISP1和ISP2,ISP1与ISP2之间建立EBGP,传递个自治系统的路由,在真实的环境中,各自的运营商需要对自己的AS路由进行汇总,减少路由条目,减少路由消耗。如何判断奇偶IP?这里用反掩码控制,也是一个难点所在,在A公司的R1路由器上通过策略路由实现选路,从而实现内网的一的分担。

下面贴出R1路由的关键配置

ip classless

ip route 0.0.0.0 0.0.0.0 58.212.224.2

ip route 0.0.0.0 0.0.0.0 210.29.144.2

!

no ip http server

no ip http secure-server

!

!

access-list 10 permit 192.168.1.0 0.0.0.254

access-list 11 permit 192.168.1.1 0.0.0.254

!

route-map pbr permit 10

 match ip address 10

 match interface Serial1/0

 set ip next-hop 58.212.224.2

 set ip next-hop verify-availability

!

route-map pbr permit 20

 match ip address 11

 match interface Serial1/1

 set ip next-hop 210.29.144.2

 set ip next-hop verify-availability

!

route-map pbr permit 30

 match ip address 11

 match interface Serial1/0

 set ip next-hop 58.212.224.2

 set ip next-hop verify-availability

!

route-map pbr permit 40

 match ip address 10

 match interface Serial1/1

 set ip next-hop 210.29.144.2

 set ip next-hop verify-availability

!

!

!        

!

control-plane

!

!

!

!

!

!

gatekeeper

 shutdown

!

!

line con 0

 exec-timeout 0 0

 logging synchronous

 stopbits 1

line aux 0

 stopbits 1

line vty 0 4

End

R4上测试(注意下一跳)

R4#traceroute 3.3.3.3

 

Type escape sequence to abort.

Tracing the route to 3.3.3.3

 

  1 192.168.1.1 136 msec 44 msec 48 msec

  2 58.212.224.2 96 msec 108 msec 76 msec

  3 10.1.1.3 128 msec *  140 msec

 

 

R5上测试数据(注意吓一跳)

R5#traceroute 2.2.2.2

 

Type escape sequence to abort.

Tracing the route to 2.2.2.2

 

  1 192.168.1.1 120 msec 80 msec 28 msec

  2 210.29.144.2 96 msec 92 msec 64 msec

  3 10.1.1.2 108 msec *  156 msec

本次实验所要要到的技术BGP、NAT、Route-map 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
双出口nat配置(一主一备)
对比 Route-Map 在 Redistribute 以及 Policy-Routing 中的应用及注意点
Cisco策略路由(policy route)精解
route
双线接入故障自动切换方案
第2期-Route-Policy详解
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服