Dinamik xaritalash bilan DMVPN 2-bosqichi Endi biz DMVPN-ni dinamik xaritalash bilan sozlaymiz. IP nhrp xaritasi multicast dinamik markazga barcha multicast trafikni qabul qilish uchun signal beradi va bu mGRE tunnellari uchun talab qilinadi. Hubdagi statik xaritalarimiz olib tashlanadi. Yana markazdan boshlaylik:
Headquarters(config)#interface Tunnel 0
Headquarters(config-if)#no ip redirects
Headquarters(config-if)#ip address 10.10.10.1 255.255.255.0 Headquarters(config-if)#tunnel source e0/0
Headquarters(config-if)#ip nhrp map multicast dynamic
Headquarters(config-if)#ip nhrp authentication DMVPN
Headquarters(config-if)#ip nhrp network-id 100
Headquarters(config-if)#tunnel mode gre multipoint
Endi spikerlar ip nhrp nhs buyrug'i bilan sozlanadi, bu NHRP keyingi hop serverini va ip nhrp map buyrug'ini markazning tunneliga va NBMA IP manzillariga xaritalash uchun aniqlaydi. IP nhrp map multicast buyrug'i spikerga barcha multicast trafikni markazga yuborish uchun signal beradi. Bu buyruq faqat ko'p nuqtali ulanishlar uchun ishlatiladi, nuqtadan nuqtaga havolalarda emas:
Branch1
Branch1(config-if)#tunnel source e0/0
Branch1(config-if)#ip nhrp authentication DMVPN
Branch1(config-if)#ip nhrp map 10.10.10.1 172.1.1.1
Branch1(config-if)#ip nhrp map multicast 172.1.1.1
Branch1(config-if)#ip nhrp nhs 10.10.10.1
Branch1(config-if)#ip nhrp network-id 100
Branch1(config-if)#tunnel mode gre multipoint
Branch2
Branch2(config-if)#tunnel source e0/0
Branch2(config-if)#ip nhrp authentication DMVPN
Branch2(config-if)#ip nhrp map 10.10.10.1 172.1.1.1
Branch2(config-if)#ip nhrp map multicast 172.1.1.1
Branch2(config-if)#ip nhrp nhs 10.10.10.1
Branch2(config-if)#ip nhrp network-id 100
Branch2(config-if)#tunnel mode gre multipoint
Keling, tunnellarni tekshirib ko'raylik va spikerlar bir-biri bilan to'g'ridan-to'g'ri gaplashishi mumkin:
Headquarters(config-if)#do sh ip nhrp
10.10.10.2/32 via 10.10.10.2, Tunnel0 created 00:00:46, expire 01:59:13
Type: dynamic, Flags: authoritative unique registered
NBMA address: 172.1.2.1
10.10.10.3/32 via 10.10.10.3, Tunnel0 created 00:00:37, expire 01:59:22
Type: dynamic, Flags: authoritative unique registered
NBMA address: 172.1.3.1
Bizning dinamik tunnellarimiz shakllanganini ko'rishimiz mumkin.
Branch1#traceroute 10.10.10.3
Type escape sequence to abort.
Tracing the route to 10.10.10.3
VRF info: (vrf in name/id, vrf out name/id)
1 10.10.10.3 4 msec 8 msec 4 msec
Bundan tashqari, biz markazdan o'tmagan trafiksiz suhbatni tasdiqladik.
3-bosqich
DMVPN 2-dan 3-bosqichga o'tish uchun biz faqat ikkita buyruq qo'shishimiz kerak. Biz hub tunneliga ip nhrp redirect buyrug'ini qo'shishdan boshlaymiz. Bu buyruq to'g'ridan-to'g'ri gaplashish imkoniyatini beradi. Keyingi buyruq ip nhrp yorlig'i spiker marshrutizatorlariga joylashtiriladi. Bu buyruq simli marshrutizatorlarga hub routerdan qayta yo'naltirish xabarini olganda CEF jadvaliga o'zgartirishlar kiritish imkonini beradi. Biz misolimizda 24-5-rasmdan foydalanamiz.
Traceroute buyrug'idan foydalanib, biz birinchi marta spiker faqat markaz orqali boshqa spiker bilan bog'lanishi mumkinligini ko'rishimiz mumkin. Shundan so'ng, markaz spikerga to'g'ridan-to'g'ri boshqa spikerga qanday erishish mumkinligi haqida xabar beradi, so'ngra biz ikkinchi traseroutda so'zlashuvchi aloqaga ruxsat berilganligini ko'rishimiz mumkin.