From owner-freebsd-net@FreeBSD.ORG Wed Oct 10 19:57:30 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD31BECA for ; Wed, 10 Oct 2012 19:57:30 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8EBA98FC0C for ; Wed, 10 Oct 2012 19:57:30 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so1271764oag.13 for ; Wed, 10 Oct 2012 12:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=iTOikb2XxvrkG6aCsxSayAnKlY6UrwTLvsPwwIxTfMc=; b=v/vRNuTyOlNtWiMYs5AbLgyvPlK89XJ3gw3anZ6Q0/iOwMaIyxQ8DnrWhUzMGy2c5H fAN70di4DxHUf8z6Cff4OG8as45E+r+SPvFlhjNfBpRV5YRYA0pkQkRfnpdXTQq9vCUX LthfRJb5Uq6GfeTL3FJI/9uayR5fTXpMiihE4VQYwL1g8BNCHmQnI6vBYRC2jBK+8KKE 4imPmSAFDdSLsvCP8oXwGNp0uQhe+dVBa78/bYFygpwzkcDyMXgewyQLPt3BYPvP8glU 2x2S47YQotfGmTuep9ePnpSTXEJ5jpkBCCCvl3WPEuJLO45VPNGjSTqpTv9UN21Upa0r jLug== MIME-Version: 1.0 Received: by 10.182.54.103 with SMTP id i7mr6580147obp.62.1349899049080; Wed, 10 Oct 2012 12:57:29 -0700 (PDT) Received: by 10.76.167.202 with HTTP; Wed, 10 Oct 2012 12:57:29 -0700 (PDT) Date: Wed, 10 Oct 2012 12:57:29 -0700 Message-ID: Subject: route add -inet6 ... -ifp $foo busted or developer error? From: Garrett Cooper To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2012 19:57:30 -0000 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