Re: Linux router w/3 nics - need help with routing

From: David Efflandt (efflandt_at_xnet.com)
Date: 11/01/03


Date: Sat, 1 Nov 2003 03:02:09 +0000 (UTC)

On 30 Oct 2003 19:07:36 -0800, bob <notlinux101@yahoo.com> wrote:
> Howdy
>
> I am setting up a RedHat 7.3 router on a Dell gmt5100 (i586). When
> I boot up the machine the routing table shows (2) entries for eth2.
> How dose this happen? Is there a file somewhere that contains this
> information?

You have the same network on 2 different interfaces (same netmask and
broadcast). One of them either needs to be configured with different
netmask and broadcast, or if one (eth1?) leads only to the default gw, it
should have netmask 255.255.255.255, broadcast same as its IP, a host
route to 63.225.xxx.x8, and default gw 63.225.xxx.x8 (listing that gw
under eth0 with 192.168.0.0/24 network is wrong).

Or if you actually have multiple hosts on eth1 & eth2 (using proxy_arp)
you need to figure out the maximum IPs you need in one of them and set
that one to a more limited subnet of your main subnet. For example my
wireless subnet is a 255.255.255.248 portion of my main LAN subnet with
proxy_arp enabled on the main LAN interface.

For example to split the proxy_arp network in half:
eth1 63.225.xxx.x6 netmask 255.255.255.0
eth2 63.225.xxx.129 netmask 255.255.255.127

> I have been trying to delete the unwanted routing information and
> then install the route I want. While I can easily install the route I
> want I have not been able to find the magic combo to delete the
> unwanted routes for eth2.
> Can someone tell me what form the route del -net 63.225.xxx.0 dev
> eth2 command should take.

route del -net 63.225.xxx.0 netmask 255.255.255.0 dev eth2
But that might delete both of them, and you might have to add one back.
But if you properly configure your subnets, you would not have that
problem.

BTW, what is the point of writing 1 to a directory in your rc.local (see
below)?

> I have printed out the route man page and read it too many times.
> HELP!
>
> -=-
> contains of /etc/sysconfig/network-scripts/ifcfg-eth*
>
> DEVICE=eth0
> ONBOOT=yes
> BOOTPROTO=static
> IPADDR=192.168.0.1
> NETMASK=255.255.255.0
> GATEWAY=63.225.xxx.x8
>
> DEVICE=eth1
> ONBOOT=yes
> IPADDR=63.225.xxx.x6
> NETMASK=255.255.255.0
>
> DEVICE=eth2
> ONBOOT=yes
> IPADDR=63.225.xxx.x7
> NETMASK=255.255.255.0
>
> -=-
> output of route -n
> Kernel IP routing table Destination Gateway Genmask Flags Metric Ref
> Use Iface 63.225.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth2
> 63.225.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
> 192.168.0.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 63.225.xxx.x8 0.0.0.0 UG 0 0 0 eth1
>
> -=-
> containts of /etc/rc.d/rc.local
>
> #!/bin/sh
>
> touch /var/lock/subsys/local
> echo 1 > /proc/sys/net/ipv4/conf/eth2

Why do you echo 1 to a directory above?

> echo 1 > /proc/sys/net/ipv4/conf/all/proxy-arp
> echo 1 > /proc/sys/net/ipv4/tcp-syscookies
> -==-
>
> using iptables and shorewall 1.4.10a
>
> TIA
>
> Bob

-- 
David Efflandt - All spam ignored  http://www.de-srv.com/


Relevant Pages

  • Re: Event ID 1000 (Userenv) Error and Event ID 8021 (BROWSER) Error
    ... > destination route entry with the 192.168.0.1 GWY was higher priority, ... > the external network), and from there to the open Internet. ... > An additional item is that it appears that if any of the NICs in the ... > with destination addresses on the 192.168.1 subnet to get to the ...
    (microsoft.public.win2000.dns)
  • Re: Event ID 1000 (Userenv) Error and Event ID 8021 (BROWSER) Error
    ... > destination route entry with the 192.168.0.1 GWY was higher priority, ... > the external network), and from there to the open Internet. ... > An additional item is that it appears that if any of the NICs in the ... > with destination addresses on the 192.168.1 subnet to get to the ...
    (microsoft.public.win2000.networking)
  • Re: please advise - problem with routing
    ... and a network is a very important distinction in IP address configuration. ... you show that the 192.168.1.0/24 subnet has two devices ... ROUTE PRINT on NT4 ... ROUTE PRINT on router ...
    (microsoft.public.windows.server.networking)
  • Re: Someone can explain this to me?
    ... > Cisco3640 core router as dgw of the network, ... > Eigrp protocol running on all the devices except the pix. ... > 3640 (remember, this is the dgw of the subnet), all seems ok. ... It sounds like the 1712 is advertising a route to 172.16.1.107 to the ...
    (comp.dcom.sys.cisco)
  • OT: RRAS doesnt R
    ... A remote user now needs access to our network. ... She needs to connect via VPN ... Our office is only one subnet. ... Here's the routing table from a "route print" done on Dataman, ...
    (microsoft.public.cert.exam.mcse)