2

I am doing some development on a raspberry pi, running arch linux on both the pi and my desktop. After having horrible connection problems with using just wireless (I live in an apartment complex which provides the internet through wireless), I connected the two through a wired router I had lying around, intending to still use the wireless for the internet connection and the wired just as a "private" network between the pi and the desktop.

The problem is as follows:

It appears that the wired connection takes precedence on both computers for internet (makes sense...same flavor of linux). Once plugging in the wired connection to both the pi and my desktop, I was still able to talk over the wireless network (ssh to the pi using its wireless ip from the desktop), but both computers started to try using the wired interface as their internet connection. The wired doesn't have internet access, so this obviously causes some problems. I would like to either set the wireless network to be the default "internet" connection, leaving the wired as a "private" network, or somehow merge the connections so that whichever has access to the internet is the one used for internet lookups. What is the general procedure for doing this?

I don't even know how to google this question properly and I have never done something like this. I have been using linux exclusively on my computers for about 3 years now, with about a year on arch linux. My rackspace server that I rent seems to do something like this, but it comes pre-configured that way and I never bothered to really delve into the reasons why it worked that way (in fact, while I am adept at fixing many problems that crop up during linux usage (drivers, package conflicts, etc), I am still quite ignorant of the network configuration options).

Thanks in advance.

2
  • How are devices getting addresses from the wired network? DHCP or static? May 25, 2013 at 22:25
  • DHCP. Its a belkin router I have the wired interfaces plugged into May 25, 2013 at 22:53

2 Answers 2

3

If the computers are trying to use the wired interface for all traffic, it means they were configured for that – something added a default route over eth0. You said in a comment that they both get IP addresses from DHCP, so it's also DHCP that sets up all routes.

It would be best to configure the router to not offer the incorrect routes over DHCP. If it doesn't let you do that, then set up DHCP clients to reject those routes – in dhcpcd.conf it would probably be:

nogateway
0

I am not sure specifically with Arch, but the following should work with many Linux distros:

In /etc/sysconfig/network (or whatever the network config file is for Arch) add the line:

GATEWAYDEV=wlan0

Or whatever your wireless interface is. This will fork any non-local traffic over the wireless interface.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .