GRE

R2
int tunnel 1
ip address 192.168.10.1 255.255.255.0
tunnel source 15.1.1.1
tunnel destination 16.1.1.1

ping 16.1.1.1 source 10.1.1.1

DMVPN (point to point)
PAT
access-list 10 permit 10.1.1.0 0.0.0.255
ip nat inside source list 10 interface fa0/0
int f0/0
ip nat outside
int f0/1
ip nat inside

GRE example of hub & spoke (not scalable)

R1
int tunnel 1
ip address 192.168.10.1 255.255.255.0
tunnel source 100.1.1.1
tunnel destination 101.1.1.1
R3
int tunnel 1
ip add 192.168.10.2 255.255.255.0
tunnel source 101.1.1.1
tunnel destination 100.1.1.1

Now do OSPF or EIGRP to give headers to inject your lan network or static

R1
ip route 20.1.1.0 255.255.0 tunnel 1
R3
ip route 10.1.1.0 255.255.255.0 tunnel 1

VPN To R1 - R2
R1
int tun 2
ip address 192.168.20.1 255.255.255.0
tunnel source 100.1.1.1
tunnel destination 102.1.1.1
exit
ip route 30.1.1.0 255.255.255.0 tunnel 2

R2
int tun 1
ip address 192.168.20.2 255.255.255.0
tunnel source 102.1.1.1
tunnel destination 100.1.1.1
ip route 10.1.1.0 255.255.255.0 tunnel 1
ip route 201.1.1.0 255.255.255.0 tunnel 1

R3
ip route 30.1.1.0 255.255.255.0 tunnel 1


dynamic routing
R1
router eigrp 100
network 192.168.10.0 0.0.0.255 (tunnel 1)
network 192.168.20.0 0.0.0.255 (tunnel 2)
network 10.1.1.0

R2
router eigrp 100
network 192.168.20.0 0.0.0.255

R3
router eigrp 100
network 192.168.10.0 0.0.0.255

DM VPN STARTS HERE (PHASE 1 DMVPN)

ISP
int S2/0
ip add 10.1.1.2 255.255.255.0
ex
int S2/1
ip add 22.1.1.2 255.255.255.0
ex
int s2/2
ip add 33.1.1.2 255.255.255.0
ex

R1
int s2/0
ip add 11.1.1.1 255.255.255.0
int l1
ip add 10.1.1.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 11.1.1.2


R3
int s2/0
ip add 33.1.1.1 255.255.255.0
int l1
ip add 30.1.1.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 33.1.1.2

R2
int s2/0
ip add 22.1.1.1 255.255.255.0
int l1
ip add 20.1.1.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 22.1.1.2

Public reachable is now connected to eachother
HUB - Multipoint GRE
R1
int tunnel 1
ip address 192.168.10.1 255.255.255.0
tunnel source 11.1.1.1
tunnel mode gre multipoint
ip nhrp network -id 1
ip nhrp map 192.168.10.3 33.1.1.1
ip nhrp map 192.168.10.2 22.1.1.1

R2
int tunnel 1
ip address 192.168.10.2 255.255.255.0
tunnel source 22.1.1.1
tunnel destination 11.1.1.1
ip nhrp network -id 2
ip nhrp map 192.168.10.1 22.1.1.1

R3
int tunnel 1
ip address 192.168.10.3 255.255.255.0
tunnel source 33.1.1.1
tunnel destination 11.1.1.1
ip nhrp network-id 3
ip nhrp map 192.168.10.1 11.1.1.1

R1
router eigrp 100
no auto-summary
network 192.168.10.0
network 10.1.1.0
int tunnel 1
ip nhrp map multicast 22.1.1.1
ip nhrp map multicast 33.1.1.1
no ip split-horizen eigrp 100

R3
router eigrp 100
no auto-summary
network 192.168.10.0
network 30.1.1.0
int tunnel 1
ip nhrp map multicast 22.1.1.1
ip nhrp map multicast 33.1.1.1
ip nhrp map multicast 11.1.1.1

R2
router eigrp 100
no auto-summary
network 192.168.10.0
network 20.1.1.0
int tunnel 1
ip nhrp map multicast 22.1.1.1
ip nhrp map multicast 33.1.1.1
ip nhrp map multicast 11.1.1.1

DMVPN Phase 2
In p1 blijft alle trafiek via hub gaan in DMNVPN phase 2 kan het direct spoke to spoke werken.

ISP
int f0/0
ip add 11.1.1.2 255.255.255.0
int f0/1
ip add 22.1.1.2 255.255.255.0
int f1/0
ip add 33.1.1.2 255.255.255.0
int f1/1
ip add 44.1.1.2 255.255.255.0

R1
int f0/0
ip add 11.1.1.1 255.255.255.0
int l1
ip add 10.1.1.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 11.1.1.2

R2
int f0/0
ip add 22.1.1.1 255.255.255.0
int l1
ip add 10.1.2.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 22.1.1.2

R3
int f0/0
ip add 33.1.1.1 255.255.255.0
int l1
ip add 10.1.3.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 33.1.1.2

R4
int f0/0
ip add 44.1.1.1 255.255.255.0
in tl1
ip add 10.1.4.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 44.1.1.2

R1
int tunnel 1
ip add 192.168.10.1 255.255.255.0
tunnel source 11.1.1.1
tunnel mode gre multipoint
ip nhrp network-id 1

R2
int tunnel 1
ip address 192.168.10.2 255.255.255.0
tunnel source 22.1.1.1
tunnel destination 11.1.1.1
ip nhrp network-id 1

R3
int tunnel 1
ip address 192.168.10.3 255.255.255.0
tunnel source 33.1.1.1
tunnel destination 11.1.1.1
ip nhrp network-id 1

R4
int tunnel 1
ip address 192.168.10.4 255.255.255.0
tunnel source 44.1.1.1
tunnel destination 11.1.1.1
ip nrhp network-id 1

spoke 1
int tunnel 1
ip nhrp nhs 192.168.10.1

spoke 2
int tunnel 1
ip nhrp nhs 192.168.10.1

spoke 3
int tunnel 1
ip nhrp nhs 192.168.10.1

Connect lan networks now
R1
router eigrp 10
no auto-summary
network 192.168.0.0
network 10.1.1.0
int tunnel 1
ip nhrp map multicast 22.1.1.1
ip nhrp map multicast 33.1.1.1
ip nhrp map multicast 44.1.1.1
no ip split-horizon eigrp 10
no ip next-hop self eigrp 10

R2
router eigrp 10
no auto-summary
network 192.168.0.0
network 10.1.2.0

R3
router eigrp 10
no auto-summary
network 192.168.0.0
network 10.1.3.0

R4
router eigrp 10
no auto-summary
network 192.168.0.0
network 10.1.4.0

2 issues now
SPOKE TO SPOKE NO Neighbor
HUB router1 is updating next hop

Spoke 1,2,3:
int tunnel 1
no tunnel destination 11.1.1.1
tunnel mode gre multipoint
shut
no shut

spoke 1
int tunnel 1
ipn nhrp map 192.168.10.1 11.1.1.1

spoke 2
int tunnel 1
Ip nhrp map 192.168.10.1 11.1.1.1

spoke 3
int tunnel 1
ip nhrp map 192.168.10.1 11.1.1.1

HUB
int tunnel 1
ip nrhp map multicast dynamic
SPOKES
int tunnel 1
ip nhrp map multicast 11.1.1.1