Subject: Re: writing to routing socket: File exists
To: Andrew Brown <atatat@atatdot.net>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: current-users
Date: 12/05/2000 16:28:07
>> - route add -inet 127.0.0.0 -netmask 0xff000000 127.0.0.1 -reject
>> see if we see any error here.
># route add -inet 127.0.0.0 -netmask 0xff000000 127.0.0.1 -reject
>writing to routing socket: File exists
>add net 127.0.0.0: gateway 127.0.0.1: File exists
>> - netstat -rn
># netstat -rnfinet
>Routing tables
>
>Internet:
>Destination Gateway Flags Refs Use Mtu Interface
>127 127.0.0.1 U 0 0 33192 lo0
I ran the same set of test on:
NetBSD starfruit.itojun.org 1.5L NetBSD 1.5L (STARFRUIT) #275: Tue Dec 5 14:06:46 JST 2000 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
for me it went just fine. typescript is attached (slightly
edited for readability).
itojun
---
(rebooted)
# head /etc/rc.d/network
#!/bin/sh
#
# $NetBSD: network,v 1.18 2000/08/02 13:59:11 itojun Exp $
#
# PROVIDE: network
# REQUIRE: root mountcritlocal tty sysctl
. /etc/rc.subr
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
XNS:
Destination Gateway Flags Refs Use Mtu Interface
ISO:
Destination Gateway Flags Refs Use Mtu Interface
X.25:
Destination Gateway Flags Refs Use Mtu Interface
AppleTalk:
Destination Gateway Flags Refs Use Mtu Interface
Internet6:
Destination Gateway Flags Refs Use Mtu Interface
::1 ::1 UH 0 0 33228 lo0
fe80::%lo0/64 fe80::1%lo0 U 0 0 33228 lo0
ff01::/32 ::1 U 0 0 33228 lo0
ff02::%lo0/32 fe80::1%lo0 UC 0 0 33228 lo0
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
fxp0* 1500 <Link> 00:90:27:96:1c:e1 0 0 0 0 0
lo0 33228 <Link> 0 0 0 0 0
lo0 33228 fe80::/64 fe80::1 0 0 0 0 0
lo0 33228 ::1/128 ::1 0 0 0 0 0
ppp0* 1500 <Link> 0 0 0 0 0
ppp1* 1500 <Link> 0 0 0 0 0
sl0* 296 <Link> 0 0 0 0 0
sl1* 296 <Link> 0 0 0 0 0
strip 1100 <Link> 0 0 0 0 0
strip 1100 <Link> 0 0 0 0 0
tun0* 1500 <Link> 0 0 0 0 0
tun1* 1500 <Link> 0 0 0 0 0
ipip0 0 <Link> 0 0 0 0 0
ipip1 0 <Link> 0 0 0 0 0
wi0* 1500 <Link> 00:60:1d:f1:86:61 0 0 0 0 0
# ifconfig -a
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:90:27:96:1c:e1
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33228
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet6 ::1 prefixlen 128
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
strip0: flags=0<> mtu 1100
strip1: flags=0<> mtu 1100
tun0: flags=10<POINTOPOINT> mtu 1500
tun1: flags=10<POINTOPOINT> mtu 1500
ipip0: flags=8010<POINTOPOINT,MULTICAST>
ipip1: flags=8010<POINTOPOINT,MULTICAST>
wi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
nwid ""
address: 00:60:1d:f1:86:61
media: IEEE802.11 autoselect adhoc (none)
# ifconfig lo0 inet 127.0.0.1
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
127.0.0.1 127.0.0.1 UH 0 0 33228 lo0
XNS:
Destination Gateway Flags Refs Use Mtu Interface
ISO:
Destination Gateway Flags Refs Use Mtu Interface
X.25:
Destination Gateway Flags Refs Use Mtu Interface
AppleTalk:
Destination Gateway Flags Refs Use Mtu Interface
Internet6:
Destination Gateway Flags Refs Use Mtu Interface
::1 ::1 UH 0 0 33228 lo0
fe80::%lo0/64 fe80::1%lo0 U 0 0 33228 lo0
ff01::/32 ::1 U 0 0 33228 lo0
ff02::%lo0/32 fe80::1%lo0 UC 0 0 33228 lo0
# ifconfig -a
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:90:27:96:1c:e1
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33228
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet6 ::1 prefixlen 128
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
strip0: flags=0<> mtu 1100
strip1: flags=0<> mtu 1100
tun0: flags=10<POINTOPOINT> mtu 1500
tun1: flags=10<POINTOPOINT> mtu 1500
ipip0: flags=8010<POINTOPOINT,MULTICAST>
ipip1: flags=8010<POINTOPOINT,MULTICAST>
wi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
nwid ""
address: 00:60:1d:f1:86:61
media: IEEE802.11 autoselect adhoc (none)
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
fxp0* 1500 <Link> 00:90:27:96:1c:e1 0 0 0 0 0
lo0 33228 <Link> 0 0 0 0 0
lo0 33228 fe80::/64 fe80::1 0 0 0 0 0
lo0 33228 ::1/128 ::1 0 0 0 0 0
lo0 33228 127 127.0.0.1 0 0 0 0 0
ppp0* 1500 <Link> 0 0 0 0 0
ppp1* 1500 <Link> 0 0 0 0 0
sl0* 296 <Link> 0 0 0 0 0
sl1* 296 <Link> 0 0 0 0 0
strip 1100 <Link> 0 0 0 0 0
strip 1100 <Link> 0 0 0 0 0
tun0* 1500 <Link> 0 0 0 0 0
tun1* 1500 <Link> 0 0 0 0 0
ipip0 0 <Link> 0 0 0 0 0
ipip1 0 <Link> 0 0 0 0 0
wi0* 1500 <Link> 00:60:1d:f1:86:61 0 0 0 0 0
# netstat -rn -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
127.0.0.1 127.0.0.1 UH 0 0 33228 lo0
# route add -inet 127.0.0.0 -netmask 0xff000000 127.0.0.1 -reject
add net 127.0.0.0: gateway 127.0.0.1
# netstat -rn -f inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
127 127.0.0.1 UGRS 0 0 33228 lo0
127.0.0.1 127.0.0.1 UH 1 0 33228 lo0