Ishni bajarish tartibi
BGP sinfsiz manzillashni qo'llab-quvvatlaydi va marshrutlash jadvallarini
qisqartirish uchun marshrutni umumlashtirishdan foydalanadi. Faraz qilaylik bizda
uchta avtonom tizim mavjud (9.1-rasm):
- AS50 faqat bitta BGP marshutizatorini (R1) o'z ichiga oladi, u AS500 bilan
bitta EBGP seansini o'rnatadi;
- AS500 uchta marshrutizatorni (R2, R3, R4) o'z ichiga oladi, ular IBGP to'liq
tarmoqli topologiyasini tashkil qiladi;
- AS5000 esa AS500 bilan ikkita seans o'rnatadigan bitta marshrutizatorni
(R5) o'z ichiga oladi.
9.1-rasm. Tadqiqot qilinayotgan tarmoq topologiyasi
R1 marshrutizatorida BGP ni sozlaymiz. AS50 jarayoni ishlayotgan bo'lishi
kerak va AS500 da R2 bilan seans o'rnatamiz.
[R1]interface Ethernet 0/0/0
[R1-Ethernet0/0/0]ip address 5.228.12.1 24
[R1]bgp 50
[R1-bgp]undo synchronization
[R1-bgp]undo summary automatic
[R1-bgp]peer 5.228.12.2 as-number 500
R2 marshrutizatorda AS500 ni sozlaymiz.
[R2]interface Ethernet 0/0/0
[R2-Ethernet0/0/0]ip address 5.228.12.2 24
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.23.2 24
[R2]interface Ethernet 0/0/1
[R2-Ethernet0/0/1]ip address 192.168.24.2 24
[R2]bgp 500
[R2-bgp]undo synchronization
[R2-bgp]undo summary automatic
[R2-bgp]peer 5.228.12.1 as-number 50
AS50 va AS500 oralig'idagi EBGP seansini tekshiramiz. Buning uchun
“display bgp peer” buyrug’idan foydalanamiz.
[R1-bgp]display bgp peer
BGP local router ID : 5.228.12.1
Local AS number : 50
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
5.228.12.2 4 500 4 5 0 00:02:24 Established 0
AS50 va AS500 o'rtasidagi EBGP seansi o'rnatildi (Established), endi biz
AS500 da IBGP seanslarini o'rnatishni boshlashimiz mumkin. Buning uchun biz
iBGP deb nomlangan tengdoshlar (peer) guruhidan foydalanamiz. Biz har bir
qo’shnilarni alohida-alohida sozlashimiz va har biriga BGP parametrlarini
belgilashimiz mumkin, ammo bu ishda konfiguratsiyani soddalashtirish va
qisqartirish uchun biz tengdoshlar guruhini (peer group) sozlaymiz, bu yerda barcha
parametrlar guruhga tayinlanadi.
[R2]bgp 500
[R2-bgp]group iBGP internal
[R2-bgp]peer iBGP next-hop-local
[R2-bgp]peer 192.168.23.3 group iBGP
[R2-bgp]peer 192.168.24.4 group iBGP
Biz iBGP tengdoshlar guruhini yaratdik va unga internal (ichki) turni
tayinladik. Ichki guruhdan foydalanganda guruhga AS raqamini belgilash shart
emas. Ushbu guruhga tegishli har bir tengdosh mahalliy AS raqamini oladi. R2
marshrutizatorda BGP konfiguratsiyasini tekshiramiz. Buning uchun “display this”
buyrug’idan foydalanamiz.
[R2-bgp]display this
#
bgp 500
peer 5.228.12.1 as-number 50
group iBGP internal
peer 192.168.23.3 as-number 500
peer 192.168.23.3 group iBGP
peer 192.168.24.4 as-number 500
peer 192.168.24.4 group iBGP
#
ipv4-family unicast
undo synchronization
peer 5.228.12.1 enable
peer iBGP enable
peer iBGP next-hop-local
peer 192.168.23.3 enable
peer 192.168.23.3 group iBGP
peer 192.168.24.4 enable
peer 192.168.24.4 group iBGP
#
return
Barcha iBGP guruhi sozlamalari qo'shni marshrutizatorlarga tayinlanadi. Endi
R3 va R4 marshrutizatorlarni sozlaymiz, shuningdek R5 bilan qo’shnichilikni qurish
uchun sozlamalarni amalga oshiramiz.
R3 marshrutizatorini sozlaymiz.
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.23.3 24
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.34.3 24
[R3]interface Serial 0/0/0
[R3-Serial0/0/0]ip address 5.228.35.3 24
[R3]bgp 500
[R3-bgp]undo synchronization
[R3-bgp]undo summary automatic
[R3-bgp]group iBGP internal
[R3-bgp]peer iBGP next-hop-local
[R3-bgp]peer 192.168.23.2 group iBGP
[R3-bgp]peer 192.168.34.4 group iBGP
[R3-bgp]peer 5.228.35.5 as-number 5000
R4 marshrutizatorini sozlaymiz.
[R4]interface Ethernet 0/0/1
[R4-Ethernet0/0/1]ip address 192.168.24.4 24
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.34.4 24
[R4]interface Ethernet 0/0/0
[R4- Ethernet 0/0/0]ip address 5.228.45.4 24
[R4]bgp 500
[R4-bgp]undo synchronization
[R4-bgp]undo summary automatic
[R4-bgp]group iBGP internal
[R4-bgp]peer iBGP next-hop-local
[R4-bgp]peer 192.168.24.2 group iBGP
[R4-bgp]peer 192.168.34.3 group iBGP
[R4-bgp]peer 5.228.45.5 as-number 5000
R3 va R4 marshrutizatorlarida BGP konfiguratsiyasini tekshiramiz. Buning
uchun “display this” va “display bgp peer” buyruqlarini ishga tushiramiz.
[R3-bgp]display this
#
bgp 500
peer 5.228.35.5 as-number 5000
group iBGP internal
peer 192.168.23.2 as-number 500
peer 192.168.23.2 group iBGP
peer 192.168.34.4 as-number 500
peer 192.168.34.4 group iBGP
#
ipv4-family unicast
undo synchronization
peer 5.228.35.5 enable
peer iBGP enable
peer iBGP next-hop-local
peer 192.168.23.2 enable
peer 192.168.23.2 group iBGP
peer 192.168.34.4 enable
peer 192.168.34.4 group iBGP
#
Return
[R3-bgp]display bgp peer
BGP local router ID : 192.168.23.3
Local AS number : 500
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
5.228.35.5 4 5000 132 132 0 02:06:04 Established 1
192.168.23.2 4 500 146 144 0 02:21:39 Established 3
192.168.34.4 4 500 141 142 0 02:18:14 Established 1
[R4-bgp]display this
#
bgp 500
peer 5.228.45.5 as-number 5000
group iBGP internal
peer 192.168.24.2 as-number 500
peer 192.168.24.2 group iBGP
peer 192.168.34.3 as-number 500
peer 192.168.34.3 group iBGP
#
ipv4-family unicast
undo synchronization
peer 5.228.45.5 enable
peer iBGP enable
peer iBGP next-hop-local
peer 192.168.24.2 enable
peer 192.168.24.2 group iBGP
peer 192.168.34.3 enable
peer 192.168.34.3 group iBGP
#
return
[R4-bgp]display bgp peer
BGP local router ID : 192.168.24.4
Local AS number : 500
Total number of peers : 3
Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
5.228.45.5 4 5000 142 143 0 02:16:43 Established 1
192.168.24.2 4 500 154 152 0 02:29:16 Established 3
192.168.34.3 4 500 152 152 0 02:29:04 Established 1
R5 marshrutizatorni sozlaymiz.
[R5]interface Ethernet 0/0/0
[R5-Ethernet0/0/0]ip address 5.228.45.5 24
[R5]interface Serial 0/0/0
[R5-Serial0/0/0]ip address 5.228.35.5 24
[R5]bgp 5000
[R5-bgp]undo synchronization
[R5-bgp]undo summary automatic
[R5-bgp]peer 5.228.35.3 as-number 500
[R5-bgp]peer 5.228.45.4 as-number 500
R5 marshrutizatori sozlamalarini tekshiramiz.
[R5-bgp]display bgp peer
BGP local router ID : 5.228.45.5
Local AS number : 5000
Total number of peers : 2
Peers in established state : 2
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
5.228.35.3 4 500 151 152 0 02:26:26 Established 3
5.228.45.4 4 500 151 152 0 02:26:14 Established 3
R5 marshrutizatori R3 va R4 bilan qo’shnichilik aloqasini o’rnatdi. BGP
protokoli sozlamalarini tugatdik. Keyingi qadam, AS50 uchun bizga kerak bo'lgan
marshrutlarni e’lon qilishni boshlashdir. Ushbu marshrutlar AS5000 ni olishlari
kerak. R1 marshrutizatorga ulangan tarmoqlarni simulyatsiya qilish uchun
LoopBack interfeyslaridan foydalanamiz. Biz interfeyslarga IP manzillarni
tayinlaymiz va keyin bgp jarayonimizga tarmoqlarni qo'shamiz.
[R1]interface LoopBack0
[R1-LoopBack0]ip address 10.0.0.1 24
[R1-LoopBack0]interface LoopBack1
[R1-LoopBack1]ip address 11.0.0.1 24
[R1-LoopBack1]interface LoopBack2
[R1-LoopBack2]ip address 12.0.0.1 24
[R1]bgp 50
[R1-bgp]network 10.0.0.0 24
[R1-bgp]network 11.0.0.0 24
[R1-bgp]network 12.0.0.0 24
R1 marshrutizatori ushbu marshrutlarni e’lon qildimi yoki yo’q tekshirib
ko’ramiz.
[R1]display bgp routing-table
BGP Local router ID is 5.228.12.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 5.228.35.0/24 5.228.12.2 0 500 5000 i
*> 10.0.0.0/24 0.0.0.0 0 0 i
*> 11.0.0.0/24 0.0.0.0 0 0 i
*> 12.0.0.0/24 0.0.0.0 0 0 i
Ushbu tarmoqlar AS500 dan AS5000 gacha o'tishi kerak. R5
marshrutizatorida BGP jadvalini tekshiramiz.
[R5]display bgp routing-table
BGP Local router ID is 5.228.45.5
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 7
Network NextHop MED LocPrf PrefVal Path/Ogn
*>5.228.35.0/24 0.0.0.0 0 0 i
*>10.0.0.0/24 5.228.35.3 0 500 50i
* 5.228.45.4 0 500 50i
*>11.0.0.0/24 5.228.35.3 0 500 50i
* 5.228.45.4 0 500 50i
*>12.0.0.0/24 5.228.35.3 0 500 50i
* 5.228.45.4 0 500 50i
R5 marshrutizatorining bgp jadvalida barcha uchta tarmoq mavjud ekanligini
ko’rdik. Ushbu tarmoqlarga eng yaxshi yo’l R3 marshrutizator orqali ekanligini
ko’rdik. Ping orqali aloqani tekshirib ko’ramiz.
[R5] ping 10.0.0.1
PING 10.0.0.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 10.0.0.1 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
Ping o’tmadi. Barcha uchta marshrut R5 marshrutlash jadvalida mavjud. BGP
to'g'ri sozlanganligini bildiradi. Muammoni aniqlash uchun icmp debugging bilan
ICMP protokoli bizga yordam beradi.
debugging ip icmp
terminal monitor
terminal debugging
Ko'rib turganimizdek, R1 icmp echo paketlarini oladi va 5.228.35.5 manziliga
javoban echo-javob yuboradi. 5.228.35.0/24 tarmog'i R1 marshrutlash jadvalida
mavjudligini tekshiramiz, buning uchun “display ip routing-table” buyrug’idan
foydalanamiz. R1 marshrutizatori 5.228.35.0/24 tarmog'igacha bo’lgan yo'lni
bilmaydi. Ushbu muammoni hal qilishning ikkita yo'li mavjud. Eng oddiy yo’li
5.228.35.0/24 tarmog’ini bgp protokolida e'lon qilishdir. Ikkinchi yo'li
marshrutizatorlarimiz o'rtasida qo'shimcha IGP protokolini o'rnatish va barcha
kerakli tarmoqlarni e’lon qilish. Biz birinchi usuldan foydalanamiz.
[R5]bgp 5000
[R5-bgp]network 5.228.35.0 24
Yana bir bor ping orqali aloqani tekshiramiz.
[R5]ping 10.0.0.1
PING 10.0.0.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.1: bytes=56 Sequence=1 ttl=253 time=90 ms
Reply from 10.0.0.1: bytes=56 Sequence=2 ttl=253 time=110 ms
Reply from 10.0.0.1: bytes=56 Sequence=3 ttl=253 time=120 ms
Reply from 10.0.0.1: bytes=56 Sequence=4 ttl=253 time=60 ms
Reply from 10.0.0.1: bytes=56 Sequence=5 ttl=253 time=70 ms
--- 10.0.0.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/90/120 ms
Do'stlaringiz bilan baham: |