BGP-backdoor案例
原创
©著作权归作者所有:来自51CTO博客作者车开往海边的原创作品,请联系作者获取转载授权,否则将追究法律责任
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)#int f0/0
R1(config-if)#ip add 21.0.0 .1 255.255.255.0
R1(config-if)#no shu
R1(config-if)#int lo0
R1(config-if)#ip add 1.1.1 .1 255.255.255.255
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1 .1
R1(config-router)#net 12.0.0 .0 0.0.0.255 a 0
R1(config-router)#net 21.0.0 .0 0.0.0.255 a 0
R1(config-router)#net 1.1.1 .1 0.0.0.0 a 0
R1(config-router)#exit
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 200
R1(config-router)#nei 21.0.0 .2 remote-as 200
R1(config-router)#net 1.1.1 .1 mask 255.255.255.255
R1(config-if)#do clear ip bgp * s o
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 f0/0
R2(config-if)#ip add 21.0.0 .2 255.255.255.0
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2 .2
R2(config-router)#net 12.0.0 .0 0.0.0.255 a 0
R2(config-router)#net 21.0.0 .0 0.0.0.255 a 0
R2(config-router)#exit
R2(config)#router bgp 200
R2(config-router)#bgp router-id 2.2.2 .2
R2(config-router)#no syn
R2(config-router)#no au
R2(config-router)#nei 12.0.0 .1 remote-as 100
R2(config-router)#nei 21.0.0 .1 remote-as 100
R2(config-router)#do sh ip bgp sum
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
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 .1/32 21.0.0 .1 0 0 100 i
*> 12.0.0 .1 0 0 100 i
R2(config-router)#network 1.1.1 .1 mask 255.255.255.255 backdoor
R2(config-router)#do sh ip bgp
BGP table version is 3, 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
r 1.1.1 .1/32 21.0.0 .1 0 0 100 i
r> 12.0.0 .1 0 0 100 i
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
O 1.1.1 .1 [110/2] via 21.0.0 .1, 00:02:25, FastEthernet0/0
C 21.0.0 .0 is directly connected, FastEthernet0/0
C 12.0.0 .0 is directly connected, Serial2/1
R2(config-router)#no network 1.1.1 .1 mask 255.255.255.255 backdoor
R2(config-router)#do sh ip bgp
BGP table version is 4, 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 .1/32 21.0.0 .1 0 0 100 i
*> 12.0.0 .1 0 0 100 i
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
B 1.1.1 .1 [20/0] via 12.0.0 .1, 00:00:13
C 21.0.0 .0 is directly connected, FastEthernet0/0
C 12.0.0 .0 is directly connected, Serial2/1
R2(config-router)#do ping 1.1.1 .1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1 .1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/84/152 ms
R2(config-router)#
注:
R2(config-router)#network 1.1.1 .1 mask 255.255.255.255 backdoor
R2(config-router)#no network 1.1.1 .1 mask 255.255.255.255 backdoor
注意观察R2的ip路由变化,还有R2的bgp路由变化。
这是没有建立bgp时R1和R2之间跑完ospf后R2上学到的ip路由。
R2(config)#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
O 1.1.1 .1 [110/2] via 21.0.0 .1, 00:00:06, FastEthernet0/0
C 21.0.0 .0 is directly connected, FastEthernet0/0
C 12.0.0 .0 is directly connected, Serial2/1

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
干货收藏!Calico的BGP RouteReflector策略实践
了解容器网络组件Calico的BGP Route Reflector模式如何使用。
Calico RR模式 kubernetes Calico BGP 容器 -
bgp backdoor用法 bpbackup用法
ibbackup参考手册一.关于ibbackup1.注册相关ibbackup是一个收费的备份软件,在购买的时候,需要注册,比如填写使用该软件的主机名,然后,会自动把购买者填写的主机名写入到ibb
bgp backdoor用法 user perl 数据库 c