Comware Based
cancel
Showing results for 
Search instead for 
Did you mean: 

2 default gateways - what is actual effect?

 
SOLVED
Go to solution
Ratatosk
Advisor

2 default gateways - what is actual effect?

Hi, by mistake I managed to configure 2 default routes in a 5800, I was going to change to a new default and didn't realize I had to perform an "undo" on the current one. Which of the 2 configured default routes would take priority in this scenario?

This was in a production environment and I can't really just go ahead and try it again to find out and I forgot to check with display static-route verbose. I back peddaled asap :)

10 REPLIES 10
akg7
HPE Pro

Re: 2 default gateways - what is actual effect?

Hi,

Can you please explain in detail that which wrong default route you have configured and whihc you are planning?

Is there any other routing configured?

 

Thanks!

I am an HPE Employee

Accept or Kudo

Ratatosk
Advisor

Re: 2 default gateways - what is actual effect?

I can't explain it much better I think, enter

ip route-static 0.0.0.0 0.0.0.0 172.17.15.1

ip route-static 0.0.0.0 0.0.0.0 192.168.241.1

in a 5800 and it will accept both statements simulanteously ending up with 2 default routes configured at the same time which makes no sense in my mind. Which will actually be used for traffic that lacks any other specific route?

akg7
HPE Pro

Re: 2 default gateways - what is actual effect?

Hi,

You need to check display ip routing-table and check which route is preferred.

Are these both routes are wrong?:

ip route-static 0.0.0.0 0.0.0.0 172.17.15.1

ip route-static 0.0.0.0 0.0.0.0 192.168.241.1

Both the default route gateway is different. What exactly you are trying to change, the correct one?

You can reduced the preference value of the route which you want to give the preference.

Thanks!

 

I am an HPE Employee

Accept or Kudo

Ratatosk
Advisor

Re: 2 default gateways - what is actual effect?

As I wrote in the first message, this happened by mistake when I tried to replace the default route with a new one but didn't realize that the old one remained and had to be explicitly removed.

I expected it to be automatically replaced by the new one, not keeping both. I just want to know, without making the same mistake again just to find out, what the actual default route would be when there's two present. What preference value would the added default route get by defaullt compared to the pre-existing one?

akg7
HPE Pro

Re: 2 default gateways - what is actual effect?

Hi,

As I mentioned earlier, check routing table and check how the traffic is going out.

Both the default route are using different gateway so I believe the routes are not going via default route.

If from routing table it taking correct default route then you are good to remove the default route.

By default no routes are overwritten unless we remove it manually.

Preference value is like AD value.

Thanks!

I am an HPE Employee

Accept or Kudo

Ratatosk
Advisor

Re: 2 default gateways - what is actual effect?

akg7, the whole resaon for asking this question is because I don't have 2 default routes anymore and I don't want to try it again just to find out beacuse it is a production system. So how do you suggest I check the routing table when I do not have the 2 default routes configured anymore? If I could just check the routing table I would'nt have to ask here., I could just have a look... t's simple enough, 2 configured defaults, what will happen to traffic that has no other route specified. I can't test it therefore I cannot check the routing table for myself.

cgu
Advisor
Solution

Re: 2 default gateways - what is actual effect?

I would assume ECMP applies, unless it's disabled.

If you want to test you should be able to do the same thing with /32 routes, I would expect the same behavior as with the default routes.

Ratatosk
Advisor

Re: 2 default gateways - what is actual effect?

cgu: thanks, yes, that would make sense and also something I could test it with without affecting production. Good suggestion! But with ECMP, it would be reasonable to assume that some traffic (50%?) would be lost if sent to the next-hop that is invalid?

 

 

Highlighted
cgu
Advisor

Re: 2 default gateways - what is actual effect?

Yes 50% of overall trafic. May not appear the same way in a simple test, depending on distribution algorithm.

Ratatosk
Advisor

Re: 2 default gateways - what is actual effect?

I got an opportunity to test this yesterday and by default they get equal preference value (60), so question answered. Thanks! :)