From owner-freebsd-net@FreeBSD.ORG Fri May 25 20:42:05 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 3F2FC16A41F for ; Fri, 25 May 2007 20:42:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx24.fluidhosting.com [204.14.89.7]) by mx1.freebsd.org (Postfix) with SMTP id D535213C4BA for ; Fri, 25 May 2007 20:42:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 20336 invoked by uid 399); 25 May 2007 20:15:23 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 25 May 2007 20:15:23 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <465743D9.7040904@FreeBSD.org> Date: Fri, 25 May 2007 13:15:21 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Andrei Manescu References: <000e01c79f03$b2cfce70$5501a8c0@ivorde> In-Reply-To: <000e01c79f03$b2cfce70$5501a8c0@ivorde> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:42:05 -0000 Andrei Manescu wrote: > Hello, > > 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 ) > > or is there any other possibility to have two ip addresses on the same nic, besides aliases ?? Did you try setting the alias with the correct subnet? IIRC, the rule that you have to use 255.255.255.255 for the alias only applies if the second (or more) IP address is in the SAME subnet. I seem to recall doing what you described at some point in the past ... hth, Doug -- This .signature sanitized for your protection