cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7101
Views
15
Helpful
10
Replies

Understanding show ip route * asterix and load balancing

SJ K
Level 5
Level 5

Hi all,

I have

  • ip cef turn on (per destination sharing) and
  • created 2 static route to a destination network.

From the Cisco link  (How does load balancing work) ->

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

It states the following

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.

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

Below is my Router output

R3#show ip route 192.168.3.0
Routing entry for 192.168.3.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
    192.168.12.3
      Route metric is 0, traffic share count is 1
  * 192.168.12.2
      Route metric is 0, traffic share count is 1

R3 is connected to the 192.168.12.0/24 network.

It has 2 gateways to the 192.168.3.0/24 network and i use it to ping to 2 workstations (192.168.3,1, 192.168.3.4)

T1) show ip route 192.168.3.0 (see * at 192.168.12.2)

T2) R3 (192.168.12.1) ping to 192.168.3.1  -- ping successfully

T3) show ip route 192.168.3.0 (still see * at 192.168.12.2)

T4) R3 (192.168.12.1) ping to 192.168.3.4  -- ping successfully

T5) show ip route 192.168.3.0 (still see * at 192.168.12.2)

The asterisk * in show ip route did not move at all despite having R3 ping to 2 different destination.

q1) Since i am using per destination load sharing,  why isn't the * rotated ?   Am i missing anything ?

Hope to hear some advices from Gurus here. ;)

Regards,

Confused Noob.

2 Accepted Solutions

Accepted Solutions

Hi so my understanding is cef table sits in front of the ip route table and makes decisions based on the asic for forwarding in the device so the star may not move due to cefs decisions as it will in the end make the final decision for fast switching

That's my understanding of it , anyone else is welcome to add in if that's wrong because that's as deep as I have read into it before and what I made of it :)

I suppose the test would be turn off cef and see if the star moves about then without per destination sharing and just standard equal route LB

View solution in original post

Hi Koh!

a. It means you can use ICMP as a tool to validate which actions is the switch/router taking when forwarding the packet, in this case we are interested in the next-hop destination particularly., however other information will be displayed in the output.

b. Exactly, only packets matching the access-list criteria will be debugged. 

Hope it helps, best regards!

View solution in original post

10 Replies 10

Mark Malone
VIP Alumni
VIP Alumni

Unfortunately cef load balancing is not like BGP there are disadvantages as below and sometimes the router will chose the same path it already took, whats the current topology look like

http://www.cisco.com/en/US/tech/tk827/tk831/technologies_white_paper09186a00800a62d9.shtml

IP Switching Mechanism

Fast switching and Cisco Express Forwarding per-destination.

Process switching and Cisco Express Forwarding per-packet.

Disadvantages

With fast switching, per destination switching may result in unequal load sharing because packets to one destination always follow the same path.

Cisco Express Forwarding switching may result in unequal distribution with a small number of source-destination pairs. Per-destination load balancing depends on the statistical distribution of traffic; load sharing becomes more effective as the number of source-destination pairs increase.

Packets for a given source-destination host pair might take different paths, which could introduce reordering of packets. This is not recommended for Voice over IP (VoIP) and other flows that require in-sequence delivery.

Advantages

With fast switching, packets for a given destination are guaranteed to take the same path even if multiple paths are available.

With Cisco Express Forwarding switching, packets for a given source-destination host pair are guaranteed to take the same path, even if multiple paths are available. Traffic destined for different pairs tend to take different paths.

Path utilization with per-packet load balancing is good because per-packet load balancing allows the router to send successive data packets over paths without regard to individual hosts or user sessions. It uses the round-robin method to determine which path each packet takes to the destination

Hi Mark,

Thanks for your prompt response.

Below is my setup (i did it with real equipments but use packet tracer to draw -- ignore those shut interfaces)

From the above, Router 3 has 2 static routes to the 192.168.3.0/24 network through Router 1 (192.168.12.2) and Router 2 (192.168.12.3).

I turn on ip cef.

I ping from R3 to both PC0 and PC1.

R3#show ip route 192.168.3.0
Routing entry for 192.168.3.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
    192.168.12.3
      Route metric is 0, traffic share count is 1
  * 192.168.12.2
      Route metric is 0, traffic share count is 1

As per inform earlier, the * did not move before and after i ping to PC0, and PC1.

Do you mean ip cef, regconise the 2 pings from R3 to PC0 and PC1 as same destination/hash value and thus use the same path ?

Regards,
Noob

Hi so my understanding is cef table sits in front of the ip route table and makes decisions based on the asic for forwarding in the device so the star may not move due to cefs decisions as it will in the end make the final decision for fast switching

That's my understanding of it , anyone else is welcome to add in if that's wrong because that's as deep as I have read into it before and what I made of it :)

I suppose the test would be turn off cef and see if the star moves about then without per destination sharing and just standard equal route LB

Hi Mark,

Sorry for the slow reply and thanks for your all your advices.

The reason on checking the *, actually boils down to the fact that I want to verify if the route are being used alternatively;  or rather I want to make sure load-balancing is working.

That being said;

q1) Can you advise on how do we verify if load-balance are indeed working when using ip cef ? (other then monitoring the exit interfaces's output rate for the 2 route)

Regards,
Noob

Hi!

In order to know the next hop your data is taking if CEF load-balancing please use the debug ip packet detail and ping the desired destination. 

Look for this line in the display:

R1#ping 10.1.2.5 repe 1

*May 7 15:06:18.991: FIBfwd-proc: ip_pak_table 0 ip_nh_table 65535 if FastEthernet0/0 nh 10.1.1.2 deag 0 chg_if 0 via fib 0 path type adjacency prefix
*May 7 15:06:18.991: FIBfwd-proc: packet routed to FastEthernet0

R1#ping 10.1.2.6 repe 1

*May*May 7 15:06:16.311: FIBfwd-proc: ip_pak_table 0 ip_nh_table 65535 if FastEthernet0/0 nh 10.1.1.3 deag 0 chg_if 0 via fib 0 path type adjacency prefix
*May 7 15:06:16.311: FIBfwd-proc: packet routed to FastEthernet0

That entry nh means 'Next Hop' and the actual next hop it will take. In this case I configured a per-destination load-balancing.

This is the easiest way and is also the one that could impact the network due to the debug command so I recommend using in combination with an ACL.

Hope it helps, best regards!

JC

Hi Carlos,

Thanks for your wonderful reply!

Can i check

  1. with your example above, does it means that we use ICMP ping to test for load-balancing ?
  2. having an access list on the debug ip packet process means only packets matching the access list will be debug ?

Regards,
Noob

Hi Koh!

a. It means you can use ICMP as a tool to validate which actions is the switch/router taking when forwarding the packet, in this case we are interested in the next-hop destination particularly., however other information will be displayed in the output.

b. Exactly, only packets matching the access-list criteria will be debugged. 

Hope it helps, best regards!

Hi Carlos,

A million thanks for your reply and confirmation !

Regards,
Noob

I disabled cef and star started moving 

 

Thanks and you have brilliant understanding of the subject 

anasather_147
Level 1
Level 1

if you turn off cef like 

 

no ip cef 

 

then ping and see the star moving 

Review Cisco Networking for a $25 gift card