Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-24-2014, 08:23 PM   #1
LQ Newbie
Registered: Sep 2014
Posts: 4

Rep: Reputation: Disabled
Automatic selection of two ethernet connections

I configured my arm Debian/Wheezy box with two ethernet connections, one through the lan port and the other through a wifi dongle. The configuration is the same as what described here for Raspberry Pi and it worked fine there. However, when I configured my server on Pogo Mobile, it also has Debian/Wheezy installed as RPi, I have very difficult time to make it work.
First, if I connected the ethernet cable and made the wlan0 up, I could ssh into the server on either ip address. However, when I unplugged the ethernet cable, I could not ssh into the wifi ip address anymore. Then I found that if I disabled eth0 by "ifdown eth0," the wifi ip address will still work even after unplugging the ethernet cable. So I added "ifdown eth0" to rc.local before exit. Sure enough, I can restart the device with the ethernet cable unplugged and the wifi still works.
Now came the second problem, I found that, even though the device could reach other devices on the same local net, it couldn't ping entities on internet outside local net. By checking using "route -n", I found the the gateway was reset after doing "ifdown eth0". It would work again if I did a "route add default gw 192.169.x.x(Gatewayip)", so I added this line to rc.local also. After that, everything works fine for now.
However, there is another strange thing going on. When I check the available ip addresses by using Advanced IP Scanner, I can see that the ip address of the ethernet port still showed up and I can ssh in using that ip, even though "ifconfig" showed only lo and wlan0 but no eth0.
The fix I did was quite a Kludge. What I want is like in RPi, when both are connected, I can ssh into it and connect to internet on either ip address. If only one connection is up, I would be able to connect to it using the connected one. However, I don't know too much about Linux networking to figure this out. Hope someone knowledgeable can help.
Thanks in advance.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Word - Automatic Selection Word Count? NotAComputerGuy General 8 10-29-2012 06:18 AM
Two Ethernet connections sleepykit Mandriva 1 02-05-2008 10:01 PM
Trouble with multiple ethernet connections earthmeLon SUSE / openSUSE 7 11-02-2006 04:15 PM
BNC connections on ethernet cards StressedLemming Linux - Networking 1 10-31-2003 02:00 PM
ethernet connections vicente Linux - Networking 1 09-30-2001 01:18 PM > Forums > Linux Forums > Linux - Networking

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration