3

I have a laptop (Arch Linux with XFCE) that when I use at home I connect to the internet with either a wired connection on eth0 or with wifi on wlan0. At work I connect to the internet with wifi on wlan0 and to shared resources on a LAN via the wired connection on eth0. All IP addresses are obtained through DHCP.

My issue is that at work I can either be connected to the internet or the LAN but not both at the same time. Both eth0 and wlan0 have the correct ip addresses, but I am unable to access the internet when the wired connection is established. Is there an easy way to fix this?

1

You can setup routes on the Linux box to point to where you want your traffic to go to. So you can set the wifi as your default location for traffic and point your 10.x.x.x (or what ever IP space you use for your work) across the wired connection

man route

[root@localhost ~]# route -4
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    0      0        0 eth0
10.10.25.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.10.70.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
link-local      0.0.0.0         255.255.0.0     U     1003   0        0 eth1
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.