Adding IP's ifconfig problems

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Nov 5 02:41:21 PST 2004


On Fri, Nov 05, 2004 at 03:11:57AM -0500, GRF . wrote:
> I have a 5.2.1 server which I need to add IP's to.  When the provider 
> assigned me the IP's they also said use the netmask 255.255.255.240.  I 
> added the IP's to my rc.conf as you can see below but they do not show up 
> in my ifconfig.
> 
> MY rc.conf:
> 
> # -- sysinstall generated deltas -- # Wed Nov  3 09:22:52 2004
> # Created: Wed Nov  3 09:22:52 2004
> # Enable network daemons for user convenience.
> # Please make all changes to this file, not to /etc/defaults/rc.conf.
> # This file now contains just the overrides from /etc/defaults/rc.conf.
> defaultrouter="208.53.17X.1"
> hostname="warped.xconch.net"
> ifconfig_fxp0="inet 208.53.17X.8  netmask 255.255.255.0"
> linux_enable="YES"
> sshd_enable="YES"
> usbd_enable="YES"
> inetd_enable="YES"
> pureftpd_enable="YES"
> ifconfig_fxp0_alias0="inet 208.53.17X.2 netmask 255.255.255.240"
> ifconfig_fxp0_alias1="inet 208.53.17X.3 netmask 255.255.255.240"
> ifconfig_fxp0_alias2="inet 208.53.17X.4 netmask 255.255.255.240"
> ifconfig_fxp0_alias3="inet 208.53.17X.5 netmask 255.255.255.240"
> ifconfig_fxp0_alias4="inet 208.53.17X.6 netmask 255.255.255.240"
> ifconfig_fxp0_alias5="inet 208.53.17X.7 netmask 255.255.255.240"
> ifconfig_fxp0_alias6="inet 208.53.17X.8 netmask 255.255.255.240"
> ifconfig_fxp0_alias7="inet 208.53.17X.9 netmask 255.255.255.240"
> ifconfig_fxp0_alias8="inet 208.53.17X.10 netmask 255.255.255.240"
> ifconfig_fxp0_alias9="inet 208.53.17X.11 netmask 255.255.255.240"
> ifconfig_fxp0_alias10="inet 208.53.17X.12 netmask 255.255.255.240"
> ifconfig_fxp0_alias11="inet 208.53.17X.13 netmask 255.255.255.240"
> ifconfig_fxp0_alias12="inet 208.53.17X.14 netmask 255.255.255.240"

Classic error.  You need to read this part of the ifconfig(8) man page
more carefully:

     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.

ie. only one address (per network) on the interface can have the
'real' netmask.  The others (ie all of your aliases) should use
0xffffffff or 255.255.255.255.  Or to put it another way, the bitwise
'and' of the IP number and the netmask must be different for every
address configured on the interface.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041105/7b447af2/attachment.bin


More information about the freebsd-questions mailing list