[Prev][Next][Index]
Route question.
Sofin Raskin (SDH-S) writes:
> I am starting to use Linux v99.12.
> I have the problem to define the route table.
> What is the right syntax to define the network ?
> I tried commands like this :
> route add X.X.X.0 eth0 4
> But 'route' defines the node instead of the network.
> My man doesn't have enough explanation.
> Any help will be welcomed.
I'd suggest upgrading to NET2DEBUGGED (which I don't think came with
v99.12), & following the NET2-HOWTO. The syntax of the route command
has changed afew times so I couldn't give you a route command that
would definitely work with your setup. For what it's worth, I do the
following to get the net here working (6 linux machines on an
ethernet, no connections to the internet), & I don't run any routing
daemons:
MYNAME=`/bin/hostname`
# Attach the loopback device.
/etc/ifconfig lo localhost
# Set up the Ethernet connection(s).
/etc/ifconfig eth0 ${MYNAME} netmask 255.255.0.0 broadcast 128.253.255.255
# Set up the primary (static) routes.
/etc/route add localhost
/etc/route -n add 128.253.0.0
This routes every address on the 128.253.0.0 network (every address
starting with 128.253) through the ethernet card.
Good luck,
Harvey J. Stein
Berger Financial Research
hjstein@math.huji.ac.il