Solved

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
4
418 Views
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. 255.255.255.0 generally for a /24,  if you don't know probably this..
      /etc/resolv.conf - list the name servers - for example:
      nameserver 10.0.1.101
      nameserver 208.67.xxx.xxx
      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 10.0.1.122 netmask 255.255.255.0 up
       reboot

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.
0
Comment
Question by:Techgoat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 27

Accepted Solution

by:
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:
--[cut]--
myhostname plumb up
--[cut]

Open in new window

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

Open in new window

4) edit /etc/inet/netmasks:
--[cut]--
10.0.0.0 255.255.255.0 
--[cut]--

Open in new window

5) reboot

Regards,
Arty
0
 
LVL 27

Expert Comment

by:Nopius
ID: 35763294
I guess 2) should be different:

2) edit /etc/hostname.e1000g0:
--[cut]--
inet myhostname netmask + broadcast + plumb up
--[cut]
0
 
LVL 27

Expert Comment

by:Nopius
ID: 35763296
even without 'plumb' :-)
0
 

Author Closing Comment

by:Techgoat
ID: 35909638
thanks
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 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