[plug] Help with routing

Matt Kemner zombie at wasp.net.au
Thu Feb 22 16:32:14 WST 2001


On Thu, 22 Feb 2001, BaRT wrote:

> eth0 ip is *.*.*.254 and goes to a ether switch with the rest of the c class
> on it but one IP.
> 
> eth1 ip is *.*.*.253 with a cross over cable to one host *.*.*.252(same c
> class as above). I can get *.*.*.252 to ping the linux router and the rest
> of the internet, how do I make is so it can ping the rest of our c class.

Hi Bart

You need to change the netmask on eth1 & the .252 machine so they know
they are the only machines on the 'net.  Normally you would route a /30
network (netmask 255.255.255.252) which is 4 IPs (including base &
broadcast so you can only use 2 of them) but with the numbers you are
using that is not practical.  I would set the netmask to 255.255.255.255
and then add a route on the .252 machine for the rest of the class C
(route add -net x.x.x.0 netmask 255.255.255.0 gw x.x.x.253)

You also need to add a host route for .252 from the "router" (the box with
2 ethers)

route add x.x.x.252 dev eth1

You then need to let the other machines know they need to route to .252
via .254 - either by adding a route on each of them

(route add x.x.x.252 gw .254    if they are linux machines)

or by using "proxy arp" on the "router", which means it will tell the
other machines on the network that it is .252 (and it will forward any
packets on to the real .252 because you gave it the route)

run this command on the router:

arp -Ds x.x.x.252 eth0 pub

This tells it to answer arp requests for .252 on eth0

Hope this helps.

If you need me to clarify any of this, let me know

 - Matt




More information about the plug mailing list