From owner-freebsd-net@FreeBSD.ORG Mon Jun 24 09:12:59 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 099B86CF; Mon, 24 Jun 2013 09:12:59 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [IPv6:2607:f8b0:400c:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id B256B17EE; Mon, 24 Jun 2013 09:12:58 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id ox1so8335028veb.41 for ; Mon, 24 Jun 2013 02:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=AiK16C68oeVpngdb82c73oIXgjkGmnx7obp/DJtC+Z8=; b=sp6o0RRmTcsmHbbeTlble4Whnj9de9HR3rd2bkVwAX30+8zHtcUwVqNAwaPyzhg+yp Svq311uP8pZ1iYiz24kGXg3HGg7ZsZYTwn7Nf4KpFi8JgQShqWvEbB5rLzkxkwavfl3x VdJZ6gLi6qmxeAbRaj1wUjA1o25SdJoAhEIySo35Pz1EhCrp56+QVstS3xEz9rY0/KHc l3X7eP+S49sFqdbrfP81ljquKIU3z5Lh+evTh569inu7+eO15w7cPGBt82OnqFt7cI5V HUfx0biJawDQ5ouGcWVlI1oexIt0ZBWbjT4UQJghumu7piUwMgnnNSvmgRzw7j4HxxFK kYtw== X-Received: by 10.52.121.7 with SMTP id lg7mr9197571vdb.68.1372065178318; Mon, 24 Jun 2013 02:12:58 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.58.189.132 with HTTP; Mon, 24 Jun 2013 02:12:38 -0700 (PDT) From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 24 Jun 2013 11:12:38 +0200 X-Google-Sender-Auth: 934fmCcPv4G3foDkmn2rYhoxAjo Message-ID: Subject: How correctly use netmap pkt-gen "sweep n addresses" option ? To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 Cc: 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:12:59 -0000 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) ? Thanks, Olivier