Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Linux Router Configuration for 2 subnets ??????????????????????????????????????????????????????????????????????? LOST

Posted on 2004-09-10
Last Modified: 2010-03-18
Hello all,

I currently have two subnets at my house, connected by a Linux router.  Looks like the following:
     _________192.175.0.11                                                                                                                          __________192.175.0.19
     |                                                                    -------     _______192.175.0.17                                        |
     |                                       |L  R|    /                                                                        |
--------                    ___________                         |I   O| /                        ----------------                            -------
| PC A|___________|D-Link 624 A|_____________|N  U|/______________|D-Link 624 B |_______________| PC B|
--------                    ----------------                       /|U  T|                         -----------------                           -------
                                                                        / |X  E|                
                                    /   |    R|
                                                                          -------- Network         <------------------------------|------------------------------->  Network

I am using the 'D-Link 624' router as a switch to connect multiple computers at each subnet and then to the Linux router.  I am not using the WAN port on the D-Link routers.
The Linux Router includes two nics.

For the Network ---
D-Link A
IP --
SNM --

eth0 (on the linux machine)
IP --
SNM --

IP --
SNM --

For the Network ---
D-Link B
IP --
SNM --

eth1 (on the linux machine)
IP --
SNM --

IP --
SNM --

For the linux router I simply installed Red Hat 9 without a firewall, and turned on ip forwarding.  I don't need a firewall at the moment.
Now, from any machine on the network, I can ping all devices on its network and the nic on the linux router that is on the other network.
EX:   I can ping from (computer) to linux router).

My problem is that I can't ping any thing else in the other side of the linux router. EX (computer) cannot ping any device past linux router).

I think that the IP Forwarding on the linux box is working because eth0 and eth1 are on different subnets, and i can ping both cards from any device on the network.
I just cant ping past the D-Link routers from the other subnet.

Any help on my configuration with the Linux box or the D-Links would be appreciated.
Question by:jneely
  • 2
  • 2
LVL 40

Expert Comment

ID: 12031576
IP forwarding is working since you can ping the other Linux NIC. What you haven't done is to give the nodes on each of the subnets a route to the other subnet. So when tries to ping the target node doesn't know that the reply should use as a gateway to the network.

> PC B
> IP --

I assume that's a typo and it should be "IP --"

Author Comment

ID: 12035067

IP --
SNM --

Author Comment

ID: 12035168
So, you're saying that I should create an entry in the routing tables for each computer on the network.  If so, this is something I've already tried.  Each computer on the network is pointing to the linux router as its gateway already.  i.e.  PC A -- gateway --       and
                                                                                                PC B -- gateway --

What I haven't figured out is how to point the D-links to the linux router.  They have the correct ip address and subnet mask.  But there is no place for me to enter a gateway to the linux router, without using the WAN ports.

I really think that this is where my problem lies.
LVL 40

Accepted Solution

jlevie earned 500 total points
ID: 12039183
If everything is plugged in to the LAN ports of the D-Link it doesn't play a role in routing. You then are simply using the D-Link as a switch. And the fact that you can touch the RH box's NICs indicates that to be true. So it is something else.

How did you enable routing on the RedHat box, via an edit to /etc/sysctl.conf or an 'echo 1 >/proc/sys/net/ipv4/ip_forward'? If the later has there been a reboot since? The echo method won't survive a reboot.

What we need to do now is to look at a tcpdump when you try a ping to an IP of the far side of the Linux router. You should see the packet come in on one NIC and go out on the other. If there's no return packet the problem lies with the far end machine.

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert Routes to Linux (CENTOS 7.0) 3 107
CentOS7 Xvnc gdm login 9 227
linux, squid server 23 59
Weird Samba Connectivity Issue... 7 51
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question