Verifying the Operation of Load Balancing with Aggregated Interfaces
Purpose
On an M-series or T-series platform, when you configure only the first two labels and the labels vary between traffic flows, traffic may be distributed. However, if there is not much variation between the two labels, traffic may not be distributed equally across aggregated interfaces.
The following output illustrates two situations. The first example output shows a situation in which traffic is not balanced across interfaces because there is not enough variation between the two configured labels. The second example output shows a situation in which traffic is balanced; all three MPLS labels are configured and the third label has enough variation to yield good load-balancing results.
Action
To verify the operation of the hash key, enter the following JUNOS CLI operational mode commands:
user@R2>show configuration forwarding-optionsuser@R2>show interfaces statisticsinterface-namedetailuser@R2>show mpls lsp statisticsSample Output
user@R2>show configuration forwarding-optionshash-key {family mpls {label-1;label-2;}# The IP payload option is missing.}user@R2>show interfaces statistics ae0 detailPhysical interface: ae0, Enabled, Physical link is UpInterface index: 128, SNMP ifIndex: 289, Generation: 129Link-level type: Ethernet, MTU: 1514, Speed: 2000mbps, Loopback: Disabled, Source filtering: Disabled,Flow control: Disabled, Minimum links needed: 1Device flags : Present RunningInterface flags: SNMP-Traps Internal: 0x4000Current address: 00:90:69:0f:07:f0, Hardware address: 00:90:69:0f:07:f0Last flapped : NeverStatistics last cleared: NeverTraffic statistics:Input bytes : 102162 560 bpsOutput bytes : 166100728 30744472 bpsInput packets: 1259 0 ppsOutput packets: 2442317 56515 ppsLabel-switched interface (LSI) traffic statistics:Input bytes : 0 0 bpsInput packets: 0 0 ppsInput errors:Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Giants: 0, Policed discards: 0, Resource errors: 0Output errors:Carrier transitions: 0, Errors: 0, Drops: 0, MTU errors: 0, Resource errors: 0Ingress queues: 8 supported, 8 in useQueue counters: Queued packets Transmitted packets Dropped packets0 best-effort 0 0 01 expedited-fo 0 0 02 assured-forw 0 0 03 network-cont 0 0 0Egress queues: 8 supported, 8 in useQueue counters: Queued packets Transmitted packets Dropped packets0 best-effort 2440822 2440822 01 expedited-fo 0 0 02 assured-forw 0 0 03 network-cont 1225 1225 0Logical interface ae0.0 (Index 66) (SNMP ifIndex 290) (Generation 131)Flags: SNMP-Traps Encapsulation: ENET2Statistics Packets pps Bytes bpsBundle:Input : 1259 0 102162 560Output: 2441888 56515 166056858 30744472Link:ge-1/1/0.0Input : 1259 0 102162 560Output: 1488498 56515 10121786430744272ge-4/3/1.0Input : 0 0 0 0Output: 953235 0 64822700200Marker Statistics: Marker Rx Resp Tx Unknown Rx Illegal Rxge-1/1/0.0 0 0 0 0ge-4/3/1.0 0 0 0 0Protocol inet, MTU: 1500, Generation: 128, Route table: 0Flags: NoneAddresses, Flags: Is-Preferred Is-PrimaryDestination: 10.35.200.4/30, Local: 10.35.200.5, Broadcast: 10.35.200.7, Generation: 147Protocol iso, MTU: 1497, Generation: 128, Route table: 0Flags: Is-PrimaryProtocol mpls, MTU: 1488, Generation: 128, Route table: 0Flags: Is-PrimaryWhat It Means
This sample shows that the hash key at the
[edit forwarding-options]hierarchy level does not include the IP payload, indicating that the distribution of traffic is varying only by IP payload. The output for theshow interfaces statisticscommand shows that traffic is not evenly distributed between linksge-1/1/0andge-4/3/1of the aggregated interfaceae0, probably due to the missing IP payload label.Sample Output
user@R2>show configuration forwarding-optionshash-key {family mpls {label-1;label-2;payload {ip;}}}user@R2>show interfaces statistics ae0 detailPhysical interface:ae0, Enabled, Physical link is UpInterface index: 185, SNMP ifIndex: 289, Generation: 186Link-level type: Ethernet, MTU: 1514, Speed: 2000mbps, Loopback: Disabled, Source filtering: Disabled,Flow control: Disabled, Minimum links needed: 1Device flags : Present RunningInterface flags: SNMP-Traps Internal: 0x4000Current address: 00:90:69:0f:07:f0, Hardware address: 00:90:69:0f:07:f0Last flapped : NeverStatistics last cleared: NeverTraffic statistics:Input bytes : 1000775 0 bpsOutput bytes : 79662734 30743104 bpsInput packets: 13273 0 ppsOutput packets: 1168916 56512 ppsLabel-switched interface (LSI) traffic statistics:Input bytes : 0 0 bpsInput packets: 0 0 ppsInput errors:Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Giants: 0, Policed discards: 0, Resource errors: 0Output errors:Carrier transitions: 0, Errors: 0, Drops: 0, MTU errors: 0, Resource errors: 0Ingress queues: 8 supported, 8 in useQueue counters: Queued packets Transmitted packets Dropped packets0 best-effort 0 0 01 expedited-fo 0 0 02 assured-forw 0 0 03 network-cont 0 0 0Egress queues: 8 supported, 8 in useQueue counters: Queued packets Transmitted packets Dropped packets0 best-effort 1186217 1186219 01 expedited-fo 0 0 02 assured-forw 0 0 03 network-cont 13057 13057 0Logical interface ae0.0 (Index 71) (SNMP ifIndex 292) (Generation 137)Flags: SNMP-Traps Encapsulation: ENET2Statistics Packets pps Bytes bpsBundle:Input : 13273 0 1000775 0Output: 1168916 56512 79662734 30743104Link:ge-1/1/0.0 #Packets are evenly distributed across aggregated interfacesInput : 13273 0 1000775 0Output: 610927282564171658015371728ge-4/3/1.0Input : 0 0 0 0Output: 557989282563794615415371376Marker Statistics: Marker Rx Resp Tx Unknown Rx Illegal Rxge-1/1/0.0 0 0 0 0ge-4/3/1.0 0 0 0 0Protocol inet, MTU: 1500, Generation: 146, Route table: 0Flags: NoneAddresses, Flags: Is-Preferred Is-PrimaryDestination: 10.35.200.4/30, Local: 10.35.200.5, Broadcast: 10.35.200.7, Generation: 151Protocol iso, MTU: 1497, Generation: 147, Route table: 0Flags: Is-PrimaryProtocol mpls, MTU: 1488, Generation: 148, Route table: 0Flags: Is-PrimaryWhat It Means
This sample output shows the configuration of the hash key and the interface statistics for the aggregated interface
ae0. The hash-key configuration specifies the labels used for outbound traffic on different physical links of the aggregated interface. In this case, two labels and IP payload are included in the configuration. The sample output for theshow interface statisticscommand shows the outgoing traffic rate, which is evenly distributed between linksge-1/1/0andge-4/3/1of aggregated interfaceae0. However, an even distribution may not always be the case because it depends on a lot of factors, which can be defined at the[edit forwarding-options]hierarchy level.Sample Output
user@R2>show mpls lsp statisticsIngress LSP: 0 sessionsTotal 0 displayed, Up 0, Down 0Egress LSP: 0 sessionsTotal 0 displayed, Up 0, Down 0Transit LSP: 9 sessionsTo From State Packets Bytes LSPname10.255.70.186 10.255.71.199 Up 1430 101943 to_R1_from_R310.255.71.199 10.255.70.186 Up 81745 5558550 to_R3_from_R110.255.71.199 10.255.70.186 Up 81748 5558768 to_R3_from_R1_110.255.71.199 10.255.70.186 Up 81760 5559492 to_R3_from_R1_210.255.71.199 10.255.70.186 Up 153259 10421488 to_R3_from_R1_310.255.71.199 10.255.70.186 Up 163509 11118573 to_R3_from_R1_410.255.71.199 10.255.70.186 Up 163453 11114666 to_R3_from_R1_510.255.71.199 10.255.70.186 Up 163450 11114554 to_R3_from_R1_610.255.71.199 10.255.70.186 Up 132785 9029356 to_R3_from_R1_7Total 9 displayed, Up 9, Down 0What It Means
This sample output shows that there are nine LSPs transiting R2. All are up and passing varying amounts of traffic.