LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to select the right interface with two network devices. (https://www.linuxquestions.org/questions/linux-networking-3/how-to-select-the-right-interface-with-two-network-devices-677793/)

mrgreedy 10-20-2008 08:23 AM

How to select the right interface with two network devices.
 
Hi,

I'm trying to use the wireless card on my new Dell X1 laptop, I think I know what's wrong but I don't know how to fix it.

Both the Ethernet and Wireless devices are detected. Ethernet is on eth0 and the wireless interface is on eth1. I can connect my browser and ping my ADSL router with the cable plugged in (eth0). I've configured my wireless settings and it has no problem connecting to the wireless access point with a good quality connection. The device appears to be working well.

However, if I pull out the network cable, I assumed that the web browser or pinging the ADSL router would go via the connected wireless card. But I can't connect. Using iptables I can actually see occasional broadcast packets from my router coming in on the wireless card (eth1).

Having looked at #route and #arp, I can see that the default route is only configured to use eth0. Is this why it doesn't work? If so, how can I add a second default route to use eth1?

Thanks,
MrGreedy

mrgreedy 10-20-2008 02:11 PM

I've spent some time looking into my problem. It seems as though my computer is trying to use eth0 no matter what happens.

If I try to ping my router with #ping 192.168.2.1, it fails. But if I specify the wireless device with #ping -I eth1 192.168.2.1, then it works. I don't know how to get Firefox to use eth1. Is there a way to configure my computer to use eth1 rather than eth0 when the connection on eth0 is down, ie no cable.

Appreciate any help.
Pete

mrgreedy 10-20-2008 02:54 PM

I've now managed to get Firefox working with wireless.

I'm using Slackware, and I had to bring down eth0 with '#./rc.inet1 eth0_stop', so that ping started using the eth1 (wireless) interface. I also had to do '#route add default gw 192.168.2.1' in order for Firefox to start working.

I'm sure there's a proper solution to this, but for now I'll probably stick those commands in a script or something.


All times are GMT -5. The time now is 02:14 AM.