Interface names when putting 802.1q VLAN on top of bonding configuration
Jo-Philipp Wich
jo at mein.io
Tue Jun 1 05:22:03 PDT 2021
Hi,
> One more question, now I'm trying to put a bridge on top of each of these vlan* interfaces so that I can map those to a few physical interfaces. I also need several vlans to map to one of the interfaces (tagged).. not sure how to do that yet either. Any suggestions with this config? When I apply it, I lose network access.
If you move an interface into a bridge (e.g. vlan10 into bv10) then you need
to put the IP addresses (172.20.32.250/255.255.255.0 for vlan10) onto the
bridge and remove it from vlan10. There is also no need to retain the `config
interface vlan10` section then anymore. Netdevs used as bridge ports cannot be
used standalone anymore.
Your config should look like that:
-- 8< --
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdb9:bf48:0362::/48'
config interface lanxge
option proto 'bonding'
option auto '1'
option bonding_policy '802.3ad'
option link_monitoring 'mii'
option slaves 'eth4 eth5'
option lacp_rate 'fast'
option miimon '100'
option use_carrier 1
option xmit_hash_policy 'layer3+4'
option force_link '1'
option ipaddr 127.0.0.2
config device
option type 8021q
option ifname bonding-lanxge
option vid 10
option name vlan10
config device
option type 8021q
option ifname bonding-lanxge
option vid 20
option name vlan20
config device
option type 8021q
option ifname bonding-lanxge
option vid 21
option name vlan21
config device
option type 8021q
option ifname bonding-lanxge
option vid 30
option name vlan30
config interface 'wan'
option ifname 'eth0.0'
option proto 'dhcp'
config interface bv10
option type 'bridge'
option ifname vlan10
option proto static
option ipaddr 172.20.32.250
option netmask 255.255.255.0
config interface bv20
option type 'bridge'
option ifname vlan20
option proto static
option ipaddr 172.20.34.2
option netmask 255.255.255.128
config interface bv21
option type 'bridge'
option ifname vlan21
option proto static
option ipaddr 172.20.35.3
option netmask 255.255.255.240
config interface bv30
option type 'bridge'
option ifname vlan30
option proto static
option ipaddr 172.20.34.130
option netmask 255.255.255.128
-- >8 --
Since legacy bridge declarations (through option type bridge in config
interface) are being phased out, your config ideally should look like that
(requires current master or OpenWrt 21.02 branch):
-- 8< --
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdb9:bf48:0362::/48'
config interface lanxge
option proto 'bonding'
option auto '1'
option bonding_policy '802.3ad'
option link_monitoring 'mii'
option slaves 'eth4 eth5'
option lacp_rate 'fast'
option miimon '100'
option use_carrier 1
option xmit_hash_policy 'layer3+4'
option force_link '1'
option ipaddr 127.0.0.2
config device
option type 8021q
option ifname bonding-lanxge
option vid 10
option name vlan10
config device
option type 8021q
option ifname bonding-lanxge
option vid 20
option name vlan20
config device
option type 8021q
option ifname bonding-lanxge
option vid 21
option name vlan21
config device
option type 8021q
option ifname bonding-lanxge
option vid 30
option name vlan30
config device
option type bridge
option name bv10
list ports vlan10
config device
option type bridge
option name bv20
list ports vlan20
config device
option type bridge
option name bv21
list ports vlan21
config device
option type bridge
option name bv30
list ports vlan30
config interface 'wan'
option ifname 'eth0.0'
option proto 'dhcp'
config interface bv10
option device bv10
option proto static
option ipaddr 172.20.32.250
option netmask 255.255.255.0
config interface bv20
option device bv20
option proto static
option ipaddr 172.20.34.2
option netmask 255.255.255.128
config interface bv21
option device bv21
option proto static
option ipaddr 172.20.35.3
option netmask 255.255.255.240
config interface bv30
option device bv30
option proto static
option ipaddr 172.20.34.130
option netmask 255.255.255.128
-- 8< --
~ Jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210601/8f6b7ff2/attachment.sig>
More information about the openwrt-devel
mailing list