Darren Reed writes:
> James Carlson wrote:
> >The other problem is the kernel.  It's _allowing_ you to do something
> >that's clearly wrong.  There's no getting around that one -- broadcast
> >type interfaces simply do not have a configured "destination address"
> >and can never have one.  Allowing the ioctl to "succeed" -- and worse
> >yet corrupting the interface state as a result -- is a clear-cut bug.
> >  
> >
> 
> Why shouldn't I be able to do:
> # ifconfig bge0 1.2.3.4 5.6.7.8 up
> if the cable that from bge0 goes to bge0 on another box?
> That sure seems like "point-to-point" to me.

I think there's a confusion of terminology here.

IP interfaces for routing purposes (e.g., with OSPF) may be one of
these types:

        Point-to-Point
        Broadcast
        Non-broadcast Multi-access

It has almost nothing to do with physical hardware design; it's an IP
issue, and it depends on the design of the datalink itself, not the
physical layer.

"Point-to-Point" links don't have netmasks, don't run L2 address
resolution issues (e.g., ARP), and don't have broadcast addresses.
All that they have is a peer IP address.  (And, really, that might be
optional in some implementations.)

"Broadcast" links have all of those things except the peer IP
address.

Ethernet is a broadcast-type medium, even when run on physically
point-to-point links.  Even with your hypothetical point-to-point
connection, it would be necessary to send out ARP messages in order to
get the peer L2 address, as long as we're still speaking standard IP
over Ethernet.

(Yes, I suppose you could just reduce everything to being broadcasts
at L2.  At that point, I think you're defining a brand new
non-Ethernet protocol where the former destination address is just
filled in with 1s.)

And, yes, point-to-point links sometimes appear on physical layers
that are anything but point-to-point (such as SONET rings), but where
the physical layer provides a service that directly connections two
datalinks together.

The key issues for identifying the interfaces are:

  - Does the datalink layer provide for the possibility of separate
    addressable nodes?

  - Does the datalink layer provide for the possibility of sending to
    all addressable nodes at once?

If Y/Y, then broadcast.  If Y/N, then NBMA.  If N/N, then
point-to-point.  (If N/Y, then someone's lying.  ;-})

> I think what needs fixing, in the first instance, is to allow
> ifconfig to reset IFF_POINTTOPOINT if it is setting the
> broadcast address or netmask.

I don't think that's the right fix, either.  That just hacks around
the original stumble: point-to-pointedness isn't something determined
by the administrator.  Ever.  It's something that's a property of the
medium itself.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to