Solaris 11 disable IPv6

I've new installed Solaris 11 on Sparc T4-1.

I'd like to disable IPv6 but with no luck.

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
net0: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.0.230 netmask ffffff00 broadcast 192.168.0.255
        ether 0:21:28:fa:3:32
net4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 169.254.182.77 netmask ffffff00 broadcast 169.254.182.255
        ether 2:21:28:57:47:17
net4: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 4
        inet6 ::/0
        ether 2:21:28:57:47:17
root@endeavour-db:~#

I tried to use ipadm but I'm not getting the right way to do it.

root@endeavour-db:~# ipadm disable-if net4/v6
ipadm: persistent operation not supported for disable-if
root@endeavour-db:~# ipadm delete-addr net4/v6
ipadm: cannot delete address: Object not found
root@endeavour-db:~# ipadm disable-addr net4/v6
ipadm: persistent operation not supported for disable-addr

I'd appreciate if someone can help me.

many thanks

I have not done this in many months.
so I am working from my notes.

ipadm can be used like this:

ipadm down-addr net0/v6

or
hack the config file:
/etc/ipadm/ipadm.conf & remove family=26

my understanding of things is that disabling IPV6 is NOT supported by oracle, and not recommended.

also I disabling IPV6 on the loopback can result in strange bugs.

Thanks for reply,

it looks fine now.

root# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.0.238 netmask ffffff00 broadcast 192.168.0.255
        ether 0:21:28:fa:3:32

Appreciate your support.

Hello

After I rebooted I get IPv6 back, what's bad that when I tried to create an IPMP by issuing ipadm command, it created two ipmp for me, one is v4 and v6.

 ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
net0: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 192.168.0.223 netmask ffffff00 broadcast 192.168.0.255
        groupname ipmp0
        ether 0:21:28:f9:9d:e8
net1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 0.0.0.0 netmask ff000000
        groupname ipmp0
        ether 0:21:28:f9:9d:e9
net4: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 169.254.182.77 netmask ffffff00 broadcast 169.254.182.255
        ether 2:21:28:57:47:17
ipmp0: flags=8001004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,IPMP> mtu 1500 index 5
        inet 192.168.0.157 netmask ffffff00 broadcast 192.168.0.255
        groupname ipmp0
net4: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 3
        inet6 ::/0
        ether 2:21:28:57:47:17
ipmp0: flags=28002000840<RUNNING,MULTICAST,IPv6,IPMP> mtu 1280 index 5
        inet6 ::/0
        groupname ipmp0

is there someway to disable IPv6 permanently.

Best Regards

your only choice may be to hack the config file:
/etc/ipadm/ipadm.conf & remove family=26

this should work across reboots.

Hello Robsonde

Unfortunately after reboot family26 is getting created again in ipadm.conf

# less /etc/ipadm/ipadm.conf
#
# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# DO NOT EDIT OR PARSE THIS FILE!
#
# Use the ipadm(1m) command to change the contents of this file.
_ifname=lo0;_family=2;_class=2;
_ifname=lo0;_aobjname=lo0/v4;_ipv4addr=127.0.0.1,;up=yes;
_ifname=lo0;_aobjname=lo0/v4;prefixlen=8;
_ifname=net0;_family=2;_class=0;
_ifname=net0;_aobjname=net0/v4;_ipv4addr=192.168.0.238,;up=yes;
_ifname=net0;_aobjname=net0/v4;prefixlen=24;
_ifname=net4;_family=2;_class=0;
_ifname=net4;_family=26;_class=0;
_ifname=net4;_aobjname=net4/v4;_ipv4addr=169.254.182.77,;up=yes;
_ifname=net4;_aobjname=net4/v4;prefixlen=24;

Something else looks weird, command is showing net0-4 which means 5 network interfaces while I have only 4 built-in network interfaces in my T4-1:

root@endeavour-db:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net1              Ethernet             unknown    0      unknown   igb1
net4              Ethernet             up         10     full      usbecm2
net3              Ethernet             unknown    0      unknown   igb3
net0              Ethernet             up         100    full      igb0
net2              Ethernet             unknown    0      unknown   igb2
root@endeavour-db:~#  dladm show-link
LINK                CLASS     MTU    STATE    OVER
net1                phys      1500   unknown  --
net4                phys      1500   up       --
net3                phys      1500   unknown  --
net0                phys      1500   up       --
net2                phys      1500   unknown  --
root@endeavour-db:~#

At the same time ipadm showing only v4 IP addresses, the only problem is with ifconfig.

~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           static   ok           192.168.0.238/24
net4/v4           static   ok           169.254.182.77/24

I am sorry, but I have not really used sol11 much yet.

maybe put the ipadm down-addr net0/v6 command into a startup script?

ugly , but it should get results.