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.
How can I force eth0 to use /etc/host and ppp0 to use my IPS DNS servers? I have a strange problem with Redhat 7.3. When I first boot my computer (without connecting to the internet) I can browse my LAN. Once I connect to my ISP with my NIC still active, all name resolution stops. I can't browse my LAN or the Internet. If I deactivate my NIC before I connect to the internet, I can then browse the internet. This is driving me nuts! Any suggestions would be appreciated.
Sounds like a default route issue. You can have only one default route on a system. If you add another connection, then you will probably have issues with how the traffic is routed. For example, if you have the NIC first, the default route will likely be for the NIC, let's say that default route is 192.168.1.1 if you add the ppp0 connection, it will probably end up with something like 12.234.65.14 (completely random here, the actual address would be supplied by your ISP). Your default route is still 192.168.1.1
The problem comes from the interfaces not knowing how to appropriately route traffic. The 12.x.x.x address has no idea where to go, since your default is internal, and vice versa.
You could probably add a static route for one or the other connection so that traffic on a given network would know which way it is supposed to go.
Post this info:
netstat -rn with just the NIC
netstat -rn with just the ppp0
netstat -rn with the NIC AND ppp0 with the NIC attached first
netstat -rn with the NIC AND ppp0 with ppp0 attached first
This sounds right. The machine I'm on has a Conexant HSF modem, and (of course) it wasn't detected during setup. So, the default route must have been set through the NIC. I will post the results of the netstat -rn commands. How can I get around this problem? I tried
O.K. the fog is starting to lift...
Here are the results of netstat
netstat -rn with just the NIC
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 10.255.255.254 0.0.0.0 UG 40 0 0 eth0
netstat -rn with just the ppp0
Destination Gateway Genmask Flags MSS Window irtt Iface
209.240.0.196 0.0.0.0 255.255.255.255 UH 40 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 209.240.0.196 0.0.0.0 UG 40 0 0 ppp0
netstat -rn with the NIC AND ppp0 with the NIC attached first
Destination Gateway Genmask Flags MSS Window irtt Iface
209.240.0.196 0.0.0.0 255.255.255.255 UH 40 0 0 ppp0
10.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 10.255.255.254 0.0.0.0 UG 40 0 0 eth0
netstat -rn with the NIC AND ppp0 with ppp0 attached first
Destination Gateway Genmask Flags MSS Window irtt Iface
209.240.0.196 0.0.0.0 255.255.255.255 UH 40 0 0 ppp0
10.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 209.240.0.196 0.0.0.0 UG 40 0 0 ppp0
I see that the Gateway for 0.0.0.0 changes with whatever connection I start with first, and I can see in Network Configuration where to set a static route, but I'm not sure which values belong. To set a static route for eth0, do I set:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.