route and netmask - proper syntax is?

zinc (zinc@zifi.genetics.utah.edu)
05 Feb 1997 21:45:39 -0700


-----BEGIN PGP SIGNED MESSAGE-----

hi,

below is my current rc.inet1 script (slackware rc.d setup). neither
routing.txt nor policy-routing.txt seem to provide workable solutions
to why my setup does not work with newer kernels.

with 2.0.28, 'route -v' gives this (sorry for the long lines):

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 499 eth0
loopback * 255.0.0.0 U 0 0 9 lo
default 155.100.229.127 0.0.0.0 UG 1 0 18566 eth0

however, with 2.1.24 i do not get the loopback (lo) set up.

what is the correct syntax?

thanks,

- -pjf

===============================================================
#! /bin/sh
#
# rc.inet1 This shell script boots up the base INET system.

HOSTNAME=`cat /etc/HOSTNAME`

# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1

/sbin/route add -net 127.0.0.0

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface. If you're only using loopback or SLIP, don't include the
# rest of the lines in this file.

# Edit for your setup.
IPADDR="155.100.229.31" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
NETWORK="155.100.229.0" # REPLACE with YOUR network address!
BROADCAST="155.100.229.255" # REPLACE with YOUR broadcast address, if you
# have one. If not, leave blank and edit below.
GATEWAY="155.100.229.127" # REPLACE with YOUR gateway address!

/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

# Uncomment these to set up your IP routing table.

/sbin/route add -net ${NETWORK} netmask ${NETMASK}

/sbin/route add default gw ${GATEWAY} metric 1

# start ndc here for nameserver

/usr/sbin/ndc start

# End of rc.inet1

- --
"Those that give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Benjamin Franklin (1773)
finger zinc-pgp@zifi for PGP key
zifi runs LINUX 2.0.28 -=-=-=WEB=-=-=-> http://zifi.genetics.utah.edu

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBMvbg603Qo/lG0AH5AQGOygP/SB5SDMukRLUS1tGmiruF7t8+Or1v/DWO
71TmtobSnNVe3Y+IzgVVWpInabjEgZKIBfgG7/48NaHDZ4IZNbrqX68tUBZYogzJ
0FDtz4sXpz86dVkcJ8rJzkDaEqkVdXhsMg05nq1kF5E4ocTkkMjYyncGlR63pXoZ
ydnWlbYbGg4=
=E51+
-----END PGP SIGNATURE-----