This is a discussion on Re: Cannot ping host in another subnet within the Linux Networking forums, part of the Linux Forums category; As you say yourself, and as your routing table clearly shows, there is no route to the 192.168.100....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
As you say yourself, and as your routing table clearly shows, there is no
route to the 192.168.100.N network. This includes both the interface (eth1) on B and the host A. man route You'll need to add the route to that specific network. Note that your "default" is eth1. IOW, if the router doesn't know where a network is, it's going to use eth1 and hope for the best (which in this case didn't work). mas "spade" <kieneckb@web.de> wrote in message news:bd7jtq$r40$05$1@news.t-online.com... > Hi, > I have the following configuration > > Hostname IP address device > ----------------------------------------- > A 192.168.100.21 eth0 > B 192.168.100.3 eth0 > B 192.168.101.99 eth1 > C 192.168.101.20 eth0 > > > the Network Address is 192.168.100 or 192.168.101 and the netmask > 255.255.255.0. > > Host C is connected via LAN with B and B is also connected with A. > > Routing table of C: > > dest gateway address iface > 192.168.101.0 192.168.101.20 eth0 > default 192.168.101.99 eth0 > > Now I try to ping from host C to 192.168.101.99 on host B. This works fine! > However, when I try to ping from host C to 192.168.100.3 on host B or to > 192.168.100.21 on host A > then there is no route! > > Any idea what is wrong :-) > > |
|
|||
|
"spade" <kieneckb@web.de> writes:
]Hi, ]I was fiddling around but I was not successful yet! Maybe I have to repeat ]my understanding: ]The Routing table an host B is as follows: ]Kernel IP routing table ]Destination Gateway Genmask Flags Metric Ref Use ]Iface ]192.168.100.0 * 255.255.255.0 U 0 0 0 ]eth1 ]192.168.101.0 * 255.255.255.0 U 0 0 0 eth0 ]default 192.168.100.21 0.0.0.0 UG 0 0 0 eth1 This says send anything addressed to teh 192.169.100.x to eth1 (meaning eth 1 must be directly connected to all computers with those addresses, so that it can request and arp and get the ethernet numbers corresponding to each of those addresses. ) for any address 192.168.101.x send it to eth1 (with the same caveate) For any other address send it to 192.168.100.21 which must be connected directly via ethernet cable 1 to this machine so that it can arp the ethernet card number. ]The Routing table on host C is as follows: ]Kernel IP routing table ]Destination Gateway Genmask Flags Metric Ref Use ]Iface ]192.168.101.0 * 255.255.255.0 U 0 0 0 eth0 ]default 192.168.101.99 0.0.0.0 UG 0 0 0 eth0 Here there is only one ethernet. Note that eth0 need not be the same ethernet cable as eth0 on B. I have no idea which machine is 192.168.101.99 Is that Machine B? ]The Routing table on host A is as follows: ]Kernel IP routing table ]Destination Gateway Genmask Flags Metric Ref Use ]Iface ]192.168.100.0 * 255.255.255.0 U 0 0 0 eth0 ]default xxx.xxx.xxx.xxx 0.0.0.0 UG 0 0 0 ]eth1 What is xxx.xxx.xxx.xxx? There seems no route to that number anywhere on A? How does this machine know how to send a packet to that address? (unless it is on the 192.168.100.0 subnet and is directly connected to A via that ethernet cable connected to eth0) ]If I am sending now a package with the address 192.168.100.21 from host C ]then my understanding of the ]routing table is as follows: I have to send 192.168.100.21, ok, I have to ]take the default route through ]the gateway 192.168.101.99. There is no ther way. Now this pacage is ]received on host B. Now I have to Is B the machine 192.168.101.99? If not then there is no way C knows to send it to B. The address of B must be the gateway for C. ]apply the routing table of B. The routing table of B says whenever there is ]a package belonging to the ]subnet 192.168.100 send it via eth1 across the line, i.e. host A is ]listening on eth0 to so packages. Is A 192.168.100.21? ]If this understanding is true, then it might be, that I have to activate ]something on host B (IP forwarding ??). Yes, you certainly need to enable ip forwarding. ]However, in general are my routing tables and my understanding wrong?? Given the right answer to the questions above, yes. ]Spade ]"M. Swope" <mswope@nowhere.com> schrieb im Newsbeitrag ]news:pzIJa.161$ii6.121285690@newssvr11.news.prodig y.com... ]> As you say yourself, and as your routing table clearly shows, there is no ]> route to the 192.168.100.N network. ]> This includes both the interface (eth1) on B and the host A. ]> ]> man route ]> ]> You'll need to add the route to that specific network. Note that your ]> "default" is eth1. IOW, if the router ]> doesn't know where a network is, it's going to use eth1 and hope for the ]> best (which in this case ]> didn't work). ]> ]> mas ]> ]> "spade" <kieneckb@web.de> wrote in message ]> news:bd7jtq$r40$05$1@news.t-online.com... ]> > Hi, ]> > I have the following configuration ]> > ]> > Hostname IP address device ]> > ----------------------------------------- ]> > A 192.168.100.21 eth0 ]> > B 192.168.100.3 eth0 ]> > B 192.168.101.99 eth1 ]> > C 192.168.101.20 eth0 ]> > ]> > ]> > the Network Address is 192.168.100 or 192.168.101 and the netmask ]> > 255.255.255.0. ]> > ]> > Host C is connected via LAN with B and B is also connected with A. ]> > ]> > Routing table of C: ]> > ]> > dest gateway address iface ]> > 192.168.101.0 192.168.101.20 eth0 ]> > default 192.168.101.99 eth0 ]> > ]> > Now I try to ping from host C to 192.168.101.99 on host B. This works ]> fine! ]> > However, when I try to ping from host C to 192.168.100.3 on host B or to ]> > 192.168.100.21 on host A ]> > then there is no route! ]> > ]> > Any idea what is wrong :-) Sounds like IP forwarding is not set up on B. /etc/sysctl.conf and/or /etc/sysconfig/network ]> > ]> > ]> ]> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|