Comparing Network configuration : Solaris 10 Vs Solaris 11
One of the best things I like about solaris 11 over solaris 10 is the huge change in the network stack in solaris 11. Oracle has added loads of new features to the networking stack of solaris 11. We’ll be discussing the new features in solaris 11 network stack and also compare it with solaris 10 where ever applicable.
Network Configuration Files
The use of below network files has been deprecated starting solaris 11 and it is being managed by SMF to have a Persistent network configuration across reboots.
/etc/defaultdomain /etc/dhcp.* /etc/hostname.* /etc/hostname.ip*.tun* /etc/nodename /etc/nsswitch.conf
Network Configuration Profile
Solaris 11 uses profile-based network configuration. It has 2 configuration modes :
1. Automatic – Uses DHCP to obtain network configuration (IP address, router and DNS) from any of the connected ethernet interfaces. Do not support hot swapping of interfaces and IPMP.
2. Manual (DefaultFixed NCP) – interfaces needs to be manually configured using dladm and ipadm commands. Also called as DefaultFixed NCP. Supports hot swapping of interfaces and IPMP.
1. Automatic – Uses DHCP to obtain network configuration (IP address, router and DNS) from any of the connected ethernet interfaces. Do not support hot swapping of interfaces and IPMP.
2. Manual (DefaultFixed NCP) – interfaces needs to be manually configured using dladm and ipadm commands. Also called as DefaultFixed NCP. Supports hot swapping of interfaces and IPMP.
To check the NCP :
# netadm list
TYPE PROFILE STATE
ncp Automatic disabled
ncp DefaultFixed online
loc Automatic offline
loc NoNet offline
loc DefaultFixed online
As you can see currently the DefaultFixed profile is online and the automatic profile is in disabled state.
To enable the automatic NCP profile :
To enable the automatic NCP profile :
# netadm enable -p ncp Automatic
To enable the manual NCP profile
# netadm enable -p ncp DefaultFixed
Commands at Data link layer
In solaris 11 the dladm show-dev command doesn’t work and is replaced by the dladm show-phys command as shown below. One major change is now every interface in solaris 11 will be identified as “net#” ( for e.g. net0, net1), it includes the IPMP interface as well (as ipmp0). This helps in hot swapping of interfaces as the OS does not take into consideration the actual physical network device name and uses the concept of “vanity names” like net0, net1 etc..
Solaris 10 :
# dladm show-dev e1000g0 link: up speed: 1000 Mbps duplex: full
Solaris 11 :
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1000 full e1000g0
Solaris 10 :
# dladm show-link e1000g0 type: non-vlan mtu: 1500 device: e1000g0
The OVER column in the below output will show on which physical data links the data link is operating (applicable only in case of aggr, vlan etc..).
Solaris 11 :
# dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up --
Commands at IP layer
The ifconfig command still works in solaris 11, but there are 2 more commands added in solaris 11 for viewing the IP addresses and MAC addresses of the interfaces.
Solaris 10 :
# ifconfig -a lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 2 inet 192.168.1.10 netmask ffffff00 broadcast 192.168.1.255 ether 0:c:29:f6:ef:67
Solaris 11:
# ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net0 ip ok yes --
Above command shows the existing interfaces in the system.
# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/geeklab static ok 192.168.1.10/24
Above command shows us the MAC and IP addresses assigned to the interfaces.
Manual network Configuration
Let us now see an example to configure an IP address in both solaris 10 and solaris 11.
Solaris 10 :
# ifconfig e1000g1 plumb # ifconfig e1000g1 192.168.1.20 netmask 255.255.255.0 up
We have to also edit the /etc/hosts, /etc/netmasks, /etc/hostname.e1000g1 files in order to make the new IP address persist reboot.
Solaris 11 :
Before configuring the IP address make sure you have enabled the manual NCP (DefaultFixed).
Before configuring the IP address make sure you have enabled the manual NCP (DefaultFixed).
# netadm enable –p ncp DefaultFixed # netadm list
Now we can configure the IP manually. ipadm command creates the new interface to be configured.
# ipadm create-ip net0 # ipadm create-addr –T static –a local=192.168.1.10/24 net0/geeklab
-T specifies either static, dhcp or addrconf (for IPv6) types of addresses. the string geeklab can be any random string used to identify the interface.
# ipadm NAME CLASS/TYPE STATE UNDER ADDR lo0 loopback ok -- -- lo0/v4 static ok -- 127.0.0.1/8 net0 ip ok -- -- net0/geeklab static ok -- 192.168.1.10/24
The un-configuration of IP addresses is as follows in both solaris 10 and solaris 11 :
Solaris 10 :
# ifconfig unplumb e1000g1
Also remove the entries in /etc/hosts, /etc/netmasks and /etc/hostname.e10000g1 (remove the complete file).
Solaris 11 :
In case of solaris 11, even if you need to change the IP address of the interface, you have to delete and create the interface again.
In case of solaris 11, even if you need to change the IP address of the interface, you have to delete and create the interface again.
# ipadm delete-ip net2
No comments:
Post a Comment