Especially network changes is one of the main concern in Solaris 11. Significant development in network side when we comparing with Solaris 10. Solaris 11 comes with profile-based network configurations which contains manual (Fixed Network configuration profile - NCP) and Automatic (reactive-Network Configuration profile - NCP) modes. Also introduced Network Auto-Magic (NWAM) features.
Manual NCP : If we enable DefaultFixed NCP, then network interface to be configured manually with using ipadm and dladm commands. DefaultFixed NCP should be used where the system will be reconfigured using Oracle Solaris Dynamic Reconfiguration or whenever hot-swappable interface are in use or when we required IP multipathing.
We can find which NCP is active through “netadm” command, from the below output we can see Automatic NCP is enabled and active.
root@unixrock:~# netadm list TYPE PROFILE STATE ncp Automatic online ncu:phys net0 online ncu:phys net1 online ncu:phys net3 online ncu:phys net2 online ncu:ip net0 online ncu:ip net1 online ncu:ip net3 online ncu:ip net2 online ncp DefaultFixed disabled loc DefaultFixed offline loc Automatic online loc NoNet offline root@unixrock:~#Before changing the Automatic to Manual NCP, Let's familiar with some basic Network administration commands in Solaris 11.
Showing the phyiscal interface
root@unixrock:~# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1000 full e1000g0 net1 Ethernet up 1000 full e1000g1 net3 Ethernet up 1000 full e1000g3 net2 Ethernet up 1000 full e1000g2 root@unixrock:~#Showing the Link status of the physical interface
root@unixrock:~# dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- net1 phys 1500 up -- net3 phys 1500 up -- net2 phys 1500 up -- root@unixrock:~#checking existing interface on the system
root@unixrock:~# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip ok yes -- net1 ip ok yes -- net2 ip ok yes -- net3 ip ok yes -- root@unixrock:~#checking MAC address and IP address
root@unixrock:~# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.168.113.139/24 net1/v4 dhcp ok 192.168.113.141/24 net2/v4 dhcp ok 192.168.113.143/24 net3/v4 dhcp ok 192.168.113.142/24 lo0/v6 static ok ::1/128 net0/v6 addrconf ok fe80::20c:29ff:febf:ac5b/10 net1/v6 addrconf ok fe80::20c:29ff:febf:ac65/10 net2/v6 addrconf ok fe80::20c:29ff:febf:ac6f/10 net3/v6 addrconf ok fe80::20c:29ff:febf:ac79/10 root@unixrock:~#Trying to switch to manual NCP (excute from console) and checking the network configurations changes
root@unixrock:~# root@unixrock:~# netadm enable -p ncp DefaultFixed Enabling ncp 'DefaultFixed' root@unixrock:~# root@unixrock:~# netadm list TYPE PROFILE STATE ncp Automatic disabled ncp DefaultFixed online loc DefaultFixed online loc Automatic online loc NoNet offline root@unixrock:~# root@unixrock:~# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet UNKNOWN 1000 full e1000g0 net1 Ethernet UNKNOWN 1000 full e1000g1 net3 Ethernet UNKNOWN 1000 full e1000g3 net2 Ethernet UNKNOWN 1000 full e1000g2 root@unixrock:~# root@unixrock:~# dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 UNKNOWN -- net1 phys 1500 UNKNOWN -- net3 phys 1500 UNKNOWN -- net2 phys 1500 UNKNOWN -- root@unixrock:~# root@unixrock:~# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- root@unixrock:~# root@unixrock:~# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 lo0/v6 static ok ::1/128 root@unixrock:~#After changing to DefaultFixed (manaul mode),None of the interface has not configured now in system. Lets we start configure the interface with using "ipadm" commands manual mode.
root@unixrock:~# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet UNKNOWN 1000 full e1000g0 net1 Ethernet UNKNOWN 1000 full e1000g1 net3 Ethernet UNKNOWN 1000 full e1000g3 net2 Ethernet UNKNOWN 1000 full e1000g2 root@unixrock:~# root@unixrock:~# ipadm create-ip net0 root@unixrock:~# root@unixrock:~# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip down no -- root@unixrock:~#Asssing IP Address to the net0 interface
root@unixrock:~# ipadm create-addr -T static -a 192.168.113.139/24 net0/v4test root@unixrock:~# root@unixrock:~# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip ok yes -- root@unixrock:~# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8) net0/v4test static ok 192.168.113.139/24 lo0/v6 static ok ::1/128 root@unixrock:~#NOTE : "T" - option can be used for three specify interface mode statis, DHCP and addrconf (auto configured IPV6 address) Trying DHCP for another interface net1
root@unixrock:~# root@unixrock:~# ipadm create-ip net1 root@unixrock:~# ipadm create-addr -T dhcp net1/v4test2 root@unixrock:~# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip ok yes -- net1 ip ok yes -- root@unixrock:~# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4test static ok 192.168.113.139/24 net1/v4test2 dhcp ok 192.168.113.141/24 lo0/v6 static ok ::1/128 root@unixrock:~#If you want to change the IP, then we need to delete and recreate the interface with new IP. Let we change the IP address
root@unixrock:~# ipadm delete-ip net2 root@unixrock:~# ipadm create-ip net2 root@unixrock:~# ipadm create-addr -T static -a 192.168.113.140 net2/v4test1 root@unixrock:~# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4test static ok 192.168.113.139/24 net1/v4test2 dhcp ok 192.168.113.141/24 net2/v4test1 static ok 192.168.113.140/24 lo0/v6 static ok ::1/128 root@unixrock:~#COOL ...!!! I hope we have covered basic of Network configuration in solaris 11. In my next post will be covered with advanced Network configuration methods as like Vswtich, Vnic, aggregations, IPMP, etc.,
No comments:
Post a Comment