Some comments on nwam and comparison of physical:nwam and physical:default would be useful here. Should physical:nwam ever be used on server? What are pros and cons of this?
There also seem to be some difficulties with nwam which need to be addressed. I was never able to figure out how to use nwam with exclusive-IP zones. in the global zone nwam seems to want to grab all of the interfaces and then the zones complain that they aren't available for them. There may be a way to fix this using nwam but I couldn't find it. I ended up disabling nwam on machines with exclusive IP zones because the physical:default method didn't grab all of the available interfaces.
Find interface name with 'ifconfig -a' or 'dladm showphys'. If it's not visible with ifconfig, it's not plumbed, so ifconfig plumb devname. For this example, we'll use e1000g0
Trying to setup a static IP on my home network. Just a little ZFS fileserver for streaming music and storing backups. Nothing fancy.
I followed these steps:
*Got my interface name (e1000g0) *Disabled NWAM *Added my static IP: echo 10.1.1.85 > /etc/hostname.e1000g0 *Added "10.1.1.0 255.255.255.0" to /etc/netmasks (unsure about the 10.1.1.0) *Added my router's IP address: echo 10.1.1.1 > /etc/defaultrouter *Added my ISP's nameservers: printf "search comcast.net\nnameserver 68.87.76.178\nnameserver 66.240.48.9\n" > /etc/resolv.conf (comcast.net required if I have no domain name?) *Enable Default and restart networking.
Right now if I ping google.com I get "unknown host"
And vice versa, in OpenSolaris 2009.06 (if I remember version number correctly) it was possible to configure static IP address using GUI exclusively. You got warning that network is configured automatically, click "manual", and NWAM was disabled - without issuing commands
svcadm disable network/physical:nwam
svcadm enable network/physical:default
In OpenIndiana GUI network configuration is not working that way.
20 Comments
Anonymous
Some comments on nwam and comparison of physical:nwam and physical:default would be useful here. Should physical:nwam ever be used on server? What are pros and cons of this?
Anonymous
There also seem to be some difficulties with nwam which need to be addressed. I was never able to figure out how to use nwam with exclusive-IP zones. in the global zone nwam seems to want to grab all of the interfaces and then the zones complain that they aren't available for them. There may be a way to fix this using nwam but I couldn't find it. I ended up disabling nwam on machines with exclusive IP zones because the physical:default method didn't grab all of the available interfaces.
Anonymous
I can not believe this would be released without being able to change the IP from DHCP to Static.
Anonymous
Any chance you can update the page to include what a LINK_ADDRESS is? Tried e1000g0 but it didn't like it for me
Anonymous
The easy way to configure a static ip address
# sudo su -
# svcadm disable network/physical:nwam
# svcadm enable network/physical:default
# cp /etc/nsswitch.dns /etc/nsswitch.conf
# exit
$ sudo network-admin (which provides GUI configuration of IP, gateway, etc)
Anonymous
The easy way to change to static IP is using GUI. This is how I did it in OpenSolaris (not tried in OI though).
Anonymous
There is a typo:
Update /etc/hosts
Since long time ago, it is symlink to /etc/inet/hosts and that one should be used.
Also, i am getting error:
ipadm create-addr -T static -a solarix/24 e1000g0/v4
ipadm: Could not create address: Persistent operation on temporary object
if omit /v4
ipadm: invalid address object name: e1000g0
And that IF is up and running. Have to reboot to see if change will survive.
Regards.
Predrag Zecevic
Roy Sigurd Karlsbakk
The easy way
Anonymous
Trying to setup a static IP on my home network. Just a little ZFS fileserver for streaming music and storing backups. Nothing fancy.
I followed these steps:
*Got my interface name (e1000g0)
*Disabled NWAM
*Added my static IP: echo 10.1.1.85 > /etc/hostname.e1000g0
*Added "10.1.1.0 255.255.255.0" to /etc/netmasks (unsure about the 10.1.1.0)
*Added my router's IP address: echo 10.1.1.1 > /etc/defaultrouter
*Added my ISP's nameservers: printf "search comcast.net\nnameserver 68.87.76.178\nnameserver 66.240.48.9\n" > /etc/resolv.conf (comcast.net required if I have no domain name?)
*Enable Default and restart networking.
Right now if I ping google.com I get "unknown host"
Regards,
Geoff
Anonymous
In /etc/nsswitch.conf update "hosts" field from "files" to "files dns".
Regards,
Dmitry Kozhinov.
Anonymous
That did it, thanks.
Regards,
Geoff
Anonymous
Or you can used NWAM and setting a static IP without disabling NWAM. It is very usefull if, like me, you have 2 or more NIC with some in DHCP.
Here a good example : http://pdconsec.net/blogs/davidr/archive/2011/07/19/solaris-express-static-ips-the-right-way.aspx
I have trying to setup static ip removing NWAMP during 4 hours without succes and it took me 10 minutes using NWAM
Anonymous
There are two problems with NWAM, from my perspective:
Anonymous
And vice versa, in OpenSolaris 2009.06 (if I remember version number correctly) it was possible to configure static IP address using GUI exclusively. You got warning that network is configured automatically, click "manual", and NWAM was disabled - without issuing commands
In OpenIndiana GUI network configuration is not working that way.
Regards,
Dmitry Kozhinov.
Gary Mills
$ uname -a
SunOS amd 5.11 oi_151a i86pc i386 i86pc
$ whence nwamadm
/usr/sbin/nwamadm
$ whence nwamcfg
/usr/sbin/nwamcfg
Anonymous
uname -a
SunOS ze 5.11 oi_151a i86pc i386 i86pc Solaris
whence nwamadm
-bash: whence: command not found
which nwamadm
/usr/sbin/nwamadm
which nwamcfg
/usr/sbin/nwamcfg
From where whence comes (linux)?
Best regards
Predrag Zecevic
Anonymous
Ah,
here:
pkg publisher -a
PUBLISHER TYPE STATUS URI
openindiana.org (preferred) origin online http://pkg.openindiana.org/dev/
sfe origin online http://pkg.openindiana.org/sfe/
sfe-encumbered origin online http://pkg.openindiana.org/sfe-encumbered/
pkg search -r whence
{returns no result
Gary Mills
`whence is a Korn shell built-in.
Anonymous
Thanks
Since Solaris 2.7 i am not using it, so i forgot.
Best regards
Predrag Zecevic
Anonymous
I wrote an article a while back which covers how to configure basic networking on Solaris 11 Express (it is valid on OpenIndiana as well).
http://blog.allanglesit.com/2011/03/solaris-11-network-configuration-basics/
I also have a subsequent article which covered configuring VLANs, Jumbo Frames, and Aggregation groups.
http://blog.allanglesit.com/2011/03/solaris-11-network-configuration-advanced/
-matt