扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
1、没有设置LOCAL-PREF之前(R5有两条路由到200.100.50):
R5#sh ip bgp 200.100.50.0
BGP routing table entry for 200.100.50.0/24, version 4
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
10.1.1.2
200
192.168.1.6 from 192.168.1.6 (200.100.50.1)
Origin IGP, metric 0, localpref 100 , valid, external, best
300 200
10.1.1.2 from 10.1.1.2 (172.24.1.18)
Origin IGP, localpref 100 , valid, external
结果:
R5#sh ip bgp
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 0.0.0.0 0 32768 i
* 192.168.1.6 0 200 300 i
* 10.1.1.2 0 0 300 i
*> 200.100.50.0 192.168.1.6 0 0 200 i
* 10.1.1.2 0 300 200 i
2、而设置了LOCAL-PREF后(R5优先选择优先级高的路由):
R5#sh ip bgp 200.100.50.0
BGP routing table entry for 200.100.50.0/24, version 4
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x208
Advertised to non peer-group peers:
192.168.1.6
300 200
10.1.1.2 from 10.1.1.2 (172.24.1.18)
Origin IGP, localpref 150 , valid, external, best
200
192.168.1.6 from 192.168.1.6 (200.100.50.1)
Origin IGP, metric 0, localpref 100 , valid, external
结果:
R5#sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0 10.1.1.2 0 150 0 300 i
* 192.168.1.6 0 200 300 i
*> 0.0.0.0 0 32768 i
*> 200.100.50.0 10.1.1.2 150 0 300 200 i
* 192.168.1.6 0 0 200 i
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者