NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ARP resolution fails when MSG_DONTROUTE flag is set

>>>>> "gt" == Greg Troxel <> writes:

    gt> It's basically wrong to expect NetBSD to arp when sending a
    gt> packet other than on the subnet configured with that prefix
    gt> using a cloning route.  ARP is triggered by a packet hitting
    gt> the cloning route.

The problem is that the route added by ARP needs to be more specific
than the cloning route, so it's impossible to add a /32 cloning route.
The cloning route single-table thing is kind of a neat hack, but it's
not fully general.  Cisco handles the corner cases better, and you can
have two devices communicating which don't share a subnet:

router a
interface FastEthernet0/0
 ip address

ip route FastEthernet0/0

router b
interface FastEthernet0/0
 ip address

ip route FastEthernet0/0

These two will have full connectivity, without any static ARP, which
is impossible on BSD.  But even Cisco isn't fully general because it
seems you can't assign a /32 address to an Ethernet interface.

I have at least two other problems with cloning/cloned routes.

I've also had problems on OpenBSD when I move wired<->wireless (two
different subnets), there's some kind of cloned /32 pointing at the
old default route which doesn't get cleared.  Sometimes I have to:

# pkill dhclient
# dhclient em0
# ssh
# route delete
delete host
# route delete
route: writing to routing socket: No such process
delete host not in table
# ssh

Then there's also the problem you mentioned years ago that interfaces
with no link indication or even 'ifconfig down' interfaces, so long as
they've an IP and subnet configured onto them, will still add their
implicit direct route for that subnet and prevent you from reaching
the same host through a different interface.  This also bites me with
moving wired/wireless.  You've more flexibility if the cloning route
and all its children were removed on link-down or 'ifconfig down' as
it is on Cisco or Juniper or EnTee, but I expect nobody wants to
change it because the new more-correct behavior surprised and annoyed
them, once, the first time they saw it on Cisco five years ago before
they learned to use loopback interfaces for that stuff.

Attachment: pgpc66DnN6FB9.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index