BGP-backdoor案例
R1(config)#int s2/1
R1(config-if)#ip add
R1(config-if)#no shu
R1(config-if)#int f0/0
R1(config-if)#ip add
R1(config-if)#no shu
R1(config-if)#int lo0
R1(config-if)#ip add
R1(config)#router ospf 1
R1(config-router)#router-id
R1(config-router)#net
R1(config-router)#net
R1(config-router)#net
R1(config-router)#exit
R1(config)#router bgp 100
R1(config-router)#bgp router-id
R1(config-router)#no syn
R1(config-router)#no au
R1(config-router)#nei
R1(config-router)#nei
R1(config-router)#net
R1(config-if)#do clear ip bgp * s o
R2(config)#int s2/1
R2(config-if)#ip add
R2(config-if)#no shu
R2(config-if)#int f0/0
R2(config-if)#ip add
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#router-id
R2(config-router)#net
R2(config-router)#net
R2(config-router)#exit
R2(config)#router bgp 200
R2(config-router)#bgp router-id
R2(config-router)#no syn
R2(config-router)#no au
R2(config-router)#nei
R2(config-router)#nei
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
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
*
*>
R2(config-router)#network
R2(config-router)#do sh ip bgp
BGP table version is 3, local router ID is
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
r>
R2(config-router)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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
C
C
R2(config-router)#no network
R2(config-router)#do sh ip bgp
BGP table version is 4, local router ID is
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
*
*>
R2(config-router)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
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
C
C
R2(config-router)#do ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/84/152 ms
R2(config-router)#
注:
R2(config-router)#network
R2(config-router)#no network
注意观察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 -
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
C
C 本文出自 51CTO.COM技术博客 |


车开往海边
博客统计信息
热门文章
最新评论
友情链接