Multiple IPs on a Single System

We want to add host Barbary with IP address 10.0.10.143 to our Sun machine. So the first step is to determine what physical interface(s) are in use on the system.

First, we issue the command "ifconfig -a". This will tell us about the current configuration for all network interfaces. The result on this system is:

lo0: flags=849< UP, LOOPBACK, RUNNING, MULTICAST> mtu 8232
        inet 127.0.0.1 netmask ff000000
le0: flags=863< UP, BROADCAST, NOTRAILERS, RUNNING, MULTICAST > mtu 1500
        inet 205.149.161.19 netmask ffffff00 broadcast 205.149.161.255
        ether 3:e3:c0:9:62 
ipdptp0: flags=28d1< UP, POINTOPOINT, RUNNING, NOARP, MULTICAST, UNNUMBERED> mtu 1500
        inet 205.149.161.19 --> 204.156.128.1 netmask ffffff00 
        ether 0:0:0:0:0:0 
		

In this example there are three physical interfaces

Now that we know what the network interface is we can configure a second logical interface (Solaris supports up to 255 logical interfaces). So to add a second logical interface to the le0 connection we use the command:

ifconfig le0:1 10.0.10.143 up
		

Although the system will now respond to the new address it will lose this information upon reboot. So the final step in configuring the system is to have the new address configured at boot time.

In /etc there is a file called hostname.le0 (the extension is the name of the interface on your machine). You want to create a file called hostname.le0:1. The only entry in this file is the host name of the new IP address.

Finally, edit /etc/hosts and add the new IP address and hostname.

Now the second IP address and hostname will be configured on startup.


This web page is Copyright © 1997 - 2017, Stephen Hinchey
If you have comments or additions for these web pages please direct them to webmaster @ barbary.com