Static IP on OpenSolaris

4 01 2009

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 :)


Actions

Information

4 responses

6 01 2009
James Legg

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

16 01 2009
Ben Lavery

Me and James have since talked about this. It seems the file may no longer be volatile…

26 01 2009
Ben Lavery

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.

26 05 2009
Ben Lavery

I no longer have this set up, seeing as the router does static IP’s for me, that seemed an easier option…

Leave a comment