Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jul 2016 03:50:56 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   route table entry for link level address (regression?)
Message-ID:  <57991EB0.6020507@grosbein.net>

next in thread | raw e-mail | index | archive | help
Hi!

I need to create route table entry for single IPv4 host address pointing
to specified interface and link level address (MAC address), so that
ARP protocol not used and supplied address always used instead.
A command similar to the following one used to work in previous versions of FreeBSD (8.x AFAIR).
It is still accepted as correct command, is processed and installs new entry
to the routing table:

# route -n add -host 192.168.0.0 -link lagg0:0.1b.21.bc.10.d0 -interface
add host 192.168.0.0: gateway lagg0:0.1b.21.bc.10.d0 fib 0
# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
...
192.168.0.0        lagg0:0.1b.21.bc.10.d0 UHS       lagg0

Nice entry, right interface with link level address, nice flags:
host (H), no intermediate gateway required (no G flag).

Still, it does not work as "ping 192.168.0.0" makes kernel to send ARP requests to lagg0
interface. They get no response as 192.168.0.0 is unpublished loopback address
of neighbouring host having noted link level (MAC) address. So, not IP packets sent.

How can I install static routing entry for such ethernet neighbour usable without ARP protocol
these days? I use recent 10.3-STABLE/amd64.

Eugene Grosbein



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