As per the documentation found here I have setup my dhcpd.conf with the following:
interface eth0
static ip_address=192.168.4.102/24
static routers=192.168.4.1
static domain_name_servers=8.8.8.8
interface wlan0
static ip_address=192.168.4.102/24
static routers=192.168.4.1
static domain_name_servers=8.8.8.8
However after a reboot only the Wifi has the new static IP:
2: enxb827ebfa27e1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:fa:27:e1 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.37/24 brd 192.168.4.255 scope global enxb827ebfa27e1
valid_lft forever preferred_lft forever
inet6 fe80::8dd2:e6ac:d404:fb53/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:af:72:b4 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.102/24 brd 192.168.4.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::5837:7479:fa9d:288a/64 scope link
valid_lft forever preferred_lft forever
I would have logically expected the Pi to:
- Give both adaptors the same static IP address
- Automatically switch between adaptors with a preference for Ethernet (and therefore only use one at a time)
How do I achieve this?