Saturday, April 13, 2013

Change the default Maximum Transmission Unit (MTU) Size in solairs

 Change the default Maximum Transmission Unit (MTU) Size

The maximum transmission unit (MTU) is the size (in bytes) of the largest protocol data unit that it can pass onwards. MTU parameters usually appear in association with a communications interface (NIC, serial port, etc.). The MTU may be fixed by standards (as is the case with Ethernet) or decided at connect time (as is usually the case with point-to-point serial links).
A higher MTU brings greater efficiency because each packet carries more user data while protocol overheads, such as headers or underlying per-packet delays remain fixed, and higher efficiency means a slight improvement in bulk protocol throughput. However, large packets can occupy a slow link for some time, causing greater delays to following packets and increasing lag and minimum latency. For example, a 1500 byte packet, the largest allowed by Ethernet at the network layer (and hence most of the Internet), would tie up a 14.4k modem for about one second.

Now here are the step by step to increase the MTU size, on Solaris of course.
by default, if you type “ifconfig -a” you will get the MTU size is 1500:
bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=201000843 mtu 1500 index 2
inet 10.32.16.1 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:73:25:e8
e1000g1: flags=201000843 mtu 1500 index 3
inet 10.32.16.2 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:6a:34:ae
bash-3.00#


you can change MTU size by running “ifconfig mtu ”, but it doesn’t work for e1000g if the max default is still 1500. try and you will got error like this:
bash-3.00# ifconfig e1000g1 mtu 8000
ifconfig: setifmtu: SIOCSLIFMTU: e1000g1: Invalid argument
{tried on bge interface also on M5000 and the result still same:
root@server # ifconfig bge2 mtu 8000
ifconfig: setifmtu: SIOCSLIFMTU: bge2: Invalid argument
{using dladm command also failed:
root@server # dladm set-linkprop -p mtu=8000 bge2
dladm: warning: invalid link property ‘mtu’
READ from this link and this link, then finally I understand that changing MTU size is different for each interface types. and here are the conclusion:
Change MTU size for E1000g (Intel PRO/1000 Gigabit family device driver) interface:
Scenario:
I have 2 interface; e1000g0 and e1000g1. I need to change the MTU size to 8000  for e1000g1 interface only.
1.  Check current config with “ifconfig -a”
2. edit file “/kernel/drv/e1000g.conf”
go to “MaxFrameSize” line, change the zero values number like this:
MaxFrameSize=0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
# 0 is for normal ethernet frames.
# 1 is for upto 4k size frames.
# 2 is for upto 8k size frames.
# 3 is for upto 16k size frames.
# These are maximum frame limits, not the actual ethernet frame
# size. Your actual ethernet frame size would be determined by
# protocol stack configuration (please refer to ndd command man pages)
# For Jumbo Frame Support (9k ethernet packet)
# use 3 (upto 16k size frames)
Note: Above configuration only affect to e1000g1.
If you want to change MTU size to all interface, just simply change all zero values with 1,2,3 as you need:
Example: MaxFrameSize=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2;
then, all your interface will support 8K MTU.
3. reboot
4. check the result with “ifconfig -a | grep mtu”
bash-3.00# ifconfig -a | grep mtu
lo0: flags=2001000849 mtu 8232 index 1
e1000g0: flags=201000843 mtu 1500 index 2
e1000g1: flags=1201000843 mtu 8106 index 3
bash-3.00#

5. After reboot, the MTU size is 8106. if you want 8000 mtu size, then edit file “/etc/hostname.e1000g1″:
bash-3.00# cat /etc/hostname.e1000g1
solaris10 mtu 8000
bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=201000843 mtu 1500 index 2
inet 10.32.16.1 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:73:25:e8
e1000g1: flags=1201000843 mtu 8000 index 3
inet 10.32.16.2 netmask ffffff00 broadcast 10.32.16.255
ether 8:0:27:6a:34:ae

Change MTU size for bge (Broadcom Gigabit Ethernet device driver) interface:
bash­3.00# grep bge /etc/path_to_inst
“/pci@0,600000/pci@0/pci@8/pci@0/network@2″ 0 “bge”
“/pci@0,600000/pci@0/pci@8/pci@0/network@2,1″ 1 “bge”
­
bash­3.00# cat /etc/system
set bge:bge_jumbo_enable = 1
­
bash­3.00# cat /platform/sun4u/kernel/drv/bge.conf
default_mtu=9000;
name=”bge” parent=”/pci@0,600000″ unitaddress=”2″ default_mtu=9000;
bash­3.00# reboot
bash­3.00# ifconfig ­-a
Change MTU size for ce (Cassini Gigabit-Ethernet device driver) interface:

Thursday, April 4, 2013

Solaris network dladm – Display Link status,speed,duplex,statistics,MTU



In the past we have to mess around with the NDD commands and stats tools like kstat to find the network link status, speed, duplex information in Sun Solaris. With Solaris 10, this has become much easier with the dladm utility.
dladm is the admin utility for Data-Link Interface which helps to display informarthe like Link Status (UP/DOWN), Speed, Duplex, MTU, VLAN Tagged and crucially statistics of network traffic on each of the interfaces historically as well as in real time. dladm can also configure and admin Link Aggregation on multiple NICs which we will not focus here.

Show Link Status/Speed/Duplex
# dladm show-dev
nxge0 link: down speed: 0 Mbps duplex: unknown
nxge1 link: down speed: 0 Mbps duplex: unknown
nxge2 link: up speed: 1000 Mbps duplex: full
nxge3 link: up speed: 1000 Mbps duplex: full
As you can see above the “show-dev” option lists all the network interfaces with Link Status (UP/DOWN), current speed in Mbps and Duplex (Half/Full)
Show Link Status
# dladm show-link
nxge0 type: non-vlan mtu: 1500 device: nxge0
nxge1 type: non-vlan mtu: 1500 device: nxge1
nxge2 type: non-vlan mtu: 1500 device: nxge2
nxge3 type: non-vlan mtu: 1500 device: nxge3
Here “show-link” option reveals the MTU and the VLAN tagging detail on each of the interfaces on the system.
Show Stats of all Interfaces for all time
# dladm show-dev -s
ipackets rbytes ierrors opackets obytes oerrors
nxge0 0 0 0 0 0 0
nxge1 0 0 0 0 0 0
nxge2 179625752557169463759657 581104982 3964684165410
nxge3 22240891 1834257868 0 5198483 395084708 0
The “-s” option along with “show-dev” or “show-link” displays network traffic statistics including Input/Output packets, input/output errors.
Stats in real-time
To show the stats of a particular interface in real-time use the “-i” option which is the interval in seconds. The first line shows again historic stats and later on the real-time information for every “n” seconds (5 seconds in our example)
# dladm show-link -s -i 5 nxge2
ipackets rbytes ierrors opackets obytes oerrors
nxge2 179637824757173944575957 581119516 3964706801670
ipackets rbytes ierrors opackets obytes oerrors
nxge2 961 319105 0 150 17874 0
ipackets rbytes ierrors opackets obytes oerrors
nxge2 887 263850 0 117 16505 0
If we fail to mention the interface then it takes the default interface (1st in the list). As you can see from the example below, we see stats for nxge0 which is not connected.
# dladm show-link -s -i 5
ipackets rbytes ierrors opackets obytes oerrors
nxge0 0 0 0 0 0 0
ipackets rbytes ierrors opackets obytes oerrors
nxge0 0 0 0 0 0 0

Monday, April 1, 2013

zoneadmd is not able to start.


Solaris zones stuck in shutting down state or zonadm status is showing  in Down status or stuck in umounting file system.

 

 

Error: zoneadmd is not able to start.

 

Solution:

1: Go in global zone and check zone state and  run ps -ef | grep "zonename" , try to kill process id of hanged process and zoneadmd.

 

2: umount -f "zone mount point name"  exp : zone1 is installaed on /zone1 mount point run umount -f /zone1

 

3:Again kill all process whcich are showing in ps -ef | grep "zonename"

 

4: Run fsck on local zone path mount point

 

5: Mount and reboot the zone

 

6: Edit /etc/vfstab and comment faulted mount point

 

7: Again Reboot the zone and mount filesystm on another mount point.