forked from zentralwerk/network
vlan c3d2 + 2 containers
This commit is contained in:
parent
3a6445c070
commit
691e3ebbc4
|
@ -46,6 +46,8 @@ hosts-inet:
|
||||||
upstream1: 172.20.72.6
|
upstream1: 172.20.72.6
|
||||||
upstream2: 172.20.72.8
|
upstream2: 172.20.72.8
|
||||||
anon1: 172.20.72.7
|
anon1: 172.20.72.7
|
||||||
|
c3d2-gw: 172.20.72.8
|
||||||
|
c3d2-anon: 172.20.72.9
|
||||||
pub:
|
pub:
|
||||||
pub-gw: 172.20.76.1
|
pub-gw: 172.20.76.1
|
||||||
serv:
|
serv:
|
||||||
|
@ -54,3 +56,6 @@ hosts-inet:
|
||||||
priv1-gw: 172.20.74.1
|
priv1-gw: 172.20.74.1
|
||||||
priv2:
|
priv2:
|
||||||
priv2-gw: 172.20.75.1
|
priv2-gw: 172.20.75.1
|
||||||
|
c3d2:
|
||||||
|
c3d2-anon: 172.22.99.1
|
||||||
|
c3d2-gw: 172.22.99.4
|
||||||
|
|
|
@ -51,3 +51,19 @@ containers:
|
||||||
interfaces:
|
interfaces:
|
||||||
core:
|
core:
|
||||||
type: veth
|
type: veth
|
||||||
|
|
||||||
|
c3d2-gw:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
gw: upstream1
|
||||||
|
c3d2:
|
||||||
|
type: veth
|
||||||
|
|
||||||
|
c3d2-anon:
|
||||||
|
interfaces:
|
||||||
|
core:
|
||||||
|
type: veth
|
||||||
|
gw: anon1
|
||||||
|
c3d2:
|
||||||
|
type: veth
|
||||||
|
|
|
@ -4,4 +4,5 @@ subnets-inet:
|
||||||
pub: 172.20.76.0/23
|
pub: 172.20.76.0/23
|
||||||
priv1: 172.20.74.0/28
|
priv1: 172.20.74.0/28
|
||||||
priv2: 172.20.75.0/28
|
priv2: 172.20.75.0/28
|
||||||
|
c3d2: 172.22.99.0/24
|
||||||
mgmt: 10.0.0.0/24
|
mgmt: 10.0.0.0/24
|
||||||
|
|
|
@ -47,13 +47,15 @@ switches:
|
||||||
- GigabitEthernet 1/0/11
|
- GigabitEthernet 1/0/11
|
||||||
- GigabitEthernet 1/0/12
|
- GigabitEthernet 1/0/12
|
||||||
- GigabitEthernet 1/0/13
|
- GigabitEthernet 1/0/13
|
||||||
ap1:
|
ap2:
|
||||||
mode: trunk
|
mode: trunk
|
||||||
ports:
|
ports:
|
||||||
- GigabitEthernet 1/0/14
|
- GigabitEthernet 1/0/14
|
||||||
vlans:
|
vlans:
|
||||||
- mgmt
|
- mgmt
|
||||||
- pub
|
- pub
|
||||||
|
- c3d2
|
||||||
|
# obsolete:
|
||||||
- priv1
|
- priv1
|
||||||
ap3:
|
ap3:
|
||||||
mode: trunk
|
mode: trunk
|
||||||
|
@ -62,6 +64,8 @@ switches:
|
||||||
vlans:
|
vlans:
|
||||||
- mgmt
|
- mgmt
|
||||||
- pub
|
- pub
|
||||||
|
- c3d2
|
||||||
|
# obsolete:
|
||||||
- priv1
|
- priv1
|
||||||
ap4:
|
ap4:
|
||||||
mode: trunk
|
mode: trunk
|
||||||
|
@ -155,21 +159,18 @@ switches:
|
||||||
- priv14
|
- priv14
|
||||||
- priv15
|
- priv15
|
||||||
- priv16
|
- priv16
|
||||||
up1:
|
c3d2-flatbert:
|
||||||
mode: access
|
mode: bond
|
||||||
ports:
|
ports:
|
||||||
- GigabitEthernet 1/0/43
|
- GigabitEthernet1/0/43
|
||||||
priv1:
|
- GigabitEthernet1/0/44
|
||||||
mode: access
|
access: c3d2
|
||||||
|
c3d2-storage:
|
||||||
|
mode: bond
|
||||||
ports:
|
ports:
|
||||||
- GigabitEthernet 1/0/44
|
- GigabitEthernet1/0/45
|
||||||
priv2:
|
- GigabitEthernet1/0/46
|
||||||
mode: access
|
access: c3d2
|
||||||
ports:
|
|
||||||
- GigabitEthernet 1/0/45
|
|
||||||
- GigabitEthernet 1/0/46
|
|
||||||
- GigabitEthernet 1/0/47
|
|
||||||
- GigabitEthernet 1/0/48
|
|
||||||
password: |
|
password: |
|
||||||
-----BEGIN PGP MESSAGE-----
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,11 @@ base:
|
||||||
- subnets
|
- subnets
|
||||||
- vlans
|
- vlans
|
||||||
- ospf
|
- ospf
|
||||||
'*-gw':
|
'priv*-gw':
|
||||||
- dhcp
|
- dhcp
|
||||||
- ospf.gw
|
- ospf.gw
|
||||||
|
'c3d2-gw or c3d2-anon':
|
||||||
|
- ospf.gw
|
||||||
'anon1':
|
'anon1':
|
||||||
- vpn.anon1
|
- vpn.anon1
|
||||||
- upstream.anon1
|
- upstream.anon1
|
||||||
|
|
|
@ -37,7 +37,7 @@ bond0.{{ vlan }}:
|
||||||
- network: bond0
|
- network: bond0
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{%- set bridge_nets = ['mgmt', 'core', 'serv', 'pub'] %}
|
{%- set bridge_nets = ['mgmt', 'core', 'serv', 'pub', 'c3d2'] %}
|
||||||
{%- for net in bridge_nets %}
|
{%- for net in bridge_nets %}
|
||||||
{%- set vlan = pillar['vlans'][net] %}
|
{%- set vlan = pillar['vlans'][net] %}
|
||||||
br-{{ net }}:
|
br-{{ net }}:
|
||||||
|
|
|
@ -74,6 +74,7 @@ send "port link-aggregation group {{ group }}\r"
|
||||||
send "undo port link-aggregation group\r"
|
send "undo port link-aggregation group\r"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
expect "]"
|
expect "]"
|
||||||
|
{%- if conf.get('vlans') %}
|
||||||
send "port link-type trunk\r"
|
send "port link-type trunk\r"
|
||||||
expect "]"
|
expect "]"
|
||||||
# Set dummy default vlan
|
# Set dummy default vlan
|
||||||
|
@ -86,6 +87,12 @@ expect "]"
|
||||||
send "port trunk permit vlan {{ pillar['vlans'][vlan_name] }}\r"
|
send "port trunk permit vlan {{ pillar['vlans'][vlan_name] }}\r"
|
||||||
expect "]"
|
expect "]"
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{%- else %}
|
||||||
|
send "port link-type access\r"
|
||||||
|
expect "]"
|
||||||
|
send "port access vlan {{ pillar['vlans'][conf['access']] }}\r"
|
||||||
|
expect "]"
|
||||||
|
{%- endif %}
|
||||||
send "quit\r"
|
send "quit\r"
|
||||||
expect "{{ hostname }}]"
|
expect "{{ hostname }}]"
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
@ -99,6 +106,7 @@ expect "]"
|
||||||
send "port link-type access\r"
|
send "port link-type access\r"
|
||||||
expect "]"
|
expect "]"
|
||||||
send "port access vlan {{ pillar['vlans'][name] }}\r"
|
send "port access vlan {{ pillar['vlans'][name] }}\r"
|
||||||
|
expect "]"
|
||||||
send "quit\r"
|
send "quit\r"
|
||||||
expect "{{ hostname }}]"
|
expect "{{ hostname }}]"
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
|
@ -6,11 +6,15 @@ base:
|
||||||
- ospf
|
- ospf
|
||||||
- switches
|
- switches
|
||||||
- cpe
|
- cpe
|
||||||
'*-gw':
|
'priv*-gw':
|
||||||
- no-ssh
|
- no-ssh
|
||||||
- forwarding
|
- forwarding
|
||||||
- ospf
|
- ospf
|
||||||
- dhcp
|
- dhcp
|
||||||
|
'c3d2-gw or c3d2-anon':
|
||||||
|
- no-ssh
|
||||||
|
- forwarding
|
||||||
|
- ospf
|
||||||
'upstream*':
|
'upstream*':
|
||||||
- no-ssh
|
- no-ssh
|
||||||
- forwarding
|
- forwarding
|
||||||
|
|
Loading…
Reference in New Issue
Block a user