Powered By Blogger

Monday, December 9, 2013

Link Aggregation on Solaris 10

      Link Aggregation on Solaris 10

What is Link Aggregation?

An aggregation is similar to an IPMP link created for failover, but has other advantages:-
  • An aggregation is treated as one device for configuration and management, and uses only one IP address.
  • In-bound as well as outbound load spreading is provided, so extra bandwidth is available.
  • Automatic failover is provided, to the remaining working links in the aggregation.
  • Policies can be applied to the traffic flows.
  • Parallel aggregations between servers can be created, without going through a switch. 

How to Set up Link Aggregation on Solaris 10?


è Configuration in the switch


First of all we need to make sure link all cables are connected to switch  ( same vlan)

1. Connect to switch console

# telnet XX.XX.XX.XX

2. Enter to privileged mode and open configuration terminal

BR-telnet@FastIron SuperX Router>en
Password:
BR-telnet@FastIron SuperX Router#config terminal

3. For each port of the bond enable link-aggregate

BR-telnet@FastIron SuperX Router(config)#interface ethernet 2/20
BR-telnet@FastIron SuperX Router(config-if-e1000-2/20)#link-aggregate active
BR-telnet@FastIron SuperX Router(config-if-e1000-2/20)#exit
BR-telnet@FastIron SuperX Router(config)#interface ethernet 2/21
BR-telnet@FastIron SuperX Router(config-if-e1000-2/21)#link-aggregate active
BR-telnet@FastIron SuperX Router(config-if-e1000-2/21)#exit

4. Quit configuration terminal and privileged mode, check for those ports in the link- aggregated ports table and exit

BR-telnet@FastIron SuperX Router(config)#exit
BR-telnet@FastIron SuperX Router(config)#write memory
BR-telnet@FastIron SuperX Router#show link-aggregate
System ID: 0012.f2b4.ae00
Long timeout: 120, default: 120
Short timeout: 3, default: 3
Port [Sys P] [Port P] [ Key ] [Act][Tio][Agg][Syn][Col][Dis][Def][Exp][Ope]
------------------------------------------------------------------------------------------
2/20 1 1 483 Yes L Agg Syn Col Dis No No Ope
2/21 1 1 483 Yes L Agg Syn Col Dis No No Ope
------------------------------------------------------------------------------------------
BR-telnet@FastIron SuperX Router#exit
BR-telnet@FastIron SuperX Router>exit

è Configuration on the Server


Login as root and execute to verify what are the interfaces are up and available

# dladm show-dev ( Following command will tell you that nxge0 to nxg3 are up and available for link aggregate)
e1000g0         link: up        speed: 1000  Mbps       duplex: full
e1000g1         link: up        speed: 1000  Mbps       duplex: full
e1000g2         link: unknown   speed: 0     Mbps       duplex: half
e1000g3         link: unknown   speed: 0     Mbps       duplex: half
nxge0           link: up        speed: 1000  Mbps       duplex: full
nxge1           link: up        speed: 1000  Mbps       duplex: full
nxge2           link: up        speed: 1000  Mbps       duplex: full
nxge3           link: up        speed: 1000  Mbps       duplex: full

Another command to verify is dladm show-link

 

Create Link aggregation now:


# dladm  create -aggr  -d  nxge0  -d  nxge1 –d nxge2 –d nxge3 1

Create aggr1 interface and plumb it


# ifconfig  aggr1   plumb 10.25.156.39 –broadcast 10.25.156.63 –netmask 255.255.255.192 up

Check the interface


# ifconfig –a

aggr1: flags=1000842 mtu 1500 index 2
        inet 10.25.156.39 netmask ffffffe0 broadcast 10.25.156.63
        ether 0:21:28:30:50:c6

Activate it


# dladm   modify-aggr  -l   active  -t  short  1

You can check policy and other information by using


# dladm   show-aggr
key: 1 (0x0001) policy: L2      address: 0:21:28:30:50:c6 (auto)
           device       address                 speed           duplex  link    state
           nxge0        0:21:28:30:50:c6          1000  Mbps    full    up      attached
           nxge1        0:21:28:30:50:c7          1000  Mbps    full    up      attached
           nxge2        0:21:28:30:50:c8          1000  Mbps    full    up      attached
           nxge3        0:21:28:30:50:c9          1000  Mbps    full    up      attached

Reboot the server

You can Check packets transferred and validation


#dladm   show-aggr -s

key:1           ipackets   rbytes       opackets   obytes       %ipkts  %opkts
        Total   18817722   2325029336   7546157    1056461980
        nxge0   4696030    580745736    1886522    264113080      25.0    25.0
        nxge1   4696574    580788680    1886522    264113080      25.0    25.0
        nxge2   4738703    583317764    1886570    264119800      25.2    25.0
        nxge3   4686415    580177156    1886543    264116020      24.9    25.0


Other important commands:


# dladm show-linkprop
Welcome to the UNIX world