forked from zentralwerk/network
deploy ap13 & dir-615 router template
This commit is contained in:
parent
d2e3b495da
commit
d6240d7d6c
|
@ -482,3 +482,28 @@ cpe:
|
|||
ssids:
|
||||
'ZW public':
|
||||
net: pub
|
||||
|
||||
ap13:
|
||||
password: |
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQEMA2PKcvDMvlKLAQf+KrhJQfg2IAJ2SHEL8x0iAAn1ZYJ4kFVGYkmoEbN6iM4O
|
||||
d2/0f8/2voMHChSTheQ5Y+Vp8op5gzOhROOShfJG1khugiEPhza+4sV0WD8Oa6Vm
|
||||
FPXTr1HJdF/LZkCAVBvJOgsUC1U1PrSiSeKp3ziZyByKw6Rox6Krw6fkR2miuixs
|
||||
fV0EW/H9bIVGru7Dtrgw1zq4QopxuFikMp/YWbmX0TEff6ntFCVwrGRN8Iluyaoy
|
||||
aLon/Wh4DW8KQkw+s0SWxq/lIkCdvXj8TnGY3h1HNSXEfPE4hWGgwGwhLgNcNGPb
|
||||
MC3IYHbmy/640GGl/tmqSnKZFuCVebMdIQ/j2iLLM9JHAe57w79qwwXIlUZ4/0I8
|
||||
gaGTRjFyub+6lP9cdR6nd4FuGZanXQAEND/bwIOQtt1+jgcrgaaF3uv3gWO6Mckl
|
||||
BEELWgTZJzE=
|
||||
=ECvx
|
||||
-----END PGP MESSAGE-----
|
||||
model: DIR-615H1
|
||||
location: Turm C 1. Etage
|
||||
lan-access: pub
|
||||
radios:
|
||||
'platform/10180000.wmac':
|
||||
channel: 1
|
||||
htmode: HT40+
|
||||
ssids:
|
||||
'ZW public':
|
||||
net: pub
|
||||
|
|
|
@ -191,6 +191,48 @@ set network.{{ net }}.proto=static
|
|||
set network.{{ net }}.ifname='{{ ' '.join(ports) }}'
|
||||
{%- endfor %}
|
||||
|
||||
{%- elif conf['model'] == 'DIR-615H1' %}
|
||||
delete network.lan_dev
|
||||
delete network.wan_dev
|
||||
{# switch is cpu port 6, wan:cpu port 4, lan port 1 is cpu port 3, lan port 2 is 2 etc #}
|
||||
set network.@switch[0]=switch
|
||||
set network.@switch[0].reset=1
|
||||
set network.@switch[0].enable=1
|
||||
set network.@switch[0].enable_vlan=1
|
||||
set network.@switch[0].name=switch0
|
||||
set network.@switch_vlan[0]=switch_vlan
|
||||
set network.@switch_vlan[0].device='switch0'
|
||||
set network.@switch_vlan[0].vlan='1'
|
||||
set network.@switch_vlan[0].ports='4t 6t'
|
||||
set network.@switch_vlan[0].comment='mgmt'
|
||||
{% set switchnum = 1 %}
|
||||
{%- for net in bridges.keys() %}
|
||||
set network.@switch_vlan[{{ switchnum }}]=switch_vlan
|
||||
set network.@switch_vlan[{{ switchnum }}].device='switch0'
|
||||
set network.@switch_vlan[{{ switchnum }}].vlan='{{ pillar['vlans'][net] }}'
|
||||
{%- if conf.get('lan-access') == net %}
|
||||
set network.@switch_vlan[{{ switchnum }}].ports='0 1 2 3 4t 6t'
|
||||
{%- else %}
|
||||
set network.@switch_vlan[{{ switchnum }}].ports='4t 6t'
|
||||
{%- endif %}
|
||||
set network.@switch_vlan[{{ switchnum }}].comment='{{ net }}'
|
||||
{% set switchnum = switchnum + 1 %}
|
||||
{%- endfor %}
|
||||
|
||||
set network.mgmt=interface
|
||||
set network.mgmt.ifname=eth0.1
|
||||
set network.mgmt.proto=static
|
||||
set network.mgmt.ipaddr={{ pillar['hosts-inet']['mgmt'][hostname] }}
|
||||
set network.mgmt.netmask=255.255.255.0
|
||||
|
||||
{%- for net in bridges.keys() %}
|
||||
set network.{{ net }}=interface
|
||||
set network.{{ net }}.type=bridge
|
||||
set network.{{ net }}.proto=static
|
||||
#TODO: this should consider lan-access
|
||||
set network.{{ net }}.ifname='eth0.{{ pillar['vlans'][net] }}'
|
||||
{%- endfor %}
|
||||
|
||||
{%- else %}
|
||||
{# All other models may have separate Ethernet chips for LAN/WAN #}
|
||||
set network.@switch[0].reset=1
|
||||
|
|
Loading…
Reference in New Issue