Once we add a VLAN to a bond/lacp interface the member interfaces will be automatically removed
Reproduce
good
set interfaces bonding bond0 member interface eth1 set interfaces bonding bond0 member interface eth2
vyos@vyos:~$ show interfaces bonding bond0 slaves Interface RX: bytes packets TX: bytes packets bond0 0 0 0 0 eth1 0 0 0 0 eth2 0 0 0 0
bad
set interfaces bonding bond0 member interface eth1 set interfaces bonding bond0 member interface eth2 set interfaces bonding bond0 vif 667 address 1.2.3.4/32
vyos@vyos:~$ show interfaces bonding bond0 slaves Interface RX: bytes packets TX: bytes packets
Debug
Debugging will show the problem, on VIF creation VIF is treated as bond and all members are removed (DEBUG/IFCONFIG write '-bond0' > '/sys/class/net/bond0.667/bonding/slaves')
[ interfaces bonding bond0 ] DEBUG/IFCONFIG cmd 'ip link add dev bond0 type bond' DEBUG/IFCONFIG write '' > '/sys/class/net/bond0/ifalias' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv4/conf/bond0/link_filter' DEBUG/IFCONFIG cmd 'sudo systemctl stop [email protected]' DEBUG/IFCONFIG cmd 'sudo systemctl stop [email protected]' DEBUG/IFCONFIG cmd 'ip link set dev bond0 nomaster' DEBUG/IFCONFIG write '30000' > '/proc/sys/net/ipv4/neigh/bond0/base_reachable_time_ms' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv4/conf/bond0/arp_filter' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0/arp_accept' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0/arp_announce' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0/arp_ignore' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0/proxy_arp' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0/proxy_arp_pvlan' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv6/conf/bond0/forwarding' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv6/conf/bond0/accept_ra' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv6/conf/bond0/autoconf' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv6/conf/bond0/dad_transmits' DEBUG/IFCONFIG write '1500' > '/sys/class/net/bond0/mtu' DEBUG/IFCONFIG read '0a:9f:19:aa:dc:ee' < '/sys/class/net/bond0/address' DEBUG/IFCONFIG cmd 'ip addr add "fe80::89f:19ff:feaa:dcee/64" dev "bond0"' DEBUG/IFCONFIG cmd 'ip link add link bond0 name bond0.667 type vlan id 667 ' DEBUG/IFCONFIG write '' > '/sys/class/net/bond0.667/ifalias' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv4/conf/bond0.667/link_filter' DEBUG/IFCONFIG cmd 'sudo systemctl stop [email protected]' DEBUG/IFCONFIG cmd 'sudo systemctl stop [email protected]' DEBUG/IFCONFIG cmd 'ip addr add "1.2.3.4/32" brd + dev "bond0.667"' DEBUG/IFCONFIG cmd 'ip link set dev bond0.667 nomaster' DEBUG/IFCONFIG write '30000' > '/proc/sys/net/ipv4/neigh/bond0.667/base_reachable_time_ms' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv4/conf/bond0.667/arp_filter' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0.667/arp_accept' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0.667/arp_announce' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0.667/arp_ignore' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0.667/proxy_arp' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv4/conf/bond0.667/proxy_arp_pvlan' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv6/conf/bond0.667/forwarding' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv6/conf/bond0.667/accept_ra' DEBUG/IFCONFIG write '0' > '/proc/sys/net/ipv6/conf/bond0.667/autoconf' DEBUG/IFCONFIG write '1' > '/proc/sys/net/ipv6/conf/bond0.667/dad_transmits' DEBUG/IFCONFIG write '1500' > '/sys/class/net/bond0.667/mtu' DEBUG/IFCONFIG read '0a:9f:19:aa:dc:ee' < '/sys/class/net/bond0.667/address' DEBUG/IFCONFIG cmd 'ip addr add "fe80::89f:19ff:feaa:dcee/64" dev "bond0.667"' DEBUG/IFCONFIG cmd 'ip -json link show dev bond0.667' DEBUG/IFCONFIG returned (out): [{"ifindex":65,"link":"bond0","ifname":"bond0.667","flags":["BROADCAST","MULTICAST"],"mtu":1500,"qdisc":"noop","operstate":"DOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"0a:9f:19:aa:dc:ee","broadcast":"ff:ff:ff:ff:ff:ff"}] DEBUG/IFCONFIG write '-bond0' > '/sys/class/net/bond0.667/bonding/slaves' DEBUG/IFCONFIG cmd 'ip -json -details link show dev bond0' DEBUG/IFCONFIG returned (out): [{"ifindex":64,"ifname":"bond0","flags":["BROADCAST","MULTICAST","MASTER"],"mtu":1500,"qdisc":"noop","operstate":"DOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"0a:9f:19:aa:dc:ee","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bond","info_data":{"mode":"balance-rr","miimon":0,"updelay":0,"downdelay":0,"use_carrier":1,"arp_interval":0,"arp_validate":null,"arp_all_targets":"any","primary_reselect":"always","fail_over_mac":"none","xmit_hash_policy":"layer2","resend_igmp":1,"num_peer_notif":1,"all_slaves_active":0,"min_links":0,"lp_interval":1,"packets_per_slave":1,"ad_lacp_rate":"slow","ad_select":"stable","tlb_dynamic_lb":1}},"inet6_addr_gen_mode":"none","num_tx_queues":16,"num_rx_queues":16,"gso_max_size":65536,"gso_max_segs":65535}] DEBUG/IFCONFIG cmd 'ip link set dev bond0 up' DEBUG/IFCONFIG cmd 'ip -json -details link show dev bond0.667' DEBUG/IFCONFIG returned (out): [{"ifindex":65,"link":"bond0","ifname":"bond0.667","flags":["NO-CARRIER","BROADCAST","MULTICAST","UP"],"mtu":1500,"qdisc":"noqueue","operstate":"LOWERLAYERDOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"0a:9f:19:aa:dc:ee","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":667,"flags":["REORDER_HDR"]}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535}] DEBUG/IFCONFIG cmd 'ip link set dev bond0.667 up' DEBUG/IFCONFIG read '' < '/sys/class/net/bond0/bonding/arp_ip_target' DEBUG/IFCONFIG write 'layer2' > '/sys/class/net/bond0/bonding/xmit_hash_policy' DEBUG/IFCONFIG write '0' > '/sys/class/net/bond0/bonding/min_links' DEBUG/IFCONFIG cmd 'ip -json link show dev bond0' DEBUG/IFCONFIG returned (out): [{"ifindex":64,"ifname":"bond0","flags":["NO-CARRIER","BROADCAST","MULTICAST","MASTER","UP"],"mtu":1500,"qdisc":"noqueue","operstate":"DOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"0a:9f:19:aa:dc:ee","broadcast":"ff:ff:ff:ff:ff:ff"}] DEBUG/IFCONFIG cmd 'ip -json -details link show dev bond0' DEBUG/IFCONFIG returned (out): [{"ifindex":64,"ifname":"bond0","flags":["NO-CARRIER","BROADCAST","MULTICAST","MASTER","UP"],"mtu":1500,"qdisc":"noqueue","operstate":"DOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"0a:9f:19:aa:dc:ee","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bond","info_data":{"mode":"balance-rr","miimon":0,"updelay":0,"downdelay":0,"use_carrier":1,"arp_interval":0,"arp_validate":null,"arp_all_targets":"any","primary_reselect":"always","fail_over_mac":"none","xmit_hash_policy":"layer2","resend_igmp":1,"num_peer_notif":1,"all_slaves_active":0,"min_links":0,"lp_interval":1,"packets_per_slave":1,"ad_lacp_rate":"slow","ad_select":"stable","tlb_dynamic_lb":1}},"inet6_addr_gen_mode":"none","num_tx_queues":16,"num_rx_queues":16,"gso_max_size":65536,"gso_max_segs":65535}] DEBUG/IFCONFIG cmd 'ip link set dev bond0 up'