注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 Exchange服务器系列课程之..
 帮助

BGP联邦实验


2007-07-28 23:31:45
 标签:BGP 联邦实验   [推送到技术圈]

R1as 100里,R2R3R4在公有as234里,(R2R3在私有as65523里,R4在私有as65504里)R5as500里。
实验步骤:
Setp1:底层配置,并且将as234IGP部署好,需要通过lookback接口来建立邻居关系,所以在R2R3R4上起lo0 2.2.2.2 lo0 3.3.3.3 lo0 4.4.4.4 并且要宣告在eigrp,底层as234eigrp
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] via 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] via 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] via 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] via 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
*>i1.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
 




    文章评论
 
2007-07-29 22:50:13
没有拓扑图啊?
抢个沙发,慢慢看

2007-07-30 09:08:00
写得不错,可惜没有拓扑和配置

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: