BGP联邦实验

R1 as 100 里, R2R3R4 在公有 as234 里,( R2R3 在私有 as65523 里, R4 在私有 as65504 里) R5 as500 里。
实验步骤:
Setp1 :底层配置,并且将 as234 IGP 部署好,需要通过 lookback 接口来建立邻居关系,所以在 R2R3R4 上起 lo0 2.2.2 .2 lo0 3.3.3.3 lo0 4.4.4.4 并且要宣告在 eigrp ,底层 as234 eigrp
Setp2 :部署 as234 联邦内 IBGP 的关系,在建立联邦 BGP 关系时,一定先做 bgp confederation identifier 此命令,因为 R3 有一个联邦内 EBGP 邻居,所以在 R3 上要用命令 bgp confederation peers 65504 来指定联邦 EBGP 对等的 as 号码。
Setp3 :建立联邦内 EBGP 关系需要注意 bgp confederation peers 命令。因为联邦内 EBGP 也是 EBGP 关系,所以需要 nei 4.4.4 .4 ebgp-multihop   nei 3.3.3.3 ebgp-multihop
Setp4 :创建 lookback 接口在 R1 上用于验证路由的传递。
R1(config)#int s2/1
R1(config-if)#ip add 12.0.0 .1 255.255.255.0
R1(config-if)#no shu
R1(config-if)#do ping 12.0.0 .2
Sending 5, 100-byte ICMP Echos to 12.0.0 .2, timeout is 2 seconds:
!!!!!
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 1.1.1 .1 255.255.255.0
R1(config)#router bgp 100
R1(config-router)#bgp router-id 1.1.1 .1
R1(config-router)#no syn
R1(config-router)#no au
R1(config-router)#nei 12.0.0 .2 remote-as 234
R1(config-router)#network 1.1.1 .0 mask 255.255.255.0
*Jul 28 14:30:41.763: %BGP-5-ADJCHANGE: neighbor 12.0.0 .2 Up
 
 
R2(config)#int s2/1
R2(config-if)#ip add 12.0.0 .2 255.255.255.0
R2(config-if)#no shu
R2(config-if)#int s2/2
R2(config-if)#ip add 23.0.0 .2 255.255.255.0
R2(config-if)#no shu
R2(config-if)#do ping 23.0.0 .3
Sending 5, 100-byte ICMP Echos to 23.0.0 .3, timeout is 2 seconds:
!!!!!
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 2.2.2 .2 255.255.255.0
R2(config)#router eigrp 90
R2(config-router)#net 12.0.0 .0 0.0.0.255
R2(config-router)#net 23.0.0 .0 0.0.0.255
R2(config-router)#net 2.2.2 .0 0.0.0.255
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 - 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
 
     34.0.0.0/24 is subnetted, 1 subnets
D       34.0.0.0 [90/2681856] vi a 23.0.0 .3, 00:01:14, Serial2/2
     2.0.0 .0/24 is subnetted, 1 subnets
C       2.2.2 .0 is directly connected, Loopback0
     3.0.0 .0/24 is subnetted, 1 subnets
D       3.3.3 .0 [90/2297856] vi a 23.0.0 .3, 00:01:14, Serial2/2
     4.0.0 .0/24 is subnetted, 1 subnets
D       4.4.4 .0 [90/2809856] vi a 23.0.0 .3, 00:00:34, Serial2/2
     23.0.0 .0/24 is subnetted, 1 subnets
C       23.0.0 .0 is directly connected, Serial2/2
     12.0.0 .0/24 is subnetted, 1 subnets
C       12.0.0 .0 is directly connected, Serial2/1
     45.0.0.0/24 is subnetted, 1 subnets
D       45.0.0.0 [90/3193856] vi a 23.0.0 .3, 00:00:35, Serial2/2
R2(config)#router bgp 65523
R2(config-router)#bgp router-id 2.2.2 .2
R2(config-router)#no syn
R2(config-router)#no au
R2(config-router)#bgp confederation identifier 234
R2(config-router)#nei 3.3.3 .3 remote-as 65523
R2(config-router)#nei 3.3.3 .3 update-source lo0
R2(config-router)#nei 12.0.0 .1 remote-as 100
*Jul 28 14:27:28.387: %BGP-5-ADJCHANGE: neighbor 3.3.3 .3 Up
R2(config-router)#
*Jul 28 14:30:35.935: %BGP-5-ADJCHANGE: neighbor 12.0.0 .1 Up
R2(config-router)#do sh ip bgp sum
BGP router identifier 2.2.2 .2, local AS number 65523
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
3.3.3 .3         4 65523       7       8        2    0    0 00:03:51        0
12.0.0 .1        4   100       5       4        2    0    0 00:00:43        1
R2(config-router)#do sh ip bgp
BGP table version is 2, local router ID is 2.2.2 .2
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
*> 1.1.1 .0/24       12.0.0 .1                 0             0 100 i
 
 
R3(config)#int s2/1
R3(config-if)#ip add 23.0.0 .3 255.255.255.0
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 3.3.3 .3 255.255.255.0
R3(config-if)#exit
R3(config)#router eigrp 90
R3(config-router)#net 23.0.0 .0 0.0.0.255
*Jul 28 14:22:14.235: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 90: Neighbor 23.0.0 .2 (Serial2/1) is up: new adjacency
R3(config-router)#net 34.0.0.0 0.0.0 .255
R3(config-router)#net 3.3.3 .0 0.0.0.255
R3(config-router)#no auto-summary
R3(config-router)#exit
R3(config)#router bgp 65523
R3(config-router)#bgp router-id 3.3.3 .3
R3(config-router)#no syn
R3(config-router)#no au
R3(config-router)#bgp confederation identifier 234
R3(config-router)#nei 2.2.2 .2 remote-as 65523
R3(config-router)#nei 2.2.2 .2 update-source lo0
R3(config-router)#bgp confederation peers 65504
R3(config-router)#nei 4.4.4 .4 remote-as 65504
R3(config-router)#nei 4.4.4 .4 update-source lo0
R3(config-router)#nei 4.4.4 .4 ebgp-multihop
*Jul 28 14:29:34.595: %BGP-5-ADJCHANGE: neighbor 4.4.4 .4 Up
R3(config-router)#do sh ip bgp sum
BGP router identifier 3.3.3 .3, local AS number 65523
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
2.2.2 .2         4 65523       9       8        2    0    0 00:04:03        1
4.4.4 .4         4 65504       5       6        2    0    0 00:01:56        0
R3(config-router)#do sh ip bgp
BGP table version is 2, local router ID is 3.3.3 .3
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 1.1.1 .0/24       12.0.0 .1                 0    100      0 100 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 4.4.4 .4 255.255.255.0
R4(config-if)#exit
R4(config)#router eigrp 90
R4(config-router)#net 34.0.0.0 0.0.0 .255
*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 0.0.0 .255
R4(config-router)#net 4.4.4 .0 0.0.0.255
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 - 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
 
     34.0.0.0/24 is subnetted, 1 subnets
C       34.0.0.0 is directly connected, Serial2/1
     2.0.0 .0/24 is subnetted, 1 subnets
D       2.2.2 .0 [90/2809856] via 34.0.0.3, 00:01:27, Serial2/1
     3.0.0 .0/24 is subnetted, 1 subnets
D       3.3.3 .0 [90/2297856] via 34.0.0.3, 00:01:27, Serial2/1
     4.0.0 .0/24 is subnetted, 1 subnets
C       4.4.4 .0 is directly connected, Loopback0
     23.0.0 .0/24 is subnetted, 1 subnets
D        23.0.0 .0 [90/2681856] via 34.0.0.3, 00:01:27, Serial2/1
     12.0.0 .0/24 is subnetted, 1 subnets
D       12.0.0 .0 [90/3193856] via 34.0.0.3, 00:01:28, Serial2/1
     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 4.4.4 .4
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 3.3.3 .3 remote-as 65523
R4(config-router)#nei 3.3.3 .3 update-source lo0
R4(config-router)#nei 3.3.3 .3 ebgp-multihop
*Jul 28 14:29:40.867: %BGP-5-ADJCHANGE: neighbor 3.3.3 .3 Up
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 4.4.4 .4, local AS number 65504
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
3.3.3 .3         4 65523       7       6        2    0    0 00:02:04        1
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 4.4.4 .4
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
*> 1.1.1 .0/24       12.0.0 .1                 0    100      0 (65523) 100 i
 
 
 
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 5.5.5 .5
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 5.5.5 .5
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
*> 1.1.1 .0/24       45.0.0.4                               0 234 100 i
 

你可能感兴趣的:(职场,休闲,BGP,联邦实验)