From owner-freebsd-net@FreeBSD.ORG Mon Jun 24 09:58:01 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A229B266; Mon, 24 Jun 2013 09:58:01 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-la0-x231.google.com (mail-la0-x231.google.com [IPv6:2a00:1450:4010:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id F0D4F19EE; Mon, 24 Jun 2013 09:58:00 +0000 (UTC) Received: by mail-la0-f49.google.com with SMTP id ea20so9815989lab.22 for ; Mon, 24 Jun 2013 02:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0knbJguPmfHD/6FlB3EJSk2AFvFzpB6YFLDJgZUalXo=; b=Kc8kmmsJGSOEWvX+D0km5bRer2TAbcZNRuYOIAL8kr3BmbSXW9eXL3PdIgMAUF8lql EQqsSVwfY1Ebkog/w1Tj0lYsHxuxJXMTgfn+kaquoz7E6Y6Z24TB9NzU9yliO2keD2yx sx/m30zQ6IAKwKT1HEuLCmtIF/R1GPoYKc0Vsys7cOZxZLSHU9hpHiOD6U5G/7wwDqrm zRM6mQ+rA4QToPQOVI/bSqabJYm+eQ3rl908rrWApjPwIQGrasLDF/v5eCcYQbTJ7HwR nsAnUybvvvUJ1802PH7BiQm7/RDsXoQc2FnQbaHex74vliWHhYXGVu9v2/uVfVWpSbSQ kLPQ== MIME-Version: 1.0 X-Received: by 10.152.28.199 with SMTP id d7mr11014145lah.67.1372067879945; Mon, 24 Jun 2013 02:57:59 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.200.15 with HTTP; Mon, 24 Jun 2013 02:57:59 -0700 (PDT) In-Reply-To: References: Date: Mon, 24 Jun 2013 11:57:59 +0200 X-Google-Sender-Auth: Swf6H6cj1IbFXWK8Zo0f6HO86EY Message-ID: Subject: Re: How correctly use netmap pkt-gen "sweep n addresses" option ? From: Luigi Rizzo To: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-net@freebsd.org" , Luigi Rizzo 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: Mon, 24 Jun 2013 09:58:01 -0000 On Mon, Jun 24, 2013 at 11:12 AM, Olivier Cochard-Labb=E9 wrote: > Hi, > > I'm using netmap pkt-gen as a packet generator/receiver and it's > working great for generating one-flow (one src/dst IP address). > But I would like generate packets with multiples source&destination IP > addresses. > pkt-gen support "range" IP and MAC address: > -d dst-ip end with %n to sweep n addresses > -s src-ip end with %n to sweep n addresses > -D dst-mac end with %n to sweep n addresses > -S src-mac end with %n to sweep n addresses > > I've did a try with command like this: > pkt-gen -i igb2 -d 2.3.1.1-2.250.250.250 -f tx -l 42 -D > 00:1b:21:d3:8f:3e -s 1.2.1.1-1.250.250.250 > It seems accepted and the output of pkt-gen is: > ... > extract_ip_range [136] extract IP range from 1.2.1.1-1.250.250.250 > extract_ip_range [171] range is 1.2.1.1 0 to 1.250.250.250 0 > extract_ip_range [136] extract IP range from 2.3.1.1-2.250.250.250 > extract_ip_range [171] range is 2.3.1.1 0 to 2.250.250.250 0 > ... > > But all packet generated only use the first IP (src 1.2.1.1 and dst > 2.3.1.1 from my example): There is no use of IP range given in > parameters. > How to correctly use this pkt-gen feature (I'm using 9.1-STABLE r252056)= ? > > sorry, it was never completely implemented, you need to add some code to play with it. cheers luigi