*BSD News Article 52987


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!newsfeed.internetmci.com!EU.net!Germany.EU.net!zib-berlin.de!irz401!uriah.heep!not-for-mail
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: ip aliasing
Date: 13 Oct 1995 08:40:43 +0100
Organization: Private FreeBSD site, Dresden.
Lines: 22
Message-ID: <45l55r$3e6@uriah.heep.sax.de>
References: <44pjfu$2o7@news.cerf.net> <44rkir$d3n@uriah.heep.sax.de> <813430816.2768@kiss.demon.co.uk>
NNTP-Posting-Host: uriah.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Phil Taylor <phil@zipmail.co.uk> wrote:

>>This is a FAQ now.  Use "netmask 0xffffff00" (or whatever is
>>appropriate) for the first IP address, and "netmask 0xffffffff" for
>>all aliases that happen to be in the same (sub)net as the primary one.

>Is this a work-around or is it the correct way to do things, It just
>seems a bit strange cause your class A/B/C hasn't changed so I would
>have thought that the netmask would be the same for all addresses. 

It is the correct way.  Think about it.  You have multiple interfaces
refering to the same network.  You *have* to chose one of the various
interface addresses as the "gateway" for outgoing packets into this
network, you cannot have them going out through a dozen of addresses
simultaneously.  The netmask 0xffffffff prevents the kernel from
considering this IP address as a valid gateway (since it's not
pointing to any network at all).
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)