Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2001 10:38:27 -0400
From:      Joe Abley <jabley@automagic.org>
To:        "Gary W. Swearingen" <swear@blarg.net>
Cc:        Chris <chris@chrisland.net>, freebsd-stable@FreeBSD.ORG
Subject:   Re: 127/8 continued
Message-ID:  <20010926103827.S37693@buffoon.automagic.org>
In-Reply-To: <j2lmj2vjmy.mj2@localhost.localdomain>
References:  <20010924094048.X5906-100000@coredump.scriptkiddie.org> <3BB0A0A2.6CCC454B@chrisland.net> <j2lmj2vjmy.mj2@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 25, 2001 at 06:13:57PM -0700, Gary W. Swearingen wrote:
> Chris <chris@chrisland.net> writes:
> 
> > Isn't that when we configure an IP on an interface, it will
> > automatically create a route for the corresponding "connected" network?
> 
> Which seems more like a bug than a feature to me.  Been giving me all
> kinds of grief.  Even doing "ifconfig if# up" creates a unwanted network
> route which I then have to delete so packets will go to my gateway
> instead of out the interface as if there was no gateway.

Are you sure you're just not setting your interface netmask incorrectly?
If you configure the interface with a netmask of 255.255.255.255 there
should be no connected subnet route to add.

> It seems to be
> designed on the assumption that we have sufficiently large number of IP
> addresses to waste a lot of them on subnets.

Um :)

> I'd think that ifconfig
> (or is it the kernel) would at least have auto-routing optional.

It is optional. Use 255.255.255.255 as your netmask, and there is
no corresponding subnet route to add.

goose# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::2e0:81ff:fe01:790d%fxp0 prefixlen 64 scopeid 0x1 
        inet6 2001:438:1fff:fffc:2e0:81ff:fe01:790d prefixlen 64 autoconf 
        inet 216.8.159.18 netmask 0xfffffff0 broadcast 216.8.159.31
        ether 00:e0:81:01:79:0d 
        media: Ethernet autoselect (10baseT/UTP)
        status: active
goose# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            216.8.159.17       UGSc       39      253   fxp0
127                lo0                UScB        0        0    lo0
127.0.0.1          127.0.0.1          UH          3    17535    lo0
216.8.159.16/28    link#1             UC          2        0   fxp0
216.8.159.17       0:4:76:ba:9c:17    UHLW       39    94814   fxp0    379
216.8.159.18       0:e0:81:1:79:d     UHLW        0       11    lo0
goose# ifconfig fxp0 inet 1.1.1.1 netmask 255.255.255.255 alias
goose# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::2e0:81ff:fe01:790d%fxp0 prefixlen 64 scopeid 0x1 
        inet6 2001:438:1fff:fffc:2e0:81ff:fe01:790d prefixlen 64 autoconf 
        inet 216.8.159.18 netmask 0xfffffff0 broadcast 216.8.159.31
        inet 1.1.1.1 netmask 0xffffffff broadcast 1.1.1.1
        ether 00:e0:81:01:79:0d 
        media: Ethernet autoselect (10baseT/UTP)
        status: active
goose# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            216.8.159.17       UGSc       39      253   fxp0
1.1.1.1/32         link#1             UC          0        0   fxp0
127                lo0                UScB        0        0    lo0
127.0.0.1          127.0.0.1          UH          3    17535    lo0
216.8.159.16/28    link#1             UC          2        0   fxp0
216.8.159.17       0:4:76:ba:9c:17    UHLW       39    94814   fxp0    368
216.8.159.18       0:e0:81:1:79:d     UHLW        0       11    lo0
goose# 


Joe

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010926103827.S37693>