详细讲解BGP后门链路(配图+详细验证过程)

企业动态
详细讲解BGP后门链路(配图+详细验证过程)。

Cisco提供一种方式强IGP路由优先于EBGP路由.这个概念也就是"后门链路"(backdoor link).EBGP路由可以标记为后门链路,它将设置这些路由的管理距离与BGP本地或200相同.因为这个管理距离要高于IGP,所以***IGP路由.

以下是具体配置:

//// r1 ////

   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作为更新源地址
  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

【编辑推荐】

  1. CCNP:BGP协议***路径选择算法揭秘
  2. 6.3.5 配置和核实BGP
  3. CCNP901:BGP路由过滤及默认路由实验配置
责任编辑:夏雨 来源: 56CTO
相关推荐

2009-06-04 10:33:10

struts vali框架

2010-04-01 15:05:05

CentOS系统

2009-12-07 10:50:01

Cisco路由器配置

2010-04-29 10:15:01

Unix系统

2010-06-17 12:57:27

如何修复Grub

2009-09-25 17:03:29

Hibernate是什

2009-12-14 11:29:19

Linux查看命令

2009-12-21 11:22:37

Linux网络操作命令

2013-01-10 15:36:44

Android开发组件Intent

2011-07-06 10:32:07

Xcode

2021-01-04 05:42:48

数仓模型设计

2009-09-27 17:23:16

Hibernate应用

2015-08-25 10:28:38

前端图片延迟加载

2011-07-06 10:46:33

Xcode

2009-04-03 08:21:37

AndroidGoogle移动OS

2014-06-03 17:29:48

PPP路由器

2010-09-06 13:57:38

2009-10-12 16:23:17

RHEL4上安装Ora

2009-07-17 13:54:51

JDBC存储过程

2011-03-23 10:51:35

Finereport报表制作
点赞
收藏

51CTO技术栈公众号