Static IP on OpenSolaris

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

This entry was posted in OpenSolaris and tagged , , , , , , . Bookmark the permalink.

6 Responses to Static IP on OpenSolaris

  1. James Legg says:

    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

  2. Ben Lavery says:

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

  3. Ben Lavery says:

    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.

  4. Ben Lavery says:

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

  5. Pingback: Static IP on OpenSolaris « #!

  6. Ducky says:

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

    Ducky

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>