From owner-freebsd-net@FreeBSD.ORG Mon Nov 10 14:15:08 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FB18460 for ; Mon, 10 Nov 2014 14:15:08 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20D6299C for ; Mon, 10 Nov 2014 14:15:08 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id bs8so10600516wib.5 for ; Mon, 10 Nov 2014 06:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=r/GVtFM/UKbHrMy/3Mo6x3jLPWg2aLOcK4AqXNlPJF0=; b=R14eMzVBSM+dRqQX+yZBnm7LI2oCMhNGYqK8/oxIDdtP/Qxi3Rl+HQy6dewMyND6zl tjQV0C1wuhmSRU1Ek2XP8R+LF7FiPiWlk+v/oOwOFOCrZTOiKPwk6Xz6D5Tz4AYTho4e meDvYkqyhBUMVCReJJhAwWugxSseYg5QRxUS0t3x0zYRHWYW6jffENlKxdk2MLGT44jL 4Xvq1IFTaQqKzAUSk2VCK1NEgmuTCZMS1kPKmDvKuSlCYEhlrgRZvg1Aj9djI6mSJCNn op20sI2t53uAIrveRPQ1LQutmomnbI9mGpv/Ts/L0BM+JlWFG/M81GLeb7hc4zox4CGx Mttw== MIME-Version: 1.0 X-Received: by 10.194.248.162 with SMTP id yn2mr43486235wjc.16.1415628544230; Mon, 10 Nov 2014 06:09:04 -0800 (PST) Received: by 10.217.92.7 with HTTP; Mon, 10 Nov 2014 06:09:04 -0800 (PST) In-Reply-To: References: <9C799778-79DC-4D5F-BA5C-EA94A573ED10@freebsdbrasil.com.br> Date: Mon, 10 Nov 2014 12:09:04 -0200 Message-ID: Subject: Re: netmap-ipfw on em0 em1 From: Evandro Nunes To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Patrick Tracanelli , "freebsd-net@freebsd.org" , Mahnaz Talebi X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 14:15:08 -0000 On Sun, Nov 9, 2014 at 9:23 PM, Luigi Rizzo wrote: > > > On Sun, Nov 9, 2014 at 1:17 PM, Evandro Nunes > wrote: > >> professor luigi >> >> where can I find the code for netmap-fwd you mentioned on usenix paper? >> >> > =E2=80=8Bthat has been renamed to bridge.c > > cheers > luigi > so it does not actually forwards ip packets, does bridging in fact other than OVS and click is there something to forward l3 packets? > =E2=80=8B > > >> >> ** >> https://www.usenix.org/system/files/conference/atc12/atc12-final186.pdf >> >> On Sun, Nov 9, 2014 at 5:31 PM, Evandro Nunes >> wrote: >> >>> hello again patrick >>> >>> On Sun, Nov 9, 2014 at 12:54 AM, Patrick Tracanelli < >>> eksffa@freebsdbrasil.com.br> wrote: >>> >>>> > (Machine-A)<-->Machine-B<--->(MachineC) >>>> > >>>> > Machine-A: >>>> > em0 172.16.251.3/24 >>>> > >>>> > Machine-B: >>>> > em1: 172.16.251.1/24 >>>> > em2: 172.16.252.1/24 >>>> > 10.0-STABLE w/ latest netmap-ipfw and netmap code from google code >>>> > repository >>>> > >>>> > Machine-C: >>>> > em0 172.16.252.3/24 >>>> >>>> Now, your scenario is a typical routing topology. kipfw has no packet >>>> forwarding capabilities whats why when you start it, you are out of >>>> forwarding capabilities and therefore, out of communication between ma= chine >>>> A and C because they just need it in your topology. >>>> >>>> So for your testing purposes read again what Mahaza said: >>>> >>>> >> ipfw works as a bridge and copy >>>> >> incoming packets to em0 to em1 if they pass defined rules (and vice >>>> versa, >>>> >> from em1 to em0). >>>> >>>> Got it? kipfw will work as a BRIDGE and COPY between the NIC ports. >>>> >>>> Therefore on your topology do a simple change: >>>> >>>> Machine-C: >>>> ifconfig em0 172.16.251.4/24 >>>> >>>> So machine C will be in the same network of machine A. >>>> >>>> WITHOUT kipfw you will be OUT of communication. If you want to have >>>> communication without kipfw please configure if_bridge(4) properly. >>>> >>>> Now WHEN you ./kipfw netmap:em1 netmap:em2 you will BRIDGE em1 and em2 >>>> ports and therefore you will HAVE communication between the NICS. >>>> >>>> And you are done, just as a miracle! Thanks to Luigi. >>>> >>> >>> YES IT WORKED YES >>> thank you VERY MUCH for the kind help and for making it clear all the >>> stuff I missed reading, yes I assume I should have read more or at leas= t >>> understood >>> now I can see how the things works and it does work >>> >>> THANK YOU again very much >>> >>> >>> >>>> Now its time to have some fun: >>>> >>>> ipfw/ipfw add pipe 1 all from 172.16.251.0/24 to 172.16.251.0/24 >>>> ipfw/ipfw pipe 1 config bw 128Kbit/s >>>> delay 300 >>>> >>>> and now ping machine-A and machine-C and see dummynet working as >>>> expected... >>>> >>>> I believe you can keep on with your testings now!!! :-) >>>> >>> >>> yes it worked as well >>> >>> now let me ask you all, other than click, does netmap offers something >>> that can do packet forwarding? simple packet forwarding like the scenar= io I >>> was trying before? I know this is not kipfw and not bridge but is there >>> something? >>> >>> thank you >>> >>> >>> >>>> BTW Luigi, I see netmap was commited to GENERIC on -CURRENT. I believe >>>> it may be a good idea to add netmap-ipfw to the base system now, to bo= th >>>> promote more testing and also to be a good companion to netmap on GENE= RIC. >>>> I dont mean a new ipfw-netmap binary under /sbin/ but just the code on >>>> /usr/src/tools/tools. >>>> >>> >>> yes and some handbook or a better README that at least mentions the >>> correct syntax for the tools >>> I think adrian chadd mentioned something about that in an earlier messa= ge >>> >>> >>>> >>>> I've been using netmap-ipfw for a while and sure it lacks more >>>> flexbility like the ability to kipfw several ports, etc. But as it is = right >>>> now, it's very stable and reliable for a preliminary code. Thats why I >>>> believe it should be on the base system. Thank you very much for the >>>> incredible technology. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >> > > > -- > -----------------------------------------+------------------------------- > Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione > http://www.iet.unipi.it/~luigi/ . Universita` di Pisa > TEL +39-050-2211611 . via Diotisalvi 2 > Mobile +39-338-6809875 . 56122 PISA (Italy) > -----------------------------------------+------------------------------- >