On OpenSolaris 10 (Release 2010.05), I have used sys-unconfig to re IP a server but what if I merely need to change the IP address for an existing interface (call it e1000g0)?

Posted on 2011-03-06
Last Modified: 2012-05-11
Scenarion: I put up a guest instance of OpenSolris 10 on a vmware host, and it took a DHCP ip address during install. Then I wanted to reconfigure the interface, e1000g0, with a static IP.  I searched on the net and found many recommendations as to how to make the changes, but none persisted after a reboot.  

Tried this:
      svcadm disable physical:nwam
      svcadm enable physical:default

      Edit the following files in /etc -
      hostname.e1000g0 : to IP address - hostname.(Interface name) is the filename..
      /etc/hosts - add IP you want and short name + long name (fully qualified name)
      /etc/nodename - the primary name to use (for example in sendmail, etc.).
      /etc/defaultrouter - the IP of the default gateway
      /etc/netmasks - set the netmasks of your networks, i.e. generally for a /24,  if you don't know probably this..
      /etc/resolv.conf - list the name servers - for example:
      copy /etc/nsswitch.dns to /etc/nsswitch.conf - so dns is used
      Restart network to check:
      svcadm restart milestone/network

Then tried rebooting, and ifconfig -a reveals that the existing DHCP address remained in effect.

Next I followed a recommendation as follows:
       ifconfig e1000g0 down
       ifconfig e1000g0 netmask up

And again, the interface e1000g0 remained at DHCP; so then I tried unplumb for the interface and plumb it new, yet still the DHCP IP persisted after reboot.

Ultimately I used sys-unconfig to set a static IP, but I anticipate that there is a means of re-ip'ing an interface, but I have not yet discovered how! And since this a practice instance, I am willing to apply recommended strategies and report back with results. Thanks in advance.
Question by:Techgoat
  • 3
LVL 27

Accepted Solution

Nopius earned 500 total points
ID: 35763293
Depending on 'network' instance you may have either 'default' or 'nwam' network configuration.
You can check it with:
bash-3.2# svcs network/physical
STATE          STIME    FMRI
disabled       23:00:16 svc:/network/physical:nwam
online         23:00:42 svc:/network/physical:default

Open in new window

I recommend you yo use 'default' instead of 'nwam' instance:
svcadm disable svc:/network/physical:nwam
svcadm enable svc:/network/physical:default

Open in new window

'default' instance runs this startup script: /lib/svc/method/net-physical

/lib/svc/method/net-physical itself configures physical interfaces (and interface flags).
it first checks for /etc/dhcp.e1000g0  file, and if found, it configures your interface by dhcp
then it checks /etc/hostname.e1000g0 for additional (ipmp ... parameters).

so I recommend you  to:
1) remove /etc/dhcp.e1000g0
2) edit /etc/hostname.e1000g0:
myhostname plumb up

Open in new window

3) edit /etc/inet/hostz:
--[cut]-- myhostname

Open in new window

4) edit /etc/inet/netmasks:

Open in new window

5) reboot

LVL 27

Expert Comment

ID: 35763294
I guess 2) should be different:

2) edit /etc/hostname.e1000g0:
inet myhostname netmask + broadcast + plumb up
LVL 27

Expert Comment

ID: 35763296
even without 'plumb' :-)

Author Closing Comment

ID: 35909638

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IPA complaining about DNS but DNS looks good.... 2 146
Measure data download 2 127
Weird Samba Connectivity Issue... 7 66
Iptables and mirroring ports 4 93
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question