File tree Expand file tree Collapse file tree 5 files changed +23
-21
lines changed Expand file tree Collapse file tree 5 files changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ In this lab topology a situation is simulated where an IPsec interconnect to a 4
33
44![ DMVPN topology] ( dmvpn.png )
55
6+ ### Overlay network
7+
8+ The diagram below display the resulting overlay network. Each hub is connected to each spoke with its own NHRP instance and subnet.
9+
10+ ![ overlay topology] ( dmvpn_overlay.png )
11+
612Some notes:
713- The IoT provider / underlay network is configured with static routes.
814- The uplink to the IoT provider is an IPsec tunnel.
Original file line number Diff line number Diff line change 1+ !
12router ospf 1
23 router-id 10.0.0.{{ id }}
34!
@@ -8,8 +9,7 @@ interface GigabitEthernet0/1
89 ip ospf network point-to-point
910 ip ospf 1 area 0.0.0.0
1011!
11- {% for intf in hostvars [inventory_hostname ].interfaces %}
12- {% if intf .type is defined and intf .type == "tunnel" %}
12+ {% for intf in interfaces if intf .type is defined and intf .type == "tunnel" %}
1313interface {{ intf.ifname }}
1414 description DMVPN Tunnel
1515 ip address {{ intf.ipv4|ipaddr('address') }} {{ intf.ipv4|ipaddr('netmask') }}
@@ -26,16 +26,14 @@ interface {{ intf.ifname }}
2626 tunnel source GigabitEthernet0/1
2727 tunnel mode gre multipoint
2828 tunnel path-mtu-discovery
29- {% endif %}
3029{% endfor %}
3130!
32- {% for intf in hostvars [inventory_hostname ].interfaces %}
33- {% if intf .type is defined and intf .type == "lan" %}
34- {% for n in intf .neighbors %}
35- {% if n .node == "firewall" %}
31+ {% for intf in interfaces if intf .type is defined and intf .type == "lan" %}
32+ {% for n in intf .neighbors %}
33+ {% if n .node == "firewall" %}
3634ip route 0.0.0.0 0.0.0.0 {{ n.ipv4|ipaddr('address') }} name default_to_firewall
37- {% endif %}
38- {% endfor %}
39- {% endif %}
35+ {% endif %}
36+ {% endfor %}
4037{% endfor %}
4138!
39+ an
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ crypto ipsec profile protect-IoT
1212 set security-association lifetime seconds 86400
1313 set transform-set TS
1414!
15- {% - for intf in hostvars [ inventory_hostname ]. interfaces -%}
15+ {% - for intf in interfaces -%}
1616{% if intf .type is defined and intf .type == "tunnel" %}
1717
1818interface {{ intf.ifname }}
@@ -33,7 +33,7 @@ interface {{ intf.ifname }}
3333 tunnel path-mtu-discovery
3434 tunnel protection ipsec profile protect-IoT
3535!
36- {% for tunint in hostvars [ inventory_hostname ]. interfaces if tunint .type is defined and tunint .type == "tunnel" %}
36+ {% for tunint in interfaces if tunint .type is defined and tunint .type == "tunnel" %}
3737{% for n in tunint .neighbors %}
3838{% for intf in hostvars ['iotprovider' ].interfaces %}
3939{% if intf .type is defined and intf .type == "lan" %}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ router ospf 1
55interface loopback0
66 ip ospf 1 area 0.0.0.0
77!
8- {% for intf in hostvars [ inventory_hostname ]. interfaces if intf .type is defined and intf .type == "tunnel" %}
8+ {% for intf in interfaces if intf .type is defined and intf .type == "tunnel" %}
99interface {{ intf.ifname }}
1010 description DMVPN Tunnel
1111 ip address {{ intf.ipv4|ipaddr('address') }} {{ intf.ipv4|ipaddr('netmask') }}
@@ -48,19 +48,17 @@ interface {{ intf.ifname }}
4848{% endfor %}
4949!
5050!
51- {% for intf in hostvars ['iotprovider' ].interfaces %}
52- {% if intf .type is defined and intf .type == "lan" %}
53- {% set iotip = intf %}
54- {% for intff in hostvars ['firewall' ].interfaces %}
55- {% if intff .type is defined and intff .type == "lan" %}
51+ {% for intf in hostvars ['iotprovider' ].interfaces if intf .type is defined and intf .type == "lan" %}
52+ {% set iotip = intf %}
53+ {% for intff in hostvars ['firewall' ].interfaces %}
54+ {% if intff .type is defined and intff .type == "lan" %}
5655ip route {{ intff.ipv4|ipaddr('network') }} {{ intff.ipv4|ipaddr('netmask') }} {{ iotip.ipv4|ipaddr('address') }} name Prevent_recursive_routing
5756!
5857ip access-list standard NO_INTER_SPOKE_TRAFFIC
5958 permit host {{ iotip.ipv4|ipaddr('address')}}
6059 deny {{ iotip.ipv4|ipaddr('network') }} {{ iotip.ipv4|ipaddr('wildcard') }}
61- {% endif %}
62- {% endfor %}
63- {% endif %}
60+ {% endif %}
61+ {% endfor %}
6462{% endfor %}
6563 permit any
6664!
You can’t perform that action at this time.
0 commit comments