forked from zentralwerk/network
cpe: configure TL-WR841Nv8 ports
This commit is contained in:
parent
906bcd682e
commit
ec9cc8bc8a
|
@ -442,7 +442,7 @@ cpe:
|
||||||
BEELWgTZJzE=
|
BEELWgTZJzE=
|
||||||
=ECvx
|
=ECvx
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
model: TL-WR841N
|
model: TL-WR841Nv8
|
||||||
location: Turm C oberste Etage
|
location: Turm C oberste Etage
|
||||||
lan-access: pub
|
lan-access: pub
|
||||||
radios:
|
radios:
|
||||||
|
|
|
@ -164,6 +164,33 @@ set network.{{ net }}.ifname='eth0.{{ pillar['vlans'][net] }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
{%- elif conf['model'] == 'TL-WR841Nv8' %}
|
||||||
|
{# Like v9 but with eth0/1 switched #}
|
||||||
|
set network.@switch[0].reset=1
|
||||||
|
set network.@switch[0].enable=1
|
||||||
|
set network.@switch[0].enable_vlan=0
|
||||||
|
|
||||||
|
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
|
||||||
|
{# Add WAN VLAN to bridge #}
|
||||||
|
{%- set ports = ['eth0.' ~ pillar['vlans'][net]] %}
|
||||||
|
{# Add LAN ports to bridge #}
|
||||||
|
{%- if conf.get('lan-access') == net %}
|
||||||
|
{%- do ports.append('eth1') %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
set network.{{ net }}.ifname='{{ ' '.join(ports) }}'
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
{%- else %}
|
{%- else %}
|
||||||
{# All other models may have separate Ethernet chips for LAN/WAN #}
|
{# All other models may have separate Ethernet chips for LAN/WAN #}
|
||||||
set network.@switch[0].reset=1
|
set network.@switch[0].reset=1
|
||||||
|
|
Loading…
Reference in New Issue