Child pages
  • Changing to Static IP
Skip to end of metadata
Go to start of metadata

4.2.1 Changing to Static IP

This approach has been deprecated with the improved Solaris 11 toolset finding its way into OpenIndiana. Please consider using nwamcfg / nwamadm as described on a separate page!

Using the GUI

If you have the GUI installed you can use the nwam-manager-properties tool to configure your network.

First you need to make sure your "admin" user is in the Primary Admin role

# usermod -P "Primary Administrator" <username>

Then when you login to the desktop you can edit the network preferences by clicking on the ethernet icon in the top right.

Once there make a new network profile and add all the NICs you want and save the profile.

Now in the Show drop down select each NIC for the profile you just created and pick either DHCP or Static and configure away.

Disabling NWAM

Here are the Oracle Admin pages on this: Configuring IP Interfaces

Changing to a static IP is a common question and needs a better answer than this, but for now, as a quick helper to anyone trying to get this working

(Warning! This commands will first disable your network interface , if you are doing this,
you better be on the console and not on remote (ssh) connection or you will be locked out of machine. 
Use scripted commands in line,that bring interface Up (svcadm enable) right after bringing it down
or stay with NWAM untill you get local console access.
)

My notes on static ip (not using NWAM) under OI from the default DHCP

--------

# svcadm disable network/physical:nwam

Update /etc/resolv.conf WITH DNS

Update /etc/hosts

# cp /etc/nsswitch.dns /etc/nsswitch.conf

Update /etc/defaultrouter with GATEWAY

# route -p add default GATEWAY

Note: if you had already enabled network/physical:default using svcadm, you need to first:

svcadm disable and then set up route manually.

svcadm disable network/physical:default wont remove network setup

I had to # ifconfig rge0 down / up at this point to allow the network service to start.

# svcadm enable network/physical:default
# ipadm create-addr -T static -a HOSTNAME/24 LINK_NAME

Note: if you complete the configuration and it still seems that you cannot connect (maybe even to hosts on the same subnet), then a restrictively IPFilter may be blocking your attempts. As a quick test, try: svcadm disable network/ipfilter  and then try your ping or traceroute agian.

  • No labels

2 Comments

  1. After switching from nwam to physical:default it may be necessary to create ones IP interface again.

    Check if the datalink still exists.

    % dladm show-link

    If your link is showing but in an unknown state then one can go forward configuring the IP interface using ipadm as shown in your example.

    If the link is not showing at all one needs to create the IP interface.

    % ipadm create-if rge0
  2. I had a difficult time using the above procedure and have a couple of suggestions which might help others:

    1. the "ipadm create-if <nic-device>" statement mentioned in the comment above is needed.
    2. The HOSTNAME must only have one IP address in /etc/hosts. Often it appears on the localhost ip address as well as the network address. You can use an IPV4 IP address instead of a host name - especially if the name has more than one address associated with it. The /24 should be the real network mask. It is often /24 but may not be. 
    3. The LINK_NAME is actually the name of the address object defined above and it seems to need to be followed by a slash and some modifier. I used /v4 since I was configuring an IPV4 address. 
    4. If I remember ritght there was a local= needed with the address. I think I ended up using something like "ipadm create-addr -a local=10.10.10.10/24 e1000g0/v4".
    5. You don't address configuring an IPV6 address.

    I eventally got the static IP address by trial and error but I still don't have a clear understanding of the process. When someone gets around to updating this page you may want to check these things out and make some clarifications.