route and netmask - proper syntax is?

route and netmask - proper syntax is?

Post by zinc » Wed, 05 Feb 1997 04:00:00



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        *        U     0      0      499 eth0
loopback        *            U     0      0        9 lo
default         UG    1      0    18566 eth0

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

what is the correct syntax?


- -pjf

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


# Attach the loopback device.
/sbin/ifconfig lo

/sbin/route add -net

# 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=""       # REPLACE with YOUR IP address!
NETMASK=""       # REPLACE with YOUR netmask!
NETWORK=""       # REPLACE with YOUR network address!
BROADCAST=""   # REPLACE with YOUR broadcast address, if you
                                # have one. If not, leave blank and edit below.
GATEWAY=""     # 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)

zifi runs LINUX 2.0.28  -=-=-=WEB=-=-=->

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



route and netmask - proper syntax is?

Post by Markus Koskimi » Wed, 05 Feb 1997 04:00:00


Quote:>/sbin/route add -net

/sbin/route add -net netmask lo

Quote:>/sbin/route add -net ${NETWORK} netmask ${NETMASK}
>/sbin/route add default gw ${GATEWAY} metric 1

/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
/sbin/route add default gw ${GATEWAY} netmask metric 1 eth0

Hope this helps.

Markus Koskimies         "Kernel Panic... No, waita sec, I figured