From here: Clicky
Make sure you have various DNS domains in /etc/resolv.conf, then:
cp /etc/nsswitch.conf /etc/nsswitch.conf.BAK
cp /etc/nsswitch.dns /etc/nsswitch.conf
svcadm restart dns/client
After this, edit the file: /etc/nwam/llp
It will look something like this:
rge0 dhcp
Change it to this:
rge0 static 192.168.1.18/24
I have rge0, you may have something else, don’t change that bit! The IP address it your choice too, the /24 gives you the netmask 255.255.255.0
Restart nwam:
svcadm restart network/physical:nwam
Add your new IP and hostname into /etc/hosts following the same format as already exists
svcadm enable network/physical:default
The add just the ip address of your default router to /etc/defaultrouter
svcadm restart network/routing-setup
Hope that help some people
There should be no need for network/physical:default to be enabled at the same time as network/physical:nwam if you configure your address using the /etc/nwam/llp file. Also just a note the man page for nwam from phase 0.5 still lists that file as volatile so it might change in later releases.
Cheers
Me and James have since talked about this. It seems the file may no longer be volatile…
Although I still have this setup on the server, I now also make the router do static IP’s, so my server, Opensolaris laptop and my MacBook all have static IP’s received via DHCP.
I no longer have this set up, seeing as the router does static IP’s for me, that seemed an easier option…
Pingback: Static IP on OpenSolaris « #!
Thanks dude, this worked a treat.
Note to others, if you set a static IP through the OpenSolaris interface, the only step you’ll need to follow is the first bit to get DNS working.
The format of the DNS file (/etc/resolv.conf) is like this:
nameserver 192.168.0.1
^^ worked a treat.
Thanks
Ducky