From owner-freebsd-net@FreeBSD.ORG Fri May 25 20:17:40 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 761B516A41F for ; Fri, 25 May 2007 20:17:40 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by mx1.freebsd.org (Postfix) with ESMTP id 623FA13C48C for ; Fri, 25 May 2007 20:17:40 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay8.apple.com (relay8.apple.com [17.128.113.38]) by mail-out3.apple.com (Postfix) with ESMTP id A91D721AA40; Fri, 25 May 2007 13:17:03 -0700 (PDT) Received: from relay8.apple.com (unknown [127.0.0.1]) by relay8.apple.com (Symantec Mail Security) with ESMTP id 38ADC4005C; Fri, 25 May 2007 13:17:40 -0700 (PDT) X-AuditID: 11807126-b0fe9bb000003f8b-d6-465744647637 Received: from [17.214.13.96] (cswiger1.apple.com [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay8.apple.com (Apple SCV relay) with ESMTP id 202A1404FD; Fri, 25 May 2007 13:17:40 -0700 (PDT) In-Reply-To: <000e01c79f03$b2cfce70$5501a8c0@ivorde> References: <000e01c79f03$b2cfce70$5501a8c0@ivorde> Mime-Version: 1.0 (Apple Message framework v752.2) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <08556012-CA57-4B2A-A142-F5C1BC8D9009@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Fri, 25 May 2007 13:17:39 -0700 To: Andrei Manescu X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-net@freebsd.org Subject: Re: two public ip addresses on one interface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 20:17:40 -0000 On May 25, 2007, at 12:34 PM, Andrei Manescu wrote: > If I want to put two public IP addresses, with different > subnetmasks (my ISP is changing some subnets and for two months I > will be able to use two public ip addresses) on the same interface > (xl0) my rc.conf shuld look like this: > > ifconfig_xl0="inet 84.125.210.108 netmask 255.255.252.0" > ifconfig_xl0_alias0="inet 81.66.10.36 netmask > 255.255.255.255" (this ip address has mask /24 ) If your aliases are part of the same subnet as the "primary" or first configured IP, then you want to use the all-1's netmask. In your case, however, the second IP is part of a completely different subnet, and you can (and should) use a /24 netmask.... -- -Chuck