Specifying device to route traffic through; Or how to bind device to eth0
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Specifying device to route traffic through; Or how to bind device to eth0
Here is my problem. Have an onboard NIC (eth0) which is malfunctioning.
So I got USB->Ethernet adapter (Linksys USB2000). The device is being recognized by Centos OK and I see a new eth1 interface after doing ifconfig -a. However even after I assign IP and netmask to eth1 and ifup I still can't ping it if I disconnect cable from eth0. If cable is connected to eth0 I can ping both devices. Doing route command
shows last line as similar to
default 0.0.0.0 172.23.23.34 eth0
If understand things correctly the setup isn't working because the traffic is still trying to get out through eth0 when going over the default route. So when I unplug the cable and replug it into eth1 the traffic is still trying to go out over unplugged device(eth0).
So my two options are probably to setup new default route
route add default gw 172.23.23.34 eth1. The problem with this is that I can't seem to make this new default route permanent. Every time I reboot the machine route changes to 'eth0'.
Another idea is to somehow disable the eth0 device (the malfunctioning device) and to reassign 'eth0' to the USB->Ethernet adapter(currently at eth1). Not sure how to do this though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.