From owner-freebsd-net@FreeBSD.ORG Sat Nov 28 08:03:55 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6186E106566C for ; Sat, 28 Nov 2009 08:03:55 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from mailrelay1.rambler.ru (mailrelay1.rambler.ru [81.19.66.239]) by mx1.freebsd.org (Postfix) with ESMTP id 164E48FC08 for ; Sat, 28 Nov 2009 08:03:55 +0000 (UTC) Received: from kas30pipe.localhost (localhost [127.0.0.1]) by mailrelay1.rambler.ru (Postfix) with ESMTP id F2221130C3D for ; Sat, 28 Nov 2009 11:03:53 +0300 (MSK) Received: from localhost (sysoev.ru [81.19.68.137]) by mailrelay1.rambler.ru (Postfix) with ESMTP id 770AB130C26 for ; Sat, 28 Nov 2009 11:03:53 +0300 (MSK) Date: Sat, 28 Nov 2009 11:03:53 +0300 From: Igor Sysoev To: freebsd-net@freebsd.org Message-ID: <20091128080353.GA11509@sysoev.ru> References: <20091127085504.GH17494@sysoev.ru> <4B10B145.1050704@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4B10B145.1050704@elischer.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.33/RELEASE, bases: 02092009 #2738642, status: clean X-SpamTest-Envelope-From: is@rambler-co.ru X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 9536 [Sen 02 2009] X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 10 X-SpamTest-SPF: pass X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release Subject: Re: interface FIB X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 08:03:55 -0000 On Fri, Nov 27, 2009 at 09:12:37PM -0800, Julian Elischer wrote: > Igor Sysoev wrote: > > Currently only packets generated during encapsulation can use > > interface's FIB stored during interface creation: > > > > setfib 1 ifconfig gif0 ... > > setfib 1 ifconfig tun0 ... > > not sure if tun actually does this (in fac tit shouldn't) > > but for gre and gif (and stf) these are tunnelling other things into > IP and thus it makes sense to be able to connect a routing table with > the generated envelopes. I've got this from 8.0 release notes: A packet generated on tunnel interfaces such as gif(4) and tun(4) will be encapsulated using the FIB of the process which set up the tunnel. However, sys/net/if_tun.c is really has no FIB related changes. > > is it possible to implement this feature for any interface: > > > > setfib 1 ifconfig vlan0 ... > > > > or > > > > ifconfig vlan0 setfib 1 ... > > these two things would mean differnt things. > and one of them wouldn't mean anything. > > setfig 1 ifconfig vlan0 woudl mean "what" exactly? > VLAN tagging is an L2/L1 operation and FIBS have no effect on this. > > as for ifconfig vlan0 setfib 1, or ifconfig em0 setfib 1 > > this will (shortly) mean that incoming packets through this interface > will be default be connected with fib 1 so the any return packets > (resets, icmp etc.) will use FIB1 to go back to the sender. This is exactly what I meant. > That patch is in the works. I'm ready to test the patch in production on 7/8-STABLE if the patch can be applied to it. -- Igor Sysoev http://sysoev.ru/en/