</p>
$ {* a/ C4 p3 c! T1 b4 h- }步骤三:配置静态路由
5 C; T# O8 N+ O: t
9 O4 b5 R/ o1 V# h0 m. I& yR2(config)# ip route 5.5.5.0 255.255.255.0 20.1.1.2 à因R2和R3运行在不同的AS,所以要指静态路由来达到可达性
/ B1 k7 h0 b! X+ B' pR3(config)# ip route 3.3.3.0 255.255.255.0 20.1.1.1 à同理
3 N2 y2 C+ c. X8 Y" _' @! a& u % T% Q4 s; y( B. H+ Y. ^3 |
+ x r# U% Q+ c' l& E' C0 q! L8 X步骤四:查看路由表
; ]) w6 _3 a4 T: Q9 S! \
[. I7 _6 I3 t% [R1#sh ip route
8 s# V7 K! a9 v5 TCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
: w8 E$ b d% ~& U" \ D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area" l" x- h( A9 c4 x
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2( x$ i6 Y7 H3 C+ b
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP" Q- z' u% q# Q/ i7 _6 |
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
, { i) v# J! r" j& V! ] * - candidate default, U - per-user static route, o - ODR0 }( U+ {" ^7 s( K h+ B5 ]% R) X
P - periodic downloaded static route
4 N Z% p1 r5 N* U0 A+ x4 H! E
: `" S, v- C, ^6 ^2 nGateway of last resort is not set
7 d' m: g5 _! R6 z
1 |! R& z, u* X8 J) C 1.0.0.0/24 is subnetted, 1 subnets
% |7 _) ?7 a9 L/ j) yC 1.1.1.0 is directly connected, Loopback0
# m+ u; \0 a* V/ N. F 2.0.0.0/24 is subnetted, 1 subnets* U$ p8 y* |, k: @' ?
C 2.2.2.0 is directly connected, Loopback1 v5 n0 u' t7 g2 ^
3.0.0.0/24 is subnetted, 1 subnets
0 P$ R: w2 }" Y G" x8 FD 3.3.3.0 [90/2297856] via 10.1.1.2, 00:09:13, Serial09 ]7 h/ H o! T7 ?3 O
4.0.0.0/24 is subnetted, 1 subnets
$ ~6 \" E, W) \5 ?+ X) i- _B 4.4.4.0 [200/0] via 3.3.3.3, 00:07:34 à学来了BGP路由条目
4 Q) O% |( F0 B! C; v- v 6.0.0.0/24 is subnetted, 1 subnets8 Q- G2 n5 Q% s, n: i* h
B 6.6.6.0 [200/0] via 3.3.3.3, 00:07:34
" l) {7 C$ c( b8 V4 M 10.0.0.0/24 is subnetted, 1 subnets4 G* t2 x$ {; O4 ~. S% C4 }
C 10.1.1.0 is directly connected, Serial06 }: G5 n, n- ?, r- H& y
4 C! |# b' O. w% hR2#sh ip route
% {2 L% e& q: v- i. L9 wCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
, j9 j& o% z# C) I1 N& H+ v7 | D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
" N7 g4 T# f; z# y" O/ c N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2$ F; V# D7 C0 ^
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
- `# C+ ^$ |% K, D9 { i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
3 B9 r* P9 g, ^) x& l0 W I. ]; T1 f0 K+ n * - candidate default, U - per-user static route, o - ODR
: H$ Q& R/ y2 g1 J7 U P - periodic downloaded static route5 ?+ [1 d2 B& @/ l) z4 j0 x
1 w$ x2 ^! L; p1 M: [6 r
Gateway of last resort is not set
q7 u- l4 g6 U. W! H; _
$ i% R4 ~* R* |1 E0 @2 w9 f3 I, c 1.0.0.0/24 is subnetted, 1 subnets8 E3 f; g, g7 ?/ Z: `5 F& C
D 1.1.1.0 [90/2297856] via 10.1.1.1, 00:14:09, Serial11 V4 ~: o" a# I. ]6 o& m/ q
2.0.0.0/24 is subnetted, 1 subnets3 Q0 N, F' t8 V( W8 i
B 2.2.2.0 [200/0] via 1.1.1.1, 00:14:05
W7 x/ j7 B& X4 S 3.0.0.0/24 is subnetted, 1 subnets
# ?" L' C- A0 F3 r2 S! ~C 3.3.3.0 is directly connected, Loopback0
! z+ b5 Q7 z4 R+ `4 b/ d" c 4.0.0.0/24 is subnetted, 1 subnets
2 r) O! z' j1 L& K" K6 u8 ]C 4.4.4.0 is directly connected, Loopback1' x: \' U& j- T! A5 ~
20.0.0.0/24 is subnetted, 1 subnets
' t& q7 a& H4 ^" D2 Q" f# }5 A2 oC 20.1.1.0 is directly connected, Serial0
+ h, L( t& G9 R& o$ e: ^ 5.0.0.0/24 is subnetted, 1 subnets+ V2 T$ @) v: E% T
S 5.5.5.0 [1/0] via 20.1.1.2, a0 K- L8 D% q6 k* K$ _+ b
6.0.0.0/24 is subnetted, 1 subnets
8 f7 S' G. Y* T. Y D; vB 6.6.6.0 [20/0] via 5.5.5.5, 00:18:07
4 `3 u( X# V7 f1 Q& X! J 10.0.0.0/24 is subnetted, 1 subnets
9 T/ I) I1 B9 e4 f5 X" sC 10.1.1.0 is directly connected, Serial1
, }1 P( @+ \1 M( y, c 1 B$ D& [4 B' i
R3#sh ip route( y$ r+ l" Y* G
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
& V) D7 {, L. e% i1 T1 C+ E D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area6 b" `" p3 B- x6 j. z: K" F2 B9 v
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
) e) ~1 j4 q7 J- Y E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
& m0 j d( w/ D3 v/ S i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
- D$ ]) c3 o) m6 {3 y% g+ Q * - candidate default, U - per-user static route, o - ODR
+ p# O3 M! X! _- T6 ^ P - periodic downloaded static route
& [$ m5 A, g% X- h/ u- q# l
' s# T) M/ d0 W. V$ tGateway of last resort is not set
! V8 R8 O7 @! |. Z9 {) L' B + a/ k: y% @; h* `+ J
2.0.0.0/24 is subnetted, 1 subnets
) N. i5 J# F$ p7 a& IB 2.2.2.0 [20/0] via 3.3.3.3, 00:18:062 f6 d/ H) [' |) a+ _( N- [2 I8 Y
3.0.0.0/24 is subnetted, 1 subnets
3 u( D- P; v z: ^5 r# [S 3.3.3.0 [1/0] via 20.1.1.1
$ |0 B$ f* _# V# m 4.0.0.0/24 is subnetted, 1 subnets
6 x" k" j# B; ~# [0 CB 4.4.4.0 [20/0] via 3.3.3.3, 00:22:07
6 G( T J0 ^( W& R" a 20.0.0.0/24 is subnetted, 1 subnets
1 T" l' ?% v( T* Z R% a* VC 20.1.1.0 is directly connected, Serial1# ~) I/ L1 {6 c9 d6 i
5.0.0.0/24 is subnetted, 1 subnets+ N% J/ O3 X' A
C 5.5.5.0 is directly connected, Loopback0
3 J" n, h/ h6 h9 N5 L 6.0.0.0/24 is subnetted, 1 subnets" P6 Q/ r! Y! l5 I' m
C 6.6.6.0 is directly connected, Loopback1
/ s8 y. `* ?3 e, S! d, K( D 10.0.0.0/24 is subnetted, 1 subnets3 p. h4 A( n' ]2 \2 l) q$ C
B 10.1.1.0 [20/0] via 3.3.3.3, 00:22:09
- H5 `& [. ]% Q& y5 X1 x$ ], F
* T/ s2 A) h3 y6 w; K
( o5 M' _" |! r% [步骤五:查看bgp 概要信息# Q. X: z" F L9 e F
; f# Q V" r6 u' IR1#sh ip bgp summary3 E% q1 ?0 u# a
BGP router identifier 2.2.2.2, local AS number 65001' h1 i0 r5 Z v* ]* t& P8 j$ S u5 I
7 h% d* Z' ?- A. z7 l0 PNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd8 H0 J+ C u- i' ?/ g2 b
3.3.3.3 4 65001 13 12 5 0 0 00:08:23 3/ | J$ C P% q: @
( X5 P1 J, w. T6 }# Q& y3 V+ O
R2#sh ip bgp summary
- ?7 x' ~ H4 U7 X2 {" \. x4 Y9 KBGP router identifier 4.4.4.4, local AS number 65001( ]- J u1 v" s. Y K% R/ G/ b
! F: u8 I' q5 d5 E9 MNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
7 K4 C+ f0 X2 m" m4 n+ i( r1.1.1.1 4 65001 18 19 5 0 0 00:14:41 2
( M4 N! L7 p/ a5.5.5.5 4 65002 22 23 5 0 0 00:18:42 1 |