注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 IB客座主编(四)美国西蒙公..
 帮助

建立BGP互连


2008-07-25 17:12:29
 标签:建立BGP互连   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://davidsergent.blog.51cto.com/195892/89630

建立BGP互连
前提:接口互通
1、  各路由器的配制如下:
R1(config)#router bgp 100
R1(config-router)#neig
R1(config-router)#neighbor 12.0.0.2 remote-as 200
R1(config-router)#neig
R1(config-router)#neighbor 15.0.0.5 remote-as 300
R1(config-router)#net
R1(config-router)#network 1.1.1.0 mask 255.255.255.0
R1(config-router)#end
 
R2(config)#router eigrp 100
R2(config-router)#net
R2(config-router)#network 23.0.0.0 0.0.0.0 
R2(config-router)#no au
R2(config-router)#exit
R2(config)#
R2(config)#router bgp 200
R2(config-router)#neighbor 23.0.0.3 remote-as 200
R2(config-router)#neighbor 12.0.0.1 remote-as 100
R2(config-router)#network 2.2.2.0 mask 255.255.255.0
R2(config-router)#end
 
R3(config)#router eigrp 100
R3(config-router)#no au
R3(config-router)#net 23.0.0.0 0.0.0.255
R3(config-router)#net 3.3.3.0 0.0.0.0
R3(config-router)#exit
R3(config)#
R3(config)#
R3(config)#router bgp 200
R3(config-router)#neighbor 23.0.0.2 remote-as 200
R3(config-router)#neighbor 34.0.0.4 remote-as 300
R3(config-router)#networ
R3(config-router)#network 3.3.3.0 mask 255.255.255.0
R3(config-router)#end
 
R4(config)#router eigrp 100
R4(config-router)#no au
R4(config-router)#net 4.4.4.0 0.0.0.0
R4(config-router)#net 45.0.0.0 0.0.0.0
R4(config-router)#exit
R4(config)#
R4(config)#
R4(config)#router bgp 300
R4(config-router)#neighbor 45.0.0.5 remote-as 300
R4(config-router)#neighbor 34.0.0.3 remote-as 200
R4(config-router)#network 4.4.4.0 mask 255.255.255.0
R4(config-router)#end
 
R5(config)#router eigrp 100
R5(config-router)#no au
R5(config-router)#net 45.0.0.0 0.0.0.0
R5(config-router)#net 5.5.5.0 0.0.0.0
R5(config-router)#exit
R5(config)# 
R5(config)#
R5(config)#
R5(config)#router bgp 300
R5(config-router)#neighbor 45.0.0.4 remote-as 300
R5(config-router)#neighbor 45.0.0.4 next-h
R5(config-router)#neighbor 15.0.0.1 remote-as 100
R5(config-router)#network 5.5.5.0 mask 255.255.255.0
R5(config-router)#end
 
2、  查看bgp建立情况
 
 
R1#sh ip bgp
BGP table version is 6, 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
*> 1.1.1.0/24       0.0.0.0                  0         32768 i
*  2.2.2.0/24       15.0.0.5                               0 300 200 i
*>                  12.0.0.2                 0             0 200 i
*  3.3.3.0/24       15.0.0.5                               0 300 200 i
*>                  12.0.0.2                               0 200 i
*> 4.4.4.0/24       15.0.0.5                               0 300 i
*> 5.5.5.0/24       15.0.0.5                 0             0 300 i
 
 
R2#sh ip bgp
BGP table version is 6, local router ID is 23.0.0.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
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*>i3.3.3.0/24       23.0.0.3                 0    100      0 i
*> 4.4.4.0/24       12.0.0.1                               0 100 300 i
* i                 34.0.0.4                 0    100      0 300 i
* i5.5.5.0/24       34.0.0.4                 0    100      0 300 i
*>                  12.0.0.1                               0 100 300 i
R2#
 
R3#sh ip bgp
BGP table version is 6, 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
*  1.1.1.0/24       34.0.0.4                               0 300 100 i
*>i                 23.0.0.2                 0    100      0 100 i
*>i2.2.2.0/24       23.0.0.2                 0    100      0 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i
* i4.4.4.0/24       23.0.0.2                 0    100      0 100 300 i
*>                  34.0.0.4                 0             0 300 i
* i5.5.5.0/24       23.0.0.2                 0    100      0 100 300 i
*>                  34.0.0.4                               0 300 i
R3#trac
 
R4(config)#do sh ip bgp
BGP table version is 7, 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       34.0.0.3                               0 200 100 i
*>i                 45.0.0.5                 0    100      0 100 i
* i2.2.2.0/24       45.0.0.5                 0    100      0 100 200 i
*>                  34.0.0.3                               0 200 i
* i3.3.3.0/24       45.0.0.5                 0    100      0 100 200 i
*>                  34.0.0.3                 0             0 200 i
*> 4.4.4.0/24       0.0.0.0                  0         32768 i
*>i5.5.5.0/24       45.0.0.5                 0    100      0 i
 
 
R5#sh ip bgp
BGP table version is 8, local router ID is 45.0.0.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       15.0.0.1                 0             0 100 i
*>i2.2.2.0/24       45.0.0.4                 0    100      0 200 i
*                   15.0.0.1                               0 100 200 i
*  3.3.3.0/24       15.0.0.1                               0 100 200 i
*>i                 45.0.0.4                 0    100      0 200 i
*>i4.4.4.0/24       45.0.0.4                 0    100      0 i
*> 5.5.5.0/24       0.0.0.0                  0         32768 i
R5#

本文出自 “davidsergent” 博客,请务必保留此出处http://davidsergent.blog.51cto.com/195892/89630





    文章评论
 
 

发表评论

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