How to disable IPv6 in Solaris 11
In contrast to solaris 10, during the Solaris 11 installation, the installer does not ask to disable IPv6. When you assign IP address using ipadm create command, it also create an IPv6 interface. Even if you delete the IPv6 interfaces with “ipadm delete-addr ” and “ifconfig inet6 unplumb“, after rebooting the system you would see the IPv6 interface re-plumbed. The ipadm command persists across reboots but the ifconfig command re-pumbs the IPv6 interface.
The DefaultFixed network profile cannot be changed, so in order to disable IPv6 in solaris 11, we have create a custom profile (ncp) and add NCU’s (network configuration units) as described below. NCPs are made up of individual configuration objects called NCU. Each NCU represents a physical link or an interface that includes the properties that define the configuration for that particular link or interface.
Creating a custom profile
Create a custom profile named noipv6 :
# netcfg netcfg> create ncp noipv6
Create NCU for the phys
Create the NCU for phys :
netcfg:ncp:noipv6> create ncu phys net0 Created ncu 'net0'. Walking properties ... activation-mode (manual) [manual|prioritized]> manual mac-address> autopush> mtu> netcfg:ncp:noipv6:ncu:net0> list ncu:net0 type link class phys parent "noipv6" activation-mode manual enabled true netcfg:ncp:noipv6:ncu:net0> end Committed changes netcfg:ncp:noipv6> list ncp:noipv6 management-type reactive NCUs: phys net0
Create NCU for the IP
Create the NCU for IP :
netcfg:ncp:noipv6> create ncu ip net0 Created ncu 'net0'. Walking properties ... ip-version (ipv4,ipv6) [ipv4|ipv6]> ipv4 ipv4-addrsrc [dhcp|static]> static ipv4-addr> 192.168.1.20 ipv4-default-route> netcfg:ncp:noipv6:ncu:net0> list ncu:net0 type interface class ip parent "noipv6" enabled true ip-version ipv4 ipv4-addrsrc static ipv4-addr "192.168.1.20" netcfg:ncp:noipv6:ncu:net0> end Committed changes netcfg:ncp:noipv6> end netcfg> end
Enable the profile created
Enable the newly created profile :
# netadm enable -p ncp noipv6 Enabling ncp 'noipv6'
Verify
Check the IP address to verify that the IPv6 interface does not exist anymore.
# 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 3 inet 192.168.1.20 netmask ffffff00 broadcast 192.168.1.255 ether 0:c:29:12:40:6f lo0: flags=2002000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL] mtu 8252 index 1 inet6 ::1/128
In case you want to plumb another interface, add the phys and IP to the same profile we just created in a similar fasion shown above. To select the profile noipv6 use the command :
# necfg netcfg> select ncp noipv6
No comments:
Post a Comment