cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
811
Views
5
Helpful
5
Replies

How to switch CEF entries for a preferred route

nygenxny123
Level 1
Level 1

We have a WAN router with 1 uplink to an ISP (l3 vlan)....that ISP than hands off to our data centers (vlans)..one on the

east coast and one on the west coast...it look like our default traffic is going to the east coast..when it should be going to the west coast

based on CEF load balancing..

is there any way to switch this?..all costs are equal and I dont want to touch that...will shutting down the east coast

data center vlan interface bounce it and keep it permanently preferred to the west ?

sh ip route

O*E1    0.0.0.0/0 [110/10065] via 10.31.205.223, 6d13h, GigabitEthernet0/0.2155-----east coast preferred?
                           [110/10065] via           10.31.205.213      07:19:57, GigabitEthernet0/0.255

#sh ip cef

Prefix               Next Hop             Interface
0.0.0.0/0            10.31.205.213        GigabitEthernet0/0.2155
                         10.31.205.223        GigabitEthernet0/0.2155

interface GigabitEthernet0/0.2155
 description-ISP link
 bandwidth 100000
 encapsulation dot1Q 2155
 ip address 10.31.205.6 255.255.255.0
 ip ospf cost 10000
 ip ospf mtu-ignore

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

There is a lot about your environment that we do not know and some of that might change some answers. But based on what you have shown us so far I would suggest this answer to your question.

Your routing table shows that it has learned two default routes and has inserted both routes into the forwarding table. When there are two routes for the same prefix then CEF will do load balancing. By default CEF balances by flows. For each flow to be forwarded CEF will hash some parameters (typically source and destination address and sometimes source and destination port numbers) and the results of the hash will determine which of the paths the flow will use.

So your assertion that default traffic is going to the east coast is not supported by the data that you have shown us.

The other answer that I would offer is to point out that you tell us that there are equal cost routes and that you do not want to change that. Why ask if you can change it when you have already determined that you do not want to do the one thing that could change it. If you want the default traffic to favor the west coast then you need to make the west coast metric better than the east coast (or make the east coast metric worse than the west coast - which is usually easier to do). When the metrics are not equal then you have a favored route and a backup route. Otherwise you have two equal routes and there will be load balancing.

HTH

Rick

HTH

Rick

View solution in original post

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

There is a lot about your environment that we do not know and some of that might change some answers. But based on what you have shown us so far I would suggest this answer to your question.

Your routing table shows that it has learned two default routes and has inserted both routes into the forwarding table. When there are two routes for the same prefix then CEF will do load balancing. By default CEF balances by flows. For each flow to be forwarded CEF will hash some parameters (typically source and destination address and sometimes source and destination port numbers) and the results of the hash will determine which of the paths the flow will use.

So your assertion that default traffic is going to the east coast is not supported by the data that you have shown us.

The other answer that I would offer is to point out that you tell us that there are equal cost routes and that you do not want to change that. Why ask if you can change it when you have already determined that you do not want to do the one thing that could change it. If you want the default traffic to favor the west coast then you need to make the west coast metric better than the east coast (or make the east coast metric worse than the west coast - which is usually easier to do). When the metrics are not equal then you have a favored route and a backup route. Otherwise you have two equal routes and there will be load balancing.

HTH

Rick

HTH

Rick

I am glad that my explanation was helpful. Thank you for using the rating system to mark this question as answered. This will help other readers in the forum to identify discussions that have helpful information.

HTH

Rick

HTH

Rick

Hello,

i want refolmulate the question:

If we have some laod-sharing, can we switch the flow, exp.:

R10# tracer 144.63.241.84 sou loo0 pro 2

1 99.0.102.2

   99.0.108.8
2 213.0.142.14 
   213.0.148.14 

To be:

1 99.0.108.8

   99.0.102.2

 2 213.0.148.14

    213.0.142.14 

i changed the fixed id of the cmd: 

ip cef load-sharing algorithm universal XXYYZZ

but the flow still have the same hash

Regards,

Fay
    

Fay

I am not clear about what you are asking. What are you trying to alter when you change the algorithm? Can you provide clarification?

HTH

Rick

HTH

Rick

Hello Rick,

I want to change the hash of the flow.

for exp. for the traceroute:

tracer X.X.X.X prob 2

1 Address_1
   Address_2
2 Address_3
3 Address_4

the router is doing ecmp between two paths (one via Address_1 and the 2nd via Address_2).

I want to change the behavior of the hash to begin with Address_2 instead of Address_1.

Target:

tracer X.X.X.X prob 2

1 Address_2
   Address_1
2 Address_3
3 Address_4

i changed the fixed id of the CMD: ip cef load-sharing algorithm universal with diff values

ip cef load-sharing algorithm universal 112233

ip cef load-sharing algorithm universal 445566

ip cef load-sharing algorithm universal 778899

but the behavior still the same, alway begin by the Address_1

Rgds,

Fay