route add -inet6 ... -ifp $foo busted or developer error?
Garrett Cooper
yanegomi at gmail.com
Wed Oct 10 19:57:30 UTC 2012
Trying to validate sanity for TAHI testing and the route.rmt
remote handler script issues the route command in the following format
when adding a route on the remote DUT:
# route add -inet6 3ffe:: -prefixlen 64 -ifp bge0
route: writing to routing socket: Invalid argument
add net 3ffe::: Invalid argument
This isn't the way that things are done on FreeBSD 9.1 (at least
-- haven't verified an older version like <= 6.x) with rc.d/routing:
# route add -inet6 3ffe:: -prefixlen 64 -iface bge1
add net 3ffe::: gateway bge1
So.. I was wondering if this was developer error or if the -ifp
flag is broken (my guess is the former, but I could be wrong). Also,
if someone could better describe (succinctly) what -ifa is supposed to
do, that would be great. The only explanation I could find is here [1]
and here [2] (and both explanations are a bit ambiguous as to why one
would have a single address assigned to more than one interface):
In a change or add command where the destination and gateway are not suf-
ficient to specify the route (as in the ISO case where several interfaces
may have the same address), the -ifp or -ifa modifiers may be used to
determine the interface or interface address.
In cases where the gateway does not uniquely identify the output
interface (for example, when several interfaces have the same
address), you can use the -ifp ifname modifier to specify the
interface by name. For example, -ifp lo0 associates the route with the
lo0 interface.
My guess is that they are suggesting carp(4) or pseudo-carp(4)
like behavior (administratively down'ed, etc) with interfaces, but I
wanted to absolutely sure that this is the case.
Thanks!
-Garrett
1. http://www.freebsd.org/cgi/man.cgi?query=route&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html
2. http://www.opennet.ru/man.shtml?topic=route&category=1
More information about the freebsd-net
mailing list