On 08/27/10 01:55 PM, Tom Chen wrote:
Hello,
I am not very familiar with ipadm and I am wondering how to setup IP address
with it.
I currently have a box with mother board NIC nxge0 set to 172.17.139.24 by dhcp
server. I want to set it to 172.17.138.79 static address, but ifconfig command
does not work on snv137 or later Solaris Express OS, how do I do it?
I tried this command, "ipadm create-addr", but it seems to only work for new
NIC interfaces(not created). For those interfaces plumbed up by default, it does not
work. How do I manually re-config existing interfaces? it seems that I can not delete
these existing interfaces and re-create them to assign new addresses.
r...@socrates:~# uname -a
SunOS socrates 5.11 snv_145 sun4v sparc SUNW,T5240 Solaris
r...@socrates:~# ifconfig nxge0
nxge0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index
13
inet 172.17.139.24 netmask fffffe00 broadcast 172.17.139.255
ether 0:21:28:4:1d:4a
r...@socrates:~# ipadm create-addr -t -T static -a local=172.17.138.79
nxge0/v4addr
ipadm: Could not create address: Interface does not exist
r...@socrates:~# ipadm delete-if nxge0
Aug 27 00:39:16 socrates in.ndpd[1119]: Interface nxge0 has been removed from
kernel. in.ndpd will no longer use it
Aug 27 00:39:16 socrates nwamd[527]: 1: nwamd_dhcp_managing: ipadm_addr_info
failed for nxge0: Interface does not exist
r...@socrates:~# ipadm create-addr -t -T static -a local=172.17.138.79 nxge0/v4
addr
Aug 27 00:41:58 socrates nwamd[527]: 1: nwamd_ncu_handle_if_state_event:
address 172.17.138.79 not managed by nwam added, removing it
Aug 27 00:41:58 socrates nwamd[527]: 1: nwamd_ncu_handle_if_state_event:
address 172.17.138.79 not managed by nwam removed, nothing to do
ipadm: Could not create address: Interface does not exist
r...@socrates:~# ifconfig nxge0
nxge0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index
13
inet 172.17.139.24 netmask fffffe00 broadcast 172.17.139.255
ether 0:21:28:4:1d:4a
The issue is, you have nwam (network auto-magic) enabled and you are trying to
manually configure the IP interfaces. You have to first disable nwam to perform
manual configuration.
# svcadm disable network/physical:nwam
# svcadm enable network/physical:default
Now use ipadm(1M) to create addresses.
If you need to create a static address permanently so that it is re-created on
reboot. Do
# ipadm create-addr -T static -a local=172.17.138.79 nxge0/v4
~Girish
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org