Professional Documents
Culture Documents
Tc gi: L Vn Cng
I Autonomous Systems
(path)
Bng thng thp gia cc AS
H1
ra gia cc peer.
Khi quan h lng ging c thit lp, th chng s
trao i cc thng tin v BGP route. Sau khi vic trao
i thng tin c khi tao xong, th cc cp nht
thnh phn(incemental update) c gi i khi c
thng tin thay i trong mng ch khng truyn ton
b bng nh tuyn.
Peer truyn cc destinations m n c th thy c
bng cc thng tin cp nht cho cc Peer ca n.
Thng tin v kh nng n cc destination c trao
i, chng hn khi mt route tr nn khng n c
th BGP s cnh bo cho lng ging ca n v thng
tin ny bng thu hi(withdrawing) cc route sai v
thay i bng nh tuyn mi. H2
tha idl.
Established: ay l trng thi sau cng ca s tho
thun ca cc peer. BGP bt u trao i cc gi cp
nht vi cc peers ca n. Nu khng phi l 0 th hold
time s c reset li khi n nhn c thng tin cp
nht hay bn tin keepalive. Mi gi cp nht u c
kim tra li, nh trng hp li hay trng lp cc
thuc tnh. Nu c li c pht hin th mt bn tin
cnh bo (notification) c gi i cho Peer. Bt k
bn tin cnh bo no c nhn trong khi trng thi
Established lm cho BGP xo Peer dang nhn v tr
v trng thi Idle. Nu Hold time ht hn, hay mt bn
tin ch th ct kt ni nhn c t Peer, hay ngng s
kin c nhn th h thng s tr v trng thi Idle.
NLRI
Thay v truyn thng tin v mt ch c th n c
la Network v Subnet mask th BGP truyn NLRI, gm
Prefix v chiu di ca prefix. Prefix s miu t cho
dch c th n c v chiu di ca prefix l miu t
cho s lng bt ca subnet mask. Ex: NLRI<19,
192.168.1.0> miu t prefix 192.168.1.0, v chiu di
l 19 bit mask.
Withdraw Route : Bn tin ny cung cp mt danh sc
cc tuyn cp nht khng cn n c na v cn
phi thu hi hay xo ra khi bng nh tuyn ca BGP.
Mt bn tin cp nht khng bao gm thng tin NLRI
hay cc thng tin thuc tnh th n ch c dng cho
Withdraw H1
Cu Hnh BGP
1. C bn v cu hnh BGP
dng lnh :
AS-number
Router(config)#router bgp
qung b route.
> i vi EBGP: th next hop l a ch
ip ca lng ging qung b route.
> i vi IBGP : Ni m route c qung t trong
cng AS th next hop l a ch ip ca lng ging qung
b route. Cn i vi route c qung b vo AS t
EBGP, th next hop t EBGP khng c thay i vo
trong IBGP, next hop l a ch ip ca EBGP lng ging
m n hc c.
> Khi mt route c qung b trong mt mi
trng da truy nhp(multi-access) nh Ethernet,
frame relay, th next hop l a ch IP ca cc cng
giao tip ca router.
RTC(config-router)#neighbor 10.10.10.1
next-hop-self
4. Thuc tnh AS_path : l mt thuc tnh Wellknow mandatory.
- N l tun t ca cc s AS m route truyn
qua n ch. AS u tin truyn route s them s
AS ca n v truyn di sang EBGP peer ca n. Sau
th mi AS m nhn route ny s truyn route ny
sang EBGP peer khc v gn them s AS ca n vo
u danh sch cc s AS. Danh sch cui cng s l
tt c cc s AS m route c truyn i qua, vi
s AS ca AS m khi to route ban u nm cui
danh sch. V danh sch ny c mang tun t cc s
AS m route i qua.
- BGP s dng thuc tnh AS_path ny trong cc cp
nht ca n m bo mt m hnh khng b loop
trn internet. Mi route c truyn i gia cc peer
s mang theo mt danh sch ca cc s AS m route
c truyn qua. Nu route c qung co n
mt AS m khi to ra n, v AS s thy chnh n l
mt phn trong danh sch cc s AS v n s khng
chp nhn route ny. BGP router s chn them s AS
ca n khi qung co bng nh tuyn cp nht ca n
sang mt AS khc. Khi route c truyn qua mt BGP
router c cng AS th danh sch AS_path s gi
nguyn khng thay i.
V d:
V d:
preference
preference
150
RTD(config)#router bgp 256
RTD(config-router)#neighbor 3.3.3.4 remote-as 300
RTD(config-router)#neighbor 128.213.11.1 remoteas 256
RTD(config-router)#bgp default local-preference
200
Cu hnh trn RTC lm cho n s thit lp tt c cc
cp nht t AS100 mt gi tr Local Preference l 150.
V t cu hnh trn RTD s lm cho n thit lp Local
Preference cho ton b cp nht t AS 300 mt gi tr
l 200. Bi v Local Prefernc ch trao i trong ni b
AS, nn c hai RTC, v RTD u xc nh rng cp
nht v mng 170.10.0.0 c gi tr Local Preference
cao hn khi n n t AS300 so vi khi n n t
AS100. Kt qu l ton b ti trong AS 256 n mng
170.10.0.0 u c truyn qua RTD.
Ta c th cu hnh bng cch s dng route map.
Route Map cung cp mt c ch uyn chuyn hn so
vi vic s dng default nh trn. Khi ta s dng lnh
bgp default local-preference cho RTD th tt c cc cp
nht nhn c bi RTD u c thit lp gi tr l
200. iu ny gm c cp nht t AS34. By gi ta s
cu hnh cho RTD s dng route map thit lp Local
Preference trn RTD ch cho nhng cp nht t AS300.
RTD(config)#ip as-path access-list 1 permit _300$
RTD(config)#route-map LP permit 10
RTD(config-route-map)#match as-path 1
RTD(config-route-map)#set local-preference 200
RTD(config)#route-map LP permit 20
RTD(config)#router bgp 256
RTD(config-router)#neighbor 3.3.3.4 remote- as
300
RTD(config-router)#neighbor 3.3.3.4 route-map LP
in
Thuc tnh Weight:
Thuc tnh Weight tng t nh Local Preference, n
s u tin s dng route c gi tr weight cao hn. Mt
iu khc y l cc thng s weight ch c ngha
ni b trong router thi m n s khng trao i vi
cc router khc. Thuc tnh weight nh hng n cc
route n t nhiu nh cung cp khc nhau ti mt
router, mt router c nhiu kt ni ti hai hay nhiu
nh cung cp. Thng s weight c tc ng cao hn
loopback
router(config)#ip prefix-list list-name [seq seqvalue] deny/permit network/len [ge ge-value] [le
le-value]
.
V d v cu hnh bng lnh ip prefix-list
RTA(config)#ip prefix-list GROVER permit
192.0.0.0/8 le 24
RTA(config)#ip prefix-list GROVER deny
192.0.0.0/8 ge 25
Theo v d ny th cu lnh u tin chp nhn tt
c cc route c cc chiu di mask ln n 24 bit vi
prefix 192.0.0.0/8, v t chi (deny) t c cc route
c th hn.
cu lnh th hai th n s kim tra prefix bt u vi
192 octet u tin. Sau quan tm n ch cc
route c th hn bng cch kim tra chiu di ca
mask. V th c 192.168.32.0/19 v 192.168.1.0/24
u c trng thi cho php(permit), nhng mng
prefix 192.168.1.32/27 th khng bi v chiu di mask
ca n ln hn 25.
c ge v le c th c s dng chung theo lnh sau:
RTA(config)#ip prefix-list OSCAR permit 10.0.0.0/8
ge 16 le 24
Lnh ny permit tt c prefix trong mng 10.0.0.0/8
vi chiu di mask t 16 cho n 24 bits.
Mi prefix list c gn cho mt s th t, s ny c
gn mc nh hoc c gn bng tay. Bng cch
nh s, mt entry c th c chn vo ti bt k
im no ca list. iu ny quan trng v router kim
tra prefix list t tun t t nh n ln. Khi c mt
match xy ra th router s khng tip tc tt n cc
entry ca cc tun t sau na. Ta c th s dng lnh
show ip prefix-list kim tra.
S tun t ny s t ng c to ra v tng dn
tng bc +5. gi tr u tin c to ra trong prefix
list l 5 tip theo l 10, 15.. Nu cu hnh bng tay
mt gi tr v tip theo khng xc nh cc gi tr th
s th t cho entry s t ng tng ln theo bc +5.
V d gi tr u tin c xc nh l 3. v sau th
khng c tun t c ch nh cho cc entry khc th
s tun t s c tao ra l 8, 13, 18.v du:
Cu hnh Thc t
1. Cu hnh cho s 1
R1#show run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
no ip directed-broadcast
!
interface Ethernet0/0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0/0
ip address 192.168.1.210 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
clockrate 64000
!
router bgp 300
network 192.168.1.212
network 192.168.250.0
neighbor 192.168.1.209 remote-as 100
no auto-summary
!
ip classless
!
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
R2#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Ethernet0
ip address 192.168.1.226 255.255.255.252
interface Serial0
ip address 192.168.1.221 255.255.255.252
no fair-queue
clockrate 64000
!
interface Serial1
ip address 192.168.1.209 255.255.255.252
!
router bgp 100
no synchronization
network 192.168.1.224 mask 255.255.255.252
neighbor 192.168.1.197 remote-as 100
neighbor 192.168.1.210 remote-as 300
neighbor 192.168.1.222 remote-as 100
R3#show runn
Building configuration...
!
interface Ethernet0/0
no ip address
shutdown
half-duplex
!
interface Serial0/0
ip address 192.168.1.222 255.255.255.252
no fair-queue
!
interface Serial0/1
ip address 192.168.1.198 255.255.255.252
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 192.168.1.196 mask 255.255.255.252
network 192.168.1.220 mask 255.255.255.252
neighbor 192.168.1.197 remote-as 100
neighbor 192.168.1.221 remote-as 100
!
ip classless
ip http server
!
!
!
!
voice-port 1/1/0
!
voice-port 1/1/1
!
dial-peer cor custom
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 5 15
!
end
R4#show runn
Current configuration : 904 bytes
!
version 12.2
!
mta receive maximum-recipients 0
!
!
!
!
interface Ethernet0/0
ip address 192.168.1.106 255.255.255.252
half-duplex
!
interface Serial0/0
ip address 192.168.1.197 255.255.255.252
clockrate 64000
!
interface Serial0/1
no ip address
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 192.168.1.204 mask 255.255.255.252
neighbor 192.168.1.198 remote-as 100
neighbor 192.168.1.205 remote-as 400
no auto-summary
!
no ip http server
ip classless
!
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R5#show runn
Building configuration...
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Loopback0
ip address 192.168.100.1 255.255.255.0
!
interface Loopback1
ip address 192.168.200.1 255.255.255.0
!
interface Loopback2
ip address 192.168.1.217 255.255.255.252
!
interface Ethernet0/0
ip address 192.168.1.225 255.255.255.252
half-duplex
!
interface Serial0/0
no ip address
shutdown
clockrate 64000
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 192.168.1.216
network 192.168.100.0
network 192.168.200.0
neighbor 192.168.1.226 remote-as 100
no auto-summary
!
no ip http server
ip classless
!
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
R6#show runn
Building configuration...
interface Loopback2
ip address 192.168.1.201 255.255.255.252
!
interface Ethernet0/0
ip address 192.168.1.205 255.255.255.252
half-duplex
!
interface Serial0/0
no ip address
shutdown
!
router bgp 400
no synchronization
bgp log-neighbor-changes
network 192.168.1.200
network 192.168.50.0
network 192.168.75.0
neighbor 192.168.1.206 remote-as 100
no auto-summary
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
By gi ta show ip bgp ca R4 :
R4#show ip bgp
Network
Weight Path
Next Hop
Metric LocPrf
* i192.168.1.196/30 192.168.1.198
100
0i
* 192.168.1.204/30 0.0.0.0
i
32768
* i192.168.1.220/30 192.168.1.198
100
0i
* 192.168.50.0
400 i
192.168.1.205
* 192.168.75.0
400 i
192.168.1.205
Network
Weight Path
Next Hop
Metric LocPrf
*>i192.168.1.196/30 192.168.1.222
100
0i
*i
192.168.1.222
100
0i
*> 192.168.100.0
0 200 i
192.168.1.225
*> 192.168.200.0
0 200 i
192.168.1.225
*> 192.168.250.0
0 300 i
192.168.1.210
Network
Weight Path
Next Hop
Metric LocPrf
*>i192.168.1.204/30 192.168.1.197
100
0i
* i192.168.50.0
0 400 i
192.168.1.205
100
* i192.168.75.0
0 400 i
192.168.1.205
100
* i192.168.100.0
0 200 i
192.168.1.225
100
* i192.168.200.0
0 200 i
192.168.1.225
100
* i192.168.250.0
0 300 i
192.168.1.210
100
R3 cha tt c cc mng vy
By gi ta xem th bng thit lp lng ging ca R4 v
R2 th xem
Neighbor
V AS MsgRcvd MsgSent
InQ OutQ Up/Down State/PfxRcd
192.168.1.198
12
0
4 100
48
00:14:58
192.168.1.205
12
0
400
50
00:09:35
192.168.1.221
0
0
4
0
100
0
never
TblVer
57
58
active
R2(config)#router ospf 1
R2(config-router)#net 192.168.1.220 0.0.0.3 area 0
R2(config-router)#net 192.168.1.196 0.0.0.3 area 0
R3(config)#router ospf 1
R4(config)#router ospf 1
R4(config-router)#net 192.168.1.196 0.0.0.3 area 0
Neighbor
V AS MsgRcvd MsgSent
OutQ Up/Down State/PfxRcd
192.168.1.198 4
100
0
0
00:08:59
2
74
TblVer InQ
87
15
192.168.1.205 4
400
0
0
00:27:36
2
68
78
15
192.168.1.221 4
100
0
0
00:00:33
5
15
Network
Weight Path
Next Hop
Metric LocPrf
r>i192.168.1.196/30 192.168.1.198
100
0i
*> 192.168.1.204/30 0.0.0.0
32768 i
* i192.168.1.208/30 192.168.1.221
100
0i
>i192.168.1.220/30 192.168.1.198
100
0i
* i192.168.1.224/30 192.168.1.221
100
0i
*> 192.168.50.0
400 i
192.168.1.205
*> 192.168.75.0
400 i
192.168.1.205
* i192.168.100.0
0 200 i
192.168.1.225
100
* i192.168.200.0
0 200 i
192.168.1.225
100
* i192.168.250.0
0 300 i
192.168.1.210
100
R3#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
00:01:27
B 192.168.200.0/24 [200/0] via 192.168.1.225,
00:03:03
B 192.168.250.0/24 [200/0] via 192.168.1.210,
00:14:01
B 192.168.50.0/24 [200/0] via 192.168.1.205,
00:01:27
192.168.1.0/30 is subnetted, 5 subnets
B
192.168.1.224 [200/0] via 192.168.1.221,
00:03:22
B
192.168.1.204 [200/0] via 192.168.1.197,
00:01:59
C
B
192.168.1.208 [200/0] via 192.168.1.221,
00:14:03
B 192.168.100.0/24 [200/0] via 192.168.1.225,
00:03:04
R3#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R3#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
00:00:07, Serial0/0
O E2 192.168.50.0/24 [110/1] via 192.168.1.197,
00:00:07, Serial0/1
192.168.1.0/30 is subnetted, 5 subnets
O E2 192.168.1.224 [110/1] via 192.168.1.221,
00:00:07, Serial0/0
O E2 192.168.1.204 [110/1] via 192.168.1.197,
00:00:07, Serial0/1
C
O
192.168.1.220 [110/128] via 192.168.1.198,
00:04:31, Serial0/1
O
192.168.1.220 [110/128] via 192.168.1.198,
00:06:11, Serial0/1
O E2 192.168.1.208 [110/1] via 192.168.1.198,
00:06:11, Serial0/1
O E2 192.168.100.0/24 [110/1] via 192.168.1.198,
00:06:11, Serial0/1
R4#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, 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
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
logging queue-limit 100
!
memory-size iomem 10
ip subnet-zero
!
!
no ip domain lookup
!
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
no voice hpi capture buffer
interface Serial0/0
ip address 192.168.1.254 255.255.255.252
clockrate 64000
!
router eigrp 1
passive-interface Serial0/0
network 192.168.1.0
network 192.168.192.0
network 192.168.193.0
network 192.168.194.0
network 192.168.195.0
no auto-summary
!
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 192.168.192.0 255.255.248.0
redistribute eigrp 1
neighbor 192.168.1.202 remote-as 100
neighbor 192.168.1.202 next-hop-self
neighbor 192.168.1.253 remote-as 200
no auto-summary
!
no ip http server
ip classless
!
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
password cisco
login
!
!
end
R2#show runn
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
process-max-time 200
!
interface Ethernet0
ip address 192.168.1.238 255.255.255.252
no ip directed-broadcast
!
interface Serial0
ip address 192.168.1.249 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
ip address 192.168.1.253 255.255.255.252
no ip directed-broadcast
!
router bgp 200
neighbor 192.168.1.237 remote-as 200
neighbor 192.168.1.237 next-hop-self
neighbor 192.168.1.250 remote-as 300
neighbor 192.168.1.254 remote-as 100
!
ip classless
no ip http server
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
login
!
end
R3#show runn
Building configuration...
Current configuration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
memory-size iomem 10
no ip domain-lookup
!
!
voice-port 1/1/0
!
voice-port 1/1/1
!
!
!
process-max-time 200
!
interface Ethernet0/0
no ip address
shutdown
!
interface Serial0/0
ip address 192.168.1.250 255.255.255.252
no ip mroute-cache
no fair-queue
clockrate 64000
!
interface Serial0/1
ip address 192.168.1.242 255.255.255.252
clockrate 64000
!
R3#show runn
Building configuration...
Current configuration:
!
version 11.3
no scheduler allocate
end
R4#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R4
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Ethernet0
ip address 192.168.1.237 255.255.255.252
interface Serial0
ip address 192.168.1.246 255.255.255.252
no fair-queue
!
interface Serial1
ip address 192.168.1.241 255.255.255.252
!
router bgp 200
neighbor 192.168.1.238 remote-as 200
neighbor 192.168.1.238 next-hop-self
neighbor 192.168.1.242 remote-as 300
neighbor 192.168.1.245 remote-as 100
!
ip classless
no ip http server
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4line vty 0 4
login
!
end
R5#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 192.168.196.1 255.255.255.0
interface Loopback1
ip address 192.168.197.1 255.255.255.0
!
interface Loopback2
ip address 192.168.198.1 255.255.255.0
!
interface Loopback3
ip address 192.168.199.1 255.255.255.0
!
interface Ethernet0
R3#show ip bgp
BGP table version is 58, local router ID is
192.168.1.250
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Path
Next Hop
192.168.1.249
0 200
192.168.1.249
0 200
192.168.1.249
*> 192.168.192.0
200 100 ?
*
100 ?
192.168.1.249
*
100 ?
0 200
192.168.1.241
0 200
192.168.1.241
192.168.1.249
*> 192.168.195.0
200 100 ?
*
0 200 100 i
192.168.1.249
*> 192.168.194.0
200 100 ?
0 200
192.168.1.249
*> 192.168.193.0
200 100 ?
*
100 ?
0 200
192.168.1.241
*> 192.168.192.0/21
192.168.1.241
*
100 i
0 200
192.168.1.241
192.168.1.249
0 200
100 ?
*> 192.168.196.0
200 100 ?
*
100 ?
Network
Weight Path
Metric LocPrf
192.168.1.241
192.168.1.249
0 200
192.168.1.241
192.168.1.249
*> 192.168.199.0
200 100 ?
*
100 ?
0 200
Next Hop
*> 192.168.198.0
200 100 ?
*
100 ?
192.168.1.249
*> 192.168.197.0
200 100 ?
*
100 ?
192.168.1.241
0 200
192.168.1.241
192.168.1.249
0 200
R2#show ip bgp
BGP table version is 43, local router ID is
192.168.1.253
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
Metric LocPrf
* i192.168.1.200/30 192.168.1.237
0 100 ?
100
*>
100 ?
192.168.1.254
* i192.168.1.244/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
100
2195456
* i192.168.1.252/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
* i192.168.192.0
0 100 ?
*>
100 ?
100
192.168.1.237
192.168.1.254
100
* i192.168.192.0/21 192.168.1.237
100
0 100 i
*>
i
192.168.1.254
* i192.168.193.0
0 100 ?
*>
100 ?
*>
100 ?
* i192.168.196.0
0 100 ?
*>
100
192.168.1.237
192.168.1.254
100
192.168.1.237
192.168.1.254
0 100
100
192.168.1.237
192.168.1.254
* i192.168.195.0
0 100 ?
*>
100 ?
192.168.1.237
192.168.1.254
* i192.168.194.0
0 100 ?
100
409600
100 ?
Network
Path
Next Hop
* i192.168.197.0
0 100 ?
*>
100 ?
100
409600
192.168.1.237
192.168.1.254
* i192.168.199.0
0 100 ?
*>
100 ?
192.168.1.237
192.168.1.254
* i192.168.198.0
0 100 ?
*>
100 ?
100
409600
192.168.1.237
192.168.1.254
100
409600
R5(config-router)#aggregate-address 192.168.192.0
255.255.248.0 summary-only
Network
Weight Path
Next Hop
Metric LocPrf
*>i192.168.1.200/30 192.168.1.201
100
0?
*>i192.168.1.244/30 192.168.1.201
100
0?
2195456
*>i192.168.1.252/30 192.168.1.201
100
0?
s>i192.168.192.0
0?
192.168.1.201
100
100
0i
192.168.1.201
s>i192.168.193.0
0?
192.168.1.201
100
s>i192.168.194.0
0?
192.168.1.201
100
s>i192.168.195.0
0?
192.168.1.201
100
s>i192.168.196.0
100
0?
192.168.1.201
409600
s>i192.168.197.0
100
0?
192.168.1.201
409600
s>i192.168.198.0
100
0?
192.168.1.201
409600
s>i192.168.199.0
100
0?
192.168.1.201
409600
192.168.199.0/24 u ch c mt ng i n AS
100.
R3#show ip bgp
BGP table version is 129, local router ID is
192.168.1.250
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Path
Next Hop
192.168.1.249
0 200
192.168.1.249
0 200
192.168.1.249
*> 192.168.192.0
200 100 ?
0 200
192.168.1.249
192.168.1.249
*> 192.168.193.0
192.168.1.249
0 200
200 100 ?
*> 192.168.194.0
200 100 ?
192.168.1.249
*> 192.168.195.0
200 100 ?
192.168.1.249
*> 192.168.196.0
200 100 ?
192.168.1.249
*> 192.168.197.0
200 100 ?
192.168.1.249
*> 192.168.198.0
200 100 ?
192.168.1.249
*> 192.168.199.0
200 100 ?
192.168.1.249
R5#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
network 192.168.1.0
network 192.168.196.0
network 192.168.197.0
network 192.168.198.0
network 192.168.199.0
no auto-summary
no eigrp log-neighbor-changes
!
router bgp 100
no synchronization
aggregate-address 192.168.192.0 255.255.248.0
redistribute eigrp 1
neighbor 192.168.1.201 remote-as 100
neighbor 192.168.1.201 next-hop-self
neighbor 192.168.1.246 remote-as 200
neighbor 192.168.1.246 send-community
neighbor 192.168.1.246 route-map COMMUNITY out
!
ip classless
no ip http server
!
access-list 101 permit ip host 192.168.192.0 host
255.255.248.0
route-map COMMUNITY permit 1
no service password-encryption
!
hostname R1
!
logging queue-limit 100
!
memory-size iomem 10
ip subnet-zero
!
!
no ip domain lookup
!
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Loopback0
ip address 192.168.192.1 255.255.255.0
!
interface Loopback1
ip address 192.168.193.1 255.255.255.0
!
interface Loopback2
ip address 192.168.194.1 255.255.255.0
!
interface Loopback3
ip address 192.168.195.1 255.255.255.0
!
interface Ethernet0/0
ip address 192.168.1.201 255.255.255.252
half-duplex
!
interface Serial0/0
ip address 192.168.1.254 255.255.255.252
clockrate 64000
!
router eigrp 1
passive-interface Serial0/0
network 192.168.1.0
network 192.168.192.0
network 192.168.193.0
network 192.168.194.0
network 192.168.195.0
no auto-summary
!
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 192.168.192.0 255.255.248.0
redistribute eigrp 1
neighbor 192.168.1.202 remote-as 100
neighbor 192.168.1.202 next-hop-self
neighbor 192.168.1.253 remote-as 200
neighbor 192.168.1.253 send-community
neighbor 192.168.1.253 route-map COMMUNITY out
no auto-summary
!
no ip http server
ip classless
!
!
!
access-list 101 permit ip host 192.168.192.0 host
255.255.248.0
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
password cisco
login
!
!
end
- ODR
P - periodic downloaded static route
192.168.1.254, 00:03:37
B
192.168.1.200/30 [20/0] via 192.168.1.254,
00:03:37
B 192.168.192.0/21 [20/0] via 192.168.1.254,
00:03:37
R2#show ip bgp
BGP table version is 124, local router ID is
192.168.1.253
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
*> 192.168.1.0
100 ?
*i
?
Metric LocPrf
192.168.1.254
192.168.1.237
100
* i192.168.1.200/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
100
* i192.168.1.244/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
100
2195456
* i192.168.1.252/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
*> 192.168.192.0
0 100
192.168.1.254
100
0 100 ?
*i
100 ?
192.168.1.237
409600
100
*i
100 ?
*i
100 ?
Network
Path
409600
Next Hop
100
409600
192.168.1.254
192.168.1.237
0 100
192.168.1.254
192.168.1.237
*> 192.168.195.0
0 100 ?
100
192.168.1.254
192.168.1.237
*> 192.168.194.0
0 100 ?
*i
100 ?
192.168.1.237
*> 192.168.193.0
0 100 ?
100
409600
100
192.168.1.237
100
0 100
100
0 100
100
0 100
192.168.1.237
192.168.1.237
?
*> 192.168.199.0 192.168.1.254
409600
0 100 ?
*i
?
192.168.1.237
100
0 100
R3#show ip bgp
BGP table version is 41, local router ID is
192.168.1.250
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Path
Next Hop
R3#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
R1#show run
Building configuration...
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
logging queue-limit 100
!
memory-size iomem 10
ip subnet-zero
!
!
no ip domain lookup
!
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
!
!
interface Serial0/0
ip address 192.168.1.254 255.255.255.252
clockrate 64000
!
router eigrp 1
passive-interface Serial0/0
network 192.168.1.0
network 192.168.192.0
network 192.168.193.0
network 192.168.194.0
network 192.168.195.0
no auto-summary
!
router bgp 100
no synchronization
bgp log-neighbor-changes
aggregate-address 192.168.192.0 255.255.248.0
redistribute eigrp 1
neighbor 192.168.1.202 remote-as 100
neighbor 192.168.1.202 next-hop-self
neighbor 192.168.1.253 remote-as 200
neighbor 192.168.1.253 send-community
neighbor 192.168.1.253 route-map COMMUNITY out
no auto-summary
!
no ip http server
ip classless
!
!
!
ip prefix-list summary seq 1 permit
192.168.192.0/21
!
access-list 101 permit ip host 192.168.192.0 host
255.255.248.0
!
route-map COMMUNITY permit 1
match ip address prefix-list summary
set community none
!
route-map COMMUNITY permit 10
set community no-export
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
password cisco
login
!
!
end
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Loopback0
ip address 192.168.192.1 255.255.255.0
!
interface Loopback1
ip address 192.168.193.1 255.255.255.0
!
interface Loopback2
ip address 192.168.194.1 255.255.255.0
!
interface Loopback3
ip address 192.168.195.1 255.255.255.0
!
interface Ethernet0/0
ip address 192.168.1.201 255.255.255.252
half-duplex
!
interface Serial0/0
ip address 192.168.1.254 255.255.255.252
clockrate 64000
!
router eigrp 1
passive-interface Serial0/0
network 192.168.1.0
network 192.168.192.0
network 192.168.193.0
network 192.168.194.0
network 192.168.195.0
no auto-summary
!
router bgp 100
no synchronization
bgp log-neighbor-changes
!
!
end
R5#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 192.168.196.1 255.255.255.0
interface Loopback1
ip address 192.168.197.1 255.255.255.0
!
interface Loopback2
ip address 192.168.198.1 255.255.255.0
!
interface Loopback3
ip address 192.168.199.1 255.255.255.0
!
interface Ethernet0
ip address 192.168.1.202 255.255.255.252
!
interface Serial0
ip address 192.168.1.245 255.255.255.252
no fair-queue
clockrate 64000
!
interface Serial1
no ip address
clockrate 64000
!
router eigrp 1
passive-interface Serial1
network 192.168.1.0
network 192.168.196.0
network 192.168.197.0
network 192.168.198.0
network 192.168.199.0
no auto-summary
no eigrp log-neighbor-changes
!
router bgp 100
no synchronization
aggregate-address 192.168.192.0 255.255.248.0
suppress-map suppress
redistribute eigrp 1
neighbor 192.168.1.201 remote-as 100
neighbor 192.168.1.201 next-hop-self
neighbor 192.168.1.246 remote-as 200
neighbor 192.168.1.246 send-community
neighbor 192.168.1.246 route-map COMMUNITY out
!
ip classless
no ip http server
!
!
ip prefix-list summary seq 1 permit 192.168.192.0/21
access-list 1 permit 192.168.192.0 0.0.3.255
access-list 1 permit 192.168.199.0 0.0.0.255
access-list 101 permit ip host 192.168.192.0 host
255.255.248.0
route-map suppress permit 1
match ip address 1
!
route-map COMMUNITY permit 1
match ip address prefix-list summary
set community none
!
route-map COMMUNITY permit 10
set community no-export
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
login
!
end
Network
Weight Path
Next Hop
*> 192.168.1.0
?
Metric LocPrf
0.0.0.0
32768
*>i192.168.1.200/30 192.168.1.201
100 0 ?
*>i192.168.1.244/30 192.168.1.201
100 0 ?
2195456
*>i192.168.1.252/30 192.168.1.201
100 0 ?
s> 192.168.192.0
32768
?
si
192.168.1.201
192.168.1.201
409600
100
192.168.1.201
s> 192.168.193.0
32768 ?
si
si
192.168.1.201
192.168.1.201
s> 192.168.194.0
32768 ?
0 i
409600
192.168.1.201
192.168.1.201
100
100
0 ?
409600
100
s> 192.168.195.0
32768
?
192.168.1.201
409600
*> 192.168.196.0
32768
?
0.0.0.0
*> 192.168.197.0
32768
?
0.0.0.0
*> 192.168.198.0
32768
?
0.0.0.0
s> 192.168.199.0
?
0.0.0.0
0 ?
32768
Network
Weight Path
Next Hop
*> 192.168.1.0
100 ?
*i
?
Metric LocPrf
192.168.1.254
192.168.1.237
100
* i192.168.1.200/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
100
* i192.168.1.244/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
100
2195456
* i192.168.1.252/30 192.168.1.237
0 100 ?
*>
100 ?
192.168.1.254
*> 192.168.192.0
0 100 ?
100
192.168.1.254
* i192.168.192.0/21 192.168.1.237
0 100 i
*>
i
192.168.1.254
100
0 100
*> 192.168.193.0
0 100 ?
192.168.1.254
*> 192.168.194.0
0 100 ?
192.168.1.254
* i192.168.196.0
0 100 ?
0 100
192.168.1.237
100
* i192.168.197.0
0 100 ?
192.168.1.237
100
* i192.168.198.0
0 100 ?
192.168.1.237
100
Network
Weight Path
Next Hop
* i192.168.1.0
100 ?
*>
100 ?
Metric LocPrf
192.168.1.238
192.168.1.245
100
192.168.1.238
100
0 100
192.168.1.238
2195456
100
192.168.1.238
* i192.168.192.0
192.168.1.238
100
0 100
100
0 100 ?
*> 192.168.192.0/21 192.168.1.245
0 100 i
*i
i
192.168.1.238
100
0 100
* i192.168.193.0
0 100 ?
192.168.1.238
100
* i192.168.194.0
0 100 ?
192.168.1.238
100
*> 192.168.196.0
0 100 ?
192.168.1.245
*> 192.168.197.0
0 100 ?
192.168.1.245
*> 192.168.198.0
0 100 ?
192.168.1.245
R3#show ip bgp
BGP table version is 52, local router ID is
192.168.1.250
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Path
Next Hop
192.168.1.249
0 200
Preference cao hn
Tng t th trn R6 ta s thit lp cc
route i n AS 75 c Local Prefrnc l 400, cc route
cn li l 100
R1#show run
Building configuration...
Current configuration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
!
memory-size iomem 10
no ip domain-lookup
!
!
!
!
process-max-time 200
!
interface Loopback0
ip address 10.20.0.1 255.255.0.0
!
interface Loopback1
ip address 172.17.0.1 255.255.0.0
!
interface Loopback2
no ip address
!
interface Loopback3
ip address 192.168.50.1 255.255.255.0
!
interface Ethernet0/0
ip address 10.10.10.1 255.255.255.248
!
interface Serial0/0
ip address 192.168.11.1 255.255.255.0
no ip mroute-cache
no fair-queue
!
router rip
network 10.0.0.0
network 172.17.0.0
network 172.29.0.0
network 192.168.50.0
!
router bgp 50
redistribute rip
neighbor 10.10.10.2 remote-as 75
neighbor 10.10.10.3 remote-as 100
neighbor 10.10.10.4 remote-as 100
ip classless
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
no scheduler allocate
end
R2#show runn
Building configuration...
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Loopback0
ip address 172.18.0.1 255.255.0.0
!
interface Loopback1
ip address 192.168.75.1 255.255.255.0
!
interface Ethernet0/0
ip address 10.10.10.2 255.255.255.248
half-duplex
interface Serial0/0
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R4#show runn
Building configuration...
Current configuration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R4
!
!
memory-size iomem 10
no ip domain-lookup
!
!
voice-port 1/1/0
!
voice-port 1/1/1
!
!
!
process-max-time 200
!
interface Ethernet0/0
ip address 10.10.10.4 255.255.255.248
!
interface Serial0/0
ip address 192.168.1.26 255.255.255.252
no ip mroute-cache
no fair-queue
!
interface Serial0/1
ip address 192.168.1.9 255.255.255.252
!
!
router bgp 100
neighbor 10.10.10.1 remote-as 50
neighbor 10.10.10.2 remote-as 75
neighbor 192.168.1.10 remote-as 30
neighbor 192.168.1.25 remote-as 100
neighbor 192.168.1.25 next-hop-self
!
ip classless
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
no scheduler allocate
end
R5#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 192.168.2.1 255.255.255.0
interface Loopback1
ip address 192.168.100.1 255.255.255.0
!
interface Loopback2
ip address 172.29.1.1 255.255.255.0
!
interface Ethernet0
ip address 192.168.1.17 255.255.255.252
!
interface Serial0
no ip address
no fair-queue
clockrate 64000
!
interface Serial1
ip address 192.168.1.14 255.255.255.252
clockrate 64000
!
router ospf 1
log-adjacency-changes
network 172.29.1.0 0.0.0.255 area 0
network 192.168.1.16 0.0.0.3 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.100.0 0.0.0.255 area 0
!
router bgp 30
no synchronization
redistribute ospf 1
neighbor 192.168.1.13 remote-as 100
neighbor 192.168.1.13 route-map PREF in
neighbor 192.168.1.13 filter-list 1 out
neighbor 192.168.1.18 remote-as 30
Current configuration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R4
!
!
memory-size iomem 10
no ip domain-lookup
!
!
voice-port 1/1/0
!
voice-port 1/1/1
!
!
!
process-max-time 200
!
interface Ethernet0/0
ip address 10.10.10.4 255.255.255.248
!
interface Serial0/0
ip address 192.168.1.26 255.255.255.252
no ip mroute-cache
no fair-queue
!
interface Serial0/1
ip address 192.168.1.9 255.255.255.252
!
router isis
!
router bgp 100
neighbor 10.10.10.1 remote-as 50
neighbor 10.10.10.2 remote-as 75
neighbor 192.168.1.10 remote-as 30
neighbor 192.168.1.25 remote-as 100
!
ip classless
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
login
!
end
R5#show run
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 192.168.2.1 255.255.255.0
interface Loopback1
ip address 192.168.100.1 255.255.255.0
!
interface Loopback2
ip address 172.29.1.1 255.255.255.0
!
interface Ethernet0
ip address 192.168.1.17 255.255.255.252
!
interface Serial0
no ip address
no fair-queue
clockrate 64000
!
interface Serial1
ip address 192.168.1.14 255.255.255.252
clockrate 64000
!
router ospf 1
log-adjacency-changes
network 172.29.1.0 0.0.0.255 area 0
network 192.168.1.16 0.0.0.3 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.100.0 0.0.0.255 area 0
!
router bgp 30
no synchronization
redistribute ospf 1
neighbor 192.168.1.13 remote-as 100
neighbor 192.168.1.13 route-map PREF in
neighbor 192.168.1.13 filter-list 1 out
neighbor 192.168.1.18 remote-as 30
neighbor 192.168.1.18 next-hop-self
!
ip classless
no ip http server
ip as-path access-list 1 permit ^$
ip as-path access-list 2 permit _50$
!
route-map PREF permit 10
match as-path 2
set local-preference 200
!
route-map PREF permit 20
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
login
!
end
R6#show run
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R6
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 10.30.0.1 255.255.0.0
interface Loopback1
ip address 172.16.0.1 255.255.0.0
!
interface Loopback2
ip address 172.31.0.1 255.255.0.0
!
interface Ethernet0
R5#show ip bgp
BGP table version is 22, local router ID is
192.168.100.1
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
*> 10.0.0.0
0.0.0.0
*
50 ?
192.168.1.13
*i
192.168.1.18
*> 172.16.0.0
*i
* 172.18.0.0
100 75 i
32768 ?
200
0 100
100
0
100
192.168.1.13
*> 172.31.0.0
0.0.0.0
400
0.0.0.0
192.168.1.18
0?
200
192.168.1.18
*> 172.29.0.0
0?
32768 ?
192.168.1.13
*>i
75 i
*i
0.0.0.0
192.168.1.18
*> 172.17.0.0
100 50 ?
Metric LocPrf
0
0
32768 ?
100
0 100
0?
32768 ?
*i
192.168.1.18
*> 192.168.1.0
*i
0.0.0.0
*>i
75 ?
0?
32768 ?
100
0
192.168.1.18
0?
32768 ?
100
192.168.1.13
* 192.168.75.0
100 75 ?
0?
200
192.168.1.13
192.168.1.18
*> 192.168.100.0
?
*i
0.0.0.0
*> 192.168.50.0
0 100 50 ?
100
0
192.168.1.18
*> 192.168.2.0
*i
400
0.0.0.0
192.168.1.18
0 100
32768
100
0?
R6#show ip bgp
BGP table version is 21, local router ID is 172.31.0.1
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
* 10.0.0.0
50 ?
192.168.1.9
*>
*i
0.0.0.0
192.168.1.17
*> 172.16.0.0
0.0.0.0
Metric LocPrf
0 100
32768 ?
0
100
0
0?
32768 ?
*i
192.168.1.17
* 172.17.0.0
100 50 ?
192.168.1.9
*> 172.29.0.0
0.0.0.0
192.168.1.17
*> 172.31.0.0
192.168.1.17
* 192.168.50.0
100 50 ?
*>i
50 ?
32768 ?
100
0
0
100
0?
32768 ?
100
0
0?
32768 ?
0
0
0?
32768 ?
100
0?
192.168.1.9
192.168.1.17
*> 192.168.75.0
100 75 ?
192.168.1.9
*> 192.168.100.0
?
0.0.0.0
*i
0.0.0.0
192.168.1.17
0 100
400
0.0.0.0
192.168.1.17
*> 192.168.2.0
*i
200
0.0.0.0
*> 192.168.1.0
*i
0?
0
192.168.1.17
*> 172.18.0.0
100 75 i
*i
100
192.168.1.9
*>i
50 ?
*i
192.168.1.17
200
0 100
400
32768
100
0?
R1(config)#router rip
R1(config-router)#net 192.168.11.0
R2(config)#router rip
R2(config-router)#net 192.168.11.0
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, 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
masks
C
R2(config)#router bgp 75
R2(config-router)#network 172.17.0.0
R1(config)#router bgp 50
R1(config-router)#net 172.18.0.0
Ta c kt qu sau Trn R1 v R2
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * candidate default
U - per-user static route, o - ODR
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, 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
R2(config)#router bgp 75
R2(config-router)#net 172.17.0.0 backdoor
R1(config)#router bgp 50
R1(config-router)# net 172.18.0.0 backdoor
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 192.168.2.1 255.255.255.0
interface Loopback1
ip address 192.168.100.1 255.255.255.0
!
interface Loopback2
ip address 172.29.1.1 255.255.255.0
!
interface Ethernet0
ip address 192.168.1.17 255.255.255.252
!
interface Serial0
no ip address
no fair-queue
clockrate 64000
!
interface Serial1
ip address 192.168.1.14 255.255.255.252
clockrate 64000
!
router ospf 1
log-adjacency-changes
network 172.29.1.0 0.0.0.255 area 0
network 192.168.1.16 0.0.0.3 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.100.0 0.0.0.255 area 0
!
router bgp 30
no synchronization
redistribute ospf 1
neighbor 192.168.1.13 remote-as 100
neighbor 192.168.1.13 route-map PREF in
neighbor 192.168.1.13 route-map MED out
neighbor 192.168.1.13 filter-list 1 out
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
end
R6#show runn
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R6
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 10.30.0.1 255.255.0.0
interface Loopback1
ip address 172.16.0.1 255.255.0.0
!
interface Loopback2
ip address 172.31.0.1 255.255.0.0
!
interface Ethernet0
ip address 192.168.1.18 255.255.255.252
!
interface Serial0
ip address 192.168.1.10 255.255.255.252
no fair-queue
clockrate 64000
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.30.0.0 0.0.255.255 area 0
network 172.16.0.0 0.0.255.255 area 0
network 172.31.0.0 0.0.255.255 area 0
network 192.168.1.16 0.0.0.3 area 0
!
router bgp 30
no synchronization
redistribute ospf 1
neighbor 192.168.1.9 remote-as 100
neighbor 192.168.1.9 route-map PREF in
neighbor 192.168.1.9 route-map MED out
neighbor 192.168.1.9 filter-list 1 out
neighbor 192.168.1.17 remote-as 30
neighbor 192.168.1.17 next-hop-self
!
ip classless
no ip http server
ip as-path access-list 1 permit ^$
ip as-path access-list 2 permit _75$
!
access-list 1 permit 172.16.0.0
access-list 2 permit any
route-map PREF permit 10
match as-path 2
set local-preference 400
route-map PREF permit 20
!
route-map MED permit 10
match ip address 1
set metric 100
!
route-map MED permit 20
match ip address 2
set metric 200
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
end
R3#show ip bgp
BGP table version is 38, local router ID is
192.168.1.25
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
* 10.0.0.0
30 ?
192.168.1.14
Metric LocPrf
200
10.10.10.1
0 75 50 ?
*>
10.10.10.1
*i
192.168.1.26
*> 172.16.0.0
30 ?
*i
?
192.168.1.14
192.168.1.26
* 172.17.0.0
50 ?
0 50 ?
100
0 50 ?
200
100
100
10.10.10.1
0 75
*>
10.10.10.1
*i
192.168.1.26
*> 172.18.0.0
10.10.10.2
0 30
0 50 ?
100
0
0 50 ?
0
75 i
*
10.10.10.2
*i
192.168.1.26
*> 172.29.0.0
30 ?
*i
30 ?
0 50 75 i
0
192.168.1.14
192.168.1.26
*> 172.31.0.0
30 ?
*i
200
100
0 75 i
200
100
192.168.1.14
100
192.168.1.26
200
200
30 ?
*> 192.168.1.0
30 ?
*i
30 ?
192.168.1.26
*> 192.168.2.0
30 ?
*i
30 ?
192.168.1.14
192.168.1.14
192.168.1.26
* 192.168.50.0
50 ?
200
200
*i
192.168.1.26
10.10.10.2
10.10.10.2
*i
192.168.1.26
*i
100
0 50 ?
100
0 50 ?
0 50 75 ?
0
192.168.1.14
192.168.1.26
0 75
10.10.10.1
*> 192.168.100.0
0 30 ?
10.10.10.1
200
*>
*> 192.168.75.0
75 ?
100
100
0 75 ?
200
200
100
30 ?
R4#show ip bgp
BGP table version is 69, local router ID is
192.168.1.26
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Path
Next Hop
* 10.0.0.0
30 ?
192.168.1.10
200
*i
192.168.1.25
*>
10.10.10.1
*
* i172.16.0.0
30 ?
*>
* i172.17.0.0
50 ?
*>
*
* i172.18.0.0
75 i
100
0 75 50 ?
192.168.1.25
200
0 30 ?
0
100
0 50 ?
10.10.10.1
192.168.1.25
100
100
192.168.1.25
10.10.10.1
0 50 ?
0 50 ?
10.10.10.1
192.168.1.10
0 75 50 ?
0
100
10.10.10.2
*>
10.10.10.2
* i172.29.0.0
30 ?
192.168.1.10
*>i172.31.0.0
30 ?
192.168.1.10
*>
192.168.1.10
192.168.1.10
*>
200
200
100
100
0 30 ?
200
200
100
0 30 ?
0
100
0 50 ?
0 75 50 ?
192.168.1.25
100
0 50 75 ?
0
192.168.1.25
192.168.1.10
0 30 ?
10.10.10.2
* i192.168.100.0
0 30 ?
*>
200
10.10.10.1
10.10.10.2
100
0 30 ?
100
192.168.1.25
10.10.10.1
* i192.168.75.0
75 ?
*
200
192.168.1.25
* i192.168.50.0
50 ?
200
192.168.1.25
* i192.168.2.0
30 ?
*>
0 75 i
192.168.1.25
* i192.168.1.0
30 ?
*>
192.168.1.25
*>
0 50 75 i
0 75 ?
200
200
100
0 30 ?
R1#show runn
Building configuration...
no service password-encryption
!
hostname R1
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
no synchronization
bgp log-neighbor-changes
network 172.17.0.0
network 172.18.0.0
neighbor 172.30.1.2 remote-as 100
neighbor 172.30.1.2 ebgp-multihop 2
neighbor 172.30.1.2 update-source Loopback2
no auto-summary
!
ip http server
ip classless
ip route 172.30.1.2 255.255.255.255 FastEthernet0/0
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
R2#show runn
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
memory-size iomem 10
ip subnet-zero
no ip domain-lookup
!
!
!
!
!
interface Loopback0
ip address 172.30.1.2 255.255.255.255
no ip directed-broadcast
!
interface Loopback1
ip address 10.33.5.1 255.255.255.0
no ip directed-broadcast
!
interface Ethernet0/0
ip address 192.168.1.13 255.255.255.252
no ip directed-broadcast
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
clockrate 64000
!
router bgp 65510
no synchronization
bgp confederation identifier 100
network 10.33.5.0 mask 255.255.255.0
neighbor 172.30.1.1 remote-as 200
neighbor 172.30.1.1 ebgp-multihop 2
neighbor 172.30.1.1 update-source Loopback0
neighbor 172.30.1.3 remote-as 65510
neighbor 172.30.1.3 update-source Loopback0
neighbor 172.30.1.3 next-hop-self
!
ip classless
ip route 172.30.1.1 255.255.255.255 Ethernet0/0
ip route 172.30.1.3 255.255.255.255 Serial0/0
ip route 172.30.1.4 255.255.255.255 Serial0/0
!
!
!
line con 0
logging synchronous
transport input none
line aux 0
line vty 0 4
login
!
end
R3#show run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
memory-size iomem 10
ip subnet-zero
no ip domain-lookup
!
!
!
!
!
interface Loopback0
ip address 172.30.1.3 255.255.255.255
no ip directed-broadcast
!
interface Loopback1
ip address 10.33.4.1 255.255.255.0
no ip directed-broadcast
!
interface Ethernet0/0
ip address 192.168.1.5 255.255.255.252
no ip directed-broadcast
!
interface Serial0/0
ip address 192.168.1.2 255.255.255.252
no ip directed-broadcast
!
interface Serial0/1
no ip address
no ip directed-broadcast
shutdown
!
router bgp 65510
no synchronization
bgp confederation identifier 100
network 10.33.4.0 mask 255.255.255.0
neighbor 172.30.1.2 remote-as 65510
neighbor 172.30.1.2 update-source Loopback0
neighbor 172.30.1.2 route-reflector-client
neighbor 172.30.1.2 next-hop-self
neighbor 172.30.1.4 remote-as 65510
R4#show run
Building configuration...
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
logging queue-limit 100
!
memory-size iomem 10
ip subnet-zero
!
!
no ip domain lookup
!
mpls ldp logging neighbor-changes
!
!
!
!
!
!
!
!
bgp log-neighbor-changes
bgp confederation identifier 100
bgp confederation peers 65520
network 10.31.1.0 mask 255.255.255.0
neighbor 172.30.1.3 remote-as 65510
neighbor 172.30.1.3 update-source Loopback0
neighbor 172.30.1.3 next-hop-self
neighbor 172.30.1.5 remote-as 65520
neighbor 172.30.1.5 ebgp-multihop 2
neighbor 172.30.1.5 update-source Loopback0
neighbor 172.30.1.5 next-hop-self
no auto-summary
!
ip http server
ip classless
ip route 172.30.1.2 255.255.255.255 Ethernet0/0
ip route 172.30.1.3 255.255.255.255 Ethernet0/0
ip route 172.30.1.5 255.255.255.255 Serial0/0
!
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
end
R5#show run
Building configuration...
Current configuration:
!
version 11.1
service udp-small-servers
service tcp-small-servers
!
hostname R5
!
!
no ip domain-lookup
!
interface Loopback0
ip address 172.30.1.5 255.255.255.255
!
interface Loopback1
ip address 10.1.1.1 255.255.255.0
!
interface Ethernet0
ip address 192.168.1.17 255.255.255.252
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 192.168.1.10 255.255.255.252
!
router bgp 65520
no synchronization
bgp confederation identifier 100
bgp confederation peers 65510
network 10.1.1.0 mask 255.255.255.0
neighbor 172.30.1.4 remote-as 65510
neighbor 172.30.1.4 ebgp-multihop 2
neighbor 172.30.1.4 update-source Loopback0
neighbor 172.30.1.4 next-hop-self
neighbor 172.30.1.6 remote-as 300
neighbor 172.30.1.6 ebgp-multihop 2
neighbor 172.30.1.6 update-source Loopback0
!
no ip classless
ip route 172.30.1.4 255.255.255.255 Serial1
ip route 172.30.1.6 255.255.255.255 Ethernet0
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
end
R6#show run
Building configuration...
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R6
!
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface Loopback0
ip address 172.30.1.6 255.255.255.255
interface Loopback1
R1#show ip bgp
BGP table version is 93, local router ID is 172.30.1.1
Status codes: s suppressed, d damped, h history, *
Network
Weight Path
Next Hop
Metric LocPrf
*> 10.1.1.0/24
100 i
172.30.1.2
*> 10.31.1.0/24
100 i
172.30.1.2
*> 10.33.4.0/24
100 i
172.30.1.2
*> 10.33.5.0/24
100 i
172.30.1.2
*> 172.17.0.0
0.0.0.0
32768 i
*> 172.18.0.0
0.0.0.0
32768 i
*> 172.19.0.0
100 300 i
172.30.1.2
*> 172.20.0.0
100 300 i
172.30.1.2
R2#show ip bgp
BGP table version is 89, local router ID is 172.30.1.2
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
Metric LocPrf
*>i10.1.1.0/24
(65520) i
172.30.1.4
100
*>i10.31.1.0/24
i
172.30.1.4
100
*>i10.33.4.0/24
i
172.30.1.3
100
*> 10.33.5.0/24
0.0.0.0
32768 i
*> 172.17.0.0
200 i
172.30.1.1
*> 172.18.0.0
200 i
172.30.1.1
*>i172.19.0.0
(65520) 300 i
172.30.1.4
100
*>i172.20.0.0
(65520) 300 i
172.30.1.4
100
R3#show ip bgp
BGP table version is 41, local router ID is 172.30.1.3
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Weight Path
Next Hop
Metric LocPrf
*>i10.1.1.0/24
(65520) i
172.30.1.4
100
*>i10.31.1.0/24
i
172.30.1.4
100
*> 10.33.4.0/24
0.0.0.0
*>i10.33.5.0/24
i
172.30.1.2
32768 i
0
100
*>i172.17.0.0
200 i
172.30.1.2
100
*>i172.18.0.0
200 i
172.30.1.2
100
*>i172.19.0.0
(65520) 300 i
172.30.1.4
100
*>i172.20.0.0
(65520) 300 i
172.30.1.4
100
R4#show ip bgp
BGP table version is 57, local router ID is 172.30.1.4
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
Weight Path
Next Hop
Metric LocPrf
*> 10.1.1.0/24
(65520) i
172.30.1.5
*> 10.31.1.0/24
0.0.0.0
*>i10.33.4.0/24
i
172.30.1.3
100
*>i10.33.5.0/24
i
172.30.1.2
100
*>i172.17.0.0
200 i
172.30.1.2
100
32768 i
100
*>i172.18.0.0
200 i
172.30.1.2
100
*> 172.19.0.0
(65520) 300 i
172.30.1.5
100
*> 172.20.0.0
(65520) 300 i
172.30.1.5
100
R5#show ip bgp
BGP table version is 85, local router ID is 172.30.1.5
Status codes: s suppressed, d damped, h history, *
valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Path
Next Hop
*> 10.1.1.0/24
0.0.0.0
32768 i
*> 10.31.1.0/24
(65510) i
172.30.1.4
100
*> 10.33.4.0/24
(65510) i
172.30.1.4
100
*> 10.33.5.0/24
(65510) i
172.30.1.4
100
*> 172.17.0.0
(65510) 200 i
172.30.1.4
100
*> 172.18.0.0
(65510) 200 i
172.30.1.4
100
*> 172.19.0.0
300 i
172.30.1.6
*> 172.20.0.0
300 i
172.30.1.6
R6#show ip bgp
Network
Weight Path
Next Hop
Metric LocPrf
*> 10.1.1.0/24
100 i
172.30.1.5
*> 10.31.1.0/24
100 i
172.30.1.5
*> 10.33.4.0/24
100 i
172.30.1.5
*> 10.33.5.0/24
100 i
172.30.1.5
*> 172.17.0.0
100 200 i
172.30.1.5
*> 172.18.0.0
100 200 i
172.30.1.5
*> 172.19.0.0
0.0.0.0
32768 i
*> 172.20.0.0
0.0.0.0
32768 i