Initial Configruation

LAB 2: DMVPN – Initial
LAB 2: Diagram
Note: This Lab was developed on Cisco IOS Version15.2(4) M1 ADVENTERPRISEK9-M.
LAB 2: Initial DMVPN Configuration
Step 1: Enable loopback and physical interfaces on R1, R2, R3, R4 and R5.
R1:
interface FastEthernet0/0
ip address 172.16.1.2 255.255.255.252
no shutdown
exit
interface Loopback1
ip address 11.11.11.11 255.255.255.0
exit
R2:
interface FastEthernet1/0
ip address 172.16.2.2 255.255.255.252
no shutdown
exit
interface Loopback1
ip address 22.22.22.22 255.255.255.0
exit
R3:
interface FastEthernet2/0
ip address 172.16.3.2 255.255.255.252
no shutdown
exit
interface Loopback1
ip address 33.33.33.33 255.255.255.0
exit
R4:
interface FastEthernet3/0
ip address 172.16.4.2 255.255.255.252
no shutdown
exit
interface Loopback1
ip address 44.44.44.44 255.255.255.0
exit
R5:
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.252
no shutdown
exit
interface FastEthernet1/0
ip address 172.16.2.1 255.255.255.252
no shutdown
exit
interface FastEthernet2/0
ip address 172.16.3.1 255.255.255.252
no shutdown
exit
interface FastEthernet3/0
ip address 172.16.4.1 255.255.255.252
no shutdown
exit
Step2: Assign default route pointing towards internet.
R1:
ip route 0.0.0.0 0.0.0.0 172.16.1.1
R2:
ip route 0.0.0.0 0.0.0.0 172.16.2.1
R3:
ip route 0.0.0.0 0.0.0.0 172.16.3.1
R4:
ip route 0.0.0.0 0.0.0.0 172.16.4.1
Step3: Configure DMVPN
R1:
interface Tunnel 0
ip address 192.168.0.1 255.255.255.0 //logical ip address
ip nhrp map multicast dynamic //enable multicast traffic
ip nhrp network-id 5 //assign same network-id else tunnel will not form
tunnel source 172.16.1.2 //physical address of HUB interface
tunnel mode gre multipoint //select gre mode
ip mtu 1400 //change mtu for DMVPN header
exit
(Here tunnel does not have an explicit destination specified because multipoint tunnels are built dynamically from the spokes to the hub router; the hub router does not need to be preconfigured with spoke addresses.)
R2:
interface Tunnel 0
ip address 192.168.0.2 255.255.255.0
ip nhrp network-id 5
tunnel source 172.16.2.2
ip nhrp map 192.168.0.1 172.16.1.2 //pointing towards NHS server
ip nhrp map multicast 172.16.1.2 //allow multicast traffic from R2 (spoke) to R1 (Hub)
ip nhrp nhs 192.168.0.1 //designates R1 as the NHS
tunnel mode gre multipoint
ip mtu 1400
exit
R3:
interface Tunnel 0
ip address 192.168.0.3 255.255.255.0
ip nhrp network-id 5
tunnel source 172.16.3.2
ip nhrp map 192.168.0.1 172.16.1.2
ip nhrp map multicast 172.16.1.2
ip nhrp nhs 192.168.0.1
tunnel mode gre multipoint
ip mtu 1400
exit
R4:
interface Tunnel 0
ip address 192.168.0.4 255.255.255.0
ip nhrp network-id 5
tunnel source 172.16.4.2
ip nhrp map 192.168.0.1 172.16.1.2
ip nhrp map multicast 172.16.1.2
ip nhrp nhs 192.168.0.1
tunnel mode gre multipoint
ip mtu 1400
exit
Step4: Verification
R1#show dmvpn
! ( Shows details of dmvpn tunnel)
Legend: Attrb --> S - Static, D - Dynamic, I - Incomplete
N - NATed, L - Local, X - No Socket
# Ent --> Number of NHRP entries with same NBMA peer
NHS Status: E --> Expecting Replies, R --> Responding, W --> Waiting
UpDn Time --> Up or Down Time for a Tunnel
======================================================================
Interface: Tunnel0, IPv4 NHRP Details
Type:Hub, NHRP Peers:3,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
----- --------------- --------------- ----- -------- -----
1 172.16.2.2 192.168.0.2 UP 00:01:50 D
1 172.16.3.2 192.168.0.3 UP 00:01:08 D
1 172.16.4.2 192.168.0.4 UP 00:00:56 D
(Hub and spoke setup would require three separate tunnels spanning from R1 to each of the spoke routers. Hub router R1 has dynamically from the tunnel with every spoke using mGRE multipoint tunnel mode. Multipoint GRE tunnel allows for more than two endpoints and is treated as a non-broadcast multi-access (NBMA) network. Conversely mGRE allows all four routers to have a single tunnel interface in the same ip subnet (192.168.0.0/24). This NBMA configuration is enabled by Next Hop Resolution Protocol, which allows multipoint tunnels to be built dynamically.)
R2#show dmvpn
! (Shows details of dmvpn tunnel)
Legend: Attrb --> S - Static, D - Dynamic, I - Incomplete
N - NATed, L - Local, X - No Socket
# Ent --> Number of NHRP entries with same NBMA peer
NHS Status: E --> Expecting Replies, R --> Responding, W --> Waiting
UpDn Time --> Up or Down Time for a Tunnel
======================================================================
Interface: Tunnel0, IPv4 NHRP Details
Type:Spoke, NHRP Peers:1,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
----- --------------- --------------- ----- -------- -----
1 172.16.1.2 192.168.0.1 UP 00:05:49 S
(Initially every spoke router will form only static tunnel with only Hub router as multicast traffic is only allowed from spokes to the hub, not from spoke to spoke.)
R3#show dmvpn
Legend: Attrb --> S - Static, D - Dynamic, I - Incomplete
N - NATed, L - Local, X - No Socket
# Ent --> Number of NHRP entries with same NBMA peer
NHS Status: E --> Expecting Replies, R --> Responding, W --> Waiting
UpDn Time --> Up or Down Time for a Tunnel
======================================================================
Interface: Tunnel0, IPv4 NHRP Details
Type:Spoke, NHRP Peers:1,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
----- --------------- --------------- ----- -------- -----
1 172.16.1.2 192.168.0.1 UP 00:06:04 S
R4#show dmvpn
Legend: Attrb --> S - Static, D - Dynamic, I - Incomplete
N - NATed, L - Local, X - No Socket
# Ent --> Number of NHRP entries with same NBMA peer
NHS Status: E --> Expecting Replies, R --> Responding, W --> Waiting
UpDn Time --> Up or Down Time for a Tunnel
======================================================================
Interface: Tunnel0, IPv4 NHRP Details
Type:Spoke, NHRP Peers:1,
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb
----- --------------- --------------- ----- -------- -----
1 172.16.1.2 192.168.0.1 UP 00:06:58 S
R1#show ip nhrp
! (Shows Next Hop Resolution Protocol details)
192.168.0.2/32 via 192.168.0.2
Tunnel0 created 00:02:49, expire 01:57:10
Type: dynamic, Flags: unique registered used
NBMA address: 172.16.2.2
192.168.0.3/32 via 192.168.0.3
Tunnel0 created 00:02:08, expire 01:57:51
Type: dynamic, Flags: unique registered used
NBMA address: 172.16.3.2
192.168.0.4/32 via 192.168.0.4
Tunnel0 created 00:01:55, expire 01:58:04
Type: dynamic, Flags: unique registered used
NBMA address: 172.16.4.2
(NHRP clients ie spoke routers issue requests to the next hop server ie hub router to obtain the physical address of another spoke router. NHRP facilitates dynamic tunnel establishment, providing tunnel-to-physical interface address resolution.)
R1#show run interface tunnel 0
! (Shows tunnel configuration on interface)
Building configuration...
Current configuration : 200 bytes
!
interface Tunnel0
ip address 192.168.0.1 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp map multicast dynamic
ip nhrp network-id 5
tunnel source 172.16.1.2
tunnel mode gre multipoint
end
R2#ping 192.168.0.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max=348/539/822 ms
R4#traceroute 192.168.0.2
Type escape sequence to abort.
Tracing the route to 192.168.0.2
1 192.168.0.1 287 msec 476 msec
2 192.168.0.2 300 msec
(Spoke router R4 is able to reach R2 via Hub router. A packet destined from R4 to R2 would need to be routed through R1 to exit R4 tunnel and the get re-encapsulation to enter R2 tunnel.)