Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am having an issue with a server, which was working before I made a couple of changes. The server is a RH 9 machine and has two NICs in it. Originally, both of these NICs were on the same subnet or segment so there was no issue. But, for a few reasons, I had to change one of the NICs to a different network segment. So, eth0 (which works fine) has a default gateway address, a broadcast address and a network address. eth1 (which does not seem to work) has it's own default gateway and broadcast and network addresses. I have edited the ifcfg-eth1 file to reflect the new settings and I get no error messages when I restart the NIC. I can ping the new IP from the server itself and I can ping hosts on the internet (Google) from the machine (although I suspect that the machine is using eth0 to route out to the internet). However, I cannot ping this new NIC from any other hosts, including hosts on the same segment. I do have a firewall but have tried temporarily disabling it but it still does not function. I suspect this has something to go with a routing issue where eth1 is trying to use the eth0 default gateway to route packets and of course, this is not reachable because it is on a different segment.
So, does anyone see any solutions to this? Anyway to force eth1 to use a different default gateway than eth0?
Unfortunately there can only be one operational default gateway. Therefore although you can indeed force more than one default gateway to be listed by route for example, or if you have two NICs both using DHCP the sytem will set up apparently 2 default gateways, only the first 1 will actually be used as a default gateway.
Before doing anything about routing or IP forwarding I'd get pinging working between eth1 and another machine. It could be a hardware fault - NIC or cable (either broken or wrong type), or if you are trying to use the same hub/switch for both networks it could be that device not being able to cope. It could be a firewall at either end or simply a misconfigured network address.
Once you get the basic communication sorted then you can look at how to achieve what you want - I'm not sure why you think you want to have default routes on two networks. With 2 NICs and a firewall you can do pretty much what you want with the firewall configuration. As usual with linux you're spoilt for choice
Each segment uses a different switch and I don't think is is a hardware issue as this has all been working fine for a couple of years before this switch. Plus, I am able to ping out from the machine to a host outside of my network. When I look at netstat -r, the gateway for eth1 does not appear. Maybe I am confused? ifconfig appears to be normal with one exception. Even though I have set the net mask for eth1 to 255.255.255.240, it continues to show up as 255.255.255.248, which is the old netmask. I cannot find where this might be coming from as I have changes the ifcfg-eth1 network-script. to reflect the new netmask but it does not appear to be taking it.
Sounds as though the netmask is your problem. Could be that ifcfg-eth1 isn't the config file, mine now are of the format ifcfg-eth-id-00:01:02:03:c4:b5. If there aren't any like that then the only thing I suggest you do is search for 255.255.255.248 in files. That should show where the real config file is.