BGP配置中Weight选路的示例分析


今天就跟大家聊聊有关BGP配置中Weight选路的示例分析,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。1、BGP公认必遵属性:as-path、next-hop、originorigin: i表示IBGP通过network命令发布的路由e表示EGP重发布进来的路由?表示从IGP重分布或静态路由2、BGP存在多跳最优路由时的选路依据3、Weight选路解析修改weight值的方法:方法一:全部修改邻居传过来的路由的weight值,例如:router bgp 4neighbor 1.1.1.1 weight 1
方法二:部分修改邻居传过来的路由的weight值,例如:ip prefix-list 1 permit 33.33.33.0/24route-map W permit 10match ip address prefix-list 1set weight 1route-map W permit 20router bgp 4neighbor 1.1.1.1 route-map W in4、实验拓扑5、基础配置R1配置
interface Loopback0ip address 1.1.1.1 255.255.255.0interface Serial0/0ip address 13.1.1.1 255.255.255.0interface Serial0/1ip address 14.1.1.1 255.255.255.0router ospf 110router-id 1.1.1.1log-adjacency-changesnetwork 1.1.1.0 0.0.0.255 area 0network 14.1.1.0 0.0.0.255 area 0router bgp 4no synchronizationbgp router-id 1.1.1.1neighbor 4.4.4.4 remote-as 4neighbor 4.4.4.4 update-source Loopback0neighbor 4.4.4.4 next-hop-selfneighbor 13.1.1.3 remote-as 3no auto-summaryR2配置interface Loopback0ip address 2.2.2.2 255.255.255.0interface Serial0/1ip address 23.1.1.2 255.255.255.0interface FastEthernet1/0ip address 24.1.1.2 255.255.255.0router ospf 110router-id 2.2.2.2network 2.2.2.0 0.0.0.255 area 0network 24.1.1.0 0.0.0.255 area 0router bgp 4no synchronizationbgp router-id 2.2.2.2neighbor 4.4.4.4 remote-as 4neighbor 4.4.4.4 update-source Loopback0neighbor 4.4.4.4 next-hop-selfneig免费云主机域名hbor 23.1.1.3 remote-as 3no auto-summaryR3配置interface Loopback0ip address 3.3.3.3 255.255.255.0interface Loopback1ip address 33.33.33.33 255.255.255.0 interface Serial0/0ip address 13.1.1.3 255.255.255.0interface Serial0/1ip address 23.1.1.3 255.255.255.0router bgp 3no synchronizationbgp router-id 3.3.3.3network 3.3.3.0 mask 255.255.255.0network 33.33.33.0 mask 255.255.255.0neighbor 13.1.1.1 remote-as 4neighbor 23.1.1.2 remote-as 4no auto-summaryR4配置interface Loopback0ip address 4.4.4.4 255.255.255.0interface Serial0/1ip address 14.1.1.4 255.255.255.0interface FastEthernet1/0ip address 24.1.1.4 255.255.255.0router ospf 110router-id 4.4.4.4network 4.4.4.0 0.0.0.255 area 0network 14.1.1.0 0.0.0.255 area 0network 24.1.1.0 0.0.0.255 area 0router bgp 4no synchronizationbgp router-id 4.4.4.4neighbor 1.1.1.1 remote-as 4neighbor 1.1.1.1 update-source Loopback0neighbor 2.2.2.2 remote-as 4neighbor 2.2.2.2 update-source Loopback0no auto-summary6、默认选路根据BGP选路原则第八条可以知道,R4到达3.3.3.0/24、33.33.33.0/24都是经过R2。7、全部修改邻居传过来的路由的weight值由前面可以R4到达3.3.3.0/24、33.33.33.0/24都是经过R2,我们通过修改Weight值将R4到达3.3.3.0/24、33.33.33.0/24都是经过R1。R4配置router bgp 4neighbor 1.1.1.1 weight 18、部分修改邻居传过来的路由的weight值R4到达3.3.3.0/24、33.33.33.0/24都是经过R2,我们通过修改Weight值将R4到达3.3.3.0/24经过R2、达到33.33.33.0/24都是经过R1。R4配置ip prefix-list 1 seq 5 permit 33.33.33.0/24route-map W permit 10match ip address prefix-list 1set weight 1route-map W permit 20router bgp 4neighbor 1.1.1.1 route-map W in看完上述内容,你们对BGP配置中Weight选路的示例分析有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注云编程开发博客行业资讯频道,感谢大家的支持。

相关推荐: 网络基础–静态路由+动态路由

说明:在用IP标示各个网络节点后,如果让相隔多个网络节点的两节点通信,需要“中间人”牵线,得一步一步告示某节点数据,要去对端节点一步步怎么走。静态路由:手工配置静态路由信息,在转发具有匹配目的地址的分组时能够根据路由信息使用专线接口或下一跳IP地址进行转发。优…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 02/06 10:59
下一篇 02/06 11:03