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.
I have a strange issue and am hoping for a little help. I have two class C subnets. When I assign the IP/Gateway from one class C, everything works great. When I change the IP/Gateway to the other subnet, it doesn't.
On subnet 1, everything works.
On subnet 2, I can ping localhost but when I ping the IP assigned to my NIC, it gets the first packet then all the others bounce. I cannot ping anything outside the box. The strange thing is that from another machine on subnet 2, I can ping the linux box and even telnet to it (although getting to the login screen takes forever).
If I swap the IP/Gateway info back to subnet 1, everything works fast and correctly. I have no static routes set. The only changes I'm making are in /etc/sysconfig/network (gateway) and /etc/sysconfig/network-scripts/ifcfg-eth0 (ip) and dropping/restarting the network.
I'm using Redhat 7.0, kernel 2.2.16-22
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
123.74.176.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 123.74.176.1 0.0.0.0 UG 0 0 0 eth0
I do have a firewall but that shouldn't matter when pinging the IP associated with my NIC, should it? Even if I had no network cable connected, shouldn't I be able to ping the IP? Right now, when I try to ping the IP, the first ping returns and the rest time out.
My first IP is 201.98.66.75 w/subnet 255.255.255.0 -> This one works without any issues.
Second IP is 123.74.176.253 w/subnet 255.255.255.0 -> This one returns first ping and times out the rest although I can ping/telnet into the box from another machine on the same subnet - it's just slow.
Thanks for your help!
PS: The first two octects have been changed on the iP addresses for security and such.
the 201.x.x.x and 123.x.x.x are belong to different network ID, maybe you would like to try using the custom subnet mask to borrow x bit depeding on how you want to design it, instead of the default subnet mask.
Last edited by shoot2kill; 07-18-2002 at 12:18 PM.
If I understand correctly, there's a solution:
Subnet 1: gateway set to IP from subnet 1 (nic1)
Subnet 2: gateway set to IP from subnet 2 (nic2)
Router: 2 nics, one for subnet1, the second one for subnet2.
It looks you're using one nic on router with 2 subnets. It's not a good solution, especially when they are so different.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.