fintanr's weblog

Archives

« October 2004 »
MonTueWedThuFriSatSun
    
2
3
8
9
10
12
13
15
16
17
18
19
20
21
22
23
24
25
26
28
29
30
31
       
Today

the links




Twitter Updates

    follow me on Twitter
















    20041006 Wednesday October 06, 2004

    Sun Trunking 1.3

    Sun Trunking has been around for a long time, and it allows you to aggregate Sun network cards (4 gigabit or 16 10/100 cards) together for a larger pipe. We have had a need to use this to make use of an e6500 as a client for a SpecjAppserver2002 rig in the past, and due to a different issue[1] I had to recreate the trunk on this rig today so I figured a quick (very simple) example on how to set it up is worthwhile.

    In our case we were using a single qfe card to create the trunks, I'll skip the pkgremove pkgadd cycle, and skip straight to the config. First up we need to grab our qfe instance numbers, we can get these from path_to_inst.

    ecemulator# grep qfe /etc/path_to_inst
    "/sbus@3,0/SUNW,qfe@0,8c00000" 0 "qfe"
    "/sbus@3,0/SUNW,qfe@0,8c10000" 1 "qfe"
    "/sbus@3,0/SUNW,qfe@0,8c20000" 2 "qfe"
    "/sbus@3,0/SUNW,qfe@0,8c30000" 3 "qfe"
    
    check to make sure we have nothing setup, just to be sure
    ecemulator# ifconfig -a
    lo0: flags=1000849 mtu 8232 index 1
            inet 127.0.0.1 netmask ff000000
    hme0: flags=1000843 mtu 1500 index 2
            inet xxx.x.x.xxx netmask ffffff00 broadcast xxx.x.x.255
            ether 8:0:20:xx:xx:xx
    
    ecemulator# cd /etc/opt/SUNWconn/bin
    ecemulator# ./nettr -conf
    
    Okay, so we are in the clear. Now lets check our local-mac-address? setting to make sure its okay (it needs to be set to true for trunking to work)
    ecemulator#  eeprom local-mac-address?
    local-mac-address?=false
    ecemulator# eeprom local-mac-address?=true
    
    In this case we are going to choose qfe0 as the head of the trunk, so we set /etc/hostname.qfe0 to ecemulator and make sure that it has an entry in our host file. Now lets actually set up the trunk. First off we need to choose our trunking policy, there are four possible policies, these being -

    MAC Default policy, at its simplest will divide the traffic equally, ie each interface in this example will handle 25% of the traffic
    Round Robin Use each interface in turn
    IP Destination Address Use IP Destination address to get the transmission path
    IP Source Address/IP Destination Address Deterministic connections

    In our case we are going to choose mac as our policy. So to enable this permanently we edit /etc/opt/SUNWconn/bin/nettr.sh and add the following line
    # Trunking setup for qfe card on sbus #1 - Fintan
    nettr -setup 0 device=qfe policy=1 members=0,1,2,3
    
    Now lets run this manually, and we get
    ecemulator# ./nettr -setup 0 device=qfe policy=1 members=0,1,2,3
    
    qfe trunk members:
        qfe0 (head)
        qfe1
        qfe2
        qfe3
    
    and thats it. To make sure its all okay, we bring the machine down and reboot
    ecemulator# sync
    ecemulator# init 0
    ecemulator#
    INIT: New run level: 0
    The system is coming down.  Please wait.
    System services are now being stopped.
    Print services already stopped.
    Oct  6 10:41:32 ecemulator syslogd: going down on signal 15
    The system is down.
    syncing file systems... done
    Program terminated
    {10} ok printenv local-mac-address?
    local-mac-address? =  true
    {10} ok boot -r
    .................
    
    Configuring Sun Trunking devices
    
    qfe trunk members:
        qfe0 (head)
        qfe1
        qfe2
        qfe3
    configuring IPv4 interfaces: hme0 qfe0.
    Hostname: ecemulator
    .......
    
    All working, and back to todays planned work. The Sun Trunking docs cover all of the above and much more in gory detail.
    [1] devfsadm -Cv -r /mnt is a really usefull hack (thanks Wookie), but fully reading manpages may be an idea on my part ;).
    (2004-10-06 03:29:16.0) Permalink

    SLAMD goes opensource...
    SLAMD has gone opensource, released under the Sun Public License. You can download the lot from here [slamd.com] or here [java.net].
    (2004-10-06 02:00:46.0) Permalink