Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2004 16:50:31 +0000
From:      Alex Zbyslaw <>
Cc:        freebsd-questions <>
Subject:   Re: Configuring IP address aliasing
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Mike wrote:
> # ifconfig -a
>         inet netmask 0xffffff00 broadcast

> # ifconfig ed0 alias netmask broadcast 
> ifconfig: ioctl (SIOCAIFADDR): File exists
> [using same netmask as real interface]

> However, THIS WORKED:
> # ifconfig ed0 alias netmask broadcast 
> [using a netmask of]
> QUESTION: Why do I use a different netmask ( for a IP 
> alias on FreeBSD?  Why isn't used?

 From the ifconfig man page on 4.9

alias   Establish an additional network address for this interface.  This
         is sometimes useful when changing network numbers, and one wishes
         to accept packets addressed to the old interface.  If the address
         is on the same subnet as the first network address for this
         interface, a non-conflicting netmask must be given.  Usually
         0xffffffff is most appropriate.

Since is on the same subnet as you must use 
0xffffffff (aka as the netmask.  (I don't know *why* I'm afraid).

You could always stick the alias on a different subnet at which point you can 
use the netmask you expect.

e.g. # ifconfig ed0 alias netmask broadcast


Want to link to this message? Use this URL: <>