BGP重分布进IGP-EIGRP
因為BGP通常擁有龐大的路由表,所以在將BGP路由表重分布進IGP時,很有可能導致IGP協議停止工作或路由器崩潰,所以為了預防此類事件的發生,慢慢的,IOS默認不允許將BGP重分布進IGP,但是并非所有BGP都不能重分布進IGP,為了放寬限制,默認情況下,只可以將從eBGP鄰居學習到的路由和本地路由重分布進IGP,也就是說iBGP路由是不能重分布進IGP的,但是可以手工調整允許將iBGP學習到的路由重分布進IGP。
配置BGP重分布進IGP
?
說明:
上圖中路由器R1,R2,R3配有Loopback地址,地址分別為:
R1? Loopback 0? 1.1.1.1/32
R2? Loopback 0? 2.2.2.2/32
R3? Loopback 0? 3.3.3.3/32
?
所有路由器之間運行OSPF,并將Loopback 0的地址發布到OSPF中,保證全網Loopback 0之間是可以通信的。
?
1.IGP保證全網Loopback 0互通
說明:此步略,請參見之前配置。
?
2.配置BGP
(1)配置R1的BGP
r1(config)#router bgp 1
r1(config-router)#bgp router-id 1.1.1.1
r1(config-router)#neighbor 2.2.2.2 remote-as 1
r1(config-router)#neighbor 2.2.2.2 update-source loopback 0
r1(config-router)#neighbor 3.3.3.3 remote-as 3
r1(config-router)#neighbor 3.3.3.3 update-source loopback 0
r1(config-router)#neighbor 3.3.3.3 ebgp-multihop
r1(config-router)#network 11.1.1.0 mask 255.255.255.0
說明:R1與R2建立iBGP鄰居,與R3建立eBGP鄰居。
?
?
(2)配置R2的BGP
r2(config)#router bgp 1
r2(config-router)#bgp router-id 2.2.2.2
r2(config-router)#neighbor 1.1.1.1 remote-as 1
r2(config-router)#neighbor 1.1.1.1 update-source loopback 0
r2(config-router)#network 22.2.2.0 mask 255.255.255.0
說明:R2與R1建立iBGP鄰居。
?
(3)配置R3的BGP
r3(config)#router bgp 3
r3(config-router)#bgp router-id 3.3.3.3
r3(config-router)#neighbor 1.1.1.1 remote-as 1
r3(config-router)#neighbor 1.1.1.1 update-source loopback 0
r3(config-router)#neighbor 1.1.1.1 ebgp-multihop
r3(config-router)#network 33.3.3.0 mask 255.255.255.0
說明:R3與R1建立eBGP鄰居。
?
(4)查看R1的BGP路由表
r1#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,
????????????? r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
?
?? Network????????? Next Hop??????????? Metric LocPrf Weight Path
*> 11.1.1.0/24????? 0.0.0.0????????????????? 0???????? 32768 i
*>i22.2.2.0/24????? 2.2.2.2????????????????? 0??? 100????? 0 i
*> 33.3.3.0/24????? 3.3.3.3????????????????? 0???????????? 0 3 i
r1#
說明:R1中包含本地路由11.1.1.0/24,iBGP路由22.2.2.0/24,eBGP路由33.3.3.0/24。
?
3.配置EIGRP
(1)在R1上配置EIGRP
r1(config)#router eigrp 100
r1(config-router)#no auto-summary
r1(config-router)#network 14.1.1.1 0.0.0.0
說明:在R1與R4之間建立EIGRP。
?
(2)在R4上配置EIGRP
r4(config)#router eigrp 100
r4(config-router)#no auto-summary
r4(config-router)#network 14.1.1.4 0.0.0.0
說明:在R4與R1之間建立EIGRP。
?
?
(3)查看R4的EIGRP鄰居
r4#sh ip eig neighbors
IP-EIGRP neighbors for process 100
H?? Address???????????????? Interface?????? Hold Uptime?? SRTT?? RTO? Q? Seq
??????????????????????????????????????????? (sec)???????? (ms)?????? Cnt Num
0?? 14.1.1.1??????????????? Se1/0??????????? 137 00:00:44 1590? 5000? 0? 2
r4#
說明:R4已經與R1正常建立EIGRP鄰居。
?
?
4.配置BGP重分布進EIGRP
(1)在R1上重分布BGP進EIGRP
r1(config)#router eigrp 100
r1(config-router)#redistribute bgp 1 metric 10000 100 255 1 1500
說明:R1將BGP重分布BGP進EIGRP。
?
(2)在R4上查看EIGRP路由
r4#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
?????? D - EIGRP, EX - EIGRP external, 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, U - per-user static route
?????? o - ODR, P - periodic downloaded static route
?
Gateway of last resort is not set
?
???? 33.0.0.0/24 is subnetted, 1 subnets
D EX??? 33.3.3.0 [170/2195456] via 14.1.1.1, 00:00:49, Serial1/0
???? 11.0.0.0/24 is subnetted, 1 subnets
D EX??? 11.1.1.0 [170/2195456] via 14.1.1.1, 00:00:49, Serial1/0
???? 14.0.0.0/24 is subnetted, 1 subnets
C?????? 14.1.1.0 is directly connected, Serial1/0
r4#
說明:默認情況下,R1只能將本地路由11.0.0.0/24和eBGP路由33.3.3.0/24重分布進IGP。
?
(3)允許將iBGP重分布進IGP
r1(config)#router bgp 1
r1(config-router)#bgp redistribute-internal
說明:配置BGP允許將iBGP重分布進IGP
?
(4)再次查看R4的EIGRP路由
r4#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
?????? D - EIGRP, EX - EIGRP external, 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, U - per-user static route
?????? o - ODR, P - periodic downloaded static route
?
Gateway of last resort is not set
?
???? 33.0.0.0/24 is subnetted, 1 subnets
D EX??? 33.3.3.0 [170/2195456] via 14.1.1.1, 00:01:15, Serial1/0
???? 22.0.0.0/24 is subnetted, 1 subnets
D EX??? 22.2.2.0 [170/2195456] via 14.1.1.1, 00:00:02, Serial1/0
???? 11.0.0.0/24 is subnetted, 1 subnets
D EX??? 11.1.1.0 [170/2195456] via 14.1.1.1, 00:01:15, Serial1/0
???? 14.0.0.0/24 is subnetted, 1 subnets
C?????? 14.1.1.0 is directly connected, Serial1/0
r4#
說明:配置允許將iBGP重分布進IGP后,就表示允許所有BGP路由重分布進IGP,所以R4從EIGRP收到BGP重分布進來的所有路由。
轉載于:https://blog.51cto.com/ericfu/1963547
總結
以上是生活随笔為你收集整理的BGP重分布进IGP-EIGRP的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: pt-table-checksum与pt
- 下一篇: 原创:襄阳城:一座城池,何以成为王朝“生