Options

default gateway 0.0.0.0 0.0.0.0 can you have 2 on 1 router?

itdaddyitdaddy Member Posts: 2,089 ■■■■□□□□□□
I know dumb question but I have seen 2 0.0.0.0 gateways on a cisco router. Is that possible? does traffic go to both is that what it does? sends it to both gateways. Just never seen that before.icon_redface.gif

Comments

  • Options
    fredrikjjfredrikjj Member Posts: 879
    Sure, it's possible, just like with other destinations. Traffic is sent according to the load sharing scheme used, which on a Cisco router with default settings should be CEF based per flow (or per src/dst ip, I can't remember which is the default). For all protocols, except unequal cost load sharing with EIGRP, the CEF "hash bucket" would be split 50/50 between the two default routes.
  • Options
    itdaddyitdaddy Member Posts: 2,089 ■■■■□□□□□□
    so maybe they using it to load balance? I don't know their setup I just saw the 2 default routes in the config and was like huh? haaha thanks fredrikjj
  • Options
    fredrikjjfredrikjj Member Posts: 879
    itdaddy wrote: »
    so maybe they using it to load balance? I don't know their setup I just saw the 2 default routes in the config and was like huh? haaha thanks fredrikjj

    You could install both in the routing table but that would require that they are from the same protocol and have the same metric (except for EIGRP). This would result in load sharing. It's sometimes called "load balancing" but that's somewhat of a misnomer since you are sending all traffic belonging to a flow down one link. You could have one really big flow going down one path, making usage between the two links very unbalanced.

    Another option is to configure one default to have a higher AD (or metric) than the other and thus only install the best one in the routing table. You could then have some condition where the first one gets removed and the second takes over. This is usually called having a "floating route". The primary route is floating above the backup.. or something.
  • Options
    HeeroHeero Member Posts: 486
    fredrikjj wrote: »
    You could install both in the routing table but that would require that they are from the same protocol and have the same metric (except for EIGRP). This would result in load sharing. It's sometimes called "load balancing" but that's somewhat of a misnomer since you are sending all traffic belonging to a flow down one link.

    This is normally referred to as ECMP, or Equal-cost multi-path routing. Load sharing and load balancing are very general networking terms. When hear use ECMP, you know that it is specifically referring to layer 3 routing with multiple equal cost paths to a destination.

    I figured the differentiation would be helpful for some people in this thread.
  • Options
    lrblrb Member Posts: 526
    fredrikjj wrote: »
    You could install both in the routing table but that would require that they are from the same protocol and have the same metric (except for EIGRP).

    Don't forget you can also traffic share across two unequal-cost paths if you are using BGP with the link bandwidth extended community.
  • Options
    joetestjoetest Member Posts: 99 ■■□□□□□□□□
    Another example using 2 default routes could be: if you have 2 default routes with different AD's(say 1 and 2) you could use policy routing for x network to go through the AD 2 route and the rest would go through the best route(AD 1). That's a pretty cool feature imo icon_smile.gif
  • Options
    sucanushiesucanushie Member Posts: 163
    You could also use an IP-SLA. So that if one default route goes down the backup is inserted into the routing table right away.
Sign In or Register to comment.