From owner-freebsd-net@FreeBSD.ORG Tue Aug 7 15:37:44 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 1F4D9106564A for ; Tue, 7 Aug 2012 15:37:44 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id B880F8FC08 for ; Tue, 7 Aug 2012 15:37:43 +0000 (UTC) Received: by yenl7 with SMTP id l7so89332yen.13 for ; Tue, 07 Aug 2012 08:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=pKb05Efp9ykzLplv4rl2KNIi5GcspYv8u0xflmgPZBk=; b=NLXiwm8Npcvz9150NgL3hoI4ISdJ7hQGJ3OwJC/tH+CmXb6htlnTy/t03NKNjHTndn cf3h2eGKeKMuEDFu2GdpTG8l98Or4JZgdh3ip1JztDgJgYTVkmjyWMrGxzarWsMb1FCu aszQ6EQYCV9cgibZdvqV2kiZPkFsHf7L6YE+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=pKb05Efp9ykzLplv4rl2KNIi5GcspYv8u0xflmgPZBk=; b=Ge3Q5O1OAqSWonk0EUZQmujql1h0dXZ7Lp1gBe1NVIuoJ4XWymcf1HResCp1qbpofD haXfhn60bNLVx7z20dw7wUT2lfXjPKBiGTNe8XlxUg8zmGfNwQMymUl3waPdBm9bO/9s l9F9fgFSHEc+YEvMyAqkCAkKKgihFNroS8mizrxpHdzkxOjX+a7w4H21nV7GEjWqh9no Veh/Vw+KFSbEggay4EU+YkufEqnDi/WeDSaIJ1tmm+Pm40tvT+4UirgBJw1CSCFQBBbH WUQMdbZXVOziJ8F3ruIElScZ10DSIFzAB/wHdsfcbXHmODTBEe5ecVO7SE7RgxUv/Ik1 SFhQ== Received: by 10.43.85.69 with SMTP id an5mr11749718icc.37.1344353862883; Tue, 07 Aug 2012 08:37:42 -0700 (PDT) Received: from DataIX.net (24-247-252-47.dhcp.aldl.mi.charter.com. [24.247.252.47]) by mx.google.com with ESMTPS id 10sm13059248igf.11.2012.08.07.08.37.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Aug 2012 08:37:42 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q77FbapR099579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Aug 2012 11:37:37 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q77FbZ9W099578; Tue, 7 Aug 2012 11:37:35 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Tue, 7 Aug 2012 11:37:35 -0400 From: Jason Hellenthal To: Eugene Grosbein Message-ID: <20120807153735.GA98926@DataIX.net> References: <50211DF0.2090607@rdtc.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <50211DF0.2090607@rdtc.ru> X-Gm-Message-State: ALoCoQktiy7TaIFavgJvxbaxPzwg+YBgI+KirVg7x7r8qPsiykogoQsLE1SNZQllkutpOPtFPqFl Cc: "net@freebsd.org" Subject: Re: 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 15:37:44 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 07, 2012 at 08:53:52PM +0700, Eugene Grosbein wrote: > Hi! >=20 > I'd like to run some stability tests for some L2-transparent > gigabit ethernet network hardware I've got. >=20 > 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. >=20 > 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? >=20 > I've tried to utilize multiple FIBs: >=20 > sysctl net.add_addr_allfibs=3D0 > 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 >=20 > But "setfib 1 ping -S 10.0.0.1 10.0.1.1" still runs via lo0 (and has no a= nswer). >=20 > 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). >=20 > I would really like using normal TCP/UDP/ICMP streams in addition of ng_s= ource tests. >=20 You could just throw a loopback plug in your adapter. All traffic going out is going to come right back in as fast as its sent out. Another alternative is a crossover cable from igb0 -> igb1. --=20 - (2^(N-1)) JJH48-ARIN --5vNYLRcllDrimb99 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJQITY/AAoJEBSh2Dr1DU7WwXMIAKIeNukM9Mt2U9W3SOpmEWAb x+txwu3KGZaDaWr4EENC/hSdlQnELNQ1YisnJjT83mWz8Pk4pclYcNYY86mDaTeP Ubd/2ADTxLUkXK82r/cEOxjD2SywfjFFCjLay7Q0K2Ne/aO6LpMCB24Ebn38ngbE 4XsxeJjpQVSxiAxpui6rAA/ybJSRTMdjQeeEu9ywFZ9XuYWXa3U2UZB5yMZTyr7q M7bwWlG60m6cps1ADNOaUutIK9iIeRlL+fpYUU1lkWhtbUgi67FeIZ39/a7Dry/Q Pi2/hB/92MG7mGfzhkBW2JyWFG3l10EQKknNE7NrsmuNMQaPS7qkpcfCcyuoCUk= =nkdG -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--