用户名: 密 码: 验证码:
你所在的位置: 主页>路由交换>思科技术> — [56cto网友尾巴原创]16.BGP后门backdoor

[56cto网友尾巴原创]16.BGP后门backdoor

时间:2009-01-02 来源: 作者:

 

如图所示:

R2位于AS 202 ,R3位于 AS 10101

概念:bgp后门是将特定的EBGP路由的管理距离从20修改为200(为IBGP管理距离)

R1配置:

router eigrp 100

 network 1.1.1.0 0.0.0.255

 network 12.1.1.0 0.0.0.255

 network 192.168.1.0

 no auto-summary

R2配置:

router eigrp 100

 network 2.2.2.0 0.0.0.255

 network 12.1.1.0 0.0.0.255

 network 23.1.1.0 0.0.0.255

 no auto-summary

router bgp 202

 no synchronization

 bgp log-neighbor-changes

 neighbor 23.1.1.2 remote-as 10101

 no auto-summary

R3配置:

router eigrp 100

 network 3.3.3.0 0.0.0.255

 network 23.1.1.0 0.0.0.255

 network 192.168.1.0

 no auto-summary

router bgp 10101

 no synchronization

 bgp log-neighbor-changes

 network 192.168.1.0

 neighbor 23.1.1.1 remote-as 202

 no auto-summary

R2上观察192.168.1.0/24的路由

r2#show ip route

1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:04:23, Serial1/0

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     23.0.0.0/24 is subnetted, 1 subnets

C       23.1.1.0 is directly connected, Serial1/1

     12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected, Serial1/0

B    192.168.1.0/24 [20/0] via 23.1.1.2, 00:02:21

发现显示的是B的路由 因为EBGP的管理距离是20小于EIGRP90

使用命令:

r3(config-router)#network 192.168.1.0 mask 255.255.255.0 backdoor

这个时侯EBGP的管理距离变为200

R2上观察192.168.1.0/24的路由

r2#show ip route

   1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/2297856] via 12.1.1.1, 00:02:49, Serial1/0

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     23.0.0.0/24 is subnetted, 1 subnets

C       23.1.1.0 is directly connected, Serial1/1

     12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected, Serial1/0

D    192.168.1.0/24 [90/2172416] via 23.1.1.2, 00:01:46, Serial1/1

                    [90/2172416] via 12.1.1.1, 00:01:46, Serial1/0