I set up a network bonding for failsafe in Ubuntu 18.04 according to this netplan:
network:
version: 2
ethernets:
eno1:
dhcp4: no
enp2s0:
dhcp4: no
bonds:
bond0:
addresses: [192.168.3.5/24]
gateway4: 192.168.3.253
nameservers:
addresses: [208.67.222.222,208.67.220.220,8.8.8.8,8.8.4.4]
dhcp4: no
interfaces:
- eno1
- enp2s0
parameters:
mode: active-backup
primary: eno1
Now when I log in I get:
IP address for enp2s0: 192.168.3.96
IP address for eno1: 192.168.3.96
IP address for bond0: 192.168.3.5
and ifconfig gives me (abridged):
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1500
inet 192.168.3.5 netmask 255.255.255.0 broadcast 192.168.3.255
inet6 xxx:a31d prefixlen 64 scopeid 0x20<link>
ether xxx:a3:1d txqueuelen 1000 (Ethernet)
eno1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
inet 192.168.3.96 netmask 255.255.255.0 broadcast 192.168.3.255
ether xxx:a3:1d txqueuelen 1000 (Ethernet)
enp2s0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
inet 192.168.3.96 netmask 255.255.255.0 broadcast 192.168.3.255
ether xxx:a3:1d txqueuelen 1000 (Ethernet)
I am sure that, before the bond was set, one of the two MACs ended with :a3:1c
Did I make mistakes while setting the bond, or is this an intended behaviour?
Edit
I had to reinstall and this is the file that the installer generated for my same configuration, including the bond:
network:
bonds:
bond0:
addresses:
- 192.168.3.5/24
gateway4: 192.168.3.253
interfaces:
- eno1
- enp2s0
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
parameters:
mode: active-backup
ethernets:
eno1: {}
enp2s0: {}
version: 2
Minor edits... watch the indents, spacing, and no tabs...
sudo netplan --debug generate
# generate config filessudo netplan apply
# apply configurationreboot
# insure proper operation