Below is my current setup, the main ethernet connection is configured with a static ip and it's working fine. The two other interfaces are connected to different Android hotspots using DHCP. I have also configured routes so that each interface can receive/send traffic independently
Below is my fully working /etc/network/interfaces file
Code: Select all
root@poweredge:/etc/network# cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp1s0
#iface enp1s0 inet dhcp
iface enp1s0 inet static
address 192.168.1.212
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
auto wlx74da388c32d0
iface wlx74da388c32d0 inet dhcp
wpa-ssid four
wpa-psk fcac8bd4439859aadf1457463f47f49091acb02895bd5a28914a1fc36969c66d
post-up ip route add default via 172.16.11.254 table wlx74da388c32d0
post-up ip rule add from 172.16.11.107 lookup wlx74da388c32d0
auto wlx74da388c32c7
iface wlx74da388c32c7 inet dhcp
wpa-ssid one
wpa-psk e629e0873738c638cde76ae81487effb28b0e22c309c9e163996e389a313c14c
post-up ip route add default via 192.168.43.1 table wlx74da388c32c7
post-up ip rule add from 192.168.43.209 lookup wlx74da388c32c7
Code: Select all
curl --interface wlx74da388c32c7 ifconfig.co
curl --interface wlx74da388c32d0 ifconfig.co
curl --interface enp1s0 ifconfig.co
However, I am running into issues when I setup a static IP on one of the wireless interfaces. For example when I change interface wlx74da388c32c7 to static IP as below
Code: Select all
auto wlx74da388c32c7
iface wlx74da388c32c7 inet static
address 192.168.43.100
netmast 255.255.255.0
gateway 192.168.43.1
wpa-ssid one
wpa-psk e629e0873738c638cde76ae81487effb28b0e22c309c9e163996e389a313c14c
post-up ip route add default via 192.168.43.1 table wlx74da388c32c7
post-up ip rule add from 192.168.43.100 lookup wlx74da388c32c7
Below is my rt_tables
Code: Select all
root@poweredge:/etc/iproute2# cat rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
10 wlx74da388c32d0
11 wlx74da388c32c7
Code: Select all
root@poweredge:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1e:4f:cd:c1:5f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.212/24 brd 192.168.1.255 scope global enp1s0
valid_lft forever preferred_lft forever
inet6 fe80::21e:4fff:fecd:c15f/64 scope link
valid_lft forever preferred_lft forever
3: wlx74da388c32c7: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 74:da:38:8c:32:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.43.100/24 brd 192.168.43.255 scope global wlx74da388c32c7
valid_lft forever preferred_lft forever
4: wlx74da388c32d0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 74:da:38:8c:32:d0 brd ff:ff:ff:ff:ff:ff
inet 172.16.11.107/24 brd 172.16.11.255 scope global wlx74da388c32d0
valid_lft forever preferred_lft forever