LAG EcoRouter Documentation / LAG
Link aggregation means combining several channels into a single logical link for increased bandwidth and redundancy. You can add ports to the aggregated link if they are parallel and configured identically. That is, aggregated channels must connect two devices in parallel.
Up to 8 ports can be aggregated in one on the same or different cards of the router. The speed characteristics of ports must match for the aggregation. Also the ports should not be attached to service instances. Service instance for the operations with VLAN tags will be configured at the aggregated port (read more in the "Service Instances" section).
Hash evaluation
A traffic balancing is made on streams. Frame distribution along aggregation port's channels is based on the frame header's data. Using this information and hashing algorythm a router choose one of physical ports from aggregated to be used.
A fields used to evaluate hash-function by default:
Router ID | S\C-Src Mac | S\C-Dst Mac | S\C-Src IP | S\C-Dst IP | Hash seed | Protocol Type | Port.no |
Router ID - an unchangeable router identifier.
S\C-Src Mac (Service\Client-Source Mac address) - an originator's MAC address.
S\C-Dst Mac (Service\Client-Destination Mac address) - a recipient's MAC address.
S\C-Src IP (Service\Client-Source IP) - an originator's IP address.
S\C-Dst IP (Service\Client-Destination) - a recipient's IP address.
Hash seed - a variable value, is unique within a router. Value's range is 0 - 255.
Protocol Type - transport protocol type.
Port.no - port number which recieved packet.
Hash-function evaluation result is always the same for packets with an identical input data. Thus one stream packets will be transferred to the same port (physical channel).
The result of hash-function evaluation is a 32-bit number. The first 16 bits are used to balancing in Link Aggregation Control Protocol (LACP), the rest 16 bits are used for balancing in Equal-cost multi-path routing (ECMP).
LACP
Link Aggregation Control Protocol is a signal protocol for aggregation port operation. In order to define which ports belong to the same logical channel LACP sends PDU messages to all ports where it is enabled. LACP operates in two modes - passive or active. In passive LACP mode device does not send PDU (Protocol Data Unit) messages by itself when aggregation channel is confugured but waits for incoming PDU messages from neighboring devices. After neighbor's PDU message recieved the device sends its own messages. In active LACP made device sends PDU packets continuously.
PDU contains device's parameters and expected from its neighbor parameters. The parameters are following: system identifier, group interfaces identifier, physical inteface identifier which PDU was sent from, and its current state. When all the folowing conditions are met an aggregated port change its state from listening to transmitting:
- the bite word state identifies neighbor device's port as binded and operating in group,
- the parameters recieved from the neighbor meet the ones expected,
- the parameters expected by the neighbor meet the device's ones.
Configuring
In context aggregation port configuration mode use the ecorouter(config-port-channel)# command to configure PDU parameters. The command's options are in the table below.
Command | Description |
---|---|
lacp | Enable LACP on an aggregation port. Disabled by default |
lacp key <NUM> | The default value is a port number in the aggregation channel. Range is 0 - 65535 |
lacp mode (active | passive) | LACP mode |
lacp period (fast | slow) | The PDU messages sending period and their lifetime:
|
lacp system-id <ID> | System identifier XXXX:XXXX:XXXX |
lacp system-priority <NUM> | Define at system priority to resolve aggregation port selection conflicts. The lower the value, the higher the priority. The default value is 32768, value changes in range 0 - 65535 |
The port priority parameter specifies port's priority in an aggregated chnnel. The lower the value, the higher the priority. The default value is 32768. In context aggregation port configuration mode use the lacp-priority <NUM> command to change the value of port priority where NUM is port priority. It changes in range 0 - 65535.
Show commands
The following show type commands are used to display LACP statistics and aggregated ports statuses.
Use the show counters lacp ( | port) command to display counters. Specify certain aggregation port if necessary.
ecorouter#sh lacp internal
Flags: S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Port channel: ae.1
LACP port Admin Port Port
Port Flags State priority Key Number State
te1/0 SA bndl 32767 0x10 8 0x3D
te1/1 SA bndl 32767 0x10 9 0x3D
Use the show lacp internal detail commant to display the detailed settings.
ecorouter#sh lacp internal detail
Flags: S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Port channel: ae.1
Actor (internal) information:
Actor Actor Actor
Port System ID Port Number Age Flags
te1/0 32767,000d.4838.8067 8 19 SA
LACP Actor Actor Actor
Port Priority Oper Key Port State
32767 0x10 0x3D
Port State Flags Decode:
Activity: Timeout: Aggregation: Synchronization:
Active Long Yes Yes
Collecting: Distributing: Defaulted: Expired:
Yes Yes No No
Actor Actor Actor
Port System ID Port Number Age Flags
te1/1 32767,000d.4838.8067 9 27 SA
LACP Actor Actor Actor
Port Priority Oper Key Port State
32767 0x10 0x3D
Port State Flags Decode:
Activity: Timeout: Aggregation: Synchronization:
Active Long Yes Yes
Collecting: Distributing: Defaulted: Expired:
Yes Yes No No
Use the show lacp neighbour ( | detail) ( | port) command to display an information about neighbors. Specify certain port and detailed output if necessary.
The following example demostrates the short and detailed commmand execution results:
ecorouter#sh lacp neighbor
Flags: S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Port channel: ae.1
Partner's information:
LACP port Port Port
Port Flags priority Dev ID Age Number State
te1/0 FA 32768 908d.7845.9bc0 1 28 0x3F
te1/1 FA 32768 908d.7845.9bc0 9 27 0x3F
ecorouter#sh lacp neighbor detail
Flags: S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Port channel: ae.1
Partner's information:
Partner Partner Partner
Port System ID Port Number Age Flags
te1/0 32768,908d.7845.9bc0 28 18 FA
LACP Partner Partner Partner
Port Priority Oper Key Port State
32768 0x1 0x3F
Port State Flags Decode:
Activity: Timeout: Aggregation: Synchronization:
Active Short Yes Yes
Collecting: Distributing: Defaulted: Expired:
Yes Yes No No
Partner Partner Partner
Port System ID Port Number Age Flags
te1/1 32768,908d.7845.9bc0 27 26 FA
LACP Partner Partner Partner
Port Priority Oper Key Port State
32768 0x1 0x3F
Port State Flags Decode:
Activity: Timeout: Aggregation: Synchronization:
Active Short Yes Yes
Collecting: Distributing: Defaulted: Expired:
Yes Yes No No
For the commands described above the modificators and output to file can be used just like for other show commands.
ECMP
ECMP (Equal-cost multi-path routing) is a best path to the destination network among equivalents selecting mechanism. The output interface and the path selection based on a hash evaluated. The funtional is enabled by default.
Link Aggregation Configuring
Aggregation port naming
Maximum possible aggregation ports number for device is n/2 where n is device's physical ports number. Aggregation port name starts with a combination of letters ae which are followed by point symbol and a unique number.
Aggregation port configuration commands
Command | Description |
---|---|
port ae.<number> | Create an aggregation port, where ae indicates port type, the number after a point is a aggregation port's order number (in configuration mode). When configuring ER-2008 mind the specifity (see Equipment) |
bind <port_name> | Add a port into aggregation channel (in context aggregation channel configuration mode) |
description <string> | Add aggregation channel port description |
mtu <value> | Specify the mtu parameter for aggregation port |
Add-mirror-session <value> | Indicate an existing mirroring rule |
Service-instance <name> | Create service instance on aggregation port |
A port can be added into an existing aggregation channel in context aggregation port configuration mode by the group <aggregation_port_name> command.
Basic configuring of an aggregation port. Method 1
In configuration mode configure an aggregation port.
ecorouter(config)#port ae.10
where ae is obligatory part of an aggregation port name, 10 is an identifier.
Add ports into an aggregation port in context aggregation channel configuration mode:
ecorouter(config-port-channel)#bind te0
ecorouter(config-port-channel)#bind te1
ecorouter(config-port-channel)#bind te2
ecorouter(config-port-channel)#bind te3
Specify mtu value on the aggregation port:
ecorouter(config-port-channel)#mtu 1500
After an aggregation port is created it can be operated just like an ordinary port.
Basic configuring of an aggregation port. Method 2
In configuration mode configure an aggregation port.
ecorouter(config)#port ae.10
where ae is obligatory part of an aggregation port name, 100 is an identifier.
Add port into an aggregation channel in context aggregation port configuration mode:
ecorouter(config)#port te0
ecorouter(config-port)#group ae.100
ecorouter(config)#port te1
ecorouter(config-port)#group ae.100
ecorouter(config)#port te2
ecorouter(config-port)#group ae.100
The default mtu value is 9728. Specify mtu value on aggregation port (the values on ae and te ports must be the same)
ecorouter(config-port-channel)#mtu 1500
After an aggregation port is created it can be operated just like an ordinary port.
Commands to view aggregation port status
Display statuses of all ports:
ecorouter#show port
Port te0 is up
Type: 10 Gigabit Ethernet
MTU: 9728 max 9728
link state UP;
Input packets 8391086176507358240, bytes 2322538359385584737, errors 0
Output packets 0, bytes 0, errors 0
Port te1 is up
Type: 10 Gigabit Ethernet
MTU: 9728 max 9728
link state UP;
Input packets 8391086176507358240, bytes 2322538359385584737, errors 0
Output packets 0, bytes 0, errors 0
Port te2 is up
Type: 10 Gigabit Ethernet
MTU: 9728 max 9728
link state UP;
Input packets 8391086176507358240, bytes 2322538359385584737, errors 0
Output packets 0, bytes 0, errors 0
Port te3 is up
Type: 10 Gigabit Ethernet
MTU: 9728 max 9728
link state UP;
Input packets 0, bytes 0, errors 0
Output packets 0, bytes 0, errors 0
Port te4 is up
Type: 10 Gigabit Ethernet
MTU: 9728 max 9728
link state UP;
Input packets 0, bytes 0, errors 0
Output packets 0, bytes 0, errors 0
Port ae.10 is up
Link te0
Link te1
Link te2
MTU: 9728
link state DOWN;
Input packets 0, bytes 0, errors 0
Output packets 0, bytes 0, errors 0
Display a certain port status:
ecorouter#sh port ae.10
Port ae.10 is up
Link te0
Link te1
Link te2
MTU: 9728
link state DOWN;
Input packets 0, bytes 0, errors 0
Output packets 0, bytes 0, errors 0
Display the counters of an aggregation port:
ecorouter#sh counters port ae.100
Port ae.100
Received packets
Total received packets: 0
Total received bytes: 0
Transmitted packets
Total received bytes: 0
Total transmitted packets: 0
Total transmitted bytes: 0
Transmission errors
giants: 0
Total transmission errors: 0