BGP联邦实验
R1在as 100里,R2R3R4在公有as234里,(R2R3在私有as65523里,R4在私有as65504里)R5在as500里。
实验步骤:
Setp1:底层配置,并且将as234的IGP部署好,需要通过lookback接口来建立邻居关系,所以在R2R3R4上起lo0
Setp2:部署as234联邦内IBGP的关系,在建立联邦BGP关系时,一定先做bgp confederation identifier此命令,因为R3有一个联邦内EBGP邻居,所以在R3上要用命令bgp confederation peers 65504 来指定联邦EBGP对等的as号码。
Setp3:建立联邦内EBGP关系需要注意bgp confederation peers命令。因为联邦内EBGP也是EBGP关系,所以需要nei
Setp4:创建lookback接口在R1上用于验证路由的传递。
R1(config)#int s2/1
R1(config-if)#ip add
R1(config-if)#no shu
R1(config-if)#do ping
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/75/104 ms
R1(config)#int lo0
R1(config-if)#ip add
R1(config)#router bgp 100
R1(config-router)#bgp router-id
R1(config-router)#no syn
R1(config-router)#no au
R1(config-router)#nei
R1(config-router)#network
*Jul 28 14:30:41.763: %BGP-5-ADJCHANGE: neighbor
R2(config)#int s2/1
R2(config-if)#ip add
R2(config-if)#no shu
R2(config-if)#int s2/2
R2(config-if)#ip add
R2(config-if)#no shu
R2(config-if)#do ping
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/48/136 ms
R2(config-if)#int lo0
R2(config-if)#ip add
R2(config)#router eigrp 90
R2(config-router)#net
R2(config-router)#net
R2(config-router)#net
R2(config-router)#no auto-summary
R2(config-router)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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
34.0.0.0/24 is subnetted, 1 subnets
D 34.0.0.0 [90/2681856] vi
C
D
D
C
C
45.0.0.0/24 is subnetted, 1 subnets
D 45.0.0.0 [90/3193856] vi
R2(config)#router bgp 65523
R2(config-router)#bgp router-id
R2(config-router)#no syn
R2(config-router)#no au
R2(config-router)#bgp confederation identifier 234
R2(config-router)#nei
R2(config-router)#nei
R2(config-router)#nei
*Jul 28 14:27:28.387: %BGP-5-ADJCHANGE: neighbor
R2(config-router)#
*Jul 28 14:30:35.935: %BGP-5-ADJCHANGE: neighbor
R2(config-router)#do sh ip bgp sum
BGP router identifier
BGP table version is 2, main routing table version 2
1 network entries using 101 bytes of memory
1 path entries using 48 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 233 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
R2(config-router)#do sh ip bgp
BGP table version is 2, local router ID is
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
*>
R3(config)#int s2/1
R3(config-if)#ip add
R3(config-if)#no shu
R3(config-if)#int s2/2
R3(config-if)#ip add 34.0.0.3 255.255.255.0
R3(config-if)#no shu
R3(config-if)#do ping 34.0.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/79/164 ms
R3(config-if)#int lo0
R3(config-if)#ip add
R3(config-if)#exit
R3(config)#router eigrp 90
R3(config-router)#net
*Jul 28 14:22:14.235: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 90: Neighbor
R3(config-router)#net 34.0.0.0
R3(config-router)#net
R3(config-router)#no auto-summary
R3(config-router)#exit
R3(config)#router bgp 65523
R3(config-router)#bgp router-id
R3(config-router)#no syn
R3(config-router)#no au
R3(config-router)#bgp confederation identifier 234
R3(config-router)#nei
R3(config-router)#nei
R3(config-router)#bgp confederation peers 65504
R3(config-router)#nei
R3(config-router)#nei
R3(config-router)#nei
*Jul 28 14:29:34.595: %BGP-5-ADJCHANGE: neighbor
R3(config-router)#do sh ip bgp sum
BGP router identifier
BGP table version is 2, main routing table version 2
1 network entries using 101 bytes of memory
1 path entries using 48 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 233 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
R3(config-router)#do sh ip bgp
BGP table version is 2, local router ID is
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
*>i
R4(config)#int s2/1
R4(config-if)#ip add 34.0.0.4 255.255.255.0
R4(config-if)#no shu
R4(config-if)#int s2/2
R4(config-if)#ip add 45.0.0.4 255.255.255.0
R4(config-if)#no shu
R4(config-if)#do ping 45.0.0.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 45.0.0.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/76/156 ms
R4(config-if)#int lo0
R4(config-if)#ip add
R4(config-if)#exit
R4(config)#router eigrp 90
R4(config-router)#net 34.0.0.0
*Jul 28 14:22:56.055: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 90: Neighbor 34.0.0.3 (Serial2/1) is up: new adjacency
R4(config-router)#net 45.0.0.0
R4(config-router)#net
R4(config-router)#no auto-summary
R4(config-router)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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
34.0.0.0/24 is subnetted, 1 subnets
C 34.0.0.0 is directly connected, Serial2/1
D
D
C
D
D
45.0.0.0/24 is subnetted, 1 subnets
C 45.0.0.0 is directly connected, Serial2/2
R4(config)#router bgp 65504
R4(config-router)#bgp router-id
R4(config-router)#no syn
R4(config-router)#no au
R4(config-router)#bgp confederation identifier 234
R4(config-router)#bgp confederation peers 65523
R4(config-router)#nei
R4(config-router)#nei
R4(config-router)#nei
*Jul 28 14:29:40.867: %BGP-5-ADJCHANGE: neighbor
R4(config-router)#nei 45.0.0.5 remote-as 500
*Jul 28 14:31:27.767: %BGP-5-ADJCHANGE: neighbor 45.0.0.5 Up
R4(config-router)#do sh ip bgp sum
BGP router identifier
BGP table version is 2, main routing table version 2
1 network entries using 101 bytes of memory
1 path entries using 48 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 233 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
45.0.0.5 4 500 4 5 2 0 0 00:00:17 0
R4(config-router)#do sh ip bgp
BGP table version is 2, local router ID is
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
*>
R5(config)#int s2/2
R5(config-if)#ip add 45.0.0.5 255.255.255.0
R5(config-if)#no shu
R5(config-if)#exit
R5(config)#router bgp 500
R5(config-router)#bgp router-id
R5(config-router)#nei 45.0.0.4 remote-as 234
*Jul 28 14:31:24.999: %BGP-5-ADJCHANGE: neighbor 45.0.0.4 Up
R5(config-router)#do sh ip bgp
BGP table version is 2, local router ID is
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
*>
|


车开往海边
博客统计信息
热门文章
最新评论
友情链接