Re: Linux Routing

From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 01/10/05


Date: Mon, 10 Jan 2005 15:17:54 -0600

In article <41e1874b$0$16575$cc9e4d1f@news-text.dial.pipex.com>, Tim Owen
wrote:

>The network structure is shown on the work doc bellow.

Your picture is unreadable. Remember that most news readers are
going to wrap at 80 characters or so.

>Linux Route Table

[Cleaned up and put back into the original format]

>Kernel IP routing table
>Destination Gateway Genmask Flags Metric Ref Use Iface
>10.101.101.0 10.101.101.35 255.255.255.0 UG 0 0 0 eth2
>10.101.101.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
>192.168.32.0 192.168.32.35 255.255.255.0 UG 0 0 0 eth0
>192.168.32.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>192.168.0.0 192.168.0.35 255.255.255.0 UG 0 0 0 eth1
>192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

1. The three routes with gateways (flag UG) are unwanted. Find out where
these are being set (somewhere in /etc/sysconfig/network-scripts most likely)
and get rid of them.
2. There should also be a loopback interface.

This means your routing table should look like this:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.32.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.101.101.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

I think your routing setup is a result of a misunderstanding. In *nix, you
need a gateway to talk to hosts that are not on the same network. Conversely,
if they _are_ on the same network, you don't need a gateway. Microsoft uses
the term 'gateway' to identify the interface, as Linux uses 'ethX' or 'lo'.

>Problem 1
>---------------
>The router can ping a pc placed onto each network. The pc cannot ping the
>router. I.e a pc (192.168.0.153) can be pinged from 192.168.0.35, but .0.153
>cannot ping .0.35.

You have set a firewall that blocks responses. Fix that.

>Problem 2
>---------------
>>From a pc on the any of the networks I cannot ping any of the other
>networks. Is this because the router isn't accepting pings.

This _could_ be because of that firewall, and it's also probable that you
are not forwarding.

>How do I check that forwarding is turned on?

cat /proc/sys/net/ipv4/ip_forward

There should be a 'one' in there. This is set up by a variable in
/etc/sysconfig/network (FORWARD_IPV4= set to 'true' or 'yes')

        Old guy



Relevant Pages

  • Re: AIX 1.3 Failures and Fables
    ... DESTINATION GATEWAY FLGS REFCNT USE INTERFACE ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: AIX 1.3 Failures and Fables
    ... I don't know if 1.3 has SMIT or its equivalent but there should be some way to add a default gateway which is your router. ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: RRAS Routing Problems
    ... erroneously routing through the DSL router. ... How to Setup Windows, Network, VPN & Remote Access on ... -All clients default routed to the RRAS Server ... 192.168.1.29: Cannot ping 192.168.2.29 ...
    (microsoft.public.windows.server.networking)
  • Re: Network connectivity between FreeBSD and Linux
    ... > When I ping from my FreeBSD to the FC2 box, ... > are never making it to the network cable - is my network card ... > to set the IP and netmask - no errors were reported. ... Did you set a gateway in /etc/rc.conf? ...
    (freebsd-questions)
  • Re: Misbehaving routing tables
    ... The metrics are supposed to give priority to ... I have including a portion of the routing table below immediately following ... Default Gateway: 192.168.10.254 ... I did notice that the default gateway is the 192.168.10.x network, ...
    (microsoft.public.windows.server.networking)