Solaris is difficult for a Linux user to understand; I believe it might have to do with a complete lack of committee and the inability to take one’s configuration ball and go home.
Quick Solaris 10 Network Configuration
The folllowing example assumes a single interface using an IP address of 192.168.42.2.
/etc/hosts:
# # Internet host table # 127.0.0.1 localhost ::1 localhost 192.168.42.2 mybox mybox.somedomain.com loghost
Make sure you leave the loghost bit in on one of your interfaces.
/etc/netmasks:
# 192.168.42.0 255.255.255.0
This is where you set netmasks for the networks in use by your devices.
/etc/resolv.conf:
nameserver #.#.#.# nameserver #.#.#.#
Naturally, replace #.#.#.# with the IP addresses of your nameservers.
/etc/nsswitch.conf:
Look for the following line:
hosts: files
Modify it to read:
hosts: files dns
/etc/defaultrouter:
192.168.42.1
This is the default gateway for your system as a whole. Sanity insists gateways are usually placed on the .1 IP of a network; your mileage may however vary.
Tying it all together with /etc/hostname.*:
Your hostnames (for each interface) go into an interface-specific file. For example purposes, I’m assuming an ‘e1000′ networking device, with a single port.
/etc/hostname.e1000g0:
mybox.somedomain.com
Review:
Roughly, your device gets its hostname from the /etc/hostname.* file. It uses this to link up with /etc/hosts and /etc/netmasks to get IP information for itself. In a simple world, the default gateway in /etc/defaultrouter is all you need for an initial, working route. Finally nsswitch.conf is set to allow dns lookups for hosts.
Now when you bring up your box, your networking is good to go with no further screwing about.