regarding routing, the suggestion is to move the route entries in the interfaces file from the vrouter interface to the vhost0 interface in the vrouter installation script.
Currently, the vrouter.cfg file looks like this for a multi-interface, L3 fabric environment after vrouter installation:
root@ic-skbrat2-cz37486c8s:~# cat /etc/network/interfaces.d/vrouter.cfg
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
The file should look like this after vrouter installation - making sure the configuration is persitent across reboots etc:
root@ic-skbrat2-cz37486c8s:~# cat /etc/network/interfaces.d/vrouter.cfg
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
auto bondB
iface bondB inet manual
bond-lacp-rate fast
bond-miimon 100
bond-mode 802.3ad
bond-num-grat-arp 1
bond-slaves none
bond-xmit-hash-policy layer2
hwaddress 48:df:37:21:ed:98
mtu 9134
regarding routing, the suggestion is to move the route entries in the interfaces file from the vrouter interface to the vhost0 interface in the vrouter installation script.
Currently, the vrouter.cfg file looks like this for a multi-interface, L3 fabric environment after vrouter installation:
root@ic- skbrat2- cz37486c8s: ~# cat /etc/network/ interfaces. d/vrouter. cfg ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ##
#######
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
#######
auto bondB num-grat- arp 1 xmit-hash- policy layer2
iface bondB inet manual
bond-lacp-rate fast
bond-miimon 100
bond-mode 802.3ad
bond-
bond-slaves none
bond-
hwaddress 48:df:37:21:ed:98
mtu 9134
post-up route add -net 100.80.39.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.39.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.59.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.59.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.69.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.69.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.38.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.38.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.48.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.48.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.58.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.58.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.68.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.68.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
auto vhost0 net/bondB/ address) type vhost net/bondB/ address) --vrf 0 --vhost-phys --type physical net/bondB/ address) --vrf 0 --type vhost --xconnect bondB
iface vhost0 inet static
address 100.80.49.1/24
pre-up ip link add address $(cat /sys/class/
pre-up vif --add bondB --mac $(cat /sys/class/
pre-up vif --add vhost0 --mac $(cat /sys/class/
post-down vif --list | awk '/^vif.*OS: vhost0/ {split($1, arr, "\/"); print arr[2];}' | xargs vif --delete
post-down vif --list | awk '/^vif.*OS: bondB/ {split($1, arr, "\/"); print arr[2];}' | xargs vif --delete
post-down ip link delete vhost0
The file should look like this after vrouter installation - making sure the configuration is persitent across reboots etc:
root@ic- skbrat2- cz37486c8s: ~# cat /etc/network/ interfaces. d/vrouter. cfg ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ## ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ##
#######
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
#######
auto bondB num-grat- arp 1 xmit-hash- policy layer2
iface bondB inet manual
bond-lacp-rate fast
bond-miimon 100
bond-mode 802.3ad
bond-
bond-slaves none
bond-
hwaddress 48:df:37:21:ed:98
mtu 9134
auto vhost0 net/bondB/ address) type vhost net/bondB/ address) --vrf 0 --vhost-phys --type physical net/bondB/ address) --vrf 0 --type vhost --xconnect bondB
iface vhost0 inet static
address 100.80.49.1/24
pre-up ip link add address $(cat /sys/class/
pre-up vif --add bondB --mac $(cat /sys/class/
pre-up vif --add vhost0 --mac $(cat /sys/class/
post-down vif --list | awk '/^vif.*OS: vhost0/ {split($1, arr, "\/"); print arr[2];}' | xargs vif --delete
post-down vif --list | awk '/^vif.*OS: bondB/ {split($1, arr, "\/"); print arr[2];}' | xargs vif --delete
post-down ip link delete vhost0
post-up route add -net 100.80.39.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.39.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.59.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.59.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.69.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.69.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.38.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.38.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.48.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.48.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.58.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.58.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
post-up route add -net 100.80.68.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true
pre-down route del -net 100.80.68.0 netmask 255.255.255.0 gw 100.80.49.254 metric 0 || true