BGP
多跳建立邻居实验总结
实验拓扑
:
R1#
interface Loopback0
ip address 1.1.1 .1 255.255.255.0
interface Serial2/1
ip address 12.0.0.1 255.255.255.0
router eigrp 100
network 12.0.0.0
auto-summary
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 1.1.1.0
network 1.1.1.0 mask 255.255.255.0
neighbor 23.0.0.3 remote-as 200
neighbor 23.0.0.3 ebgp-multihop 2
no auto-summary
=============================================
R2#
interface Serial2/1
ip address 12.0.0 .2 255.255.255.0
interface Serial2/2
ip address 23.0.0 .2 255.255.255.0
router eigrp 100
network 12.0.0 .0
network 23.0.0.0
auto-summary
!
ip classless
ip route 1.1.1.0 255.255.255.0 Serial2/1 //
可以用它来控制选路
ip route 3.3.3.0 255.255.255.0 Serial2/2
========================================
R3#
interface Loopback0
ip address 3.3.3 .3 255.255.255.0
interface Serial2/1
ip address 23.0.0.3 255.255.255.0
router eigrp 100
network 23.0.0 .0
router bgp 200
no synchronization
bgp log-neighbor-changes
network 3.3.3.0
network 3.3.3.0 mask 255.255.255.0
neighbor 12.0.0.1 remote-as 100
neighbor 12.0.0.1 ebgp-multihop 2
========================================================
R1#show ip route
1.0.0 .0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
3.0.0.0/24 is subnetted, 1 subnets
B 3.3.3.0 [20/0] vi a 23.0.0 .3, 00:18:17
D 23.0.0.0/8 [90/2681856] vi a 12.0.0 .2, 00:33:19, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
R1#
R1#show ip bgp
BGP table version is 3, local router ID is 1.1.1 .1
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 .0/24 0.0.0 .0 0 32768 i
*> 3.3.3 .0/24 23.0.0 .3 0 0 200 i
R2#show 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
1.0.0 .0/24 is subnetted, 1 subnets
S 1.1.1 .0 is directly connected, Serial2/1
3.0.0 .0/24 is subnetted, 1 subnets
S 3.3.3 .0 is directly connected, Serial2/2
23.0.0 .0/8 is variably subnetted, 2 subnets, 2 masks
C 23.0.0 .0/24 is directly connected, Serial2/2
D 23.0.0 .0/8 is a summary, 00:35:05, Null0
12.0.0 .0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0 .0/24 is directly connected, Serial2/1
D 12.0.0 .0/8 is a summary, 00:35:05, Null0
R3#show ip route
1.0.0 .0/24 is subnetted, 1 subnets
B 1.1.1 .0 [20/0] vi a 12.0.0 .1, 00:22:04
3.0.0 .0/24 is subnetted, 1 subnets
C 3.3.3 .0 is directly connected, Loopback0
23.0.0 .0/24 is subnetted, 1 subnets
C 23.0.0 .0 is directly connected, Serial2/1
D 12.0.0 .0/8 [90/2681856] vi a 23.0.0 .2, 00:35:08, Serial2/1
R3#show ip bgp
BGP table version is 3, local router ID is 3.3.3 .3
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 .0/24 12.0.0 .1 0 0 100 i
*> 3.3.3 .0/24 0.0.0 .0 0 32768 i
R1#ping 3.3.3 .3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3 .3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/176/216 ms
R1#tr
R1#traceroute 3.3.3 .3
Type escape sequence to abort.
Tracing the route to 3.3.3 .3
1 12.0.0 .2 68 msec 144 msec 60 msec
2 23.0.0 .3 204 msec * 204 msec