Discussion:
ipadm buggy?
Jens Elkner
2011-06-25 20:46:50 UTC
Permalink
Hi,

Hmm, what is the propper way to bring up an IP IF, which is admin. down?


ENVIRONMENT: Solaris Express snv_151a incl. all avail support updates

admin.home ~ > dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
ext0 Ethernet up 100 full rge0
vboxnet0 Ethernet unknown 0 unknown vboxnet0
int0 Ethernet up 100 full rge1

admin.home ~ > dladm show-vnic
LINK OVER SPEED MACADDRESS MACADDRTYPE
VID
home0 ext0 100 0:80:41:10:d:1 fixed 0
home1 int0 100 0:80:41:20:d:1 fixed 0

admin.home ~ > dladm show-link
LINK CLASS MTU STATE BRIDGE OVER
ext0 phys 1500 up -- --
vboxnet0 phys 1500 unknown -- --
int0 phys 1500 up -- --
home0 vnic 1500 up -- ext0
home1 vnic 1500 up -- int0

admin.home ~ > ipadm show-if
IFNAME STATE CURRENT PERSISTENT
lo0 ok -m-v------46 ---
vboxnet0 ok bm--------4- ---
home0 ok bm--------46 -46
home1 down bm--------46 -46

admin.home ~ > ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
vboxnet0/_a static ok 192.168.56.1/24
home0/extern dhcp ok 98.76.54.32/24
lo0/v6 static ok ::1/128
home1/intern static disabled home/24

admin.home ~ > + ipadm enable-if home1
ipadm: persistent operation not supported for enable-if

admin.home ~ > + ipadm enable-if -t home1
ipadm: Could not enable home1 : Interface already exists

admin.home ~ > + ipadm enable-addr home1/intern
ipadm: persistent operation not supported for enable-addr

admin.home ~ > + ipadm enable-addr -t home1/intern
ipadm: could not enable address: Object not found


OK. I could workaround it by re-creating it:
+ ipadm disable-if -t home1
+ ipadm delete-if home1
+ ipadm create-addr -T static -a home/24 home1/intern
however, this seems pretty strange and I guess, many people will not
even find this workaround when getting into trouble ...

BTW: This happend when installing the latest updates after an 'init 6'.

Regards,
jel.
--
Otto-von-Guericke University http://www.cs.uni-magdeburg.de/
Department of Computer Science Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany Tel: +49 391 67 12768
Girish Moodalbail
2011-06-28 22:44:24 UTC
Permalink
Post by Jens Elkner
Hi,
Hmm, what is the propper way to bring up an IP IF, which is admin. down?
A state of an IP interface is marked `down' if there are no addresses configured
on that interface or all the configured addresses on the interface is
administratively marked down (using ipadm down-addr or address was created using
`-d' switch). So to bring up an IP interface you would have to have at least one
address that is not administratively down.
Post by Jens Elkner
ENVIRONMENT: Solaris Express snv_151a incl. all avail support updates
admin.home ~> dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
ext0 Ethernet up 100 full rge0
vboxnet0 Ethernet unknown 0 unknown vboxnet0
int0 Ethernet up 100 full rge1
admin.home ~> dladm show-vnic
LINK OVER SPEED MACADDRESS MACADDRTYPE
VID
home0 ext0 100 0:80:41:10:d:1 fixed 0
home1 int0 100 0:80:41:20:d:1 fixed 0
admin.home ~> dladm show-link
LINK CLASS MTU STATE BRIDGE OVER
ext0 phys 1500 up -- --
vboxnet0 phys 1500 unknown -- --
int0 phys 1500 up -- --
home0 vnic 1500 up -- ext0
home1 vnic 1500 up -- int0
admin.home ~> ipadm show-if
IFNAME STATE CURRENT PERSISTENT
lo0 ok -m-v------46 ---
vboxnet0 ok bm--------4- ---
home0 ok bm--------46 -46
home1 down bm--------46 -46
admin.home ~> ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
vboxnet0/_a static ok 192.168.56.1/24
home0/extern dhcp ok 98.76.54.32/24
lo0/v6 static ok ::1/128
home1/intern static disabled home/24
admin.home ~> + ipadm enable-if home1
ipadm: persistent operation not supported for enable-if
admin.home ~> + ipadm enable-if -t home1
ipadm: Could not enable home1 : Interface already exists
This is correct since home1 is already plumbed for both ipv4 and ipv6 as it is
evident from the `ipadm show-if' output.
Post by Jens Elkner
admin.home ~> + ipadm enable-addr home1/intern
ipadm: persistent operation not supported for enable-addr
admin.home ~> + ipadm enable-addr -t home1/intern
ipadm: could not enable address: Object not found
This should have worked. I presume nwam was disabled and you had not specified
any network configuration via /etc/hostname.home1. What does 'grep home1
/etc/ipadm/ipadm.conf' say?
Post by Jens Elkner
+ ipadm disable-if -t home1
+ ipadm delete-if home1
+ ipadm create-addr -T static -a home/24 home1/intern
Another way is to just do,
# ipadm delete-addr home1/intern
# ipadm create-addr -T static -a home/24 home1/intern

thanks
~Girish
Post by Jens Elkner
however, this seems pretty strange and I guess, many people will not
even find this workaround when getting into trouble ...
BTW: This happend when installing the latest updates after an 'init 6'.
Regards,
jel.
Loading...