Re: kernels > 2.1.14 can't /sbin/route add -net 127.0.0.0

Richard B. Johnson (root@analogic.com)
Sun, 29 Dec 1996 22:21:27 -0500 (EST)


On Sun, 29 Dec 1996, David M. Meyer 541/346-1747 wrote:

> >> > [root@endor:/home/meyer] 4# /sbin/route add -net 127.0.0.0
> >> > SIOCADDRT: Invalid argument
> >>
> >> Add 'netmask 255.0.0.0' to the command.
>
> # /sbin/route add -net 127.0.0.0 netmask 255.0.0.0
> SIOCADDRT: No such device
>
> >> have you tried
> >>
> >> # /sbin/route add -net 127.0.0.0 dev [presumably lo]
>
> # /sbin/route add -net 127.0.0.0 dev lo
> SIOCADDRT: Invalid argument
>
> >> You might want to route add -net 127.0.0.0 lo
>
> # /sbin/route add -net 127.0.0.0 lo
> SIOCADDRT: Invalid argument
>
> Also,
>
> # /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 dev lo
> SIOCADDRT: File exists
>
> All this with
>
> # ifconfig -a
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
> UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
> RX packets:12 errors:0 dropped:0 overruns:0
> TX packets:12 errors:0 dropped:0 overruns:0
>
> eth0 Link encap:10Mbps Ethernet HWaddr 00:C0:4F:D9:46:AB
> inet addr:128.223.72.29 Bcast:128.223.72.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:12471 errors:0 dropped:0 overruns:0
> TX packets:3177 errors:0 dropped:0 overruns:0
> Interrupt:11 Base address:0xdce0
>
>
> and
>
> # netstat -rn
> Kernel routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 128.223.72.0 0.0.0.0 255.255.255.0 U 32767 0 0 eth0
> 0.0.0.0 128.223.72.1 0.0.0.0 UG 1 0 0 eth0
>
> Confused.
> Dave
>

This works:
# cat /etc/rc.d/rc.inet1

#
# File created by root using network_setup on Thu Dec 12 15:35:20 1996
# Modify /etc/network.conf to change.
#
OLD_PATH=${PATH}
PATH=/sbin:/usr/sbin:/bin:/usr/bin
hostname chaos
domainname analogic.com
ifconfig lo 127.0.0.1
route add -net 127.0.0.0 dev lo metric 0 netmask 255.0.0.0
ifconfig eth0 204.178.40.224 netmask 255.255.248.0 broadcast 204.178.40.255
route add -net 204.178.40.0 dev eth0 metric 0 netmask 255.255.248.0
route add default gw 204.178.40.1 metric 1 dev eth0 netmask 0.0.0.0
PATH=${OLD_PATH}

# ifconfig

lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:2381 errors:0 dropped:0 overruns:0
TX packets:2381 errors:0 dropped:0 overruns:0

eth0 Link encap:10Mbps Ethernet HWaddr 00:A0:76:A0:50:53
inet addr:204.178.40.224 Bcast:204.178.40.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19134567 errors:0 dropped:0 overruns:0
TX packets:1226546 errors:0 dropped:0 overruns:0
Interrupt:11 Base address:0xfca0

There have been some changes to the network code so that there do not
seem to be the same defaults as in the past. Therefore, I made a program
to precisely create an /etc/rc.d/rc.inet1 file for each of my systems
based upon reading a configuration file. What I have shown is the output
from that program.

Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.16 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-