Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2016 15:48:34 +0000
From:      David DeSimone <ddesimone@verio.net>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        "net@freebsd.org" <net@freebsd.org>
Subject:   RE: ifconfig creates a bogus(?) route
Message-ID:  <SN1PR08MB1821D18DE13FB882ED3BA327BA430@SN1PR08MB1821.namprd08.prod.outlook.com>
In-Reply-To: <20160528154122.C1843@besplex.bde.org>
References:  <20160528154122.C1843@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> Sometime between r191220 and r201220, ifconfig started creating a bogus(?=
) static route.
> The following is under r248255 with "ifconfig em0 inet 192.168.2.8" (wher=
e 192.168.2.8 is
> for the local host and I don't bother typing the netmsk) done before brin=
ging up lo0:
>
> Routing tables
>
> Internet:
> Destination        Gateway            Flags    Refs      Use  Netif Expir=
e
> 192.168.2.0/24     link#1             U           0        0    em0
> 192.168.2.8        link#1             UHS         0        0    lo0

Why do you feel the route is bogus?  Is it because it has a netmask?

If you don't supply a netmask, ifconfig will assume one based on the "class=
" (A, B, C) of the IP you've supplied.  192.168.2.8 is a Class C address an=
d gets a /24 netmask by default.

> The bogus(?) route points to itself (route get shows this more clearly), =
and doesn't work.
> I know little about routiing, but can > fix things like this manually.  S=
imply "route delete"
> on the bogus(?) route works in this case.  An alias for lo0 also works.

In router parlance, the route would be called a "connected" route, showing =
that not only do you have an IP on the subnet, but by virtue of the netmask=
, you are "connected" to every other IP in the same subnet range, through t=
hat interface.  It will cause your system to send ARP requests through that=
 interface for any other IP in the range, in order to communicate with them=
.

--
David DeSimone <ddesimone@verio.net>
Professional Services Design Engineer at NTT America

________________________________
This email message is intended for the use of the person to whom it has bee=
n sent, and may contain information that is confidential or legally protect=
ed. If you are not the intended recipient or have received this message in =
error, you are not authorized to copy, distribute, or otherwise use this me=
ssage or its attachments. Please notify the sender immediately by return e-=
mail and permanently delete this message and any attachments. makes no warr=
anty that this email is error or virus free. Thank you.
________________________________
This email message is intended for the use of the person to whom it has bee=
n sent, and may contain information that is confidential or legally protect=
ed. If you are not the intended recipient or have received this message in =
error, you are not authorized to copy, distribute, or otherwise use this me=
ssage or its attachments. Please notify the sender immediately by return e-=
mail and permanently delete this message and any attachments. NTT America m=
akes no warranty that this email is error or virus free. Thank you.
________________________________



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