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 184.108.40.206 netmask ffffff00 broadcast 220.127.116.11 ether 3:e3:c0:9:62 ipdptp0: flags=28d1< UP, POINTOPOINT, RUNNING, NOARP, MULTICAST, UNNUMBERED> mtu 1500 inet 18.104.22.168 --> 22.214.171.124 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 - 2019, Stephen Hinchey
If you have comments or additions for these web pages please direct them to webmaster @ barbary.com