Configuring networking is a multi-step process. Will you be using DNS? Do you know the DNS server names/IPs? Do you have a IP address,etc. In this case, lets say we are going to use DNS on this system.
Set the name of the machine
You need to put the name of the machine in the
/etc/nodename file.
Tell Solaris that we're going to use DNS
By default, Solaris is not setup to use DNS. To make the change, we have to edit the /etc/nsswitch.conf
file.
Open this file and look for the line which starts with "hosts:".
Add "dns" to the end of this line.
You can also add the "dns" entry to the beginning of the line, which changes the order in which Solaris will do name lookups. For example, if you have "nis" before "dns", Solaris will first look in the NIS database. If you have "files" before "dns", Solaris will look at the /etc/hosts file before it looks at DNS.
Tell Solaris about your DNS servers
Edit the /etc/resolv.conf file. This file may not exist already, but you can just create it with a text editor.
Here is an example /etc/resolv.conf file (from devnull.unixville.com)
search unixville.com
domain unixville.com
nameserver 216.242.178.2
nameserver 216.242.178.3
nameserver 204.235.100.130
nameserver 24.1.0.33
nameserver 198.6.1.202
The first line tells the OS to search first in the "unixville.com" domain. The second line simply tells the OS what domain we are currently in (I think). The lines after that are listings of the DNS servers to use for lookup. They are used in the order they are in, so if the first DNS server does not respond, the OS knows to go to the second one and so forth.
Add the machines info to the /etc/hosts file
You will need to edit the /etc/hosts file and enter the name of the machine and its IP address. For example, for devnull.unixville.com, I just entered the following line in the /etc/hosts file:
216.242.17.87 devnull
You can leave all the rest of the data in /etc/hosts file as is.
Also edit the following files:
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
Edit the interfaces hostname file.
Since Sun systems can have multiple network cards, and each of those cards may answer to a different hostname, you need to also edit a file to assign the hostname to the main network card. This is usefull because you may want a single server to respond to many different names, each on a different network card.
The main network interface is usually hme0. Most Sun 10/100 cards are known as hme cards, due to the internal codename during development, happy meal. Other cards, such as the 10/100 Quad card, show up in Solaris as qfe, and since this card has 4 ethernet controllers built in, they are accessed as qfe0,qfe1,qfe2 and qfe3.
To edit the name of the interface, simply edit the /etc/hostname.[interface] file.
For example, for the built in hme0 card, you would edit the /etc/hostname.hme0 file. For the second ethernet interface on a Quad card (if you have one), you would edit the /etc/hostname.qfe1 file. The reason it's 1 is because the computer counts from 0, but it can get confusing when dealing with multiple qfe cards, so keep it in mind.
If you are changing netmask
Edit the following file with your netmask and network number:
/etc/inet/netmasks