Solaris -- Network Aggregation

Aus RZ-Amper Wiki
Zur Navigation springen Zur Suche springen

Zuerst sehen wir uns mal die Netzwerk-Schnittstellen an. Die Befehle 'dladm show-link -s' und 'dladm show-dev' bringen dazu brauchbare Ausgaben.

 ismine~# dladm show-link -s
                 ipackets   rbytes       ierrors  opackets   obytes       oerrors
 bge0            0          0            0        0          0            0
 bge1            0          0            0        0          0            0
 qfe0            4784       1211673      0        3787       1341922      0
 qfe1            0          0            0        0          0            0
 qfe2            0          0            0        0          0            0
 qfe3            0          0            0        0          0            0
 bge2            0          0            0        0          0            0
 bge3            0          0            0        0          0            0
 ismine~# dladm show-dev
 bge0            link: unknown   speed: 0     Mbps       duplex: unknown
 bge1            link: unknown   speed: 0     Mbps       duplex: unknown
 qfe0            link: up        speed: 100   Mbps       duplex: full
 qfe1            link: down      speed: 0     Mbps       duplex: unknown
 qfe2            link: down      speed: 0     Mbps       duplex: unknown
 qfe3            link: down      speed: 0     Mbps       duplex: unknown
 bge2            link: unknown   speed: 0     Mbps       duplex: unknown
 bge3            link: unknown   speed: 0     Mbps       duplex: unknown


Link der Netzwerk-Schnittstelle ueberpruefen.

 ismine~# ndd -get /dev/bge0 link_status
 0
 ismine~# ndd -get /dev/bge1 link_status
 0

Das Agregat mit 'dladmin' erstellen.

 dladm create-aggr -d bge0 -d bge1 -d bge2 -d bge3 -l off -P L2 1

-d Es koennen soviele Schnittstellen hinzugefuegt werden wie noetig.
-P Policy; Die Richtlinie, die das Load Balancing beschreibt: L2 fuer MAC, L3 fuer IP, L4 fuer src/dest IP
-l off/active/passive bechreibt die Art wie LCAP arbeitet.

LCAP Mode Description
Passive The switch does not initiate the channel, but does understand incoming LACP packets. The peer (in active state) initiates negotiation (by sending out an LACP packet) which we receive and reply to, eventually forming the aggregation channel with the peer. This is similar to the auto mode in PAgP.
Active We are willing to form an aggregate link, and initiate the negotiation. The link aggregate will be formed if the other end is running in LACP active or passive mode. This is similar to the desirable mode of PAgP.
On The link aggregation is forced to be formed without any LACP negotiation .In other words, the switch will neither send the LACP packet nor process any incoming LACP packet. This is similar to the on state for PAgP.

Mit 'dladm show-link -s' sehen wir uns noch mal die Netzwerk-Schnittstellen an und sehen, dass die Schnittstelle 'aggr' hinzugekommen ist.

 ismine~# dladm show-link -s
                 ipackets   rbytes       ierrors  opackets   obytes       oerrors
 bge0            0          0            0        0          0            0
 bge1            0          0            0        0          0            0
 qfe0            6456       1439028      0        4936       1584411      0
 qfe1            0          0            0        0          0            0
 qfe2            0          0            0        0          0            0
 qfe3            0          0            0        0          0            0
 bge2            0          0            0        0          0            0
 bge3            0          0            0        0          0            0
 aggr1           0          0            0        0          0            0

Nun kann die Schnittstelle eingebunden und eine IP Adresse hinzugefuegt werden.

 ismine~# ifconfig aggr1 plumb
 ismine~# ifconfig aggr1 192.168.2.30 netmask 255.255.255.0 up
 ismine~# ifconfig -a
 lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
         inet 127.0.0.1 netmask ff000000
 qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
         inet 192.168.2.12 netmask ffffff00 broadcast 192.168.2.255
         ether 8:0:20:c8:54:5
 aggr1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
         inet 192.168.2.30 netmask ffffff00 broadcast 192.168.2.255
         ether 0:3:ba:58:20:d

Das war es auch schon. Das Agregat ist erstellt und arbeitet.

 ismine~# dladm show-aggr
 key: 1 (0x0001) policy: L2      address: 0:3:ba:58:20:d (auto)
            device       address                 speed           duplex  link    state
            bge0         0:3:ba:58:20:d    100   Mbps    full    up      attached
            bge1         0:3:ba:58:20:e    100   Mbps    full    up      attached
            bge2         0:3:ba:58:20:f    100   Mbps    full    up      attached
            bge3         0:3:ba:58:20:10   100   Mbps    full    up      attached