Solaris 10 Networking Setup
With all I’ve been doing getting the server up and running with apache and everything else I never realized it could not connect to the internet.
blastwave.org to the rescue: http://www.blastwave.org/docs/step-152.html
To get the networking setup to be able to access the internet I needed to edit /etc/defaultrouter and put my router’s IP in there. This file was already correct from when I first setup Solaris.
I had to create the file /etc/inet/resolv.conf which is setup just like the Linux /etc/resolv.conf. Just add nameservers to it, one on each line:
nameserver 192.168.1.1
nameserver 22.33.44.55
chown the resolv.conf file with ‘chown root:sys /etc/inet/resolv.conf’
Then make a symlink from /etc/inet/resolv.conf to /etc/resolv.conf with: ‘ln -s /etc/inet/resolv.conf /etc/resolv.conf’
Edit /etc/nsswitch.conf and add “dns” to the “hosts” line.
Make sure /etc/inet/hosts and /etc/inet/ipnodes are setup correctly. Hosts should have the loopback and your network IP with your hostname and ‘loghost’ on that line:
127.0.0.1 localhost
192.168.1.110 sunfire loghost
ipnodes is very similar:
::1 localhost
127.0.0.1 localhost
192.168.1.110 sunfire loghost
And thats it. Didn’t have to restart networking or reboot the machine or anything. A simple ‘ping -s google.com 56 10′ confirmed that the machine could resolve an IP and hit google.
