Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2012 12:57:29 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   route add -inet6 ... -ifp $foo busted or developer error?
Message-ID:  <CAGH67wRetdANSJXtfntLYK-V31NW1d1O0aX_wuuNM0XoUEgp3Q@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
    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



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