Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Mar 2008 15:18:55 +0100
From:      Pietro Cerutti <gahr@FreeBSD.org>
To:        spil.oss@gmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Removing aliases removes primary IP
Message-ID:  <47E666CF.2080407@FreeBSD.org>
In-Reply-To: <5fbf03c20803200422o1709e6edmaa24c85634a4b403@mail.gmail.com>
References:  <5fbf03c20803200422o1709e6edmaa24c85634a4b403@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Spil Oss wrote:
| Dear all,
|
| Today I removed all aliases on my internal NIC and loopback, which
| resulted in losing the primary ip-address. What am I missing!

|
| # ifconfig xl0 alias 172.17.2.3 delete
| # ifconfig xl0 alias 172.17.2.4 delete
| # ifconfig xl0 alias 172.17.2.5 delete
| # ifconfig lo0 alias 127.0.0.2 delete
| # ifconfig lo0 alias 127.0.0.3 delete

What you are doing here is:
1) you create an alias (which already exists) with the 'alias' argument
2) you remove an alias which the 'delete' argument. Since you don't
specify which alias to be removed, the lowest IP number is removed. In
your case, the lowest IP number happens to be your primary :-)

You may want to use the '-alias' command line option to remove an alias:
# ifconfig xl0 -alias 172.17.2.3

| Kind regards,

Hope this helps,

| Spil.




- --
Pietro Cerutti
gahr@FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iEYEAREKAAYFAkfmZs4ACgkQwMJqmJVx945NsgCg4jfR8JuKsOnGqirAmclnGM80
8Y0AoKeK+mWCGtkniIko2rJlF8UX0EDI
=vMXT
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47E666CF.2080407>