Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes the
proper task IDs. If you suspect user group assignment is preventing you from
using a command, contact your AAA administrator for assistance.
You can
undo only a Layer 4 configuration.
Per-flow load-balancing
allows incoming data traffic on a router to be evenly distributed over multiple
equal-cost connections. Per-flow load-balancing is the only load-balancing
algorithm that is used to perform Layer 2 and Layer 3 load-balancing decisions
on IPv4, IPv6, and Multiprotocol Label Switching (MPLS) flows in the system.
The existing
3-tuple hash provides good-balancing for packet flows with different Layer 3
information (for example, source and destination IP addresses). However, this
hash algorithm performs well for cases in which different packet flows, which
are identified by Layer 4 content, contain the same Layer 3 packet information.
For example, a network, which uses Port Address Translation (PAT) on one end of
the network, distributes traffic to a content provider on the other end of the
network that supports redundant access using the same IP address.
A new hash algorithm, which
uses additional Layer 4 information from the Layer 3 packet, is needed to
provide improved load-balancing support in the system. On the Cisco IOS XR
software, the 7-tuple hash algorithm is implemented to provide improved
load-balancing. The following inputs are processed:
- Layer 3 information
- Source IP address
- Destination IP address
- Protocol
- Layer 4 information
- Source port
- Destination port
- Cisco
CRS router-related information
- Router ID
- Slot Number:Rx UIDB Index
- Ingress interface bundle
Note
|
The treatment
is different for IPv4 and IPv6 fragmented packets that are fragmented on the
router for various reasons. For example, the fragmented packets can originate
at the router or they can arrive at the router with a size larger than the
maximum transmission unit (MTU). Therefore, the 7-tuple load balancing is done
on the whole packet, and fragmentation is done later so that all fragments can
go on the same interface.
|
- Source IP address
- Destination IP address
- Router ID
Note
|
This command has no effect on Layer 3 Multicast IP traffic.
|
Examples
The following
example shows how to configure Layer 3
and Layer 4
load-balancing for the hash algorithm from the
cef
load-balancing fields command:
RP/0/RP0/CPU0:router# cef load balacing fields
The following example shows
sample output that displays summary information for all locations from the
show cef
summary
command:
RP/0/RP0/CPU0:router# show cef load-balancing location all
Router ID is 1.1.1.101
IP CEF with switching (Table Version 0) for node0_0_CPU0
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286202
286110 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20599920 bytes
11112 load sharing elements, 3012008 bytes, 297064 references
8 shared load sharing elements, 3008 bytes
11104 exclusive load sharing elements, 3009000 bytes
0 CEF route update drops, 2864666 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 1 adjacency
1 incomplete adjacency
IP CEF with switching (Table Version 0) for node0_0_CPU1
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286202
286110 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20599920 bytes
11112 load sharing elements, 3012008 bytes, 297064 references
8 shared load sharing elements, 3008 bytes
11104 exclusive load sharing elements, 3009000 bytes
0 CEF route update drops, 2864666 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 1 adjacency
1 incomplete adjacency
IP CEF with switching (Table Version 0) for node0_1_CPU0
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286228
286112 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20600064 bytes
11114 load sharing elements, 3590384 bytes, 297064 references
8 shared load sharing elements, 3424 bytes
11106 exclusive load sharing elements, 3586960 bytes
0 CEF route update drops, 4076380 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 77 adjacencies
22 incomplete adjacencies
IP CEF with switching (Table Version 0) for node0_2_CPU0
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286202
286110 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20599920 bytes
11112 load sharing elements, 3012008 bytes, 297064 references
8 shared load sharing elements, 3008 bytes
11104 exclusive load sharing elements, 3009000 bytes
0 CEF route update drops, 2864666 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 1 adjacency
1 incomplete adjacency
IP CEF with switching (Table Version 0) for node0_2_CPU1
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286202
286110 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20599920 bytes
11112 load sharing elements, 3012008 bytes, 297064 references
8 shared load sharing elements, 3008 bytes
11104 exclusive load sharing elements, 3009000 bytes
0 CEF route update drops, 2864666 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 1 adjacency
1 incomplete adjacency
IP CEF with switching (Table Version 0) for node0_3_CPU0
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286204
286110 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20599920 bytes
11111 load sharing elements, 3589556 bytes, 297062 references
7 shared load sharing elements, 3148 bytes
11104 exclusive load sharing elements, 3586408 bytes
0 CEF route update drops, 4076376 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 21 adjacencies
12 incomplete adjacencies
IP CEF with switching (Table Version 0) for
node0_RSP0_CPU0
node0_RP0_CPU0
Load balancing: L4
Tableid 0xe0000000, Vrfid 0x60000000, Vrid 0x20000000, Flags 0x301
Vrfname default, Refcount 286242
286122 routes, 0 reresolve, 0 unresolved (0 old, 0 new), 20600784 bytes
11124 load sharing elements, 3014696 bytes, 297064 references
8 shared load sharing elements, 3008 bytes
11116 exclusive load sharing elements, 3011688 bytes
0 CEF route update drops, 4075013 revisions of existing leaves
Resolution Timer: 15s
0 prefixes modified in place
0 deleted stale prefixes
0 prefixes with label imposition, 11032 prefixes with label information Adjacency Table has 15 adjacencies
1 incomplete adjacency