欢迎光临重庆协创IT国际认证中心!

收藏本站 .网站地图 .联系我们

20年认证人才培训品牌

咨询热线:

023-65111115
023-65111116
  • 重庆协创教育
  • 协创教育_IT培训
  • 协创教育_国际认证
  • previous
  • next
您所在的位置:首页 > 文章集萃

BGP后门链路(Backdoor)实际案例(配图+详细验证过程)

2011-8-29
投稿人:admin

Cisco提供一种方式强IGP路由优先于EBGP路由.这个概念也就是"后门链路"(backdoor link).EBGP路由可以标记为后门链路,它将设置这些路由的管理距离与BGP本地或200相同.因为这个管理距离要高于IGP,所以首选IGP路由.
 
以下是具体配置:
 
//// r1 ////DIV>
int lo0
  ip ad 1.1.1.1 255.255.255.0
 
int e1/0
  ip ad 192.1.1.1 255.255.255.0
 
router os 1
  network 0.0.0.0 255.255.255.255 a 0   //将所有接口宣告进OSPF
 
router bgp 200
  no syn  //关闭同步,同时也注定了全互连的拓扑
  neighbor 192.1.1.2 remote-as 200
  neighbor 192.1.1.2 update-source lo0  //以lo0接口IP作为更新源地址
 
 
//// r2 ////
int lo0
  ip ad 2.2.2.2 255.255.255.0
 
int e1/0
  ip ad 192.1.1.2 255.255.255.0
 
int e0/0
  ip ad 193.1.1.2 255.255.255.0
 
int e2/0
  ip ad 195.1.1.2 255.255.255.0
 
router os 1
  network 0.0.0.0 255.255.255.255 a 0  //宣告所有接口进OSPF
 
router bgp 200
  no syn
  neighbor 192.1.1.1 remote-as 200
  neighbor 192.1.1.1 update-source lo0
  neighbor 192.1.1.1 next-hop-self
  neighbor 195.1.1.5 remote-as 100
  network 192.1.1.0 mask 255.255.255.0
 
 
//// r3 ////
int lo0
  ip ad 3.3.3.3 255.255.255.0
 
int e0/0
  ip ad 193.1.1.3 255.255.255.0
 
int e1/0
  ip ad 194.1.1.3 255.255.255.0
 
int e3/0
  ip ad 196.1.1.3 255.255.255.0
 
router os 1
  netw 0.0.0.0 255.255.255.255 a 0
 
router bgp 300
  no syn
  neighbor 196.1.1.5 remote-as 100
  neighbor 194.1.1.4 remote-as 300
  neighbor 194.1.1.4 update-source lo0
  neighbor 194.1.1.4 next-hop-self
  network 194.1.1.0 mask 255.255.255.0
 
 
//// r4 ////
int lo0
  ip ad 4.4.4.4 255.255.255.0
 
int e0/0
  ip ad 194.1.1.3 255.255.255.0
router os 1
  network 0.0.0.0 255.255.255.255 a 0
 
router bgp 300
  no syn
  neighbor 194.1.1.3 remote-as 300
  neighbor 194.1.1.3 update-source lo0
  network 192.1.1.0 mask 255.255.255.0 backdoor
 

//// r5 ////
int lo0
  ip ad 5.5.5.5 255.255.255.0

int e2/0
  ip ad 195.1.1.5 255.255.255.0

int e3/0
  ip ad 196.1.1.5 255.255.255.0

router bgp 100
  no syn
  neighbor 195.1.1.2 remote-as 200
  neighbor 196.1.1.3 remote-as 300

 

验证:

//后门链路作用前
r2#sh ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*> 192.1.1.0        0.0.0.0                  0         32768 i
*> 194.1.1.0        195.1.1.5                              0 100 300 i
r2#
r2#
r2#
r2#sh ip ro bgp
B    194.1.1.0/24 [20/0] via 195.1.1.5, 00:00:49

 
r3#sh ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*> 192.1.1.0        196.1.1.5                              0 100 200 i
*> 194.1.1.0        0.0.0.0                  0         32768 i
r3#sh ip ro bgp
B    192.1.1.0/24 [20/0] via 196.1.1.5, 00:02:28
 
 
r3#sh ip ro             //后门链路作用前
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/21] via 193.1.1.2, 00:04:22, Ethernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 193.1.1.2, 00:04:22, Ethernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/11] via 194.1.1.4, 00:04:22, Ethernet1/0
C    196.1.1.0/24 is directly connected, Serial3/0
C    193.1.1.0/24 is directly connected, Ethernet0/0
B    192.1.1.0/24 [20/0] via 196.1.1.5, 00:00:06
O    195.1.1.0/24 [110/74] via 193.1.1.2, 00:04:22, Ethernet0/0
C    194.1.1.0/24 is directly connected, Ethernet1/0
 
 
 
//后门链路作用后
r3#sh ip ro
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/21] via 193.1.1.2, 00:06:38, Ethernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 193.1.1.2, 00:06:38, Ethernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/11] via 194.1.1.4, 00:06:38, Ethernet1/0
C    196.1.1.0/24 is directly connected, Serial3/0
C    193.1.1.0/24 is directly connected, Ethernet0/0
O    192.1.1.0/24 [110/20] via 193.1.1.2, 00:00:06, Ethernet0/0
O    195.1.1.0/24 [110/74] via 193.1.1.2, 00:06:38, Ethernet0/0
C    194.1.1.0/24 is directly connected, Ethernet1/0
 
出处:Cisco网站


您的评论

评论者: 请填写您的姓名,方便我们联系您
评论内容:
请填写您的评论内容, 内容不能超过200字哟!有您的支持,是我们不断前进的动力,感谢您的支持!
  
相关评论更多
Copyright: Chongqing Co-Founder of Network Technology Education Center (c) 2005-2021 All Rights
版权所有:重庆协创IT国际认证中心(c)2005-2011 All Rights 网站备案号:渝ICP备17014127号-1
地址:重庆市沙坪坝区小龙坎新街86号嘉多利广场11-7     联系电话:023-65111115   023-65111116
站长统计 技术支持:重庆网络推广专家