Wed, Jul 20, 2011 at 12:34:38PM +0300, Daniel Braniss wrote: > from the diskless: > els-01# ifconfig > vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 > options=8280b<RXCSUM,TXCSUM,VLAN_MTU,WOL_UCAST,WOL_MAGIC,LINKSTATE> > ether 00:0d:b9:22:57:18 > inet 132.65.91.1 netmask 0xfffff000 broadcast 132.65.95.255 > media: Ethernet autoselect (100baseTX <full-duplex>) > status: active > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 > options=3<RXCSUM,TXCSUM> > inet 127.0.0.1 netmask 0xff000000 > els-01# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif Expire > default 132.65.80.1 UG 0 16606 vr0 > 127.0.0.1 link#4 UH 0 36 lo0 > 132.65.80.0/20 link#1 U 0 86612 vr0 > 132.65.91.1 link#1 UHS 0 12 lo0 > > from the non-diskless: > wrap-1# ifconfig > sis0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu > 1500 > options=83808<VLAN_MTU,WOL_UCAST,WOL_MCAST,WOL_MAGIC,LINKSTATE> > ether 00:0d:b9:00:72:a8 > inet 132.65.80.181 netmask 0xfffff000 broadcast 132.65.95.255 > media: Ethernet autoselect (100baseTX <full-duplex>) > status: active > sis1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 > options=83808<VLAN_MTU,WOL_UCAST,WOL_MCAST,WOL_MAGIC,LINKSTATE> > ether 00:0d:b9:00:72:a9 > media: Ethernet autoselect (none) > status: no carrier > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 > options=3<RXCSUM,TXCSUM> > inet 127.0.0.1 netmask 0xff000000 > > wrap-1# netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif Expire > default 132.65.80.1 UGS 0 16936 sis0 > 127.0.0.1 link#4 UH 0 76 lo0 > 132.65.80.0/20 link#1 U 0 67433 sis0 > 132.65.80.181 link#1 UHS 0 0 lo0
The only difference I see is the absence of the 'S' flag on the default
route for the diskless case. Will try to create the testbed.
> > Yes, it is. But ip_output.c has the following code,
> > {{{
> > if (rte->rt_flags & RTF_GATEWAY)
> > dst =3D (struct sockaddr_in *)rte->rt_gateway;
> > if (rte->rt_flags & RTF_HOST)
> > isbroadcast =3D (rte->rt_flags & RTF_BROADCAST);
> > else
> > isbroadcast =3D in_broadcast(dst->sin_addr, ifp);
> > }}}
> >
> > So, if the route that is selected is the gateway, then there will be
> > no broadcast on the L2. At least in my understanding of the code.
> > Thus, I am interested in the routing tables and route flags.
>
> so it boils down to a problem in selecting the route?
More-or-less so: for default gateways there will never be any
L2-broadcasts, for host routes the L2-broadcasts are governed by the
'B' route flag and for other routes the destination address governs
the behaviour (INADDR_ANY & INADDR_BROADCAST as the destination will
enable L2-broadcast unconditionally /but most likely we will hit the
default route earlier for this case/, interface broadcast address
/132.65.95.255 in your case/ will enable L2-brodcast via the
corresponding interface).
--
Eygene Ryabinkin ,,,^..^,,,
[ Life's unfair - but root password helps! | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
pgpQRdPPTtMsN.pgp
Description: PGP signature
