GigaSMART Load Balancing

Load balancing distributes GigaSMART outgoing traffic to multiple tool ports or multiple tunnel endpoint destinations. In this way, traffic processed by GigaSMART is shared.

■   Stateful load balancing distributes GigaSMART processed traffic to multiple tool ports or tunnel endpoints based on GigaSMART application-specific flow sessions.
■   Stateless load balancing distributes GigaSMART processed traffic to multiple tool ports or tunnel endpoints based on hash values generated from predefined protocol fields in the packet.
■   Enhanced load balancing

Load balancing operations to tool ports can be assigned to GigaSMART groups consisting of multiple engine ports. Refer to Groups of GigaSMART Engine Ports on page 406 for details.

Refer to the Load Balancing section in the GigaVUE Fabric Management Guide.

Stateful Loadbalancing

Refer to the following examples:

■   Example 1: GigaSMART Stateful Load Balancing
■   Example 2: GigaSMART Stateful Load Balancing

For an example of GTP load balancing in a cluster, refer to Example 6: GigaSMART GTP Load Balancing in a Cluster.

For an example of load balancing on L2GRE encapsulation tunnel, refer to Example 2 – GigaSMART L2GRE Tunnel Encap Stateful LB.

Example 1: GigaSMART Stateful Load Balancing

Example 1 configures stateful load balancing of GigaSMART GTP traffic among tool ports 1/1/x6, 1/1/x7, 1/2/x3, and 1/2/x4 based on bandwidth with different weights for each port. The same subscriber (imsi) traffic will be forwarded to the same tool port. GTP-c packets are replicated to all tool ports.

Step

Description

Command

1.    

Create a port group and specify the tool ports for load balancing.

(config) # port-group alias portgrp1 port-list 1/1/x6,1/1/x7,1/2/x3,1/2/x4

2.  

Enable load balancing on the port group.

(config) # port-group alias portgrp1 smart-lb enable

3.  

Specify weights for each tool port.

(config) # port-group alias portgrp1 weight 1/1/x6 5

(config) # port-group alias portgrp1 weight 1/1/x7 10

(config) # port-group alias portgrp1 weight 1/2/x3 20

(config) # port-group alias portgrp1 weight 1/2/x4 10

4.  

Create a GigaSMART group and specify a port.

(config) # gsgroup alias gsgrp1 port-list 1/3/e1

5.  

Enable replicate GTP-c packets to all tool ports in the load balancing port group.

(config) # gsparams gsgroup gsgrp1 lb replicate-gtp-c enable

6.  

Create a GSOP, including GTP application and load balancing metric.

(config) # gsop alias gsop1 flow-ops flow-filtering gtp lb app gtp metric wt-lt-bw port-list gsgrp1

7.  

Create a virtual port and associate it with the GigaSMART group.

(config) # vport alias vp1 gsgroup gsgrp1

8.  

Create an ingress (first level) map.

Note the following:

■   You can specify only one port group as part of the map tool port in the to statement.
■   You can define the same load balancing port group in multiple maps, however, the load balancing metrics defined in the GSOPs on those maps have to be the same.
■   You cannot use a shared collector map for load balancing.

Note:  In the rules, 2123 is GTP-c traffic and 2152 is GTP-u traffic.

(config) # map alias map11

(config map alias map11) # type firstLevel byRule

(config map alias map11) # from 1/1/x1

(config map alias map11) # to vp1

(config map alias map11) # rule add pass portdst 2123

(config map alias map11) # rule add pass portdst 2152

(config map alias map11) # exit

(config) #

9.  

Create a second level map.

(config) # map alias map22

(config map alias map22) # type secondLevel flowFilter

(config map alias map22) # from vp1

(config map alias map22) # use gsop gsop1

(config map alias map22) # to portgrp1

(config map alias map22) # flowrule add pass gtp imsi 234567*

(config map alias map22) # exit

(config) #

10.  

Display load balancing statistics.

(config) # show load-balance port-group stats alias portgrp1

11.  

Clear load balancing statistics, including Total Bytes, Total Packets, and Total Sessions.

Note:  Active Sessions will not be cleared.

(config) # clear load-balance port-group stats all

Example 2: GigaSMART Stateful Load Balancing

Example 2 configures stateful load balancing of GigaSMART GTP traffic among tool ports 1/1/x6, 1/1/x7, 1/2/x3, and 1/2/x4 based on hashing of the imei value. The same device ID (imei) traffic will be forwarded to the same tool port. GTP-c packets are replicated to all tool ports.

Step

Description

Command

1.    

Create a port group and specify the tool ports for load balancing.

(config) # port-group alias portgrp1 port-list 1/1/x6,1/1/x7,1/2/x3,1/2/x4

2.  

Enable load balancing on the port group.

(config) # port-group alias portgrp1 smart-lb enable

3.  

Create a GigaSMART group and specify ports.

(config) # gsgroup alias gsgrp1 port-list 1/3/e1

4.  

Enable replicate GTP-c packets to all tool ports in the load balancing port group.

(config) # gsparams gsgroup gsgrp1 lb replicate-gtp-c enable

5.  

Create a GSOP, including GTP application and load balancing metric.

(config) # gsop alias gsop1 flow-ops flow-filtering gtp lb app gtp metric hashing key imei port-list gsgrp1

6.  

Create a virtual port and associate it with the GigaSMART group.

(config) # vport alias vp1 gsgroup gsgrp1

7.  

Create an ingress (first level) map.

Note the following:

■   You can specify only one port group as part of the map tool port in the to statement.
■   You can define the same load balancing port group in multiple maps, however, the load balancing metrics defined in the GSOPs on those maps have to be the same.
■   You cannot use a shared collector map for load balancing.

Note:  In the rules, 2123 is GTP-c traffic and 2152 is GTP-u traffic.

(config) # map alias map11

(config map alias map11) # type firstLevel byRule

(config map alias map11) # from 1/1/x1

(config map alias map11) # to vp1

(config map alias map11) # rule add pass portdst 2123

(config map alias map11) # rule add pass portdst 2152

(config map alias map11) # exit

(config) #

8.  

Create a second level map.

(config) # map alias map22

(config map alias map22) # type secondLevel flowFilter

(config map alias map22) # from vp1

(config map alias map22) # use gsop gsop1

(config map alias map22) # to portgrp1

(config map alias map22) # flowrule add pass gtp imsi 234567*

(config map alias map22) # exit

(config) #

9.  

Display load balancing statistics.

(config) # show load-balance port-group stats alias portgrp1

Use the following command to display load balancing statistics:

(config) # show load-balance port-group stats alias portgrp1

Stateless Loadbalancing

Refer to the following examples:

■   Example 1: GigaSMART Stateless Load Balancing
■   Example 2: GigaSMART Stateless Load Balancing
■   Example 3: GigaSMART Stateless Load Balancing

For an example of load balancing on L2GRE encapsulation tunnel, refer to Example 3 – GigaSMART L2GRE Tunnel Encap Stateless LB.

Example 1: GigaSMART Stateless Load Balancing

Example 1 configures stateless load balancing of traffic among tool ports 1/1/x6, 1/1/x7, 1/2/x3, and 1/2/x4 after slicing the packet to an offset of 70 bytes.

 

Step

Description

Command

1.    

Create a port group and specify the tool ports for load balancing.

(config) # port-group alias portgrp1 port-list 1/1/x6,1/1/x7,1/2/x3,1/2/x4

2.  

Enable load balancing on the port group.

(config) # port-group alias portgrp1 smart-lb enable

3.  

Configure a GigaSMART group and associate it with GigaSMART engine ports.

(config) # gsgroup alias gsgrp1 port-list 1/3/e1,1/3/e2

4.  

Create a GSOP, with load balancing.

(config) # gsop alias lbiponlyouter slicing protocol none offset 70 lb hash ip-only outer port-list gsgrp1

5.  

Create a first level map.

Note the following:

■   You can specify only one port group as part of the map tool port in the to statement.
■   You can define the same load balancing port group in multiple maps, however, the load balancing metrics defined in the GSOPs on those maps have to be the same.
■   You cannot use a shared collector map for load balancing.

(config) # map alias map1

(config map alias map1) # type regular byRule

(config map alias map1) # from 1/1/x1

(config map alias map1) # use gsop lbiponlyouter

(config map alias map1) # to portgrp1

(config map alias map1) # rule add pass ipver4

(config map alias map1) # exit (config) #

6.  

Display load balancing statistics.

(config) # show load-balance port-group stats alias portgrp1

7.  

Clear load balancing statistics, including Total Bytes and Total Packets.

(config) # clear load-balance port-group stats all

8.  

Display load balancing statistics.

Note:   Since stateless load balancing is on a packet-by-packet basis, it does not have sessions. So for stateless load balancing, Total Sessions and Active Sessions will always be zero (0).

(config) # show load-balance port-group stats alias portgrp1

 

Example 2: GigaSMART Stateless Load Balancing

Example 2 configures stateless load balancing of GTP traffic among tool ports 1/1/x6, 1/1/x7, 1/2/x3, and 1/2/x4. Data packets with the same GTP-u tunnel ID will be forwarded to the same tool port.

Step

Description

Command

1.    

Create a port group and specify the tool ports for load balancing.

(config) # port-group alias portgrp1 port-list 1/1/x6,1/1/x7,1/2/x3,1/2/x4

2.  

Enable load balancing on the port group.

(config) # port-group alias portgrp1 smart-lb enable

3.  

Configure a GigaSMART group and associate it with GigaSMART engine ports.

(config) # gsgroup alias gsgrp1 port-list 1/3/e1,1/3/e2

4.  

Create a GSOP, including load balancing metric.

(config) # gsop alias gsop1 lb hash gtpu-teid port-list gsgrp1

5.  

Create first level maps.

Note the following:

■   You can specify only one port group as part of the map tool port in the to statement.
■   You can define the same load balancing port group in multiple maps, however, the load balancing metrics defined in the GSOPs on those maps have to be the same.
■   You cannot use a shared collector map for load balancing.

(config) # map alias map1

(config map alias map1) # type regular byRule

(config map alias map1) # from 1/1/x1

(config map alias map1) # to portgrp1

(config map alias map1) # rule add pass protocol udp portdst 2123

(config map alias map1) # exit

(config) # map alias map2

(config map alias map2) # type regular byRule

(config map alias map2) # from 1/1/x1

(config map alias map2) # use gsop gsop1

(config map alias map2) # to portgrp1

(config map alias map2) # rule add pass protocol udp portdst 2152

(config map alias map2) # exit

(config) #

6.  

Display load balancing statistics.

Note:  Since stateless load balancing is on a packet-by-packet basis, it does not have sessions. So for stateless load balancing, Total Sessions and Active Sessions will always be zero (0).

(config) # show load-balance port-group stats alias portgrp1

Example 3: GigaSMART Stateless Load Balancing

Example 3 configures stateless load balancing of HTTP on GTP traffic among tool ports 1/1/x6, 1/1/x7, 1/2/x3, and 1/2/x4. Data packets with the same inner IP will be forwarded to the same tool port.

Step

Description

Command

1.    

Create a port group and specify the tool ports for load balancing.

(config) # port-group alias portgrp1 port-list 1/1/x6,1/1/x7,1/2/x3,1/2/x4

2.  

Enable load balancing on the port group.

(config) # port-group alias portgrp1 smart-lb enable

3.  

Configure a GigaSMART group and associate it with GigaSMART engine ports.

(config) # gsgroup alias gsgrp1 port-list 1/3/e1,1/3/e2

4.  

Create a GSOP, including load balancing metric.

(config) # gsop alias gsop1 lb hash ip-only inner port-list gsgrp1

5.  

Create first level and second level maps.

Note the following:

■   You can specify only one port group as part of the map tool port in the to statement.
■   You can define the same load balancing port group in multiple maps, however, the load balancing metrics defined in the GSOPs on those maps have to be the same.
■   You cannot use a shared collector map for load balancing.

(config) # map alias map1

(config map alias map1) # type regular byRule

(config map alias map1) # from 1/1/x1

(config map alias map1) # to portgrp1

(config map alias map1) # rule add pass protocol udp portdst 2123

(config map alias map1) # exit

(config) # map alias map2

(config map alias map2) # type firstLevel byRule

(config map alias map2) # from 1/1/x1

(config map alias map2) # to vp1

(config map alias map2) # rule add pass protocol udp portdst 2152

(config map alias map2) # exit

(config) #map alias map22

(config map alias map22) # type secondLevel byRule

(config map alias map22) # from vp1

(config map alias map22) # use gsop gsop1

(config map alias map22) # to portgrp1

(config map alias map22) # gsrule add pass l4port dst pos 2 value 80

(config map alias map22) # exit

(config) #

6.  

Display load balancing statistics.

Note:   Since stateless load balancing is on a packet-by-packet basis, it does not have sessions. So for stateless load balancing, Total Sessions and Active Sessions will always be zero (0).

(config) # show load-balance port-group stats alias portgrp1

Enhanced Load Balancing

Example 1: Enhanced Load Balancing

In this example GTP-c traffic is sent to tool ports 1/1/x5, 1/1/x6. Enhanced load balancing is used to send GTP-u traffic to tool ports 1/1/x5, 1/1/x6, 2/1/x15 and 2/2/x16 based on inner IP.

Note:  Optional configuration for MPLS traffic handling. Inner IP (version 4) is located 70 bytes from the beginning of the packet.

Task

Description

UI Steps

1.    

Create a Port Group for GTP-c traffic and specify the tool ports.

# port-group alias pg1

port-list 1/1/x5,1/1/x6

exit

2.  

Create a Port Group for GTP-u traffic and specify the tool ports for enhanced load balancing.

# port-group alias pg2

port-list 1/1/x5,1/1/x6,2/1/x15,2/2/x16

smart-lb enable

exit

3.  

Create a GigaSMART Group and associate the GigaSMART engine port(s).

# gsgroup alias gsgrp1 port-list 1/1/e1

4.  

Create an enhanced load balance metric for GTPu traffic and distribute traffic based on inner IP.

# apps enhanced-lb alias elb-gtpu

hash-field add ip inner

exit

5.  

Create a GigaSMART operation for GTP-c traffic.

# gsop alias gsop1

apf set

port-list gsgrp1

exit

6.  

Create a GigaSMART operation for GTP-u traffic and include the enhanced load balance metric.

# gsop alias gsop2

apf set

lb elb elb-gtpu

port-list gsgrp1

exit

7.  

Create a virtual port and associate it with the GigaSMART group.

# vport alias vp1 gsgroup gsgrp1

8.  

Create an ingress first level map to direct traffic from the network ports 1/1/x1 and 1/1/x2 to the virtual port based on IP version.

# map alias map11

from 1/1/x1,1/1/x2

to vp1

rule add pass ipver4

rule add pass ipver6

exit

9.  

Create an egress second level map to process GTP-c traffic

# map alias map21

from vp1

use gsop gsop1

10.  

Create an egress second level map to process

GTP-u traffic

# map alias map22

from vp1

use gsop gsop2

to pg2

gsrule add pass l4port dst pos 1 value 2152

exit

11.  

Display port statistics for GTP-c traffic

# show port stats port-list 1/1/x5..x6

12.  

Display load balancing statistics for GTP-u traffic

# show load-balance port-group stats alias pg2

Example 2: Enhanced Load Balancing

In this example enhanced load balancing of Non GTP traffic and (subsequent) fragmented packets to are sent GTP tool ports 1/1/x5, 1/1/x6, 2/1/x15 and 2/2/x16 based on outer IP.

Task

Description

UI Steps

1.    

Create a Port Group for non GTP and (subsequent) fragmented traffic

# port-group alias pg3

port-list 1/1/x5,1/1/x6,2/1/x15,2/2/x16

smart-lb enable

exit

2.  

Create a GigaSMART Group and associate the GigaSMART engine port(s)

# gsgroup alias gsgrp1 port-list 1/1/e1

3.  

Create an enhanced load balance metric for non GTP IP traffic and distribute traffic based on outer IP

# apps enhanced-lb alias elb-ip

hash-field add ip outer

exit

4.  

Create a GigaSMART operation for non-GTP and fragmented traffic and include the enhanced load balance metric

# gsop alias gsop3

apf set

lb elb elb-ip

port-list gsgrp1

exit

5.  

Create a virtual port and associate it with the GigaSMART group

# vport alias vp1 gsgroup gsgrp1

6.  

Create an ingress first level map to direct traffic from the network ports 1/1/x1 and 1/1/x2 to the virtual port based on IP version

# map alias map11

from 1/1/x1,1/1/x2

to vp1

rule add pass ipver4

rule add pass ipver6

exit

7.  

Create an egress second level map to process non GTP and fragmented traffic

# map alias map23

from vp1

use gsop gsop3

to pg3

gsrule add pass ipver pos 1 value 4

Enhanced Load Balancing 9

gsrule add pass ipver pos 1 value 6

exit

8.  

Display load balancing statistics for Non GTP and fragmented traffic

# show load-balance port-group stats alias pg3