forked from zentralwerk/network
cpe: prepare TL-Archer-C7v4 switching config
This commit is contained in:
parent
2a730e81c9
commit
562fe53936
|
@ -1081,7 +1081,6 @@ cpe:
|
||||||
net: pub
|
net: pub
|
||||||
|
|
||||||
ap29:
|
ap29:
|
||||||
firstboot: true
|
|
||||||
password: |
|
password: |
|
||||||
-----BEGIN PGP MESSAGE-----
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
@ -1095,7 +1094,7 @@ cpe:
|
||||||
Axz/Dd5jCt1Nmv2RUCF+vQ==
|
Axz/Dd5jCt1Nmv2RUCF+vQ==
|
||||||
=2Fj1
|
=2Fj1
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: TL-Archer-C7v2
|
model: TL-Archer-C7v4
|
||||||
version: nightly
|
version: nightly
|
||||||
location: B1.05.07
|
location: B1.05.07
|
||||||
lan-access: priv13
|
lan-access: priv13
|
||||||
|
|
|
@ -169,6 +169,41 @@ set network.{{ net }}.ifname='eth0.{{ pillar['vlans'][net] }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
{%- elif conf['model'] == 'TL-Archer-C7v4' %}
|
||||||
|
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='0t 1t'
|
||||||
|
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] }}'
|
||||||
|
# 0: eth0; 1: WAN port; 2-5: LAN ports
|
||||||
|
{%- if conf.get('lan-access') == net %}
|
||||||
|
set network.@switch_vlan[{{ switchnum }}].ports='0t 1t 2 3 4 5'
|
||||||
|
{%- else %}
|
||||||
|
set network.@switch_vlan[{{ switchnum }}].ports='0t 1t'
|
||||||
|
{%- endif %}
|
||||||
|
set network.@switch_vlan[{{ switchnum }}].comment='{{ net }}'
|
||||||
|
{% set switchnum = switchnum + 1 %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
{{ uci_network_mgmt('eth0.1') }}
|
||||||
|
|
||||||
|
{%- for net in bridges.keys() %}
|
||||||
|
set network.{{ net }}=interface
|
||||||
|
set network.{{ net }}.type=bridge
|
||||||
|
set network.{{ net }}.proto=static
|
||||||
|
set network.{{ net }}.ifname='eth0.{{ pillar['vlans'][net] }}'
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
{%- elif conf['model'] == 'TL-WR841Nv8' %}
|
{%- elif conf['model'] == 'TL-WR841Nv8' %}
|
||||||
{# Like v9 but with eth0/1 switched #}
|
{# Like v9 but with eth0/1 switched #}
|
||||||
set network.@switch[0].reset=1
|
set network.@switch[0].reset=1
|
||||||
|
|
Loading…
Reference in New Issue