File tree 5 files changed +23
-21
lines changed
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
3
3
4
4
![ DMVPN topology] ( dmvpn.png )
5
5
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
+
6
12
Some notes:
7
13
- The IoT provider / underlay network is configured with static routes.
8
14
- The uplink to the IoT provider is an IPsec tunnel.
Original file line number Diff line number Diff line change
1
+ !
1
2
router ospf 1
2
3
router-id 10.0.0.{{ id }}
3
4
!
@@ -8,8 +9,7 @@ interface GigabitEthernet0/1
8
9
ip ospf network point-to-point
9
10
ip ospf 1 area 0.0.0.0
10
11
!
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" %}
13
13
interface {{ intf.ifname }}
14
14
description DMVPN Tunnel
15
15
ip address {{ intf.ipv4|ipaddr('address') }} {{ intf.ipv4|ipaddr('netmask') }}
@@ -26,16 +26,14 @@ interface {{ intf.ifname }}
26
26
tunnel source GigabitEthernet0/1
27
27
tunnel mode gre multipoint
28
28
tunnel path-mtu-discovery
29
- {% endif %}
30
29
{% endfor %}
31
30
!
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" %}
36
34
ip 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 %}
40
37
{% endfor %}
41
38
!
39
+ an
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ crypto ipsec profile protect-IoT
12
12
set security-association lifetime seconds 86400
13
13
set transform-set TS
14
14
!
15
- {% - for intf in hostvars [ inventory_hostname ]. interfaces -%}
15
+ {% - for intf in interfaces -%}
16
16
{% if intf .type is defined and intf .type == "tunnel" %}
17
17
18
18
interface {{ intf.ifname }}
@@ -33,7 +33,7 @@ interface {{ intf.ifname }}
33
33
tunnel path-mtu-discovery
34
34
tunnel protection ipsec profile protect-IoT
35
35
!
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" %}
37
37
{% for n in tunint .neighbors %}
38
38
{% for intf in hostvars ['iotprovider' ].interfaces %}
39
39
{% 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
5
5
interface loopback0
6
6
ip ospf 1 area 0.0.0.0
7
7
!
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" %}
9
9
interface {{ intf.ifname }}
10
10
description DMVPN Tunnel
11
11
ip address {{ intf.ipv4|ipaddr('address') }} {{ intf.ipv4|ipaddr('netmask') }}
@@ -48,19 +48,17 @@ interface {{ intf.ifname }}
48
48
{% endfor %}
49
49
!
50
50
!
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" %}
56
55
ip route {{ intff.ipv4|ipaddr('network') }} {{ intff.ipv4|ipaddr('netmask') }} {{ iotip.ipv4|ipaddr('address') }} name Prevent_recursive_routing
57
56
!
58
57
ip access-list standard NO_INTER_SPOKE_TRAFFIC
59
58
permit host {{ iotip.ipv4|ipaddr('address')}}
60
59
deny {{ iotip.ipv4|ipaddr('network') }} {{ iotip.ipv4|ipaddr('wildcard') }}
61
- {% endif %}
62
- {% endfor %}
63
- {% endif %}
60
+ {% endif %}
61
+ {% endfor %}
64
62
{% endfor %}
65
63
permit any
66
64
!
You can’t perform that action at this time.
0 commit comments