From owner-freebsd-questions@FreeBSD.ORG Thu Feb 21 12:07:11 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25FFB16A406 for ; Thu, 21 Feb 2008 12:07:11 +0000 (UTC) (envelope-from siraj.shaikh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by mx1.freebsd.org (Postfix) with ESMTP id 7EAB413C474 for ; Thu, 21 Feb 2008 12:07:10 +0000 (UTC) (envelope-from siraj.shaikh@gmail.com) Received: by py-out-1112.google.com with SMTP id u52so7512pyb.10 for ; Thu, 21 Feb 2008 04:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=UwZDWih37X7noA9MXKXBrr+WhQ6yqw+jxN9tnxrBDNM=; b=Pwt7zBJGaarNTKGlQyNOq8YrvVNTal+O8q3LrG06VJ0ekXTYOe/+AzuudOpp14hQ5Z4HB8KkL9m/WME3br6x+CYXSVlk3rShqBfyW5z7smTpByn24q5wYEJ5uwj1vC/pe86M6biIbCJiOMOGwqCFwsap0Ogox8T+w9KaIoQNAYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=J46fgs1Z676Hy6Z9Ths0iONJKmxcvPXtfM9SggrPs1RhmgWZKWTMksbxzj4DoXZdqsWyRzbQ0MW7sxyMp3qHU5eJGN17cPFw3UhFUwiVg/MI5tuOWO10JZZ4y+K/80+7v1GKsFPc8VNtLkqNHLX0IExOmNdSqALzW5+tvGx8+K8= Received: by 10.141.37.8 with SMTP id p8mr6619754rvj.150.1203595628669; Thu, 21 Feb 2008 04:07:08 -0800 (PST) Received: by 10.140.162.17 with HTTP; Thu, 21 Feb 2008 04:07:08 -0800 (PST) Message-ID: <3b2ddd940802210407j7b83059duabadeccaec53a26c@mail.gmail.com> Date: Thu, 21 Feb 2008 12:07:08 +0000 From: "Siraj Shaikh" To: "Olivier Nicole" In-Reply-To: <200801290234.m0T2YtLn074403@banyan.cs.ait.ac.th> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3b2ddd940801280627m6d747cd1g27682bcd9e50ceb7@mail.gmail.com> <200801290234.m0T2YtLn074403@banyan.cs.ait.ac.th> Cc: freebsd-questions@freebsd.org Subject: Re: IP Aliasing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 12:07:11 -0000 On 29/01/2008, Olivier Nicole wrote: > > 1) is there an upper limit to configuring a number of alias addresses? > > I have a machine with 200+ IP without any problem. > > > 2) if an interface is configured with an alias address, then what > > address is shown on the traffic leaving this interface? So, for > > example, if I were to ping this machine on its primary address, I > > expect to get a response from the primary address of the interface. > > What happens if I ping an alias address, would I get a response from > > By default exiting traffic is using the primary address (the one > defined with no keyword alias in the ifconfig). I think there is a way > to choose the exiting IP. > > When a paket is responding, it use the same IP that was used in the > query (else any firewall would be confused in the way). > > > > 3) In the above scenario, all traffic leaving the interface > > (regardless of the source IP on it) will have the same MAC address > > (the one of the interface) - is that right? > > > Right except maybe some NIC that allow several MAC addresses? That > could be used in hi availability? > > > > 4) Does anyone know if there are there any other network > > characteristics or behaviour by which we can distinguish a machine > > having more than one IP address (primary plus alias) configued on one > > of its interface? > > > Once you cross a router, you don't see the MAC of the machine anymore, > MAC is local to your LAN anyway. > > Olivier > > > One last thing I wanted to know (sorry to email after a long delay), in order for me to add aliases that I want to remain configured on the machine at every boot, I can simply add, for exmaple, the following lines to the rc.conf file? ifconfig_ed0_alias0="inet 127.0.0.251 netmask 0xffffffff" ifconfig_ed0_alias1="inet 127.0.0.252 netmask 0xffffffff" ifconfig_ed0_alias2="inet 127.0.0.253 netmask 0xffffffff" Just want to know, as I want to configure about 253 addresses as an alias on a single machine (along with the primary address, this will be 254 address, a whole C-class subnet) - and would like these entries to hold when I boot. Also, is there any shortcut to adding a range of net/host address or would I have to add a line for each address? Thanks