Make hosts/campus-host{1,2}_interfaces the source of truth for the
campus host IP and default route, and have clab simply invoke 'ifup
eth1' at container start to apply it. Previously the bound interfaces
file was unused and the real config lived in the YAML exec block,
which was misleading.
BusyBox ifup in the network-multitool image needs 'address' plus
'netmask' rather than a CIDR, so split the address accordingly. Also
add 'post-up ip route replace default via <fabric-gw>' so the fabric
default overrides the management DHCP default even when one is already
installed.
10 lines
191 B
Plaintext
10 lines
191 B
Plaintext
auto lo
|
|
iface lo inet loopback
|
|
|
|
auto eth1
|
|
iface eth1 inet static
|
|
address 10.60.70.102
|
|
netmask 255.255.255.0
|
|
gateway 10.60.70.1
|
|
post-up ip route replace default via 10.60.70.1
|