From owner-freebsd-net@FreeBSD.ORG Thu Mar 21 13:54:19 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 1A8A32F5 for ; Thu, 21 Mar 2013 13:54:19 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) by mx1.freebsd.org (Postfix) with ESMTP id AB7D4A6F for ; Thu, 21 Mar 2013 13:54:18 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hm6so3095739wib.14 for ; Thu, 21 Mar 2013 06:54:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=QRzs2kZi6LtubNKYlAyLAv57/tApI1pbq+PWtkixyfA=; b=aYxjgK19GH+QzsDHh/K+8G37tYDyGh+iycO2XnBlBM+ZhdOwkPY5eVDI98+sOk2IKc iFu/dI0RTa3LKnVd01hoGcCScbgD3kzJcz3uYH/6Ft9qtoCHdk582WNdRtepNvF8Rskk 0koSdOgdyNWo1W9VNMxGPYQnXZDE8BXrDUk5WmdoD9gHKOegJ36ybqGLQwxoio2hIP2v 6dCEmcjcOtCbMKyG/rZN3U4hPTgQGWF4OnPrxrGFhnEWn7wOC2GBb3FO1yOpv7De1o8j UIZ0hV4Lqe1dpQaeSA3F/7yLl2ftNI3WeRPIhMMmkc53vEGVE7nzGrXykOkq2+OcGPWW pOow== X-Received: by 10.194.109.136 with SMTP id hs8mr17547841wjb.8.1363874057915; Thu, 21 Mar 2013 06:54:17 -0700 (PDT) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id g4sm5396975wib.11.2013.03.21.06.54.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 06:54:17 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Best way for an app to accept traffic on 30,000+ interfaces? From: Fleuriot Damien In-Reply-To: Date: Thu, 21 Mar 2013 14:54:09 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <96327F03-86EC-4EE6-9679-F66A960BDDB4@my.gd> References: <20130321005959.98706.qmail@f5-external.bushwire.net> To: =?iso-8859-1?Q?Ermal_Lu=E7i?= X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQlj8KyGvn+4g9UdzvbQZ51HUepITbo0HVfACPEN/KGyuw/C7pjSv1FSrvT85wcG13UAtBy5 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 13:54:19 -0000 On Mar 21, 2013, at 9:25 AM, Ermal Lu=E7i wrote: > On Thu, Mar 21, 2013 at 1:59 AM, Mark D = wrote: >=20 >> (Hopefully this isn't too out-of-scope for this list..) >>=20 >> 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). >>=20 >> This would all be on a small number of FBSD instances. >>=20 >> 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. >>=20 >> This address range would be internet-facing and responding to random >> remote clients. >>=20 >> My first thought is to use SOCK_RAW in much the same way that natd >> does - at least to receive the traffic. >>=20 >> Is that a sensible and viable approach or is there a better/easier >> way? >>=20 >>=20 >> 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" >>=20 >=20 >=20 > 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? >=20 > --=20 > Ermal I fail to see how that's different from what I suggested with PF's rdr = rule ?