From owner-freebsd-net@FreeBSD.ORG Tue Aug 7 13:53:56 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D6BF106566C for ; Tue, 7 Aug 2012 13:53:56 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6D28FC0A for ; Tue, 7 Aug 2012 13:53:55 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id q77DrqtA021325 for ; Tue, 7 Aug 2012 20:53:52 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <50211DF0.2090607@rdtc.ru> Date: Tue, 07 Aug 2012 20:53:52 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: "net@freebsd.org" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Send traffic to itself using real NIC 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: Tue, 07 Aug 2012 13:53:56 -0000 Hi! I'd like to run some stability tests for some L2-transparent gigabit ethernet network hardware I've got. I have one spare FreeBSD 9.1-PRERELEASE with two-ports igb(4) card and connected both ports using my L2 hardward making a loop. Is it possible to configure FreeBSD in such way so it would send IP traffic for itself not via loopback interface but via igb0/igb1? I've tried to utilize multiple FIBs: sysctl net.add_addr_allfibs=0 ifconfig igb0 inet 10.0.0.1/24 mtu 9126 ifconfig igb1 inet 10.0.1.1/24 mtu 9126 setfib 1 route -q flush setfib 1 route add 10.0.1.1/32 -iface igb1 setfib 2 route -q flush setfib 2 route add 10.0.0.1/32 -iface igb0 But "setfib 1 ping -S 10.0.0.1 10.0.1.1" still runs via lo0 (and has no answer). The only way I've got working is unidirectional stream of packets generated with ng_source(4) (patched due to kern/120304) that shows me 10% packet loss (using netstat -I to see how many packets got through). I would really like using normal TCP/UDP/ICMP streams in addition of ng_source tests. Eugene Grosbein