Hi,
I'm trying to configure a pc with an RJ45 NIC and a wireless interface .
the 2 are on 2 different subnets . the RJ45 is on 192.168.2.x and the wifi is on 192.168.1.x .
the following configuration doesn't work even if it makes sense to me and, as far as I can tell, it contains everything you need to make it work .
I can ping anything I'm supposed to be able to ping via local IP but the internet connection ( the gateway ) doesn't work .
/etc/network/interfaces
Code:
allow-hotplug enp3s0f2
iface enp3s0f2 inet static
address 192.168.2.2
netmask 255.255.255.0
network 192.168.2.255
dns-nameservers 208.67.220.220
post-up ip route add 192.168.2.0/24 dev enp3s0f2 src 192.168.2.2 table rt1
post-up ip route add default via 192.168.2.1 dev enp3s0f2 table rt1
post-up ip rule add from 192.168.2.2/24 table rt1
post-up ip rule add to 192.168.2.2/24 table rt1
allow-hotplug wlp2s0
iface wlp2s0 inet static
pre-up ip link set dev wlp2s0 up
address 192.168.1.11
netmask 255.255.255.0
network 192.168.1.255
dns-nameservers 208.67.222.222
wpa-ssid <OMISSIS>
wpa-psk <OMISSIS>
post-up ip route add 192.168.1.0/24 dev wlp2s0 src 192.168.1.11 table rt2
post-up ip route add default via 192.168.1.1 dev wlp2s0 table rt2
post-up ip rule add from 192.168.1.11/24 table rt2
post-up ip rule add to 192.168.1.11/24 table rt2
/etc/iproute2/rt_tables
Code:
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
1 rt1
2 rt2
/etc/resolv.conf
Code:
nameserver 208.67.222.222
Code:
ip -a route
169.254.0.0/16 dev enp3s0f2 scope link metric 1000
192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.11
192.168.2.0/24 dev enp3s0f2 proto kernel scope link src 192.168.2.2