[Sunhelp] Adding alias IP addresses to a NIC

Dale Ghent daleg at elemental.org
Tue Feb 22 11:36:16 CST 2000


On Tue, 22 Feb 2000, Pearson, David wrote:

| Can someone tell me a little about how an alias IP address works and how do
| I set one up?

IP aliasing is giving an interface (le0, hme0, ge0, etc) more than one IP
address. They're more like sub-interfaces. For example:

hme0 has the main IP of that interface.

hme0:1 is the first IP alias
hme0:2 is the second
and so on.

you can configure an alias on a running interface with the command:

ifconfig <interface>:<alias number> <ip address> up

or

ifconfig hme0:1 206.221.135.60 up

To make the alias reappear after a reboot, make a file in /etc named
"hostname.<interface>:<alias number>" (ex: "hostname.hme0:1") that
contains the IP address of that alias (or, just the hostname of that
alias, and put the IP in /etc/hosts)

/dale







More information about the SunHELP mailing list