Load balancing in cisco router

Load balancing in cisco router DEFAULT

Cisco Router Per-packet Load Balancing

Load balancing across multiple routes on a Cisco router

When multiple routes for the same destination network are installed in a router's Routing Table, a router can load-balance traffic across the different routes.

Cisco Routers offer 2 mechanisms to load-balance traffic across multiple routes with the same Administrative Distance. In this note we will discuss per-packet load balancing.

Consider the routing table below:

Router1 Console

Router1#show ip route

Codes:L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set
 
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C   10.0.0.0/24 is directly connected, GigabitEthernet0/1
L   10.0.0.1/32 is directly connected, GigabitEthernet0/1
C   10.0.2.0/24 is directly connected, GigabitEthernet0/0
L   10.0.2.1/32 is directly connected, GigabitEthernet0/0
S   10.20.0.0/24 [1/0] via 10.0.0.2
S   10.20.0.0/24[1/0] via 10.0.0.3
S   10.20.0.0/24[1/0] via 10.0.2.2

Router1#

There are 2 connected routes and 3 static routes installed in the routing table. All 3 static routes are for the destination network 10.20.0.0/24. When the router receives an IP packet addressed to 10.20.0.10 how does it decide where to forward that packet?

Per-packet load balancing

When a router is configured for per-packet load balancing, IP packets are distributed evenly across the available routes for a network on a per-packet basis.

In our example, the first time that the router has to route a packet to the destination network 10.20.0.0/24 the router chooses the first route available (10.0.0.2). The next packet that must be routed to the network 10.20.0.0/24 will be routed over the 2nd path (10.0.0.3). The third packet will be forwarded to 10.0.2.2.

When the next packet has to be routed to 10.20.0.0/24, the router will forward it to 10.0.0.2 and the round-robin process continues.

Configuring per-packet load balancing

Per-packet load balancing is not the default load-balancing mode on Cisco routers. Per-packet load balancing can be configured using the following command:

ip load-sharing per-packet

This command is an Interface Configuration Mode command. It must be applied to every interface that forwards traffic to the destination network that we are interested in. In our example, the 3 routes to the network 10.20.0.0/24 are reached via Interface gi0/1 (for 10.0.0.2 and 10.0.0.3) and Interface gi0/0 (for 10.0.2.2).

Per-packet load balancing must be configured on both interface gi0/1 and gi0/0 as shown below:

Router1 Console

Router1(config)#int gi0/1

Router1(config-if)#ip load-sharing per-packet

Router1(config-if)#int gi0/0

Router1(config-if)#ip load-sharing per-packet

Router1(config-if)#

Advantages of per-packet load balancing

The primary advantage of per-packet load balancing is that this mechanism guarantees the distribution of traffic equally across all the available links.

Disadvantages of per-packet load balancing

There are 2 main disadvantages of per-packet load balancing.

Out of order packets

The primary disadvantage of per-packet load balancing is that this mechanism cannot guarantee the arrival of packets in the order that they were sent from the source device. Since each packet from a specific source device to a specific destination device may take a different path to the destination device, the packets may arrive at the destination device in a different order than they were sent out.

Processor-intensive mechanism

Another disadvantage of per-packet load balancing is the fact that this is a processor-intensive mechanism and could result in lower overall performance on high-speed interfaces. This mechanism requires a routing table lookup for each packet in order to choose the least used path for a given destination network.


Route Installation and Route Selection on Cisco routers is covered extensively in Course 4 - Static Routes on this website.

Sours: https://www.connecteddots.online/resources/cisco-reference/cisco-router-per-packet-load-balancing

Configuring Dual ISP load balancing on Single Cisco Router

techspacekhJanuary 16, 2018

 

For today network with multiple internet connections/dual ISP connections would need a network load balancer to load balance LAN IP subnets.  ISP load balancing is very important not only in the enterprise networks but even in some small networks also need ISP load balancing for LAN IP subnets. Most of the case, people want end user LAN can access to internet with different ISP from server farm LAN. To achieve the objective of ISP load balancing for LAN IP subnets of a network, we can use Policy Based routing PBR on Cisco router.

In this article will show how to configure dual ISP load balancing on single Cisco router with Policy Based routing PBR on Cisco router to load balance two IP subnet, end user LAN and server farm LAN. End user LAN will access to internet via ISP01 and  server farm LAN will access to the internet via ISP02.

 

In this article of how to configure dual ISP load balancing on single Cisco router, it is assumed that:

a. you already have GNS3 VM virtual server installed up and running on your computer. In case that you don’t, please refer to this link. Installing GNS3 VM on VMware Workstation

b.  You know how to configure NAT, network address translation, on Cisco router. If you do not, you can refer this link Configuring Network Address Translation (NAT) on Cisco Router.

 

To demonstrate how to configure dual WAN load balancing on single Cisco router , we will set up a GNS3 lab as the following IP network diagram.

There are five Cisco routers. R1 is the router in customer network and the other two routers will act like two different ISP, so we have multiple internet connections for the customer network. ISP01 is used serve internet connection for end user computer LAN which is 10.10.10.0/24 and ISP02 is used serve internet connection for server farm LAN which is 20.20.20.0/24. There is one router PC1 within the LAN network acting as end user computer client and one router Server01 act as a dedicated server in server farm LAN.

Now let configure the IP address setting on PC1.

# int f0/0 ip add 10.10.10.2 255.255.255.0 no sh # ip route 0.0.0.0 0.0.0.0 10.10.10.1

On Server01, configure the IP address setting as the following.

# int f0/0 ip add 20.20.20.2 255.255.255.0 no sh # ip route 0.0.0.0 0.0.0.0 20.20.20.1

On customer router R1 configure the following IP address settings

# int f0/0 ip add 10.10.10.1 255.255.255.0 no sh # int f0/1 ip add 20.20.20.1 255.255.255.0 no sh # int f1/0 ip add 100.100.100.1 255.255.255.252 no sh # int f1/1 ip add 200.200.200.1 255.255.255.252 no sh

On ISP01 router, configure the following IP address settings

# int f0/0 ip add 100.100.100.2 255.255.255.252 no sh # int f0/1 ip add 102.102.102.1 255.255.255.252 no sh

On ISP02 router, configure the following IP address settings

# int f0/0 ip add 200.200.200.2 255.255.255.252 no sh # int f0/1 ip add 102.102.102.2 255.255.255.252 no sh

To connect ISP01 to ISP02 we need to configure a routing protocol. It can be the static routing or dynamic routing protocol, but in our case now let use OSPF dynamic routing protocol to connect these two ISP.

On ISP01 router, configure OSPF dynamic routing protocol as the below.

# router ospf 1 net 102.102.102.0 0.0.0.3 area 1 net 100.100.100.0 0.0.0.3 area 1

On ISP02 router, configure OSPF dynamic routing protocol as the below.

# router ospf 1 net 102.102.102.0 0.0.0.3 area 1 net 200.200.200.0 0.0.0.3 area 1

 

The first thing that we need to do here to have ISP load balancing with multiple internet connections is to configure dynamic NAT, dynamic network address translation, on Cisco router R1 that connected directly to two ISP. So, clients computers in user LAN and servers in server farm LAN within the internal network can reach to internet.

To configure dynamic NAT on Cisco router R1,  we need to create an ACL to contain the IP address to be NATed. In below ACL, we allow all IP in the client computers in user LAN and servers in server farm LAN can access to the internet.

# ip access-list standard ACL-UserLAN permit 10.10.10.0 0.0.0.255 # ip access-list standard ACL-ServerLAN permit 20.20.20.0 0.0.0.25

After configured an access control list , then we need to configure dynamic NAT with the created ACL above.

# int f0/0 ip nat inside # int f0/1 ip nat inside # int f1/0 ip nat outside # int f1/1 ip nat outside # ip nat inside source list ACL-ServerLAN int fa1/1 overload # ip nat inside source list ACL-UserLAN int fa1/0 overload

Then, we need to configure default routes on our dual wan connection Cisco router R1. So, end user computers in user LAN and servers in server farm LAN within the internal network can reach to internet.

# ip route 0.0.0.0 0.0.0.0 100.100.100.2 # ip route 0.0.0.0 0.0.0.0 200.200.200.2

Now we need to configure Policy-based routing PBR on Cisco router with dual wan connection R1. Policy-based routing PBR will manage to forward the traffic from end user computer LAN 10.10.10.0/24 to the internet via ISP01 and server farm LAN to the internet via ISP02.

# route-map PBR-UserLAN permit 10 set ip next-hop 100.100.100.2 match ip address ACL-UserLAN # route-map PBR-SERVERLAN permit 10 set ip next-hop 200.200.200.2 match ip address ACL-ServerLAN

Then, we need to apply the Policy-based routing PBR configured above into the interface that connected to end user LAN and server farm LAN.

# int f0/0 ip policy route-map PBR-UserLAN # int f0/1 ip policy route-map PBR-SERVERLAN

 

To test if the configuration of  ISP load balancing with multiple internet connections work or not,  we can ping to the public IP address these two ISP which is 102.102.102.1 or 102.102.102.2 from end user computer LAN PC1 or Server01 in server farm LAN. We should get the following successful result.

PC1# ping 102.102.102.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 102.102.102.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/50/72 ms Server01# ping 102.102.102.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 102.102.102.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/32/48 ms

After we know that ping to the public IP address of these two ISP is successful, we can check the traceroute command to see which path that it go to reach that  public IP address. Base on the following traceroute result, it reach 102.102.102.2 via ISP01.

PC1# traceroute 102.102.102.2 1 10.10.10.1 36 msec 16 msec 8 msec 2 100.100.100.2 8 msec 28 msec 16 msec 3 102.102.102.2 52 msec 40 msec 44 msecServer01# traceroute 102.102.102.1 1 20.20.20.1 28 msec 20 msec 20 msec 2 200.200.200.2 8 msec 36 msec 20 msec 3 102.102.102.1 28 msec 36 msec 64 msec

Base on the following traceroute result, we can see that end user computer PC1 can reach 102.102.102.2 via ISP01 and Server01 in server farm can reach 102.102.102.1 via ISP02.

Let also check the NAT configuration of  ISP load balancing with multiple internet connections work or not. For end user LAN 10.10.10.0/24 should be NATed to the IP address of ISP01 and for server farm LAN 20.20.20.0/24 should be NATed to the IP address of ISP02 as the following.

# sh ip nat translations Pro Inside global Inside local Outside local Outside global udp 100.100.100.1:49323 10.10.10.2:49323 102.102.102.2:33437 102.102.102.2:33437 udp 100.100.100.1:49327 10.10.10.2:49327 102.102.102.2:33441 102.102.102.2:33441 udp 100.100.100.1:49328 10.10.10.2:49328 102.102.102.2:33442 102.102.102.2:33442 udp 200.200.200.1:49264 20.20.20.2:49264 102.102.102.1:33437 102.102.102.1:33437 udp 200.200.200.1:49265 20.20.20.2:49265 102.102.102.1:33438 102.102.102.1:33438 udp 200.200.200.1:49266 20.20.20.2:49266 102.102.102.1:33439 102.102.102.1:33439

 

That’s all about how to configure dual ISP load balancing on single Cisco router from Tech Space KH. This is a cheap and simple method to achieve the objective of ISP load balancing with multiple internet connections. Hopefully, you can find this guide informative. If you have any questions or suggestions you can always leave your comments below. I will try all of my best to review and reply them.

Comments

comments

Sours: http://www.techspacekh.com/configuring-dual-isp-load-balancing-on-single-cisco-router/
  1. Virginia state multi purpose center
  2. Delaware river high tides today
  3. 3m open 2021 committed players
  4. Add signature to notes iphone
  5. Very short pixie with bangs

Cisco Router Per-destination Load Balancing

Load balancing across multiple routes on a Cisco router

The previous article discussed per-packet load balancing on Cisco Routers. In this article we will discuss per-destination load balancing.

Consider the routing table below:

Router1 Console

Router1#show ip route

Codes:L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set
 
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C   10.0.0.0/24 is directly connected, GigabitEthernet0/1
L   10.0.0.1/32 is directly connected, GigabitEthernet0/1
C   10.0.2.0/24 is directly connected, GigabitEthernet0/0
L   10.0.2.1/32 is directly connected, GigabitEthernet0/0
S   10.20.0.0/24 [1/0] via 10.0.0.2
S   10.20.0.0/24[1/0] via 10.0.0.3
S   10.20.0.0/24[1/0] via 10.0.2.2

Router1#

There are 2 connected routes and 3 static routes installed in the routing table. All 3 static routes are for the destination network 10.20.0.0/24. When the router receives an IP packet addressed to 10.20.0.10 how does it decide where to forward that packet?

Per-destination load balancing

With per-destination load balancing, the router makes a forwarding decision based on the destination IP address of an IP packet. Once it chooses a route for a particular destination IP address, the router will forward all subsequent packets addressed to the same host to the same next hop address.

We can illustrate what happens with an example. When the router receives a packet for 10.20.0.5, it decides to forward the packet to 10.0.0.2. All subsequent packets addressed to 10.20.0.5 will be forwarded to 10.0.0.2.

The router now receives a packet for 10.20.0.6. The router will now choose a new path to 10.20.0.0/24 for this packet. Suppose it chooses 10.0.0.3. All subsequent packets addressed to 10.20.0.6 will be forwarded to 10.0.0.3.

This process continues - the first time that the router has to choose a path for a particular destination host, the router will choose the path based on link usage. Once this choice has been made, all subsequent packets addressed to this host will be forwarded along the same path.

Configuring per-destination load balancing

Per-destination load balancing is the default load-balancing mode on Cisco routers. If an interface has previously been configured for per-packet load sharing, it can be configured for per-destination load balancing using one of the following 2 commands:

no ip load-sharing per-packet

OR

ip load-sharing per-destination

Either of the above commands will configure the interface to perform per-destination load balancing.

Advantages of per-destination load balancing

Per-destination load balancing is a deterministic load balancing mechanism. This means that packets addressed to a particular host will always follow the same path. As a result, packets should arrive at the destination in the same order that they were sent (in the absence of packet loss due to network congestion issues).

Disadvantages of per-destination load balancing

The primary drawback of per-destination load balancing is the possibility of uneven distribution of traffic. There is no guarantee that all available paths to a destination network will be used equally. If a large number of packets are destined for the same host (for e.g. a web application server), the link used for that host will be used more than the other available links.

Enhancements to per-destination load balancing

Source and destination based load balancing

In order to achieve a more even distribution of traffic across available links, without having to resort to per-packet load balancing, some enhancements have been made to the per-destination load balancing algorith.

Instead of basing a forwarding decision simply on the destination IP Address, the combination of source and destination address are used. All packets from a specific host to a specific host goes over the same path. Traffic designated for the same destination host (such as a server), but originating from different source devices should travel over different paths, thereby ensuring a more even distribution of traffic.


Route Installation and Route Selection on Cisco routers is covered extensively in Course 4 - Static Routes on this website.

Sours: https://www.connecteddots.online/resources/cisco-reference/cisco-router-per-destination-load-balancing
Cisco Default Routes and Load Balancing Configuration

Configuring a Load-Balancing Scheme

adjacency--A relationship formed between selected neighboring routers and end nodes for the purpose of exchanging routing information. Adjacency is based upon the use of a common media segment by the routers and nodes involved.

CiscoExpressForwarding--A Layer 3 switching technology. Cisco Express Forwarding can also refer to central Cisco Express Forwarding mode, one of two modes of Cisco Express Forwarding operation. Cisco Express Forwarding enables a Route Processor to perform express forwarding. Distributed Cisco Express Forwarding is the other mode of Cisco Express Forwarding operation.

distributedCiscoExpressForwarding--A mode of Cisco Express Forwarding operation in which line cards (such as Versatile Interface Processor [VIP] line cards) maintain identical copies of the forwarding information base (FIB) and adjacency tables. The line cards perform the express forwarding between port adapters; this relieves the Route Switch Processor of involvement in the switching operation.

FIB--forwarding information base. A component of Cisco Express Forwarding that is conceptually similar to a routing table or information base. The router uses the FIB lookup table to make destination-based switching decisions during Cisco Express Forwarding operation. The router maintains a mirror image of the forwarding information in an IP routing table.

LSP--label switched path. A sequence of hops (Router 0...Router n). A packet travels from R0 to Rn by means of label switching mechanisms. An LSP can be chosen dynamically, based on normal routing mechanisms, or you can configure the LSP manually.

prefix--The network address portion of an IP address. A prefix is specified by a network and mask and is generally represented in the format network/mask. The mask indicates which bits are the network bits. For example, 1.0.0.0/16 means that the first 16 bits of the IP address are masked, making them the network bits. The remaining bits are the host bits. In this example, the network number is 10.0.

RIB--Routing Information Base. A central repository of routes that contains Layer 3 reachability.

Sours: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipswitch_cef/configuration/xe-3s/isw-cef-xe-3s-book/isw-cef-load-balancing.html

Cisco router balancing in load

Load Balancing with OSPF

Last Updated on Sat, 18 Sep 2021 | Routing Table

Load balancing is a standard functionality of Cisco IOS Software that is available across all router platforms. It is inherent to the forwarding process in the router, and it enables a router to use multiple paths to a destination when it forwards packets. The number of paths used is limited by the number of entries that the routing protocol puts in the routing table. Four entries is the default in Cisco IOS Software for IP routing protocols except for BGP. BGP has a default of one entry. The maximum number of paths you can configure is 16.

Figure 4-6 shows an example of configuring an OSPF router to load balance across six equal-cost paths.

Figure 4-6 OSPF Equal-Cost Load Balancing

Figure 4-6 OSPF Equal-Cost Load Balancing

Calculate Cost Ofospf

The cost (or metric) of an interface in OSPF indicates the overhead that is required to send packets across a certain interface. The cost of an interface is inversely proportional to its bandwidth. A higher bandwidth indicates a lower cost. By default, Cisco routers calculate the cost of an interface based on the bandwidth. However, you can force the cost of an interface with the command ip ospf cost {value} in interface configuration mode.

If equal-cost paths exist to the same destination, the Cisco implementation of OSPF can keep track of up to 16 next hops to the same destination in the routing table (which is called load balancing). By default, the Cisco router supports up to four equal-cost paths to a destination for OSPF. Use the maximum-paths command under the OSPF router process configuration mode to set the number of equal-cost paths in the routing table, as shown in Example 4-8.

Example 4-8 Setting the Number of Equal-Cost Paths in the Routing Table

RouterX(config)

#router ospf 1

RouterX(config-

router)#maximum

paths ?

<1-16> Number

of paths

RouterX(config-

router)#maximum-

paths 3

You can use the show ip route command to find equal-cost routes. Following is an example of the show ip route command output for a specific subnet that has multiple routes available in the routing table. Example 4-9 shows three equal-cost paths to the 194.168.20.0 network.

Example 4-9 Finding Equal-Cost Routes with the show ip route Command

RouterX#show ip route 194.168.20.0

Routing entry for 194.168.20.0/24

Known via "ospf 1", distance 110, metric 74, type intra area

Redistributing via ospf 1

Last update from 10.10.10.1 on Seriall, 00:00:01 ago

Routing Descriptor Blocks:

* 20.20.20.1, from 204.204.204.1, 00:00:01 ago

via Serial2

Route metric is 74, traffic share count is

1

30.30.30.1, from 204.204.204.1, 00:00:01 ago

via Serial3

Route metric is 74, traffic share count is

1

10.10.10.1, from 204.204.204.1, 00:00:01 ago

via Seriall

Route metric is 74, traffic share count is

1

Notice the three routing descriptor blocks. Each block is one available route. Also note the asterisk (*) next to one of the block entries. The asterisk corresponds to the active route that is used for new traffic. The term "new traffic" corresponds to a single packet or an entire flow to a destination, depending on whether the router is performing per-destination or per-packet load balancing.

Continue reading here: OSPF Authentication

Was this article helpful?

Sours: https://www.ccexpert.us/routing-table/load-balancing-with-ospf.html
Cisco Tech Talk: Load Balancing vs. WAN Failover on Cisco RV Series Routers

Introduction

Load balancing is a standard functionality of the Cisco IOS® router software, and is available across all router platforms. It is inherent to the forwarding process in the router and is automatically activated if the routing table has multiple paths to a destination. It is based on standard routing protocols, such as Routing Information Protocol (RIP), RIPv2, Enhanced Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), and Interior Gateway Routing Protocol (IGRP), or derived from statically configured routes and packet forwarding mechanisms. It allows a router to use multiple paths to a destination when forwarding packets.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

Conventions

For more information on document conventions, refer to Cisco Technical Tips Conventions.

Load-Balancing

When a router learns multiple routes to a specific network via multiple routing processes (or routing protocols, such as RIP, RIPv2, IGRP, EIGRP, and OSPF), it installs the route with the lowest administrative distance in the routing table. Refer to Route Selection in Cisco Routers for more information.

Sometimes the router must select a route from among many learned via the same routing process with the same administrative distance. In this case, the router chooses the path with the lowest cost (or metric) to the destination. Each routing process calculates its cost differently and the costs may need to be manipulated in order to achieve load-balancing.

If the router receives and installs multiple paths with the same administrative distance and cost to a destination, load-balancing can occur. The number of paths used is limited by the number of entries the routing protocol puts in the routing table. Four entries is the default in IOS for most IP routing protocols with the exception of Border Gateway Protocol (BGP), where one entry is the default. Six different paths configured is the maximum number.

The IGRP and EIGRP routing processes also support unequal cost load-balancing. You can use the variance command with IGRP and EIGRP to accomplish unequal cost load-balancing. Issue the maximum-paths command in order to determine the number of routes that can be installed based on the value configured for the protocol. If you set the routing table to one entry, it disables load balancing. Refer to How Does Unequal Cost Path Load-Balancing (Variance) Work in IGRP and EIGRP? for more information about variance.

You can usually use the show ip route command to find equal cost routes. For example, below is the show ip route command output to a particular subnet that has multiple routes. Notice there are two routing descriptor blocks. Each block is one route. There is also an asterisk (*) next to one of the block entries. This corresponds to the active route that is used for new traffic. The term 'new traffic' corresponds to a single packet or an entire flow to a destination, depending on the type of switching configured.

  • For process-switching—load balancing is on a per-packet basis and the asterisk (*) points to the interface over which the next packet is sent.

  • For fast-switching—load balancing is on a per-destination basis and the asterisk (*) points to the interface over which the next destination-based flow is sent.

The position of the asterisk (*) keeps rotating among the equal cost paths each time a packet/flow is served.

M2515-B# show ip route 1.0.0.0 Routing entry for 1.0.0.0/8 Known via "rip", distance 120, metric 1 Redistributing via rip Advertised by rip (self originated) Last update from 192.168.75.7 on Serial1, 00:00:00 ago Routing Descriptor Blocks: * 192.168.57.7, from 192.168.57.7, 00:00:18 ago, via Serial0 Route metric is 1, traffic share count is 1 192.168.75.7, from 192.168.75.7, 00:00:00 ago, via Serial1 Route metric is 1, traffic share count is 1

Per-Destination and Per-Packet Load Balancing

You can set load-balancing to work per-destination or per-packet. Per-destination load balancing means the router distributes the packets based on the destination address. Given two paths to the same network, all packets for destination1 on that network go over the first path, all packets for destination2 on that network go over the second path, and so on. This preserves packet order, with potential unequal usage of the links. If one host receives the majority of the traffic all packets use one link, which leaves bandwidth on other links unused. A larger number of destination addresses leads to more equally used links. To achieve more equally used links use IOS software to build a route-cache entry for every destination address, instead of every destination network, as is the case when only a single path exists. Therefore traffic for different hosts on the same destination network can use different paths. The downside of this approach is that for core backbone routers carrying traffic for thousands of destination hosts, memory and processing requirements for maintaining the cache become very demanding.

Per-packet load-balancing means that the router sends one packet for destination1 over the first path, the second packet for (the same) destination1 over the second path, and so on. Per-packet load balancing guarantees equal load across all links. However, there is potential that the packets may arrive out of order at the destination because differential delay may exist within the network. In Cisco IOS software, except the release 11.1CC, per packet load balancing does disable the forwarding acceleration by a route cache, because the route cache information includes the outgoing interface. For per-packet load balancing, the forwarding process determines the outgoing interface for each packet by looking up the route table and picking the least used interface. This ensures equal utilization of the links, but is a processor intensive task and impacts the overall forwarding performance. This form of per-packet load balancing is not well suited for higher speed interfaces.

Per-destination or per-packet load-balancing depends on the type of switching scheme used for IP packets. By default, on most Cisco routers, fast switching is enabled under interfaces. This is a demand caching scheme that does per-destination load-balancing. To set per-packet load-balancing, enable process switching (or disable fast switching), use these commands:

Router# config t Router(config)# interface Ethernet 0 Router(config-if)# no ip route-cache Router(config-if)# ^Z

Now the router CPU looks at every single packet and load balances on the number of routes in the routing table for the destination. This can crash a low-end router because the CPU must do all the processing. To re-enable fast switching, use these commands:

Router# config t Router(config)# interface Ethernet 0 Router(config-if)# ip route-cache Router(config-if)# ^Z

Newer switching schemes such as Cisco Express Forwarding (CEF) allow you to do per-packet and per-destination load-balancing more quickly. However, it does imply that you have the extra resources to deal with maintaining CEF entries and adjacencies.

When you work with CEF, you could ask: Who does the load balancing, CEF or the routing protocol used? The way in which CEF works is that CEF does the switching of the packet based on the routing table which is being populated by the routing protocols such as EIGRP. In short, CEF performs the load-balancing once the routing protocol table is calculated.

Refer to Troubleshooting Load Balancing Over Parallel Links Using Cisco Express Forwarding and Load Balancing with CEF for more information about CEF load balancing.

These documents provide more information about how various protocols select a best path, calculate their costs to specific destinations, and how they perform load-balancing when applied.

Related Information

Sours: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5212-46.html

You will also like:

There were horses and some kind of dogs and some other strange creatures. And then I saw that they were coming to me. I didnt know what to do, Im naked here, and here are the employees with stretchers. I ran into the room and fell into bed, covering myself up to my neck. The staff brought in my neighbors, laid them on the bed and covered them.



2544 2545 2546 2547 2548