Call : 381-18-529-373

Linux,Solaris and OSX

Setting network in Solaris 10

In order to have the system configure our NIC at boot, the first step is to get an IP address and subnet mask. In our case, we are going to put this second NIC into a different IP range than the original NIC. Our first NIC is in the 192.168.1.x network, so we will put the new NIC into the 192.168.2.x network. Both of these networks have a subnet mask of Note: Always make sure the assigned IP is not already taken up by another machine; to do so, use ping from a machine already configured in that network.

Next we add a line to the /etc/hosts file for our new card: host2

Now, we create a file in /etc that is named hostname. For example, our first NIC’s file is /etc/hostname.hme0. Our new device, hme1, will need the file /etc/hostname.hme1. In this file, we will put the name associated with the IP (as found in the /etc/hosts file). It should be the first name in the /etc/hosts file. In our scenario, /etc/hostname.hme1 should contain:

Then we edit the /etc/netmasks file for our new network:

Reboot the system, and your network card has been configured for the new network with the proper subnet mask. You can check it by running an ifconfig -a again:

lo0: flags=1000849 mtu 8232 index 1
inet netmask ff000000
hme0: flags=1000843 mtu 1500 index 2
inet netmask ffffff00 broadcast
hme1: flags=1000843 mtu 1500 index 3
inet netmask ffffff00 broadcast

2 Comments to “Setting network in Solaris 10”

  1. I’m not sure where you’re getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for excellent information I was looking for this info for my mission.

    • Hi. It’s just that I work in IT dept, of an educational institution so I have to deal with all kinds of stuff. I post everything out of the ordinary I do so I don’t forget it, the next time I need it :-) . Thank you for the kind words. Glad it helped someone. If I can do anything else to help, please be free to contact me .

Leave a Reply