From owner-freebsd-net@FreeBSD.ORG Thu Mar 21 08:31:30 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 AA22B36C for ; Thu, 21 Mar 2013 08:31:30 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) by mx1.freebsd.org (Postfix) with ESMTP id 6E725217 for ; Thu, 21 Mar 2013 08:31:30 +0000 (UTC) Received: by mail-qc0-f181.google.com with SMTP id a22so1252766qcs.40 for ; Thu, 21 Mar 2013 01:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=HpPqEyNitrfPXeWuBQ98GTawQg8Xc5almegC8LJeHLY=; b=gfeQZmu6DAOtfa8098zPm2juf48FtqukEpu2FJM1FHb+yjI33/X1QYMkDQm1NEaZ/G 8qIbqg64NTr/zoWQtFOzBQ9z68lFojEqHuAmluH8Jw0gp/bil9C14BU/N+HnRYx73wNq MfHUPQQBXLF5HImupI5w43JjZpHkPhQuCCGg5app2iO67zBNe4uBn95XqfdWSX0TMbEN OVKuTCHWNNR0OL7caNlEDgR7J6VAY03w7CqUxEkAR7rywk2ix0MGydteUa4jpijBj+WL AfY1wxYhQCXzBidbaWq3h3hrcbDH9MhjHx0Zn7/5SvYL+wBCyDlvFnIliNCaZGkHPr31 5Zhg== MIME-Version: 1.0 X-Received: by 10.49.30.70 with SMTP id q6mr6025460qeh.28.1363854316589; Thu, 21 Mar 2013 01:25:16 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.49.98.103 with HTTP; Thu, 21 Mar 2013 01:25:16 -0700 (PDT) In-Reply-To: <20130321005959.98706.qmail@f5-external.bushwire.net> References: <20130321005959.98706.qmail@f5-external.bushwire.net> Date: Thu, 21 Mar 2013 09:25:16 +0100 X-Google-Sender-Auth: WqpwJo1177_PGbU3R5naCqjrCUg Message-ID: Subject: Re: Best way for an app to accept traffic on 30,000+ interfaces? From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Mark D Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net 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: Thu, 21 Mar 2013 08:31:30 -0000 On Thu, Mar 21, 2013 at 1:59 AM, Mark D wrote: > (Hopefully this isn't too out-of-scope for this list..) > > I have an application in mind that I'd like to have accept/respond to > UDP queries sent to perhaps 30K contiguous IP addresses (most likely > IPV6 addresses because such ranges are easy to come by, but > conceptually ipv4 as well). > > This would all be on a small number of FBSD instances. > > Though it could be done, I don't really want to create 30K interfaces > and have the application bind 30K sockets as it's not clear if that > will scale if I try an address range that expands to, say, 1M IPs > wide. > > This address range would be internet-facing and responding to random > remote clients. > > My first thought is to use SOCK_RAW in much the same way that natd > does - at least to receive the traffic. > > Is that a sensible and viable approach or is there a better/easier > way? > > > Mark. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > How about firing up one of the firewall/pfil(9) consumers like (ipfw/pf) and adding rules to redirect traffic to a socket bound on loopback? -- Ermal