[H-GEN] Re: Linux 2.2 kernel routing table

Andrae Muys a.muys at mailbox.uq.edu.au
Thu Feb 24 20:46:15 EST 2000


[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics.  Please observe the list's charter.          ]

On Fri, 25 Feb 2000, Rawlinsons (Qld) Head Office wrote:

> Andrae,
> 
> Apropos our discussion in McGill's bookshop the other day, I built a
> test version of RedHat 6.0 and the routing table looks like this:
> 
> Destination      Gateway         Genmask            Flags Iface
> 192.168.1.123  *                     255.255.255.255  UH    eth0
> 192.168.1.0     192.168.1.123  255.255.255.0      UG   eth0
> 192.168.1.0     *                     255.255.255.0      U      eth0
> 127.0.0.0        *                      255.0.0.0             U     lo
> 
> The equivalent RedHat 5.2 routing table would not have entries 2 and 3.
> 
> The problem with the routing table is this: if I add another gateway
> for the modem, pppd gets confused by the presence of two gateways and
> refuses to dial out through the modem.
> 
> I followed your suggestion to delete the gateway with "route del
> default" and I got the following error message: "SIOCDELRT: No such
> process".
> 
> Any thoughts?
> 

Yes :),

1st, your routing table is seriously broken.  You have 2 routes to the
192.168.1/24 network, and one of them is gatewayed through a machine on
that network (to which you have a seperate route).  I'm not surprised the
machine is confused, that table leaves me confused :).

I'm going to assume you have the following network configuration.


  Office               DMZ      Gateway        ISP         Internet

In-Server   Firewall Out-Server PPPbox       Dialin
  |          |   |      |        |  |         |  |
  +----------+   +------+--------+  +--//-----+  +------->ISP/INTERNET
  |
Host 2

<Ethernet-1>   | <Ethernet-2>     | <PPP-link> | <Ethernet/ISDN/ATM/etc>

Office network 192.168.1/24
DMZ network 192.168.2/24

Firewall: eth0 - 192.168.1.1 and eth1 - 192.168.2.1
PPP-Box:  eth0 - 192.168.2.2 and ppp0 - 130.102.2.14 (real IP address).
Dialin:   130.102.2.15 (serverIP of PPP link)

In this case your routing table should look like this:

PPP-Box:
Destination      Gateway         Genmask            Flags Iface
127.0.0.0           *           255.0.0.0            U      lo
192.168.2.0         *           255.255.255.0        U      eth0
192.168.1.0     192.168.2.1     255.255.255.0        UG     eth0
default         130.102.2.15    0.0.0.0              UG     ppp0

Firewall:
Destination      Gateway         Genmask            Flags Iface
127.0.0.0           *           255.0.0.0            U      lo
192.168.1.0         *           255.255.255.0        U      eth0
192.168.2.0         *           255.255.255.0        U      eth1
default         192.168.2.2     0.0.0.0              UG     eth1

Best way for now is simply to

#route del -net 192.168.1.0
#route del 192.168.1.123

That order should work, but if it dosn't try differnet orders until it
does.  If you are having real problems try

#ifconfig eth0 down
#route -n

and delete every route in the table except loopback.

You should also disable IP-forwarding/mascarading, and configure the
gateway box as a host on both networks.  Add the routes you need to access
the ethernet, and then try activating the ppp link.  You should make sure
you don't have a default route except when the ppp-link is up.

Once you have the gateway talking to both networks (internal and
external), then start setting up IP-mascarading, for help with that I'm
going to have to defer to someone who's actually done it before :).

Anyway I hope this helps, and I've also cc'd this to the Humbug mailing
list for further advice and comment.

Andrae Muys

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andrae Muys <andrae at humbug.org.au> "Never ascribe to malice that which is
Senior IT Officer                   adequately explained by incompetence." 
The Centre for Magnetic Resonance                     -Napoleon Bonaparte
The University of Queensland


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list