cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2730
Views
20
Helpful
20
Replies

What exactly does the "ip default-gateway x.x.x.x" command do on a switch?

insccisco
Level 1
Level 1

Guys, curious question... I have a 6509 (core sw) and 4 3560 switches connected to this 6509. Each of these 4 switches has its management IP configured.

The management IP addresses of the switches sit on subnet 10.10.5.0/24

From one of these switches, I start pinging hosts which reside in other VLANs (for example, 10.10.20.3) and the switch will not know how to get (ping) to the host if it wasn't for the “ip default-gateway 10.10.5.1” command configured on the switch. Is this correct assumption? Can you please correct me if I am wrong here?

Exactly what this “ip default-gateway x.x.x.x” command does when configured on a switch?

20 Replies 20

Not a single clue. There's an "it person" on-site who's calling the shots. He got these people to do their network migration but all was a disaster. So I got called and all I know is that he wants to move from that big network to end up with only an 1841, and 2 3560s.

Any clues on my earlier questions?

Still not sure about next-hop and what is going on there.

Did you see other response i posted today about using HSRP between the 6500 and the new 3560 ?

As for having all the L3 vlan interfaces on the new 3560 but still have ip default-gateway, that should be fine. The switch will ignore the vlan interfaces until you enable "ip routing".

Jon

Hi Jon, happy new year!

I skip your earlier response about the HSRP. I think this might not work because during the transition period of this migration, there will be hosts on both networks (and yes the hosts have different default gateways) that will need to be communicating to the outside. So in other words, during this "bridge", hosts connected to the new switch will have a default gateway IP address of that of the 1841 and the hosts still connected to the old network will have their default gateway IP of that of the L3 interfaces configured on the 6509. Also because we are on the "transition" period, although the hosts will have different gateways, they should still be able to communicate to each other as there is no need for default gateway (routing) if traffic contained within the same subnet.

And this I will need you to confirm.... meaning, once I have the 3560 enabled with IP routing, and the hosts connected to this switch have their default gateway IPs pointing to the L3 interfaces configured on this 3560 (the L3 VLAN interfaces with IPs ending in .254), will these hosts still be able to properly communicate with hosts which will still be connected to the switches connected to the 6509?

Angel

"And this I will need you to confirm.... meaning, once I have the 3560 enabled with IP routing, and the hosts connected to this switch have their default gateway IPs pointing to the L3 interfaces configured on this 3560 (the L3 VLAN interfaces with IPs ending in .254), will these hosts still be able to properly communicate with hosts which will still be connected to the switches connected to the 6509?"

Yes as long as the 3560 is connected via L2 to the 6500 which you say it is ie.

6500 -> L2 trunk -> old 3560 -> L2 trunk -> new 3560

but the fact the they are connected via L2 is why HSRP might be the best approach.

You've confused me though - "hosts connected to the new switch will have a default gateway IP address of that of the 1841"

i though the host would have default-gateways set on the new 3560. Just so my understanding is clear

You have

internet router -> 6500 -> 3560(s)

you will be having

internet router -> 3560(1) -> 3560(s)

Is 3560(1) the new sw2 with the L3 SVI's. And during transition you will have

internet router -> 6500 -> 3560 -> 3560(1) ?

Where i am confused is this statement -

"there will be hosts on both networks (and yes the hosts have different default gateways) that will need to be communicating to the outside."

my point was of the 6500 and new sw2 are connected at L2 then they don't need to have different default-gateways ie. just use HSRP and use the virtual address.

Perhaps there is something in your topology i'm not understanding ?

Jon

""You've confused me though - "hosts connected to the new switch will have a default gateway IP address of that of the 1841"""

You're right. I meant to say 'hosts connected to the new switch will have a default gateway IP address of that of the L3 VLAN interface which will be configured on this new switch (the ones ending with .254)

"i though the host would have default-gateways set on the new 3560. Just so my understanding is clear "

Once again, you are right. The hosts will have default gateways set on the new 3560.

""Where i am confused is this statement -

"there will be hosts on both networks (and yes the hosts have different default gateways) that will need to be communicating to the outside."

my point was of the 6500 and new sw2 are connected at L2 then they don't need to have different default-gateways ie. just use HSRP and use the virtual address.

Perhaps there is something in your topology i'm not understanding ? ""

Yes, I have to admit, this whole thing is a bit messy. The 2 networks are completely different and both have their own internet connection.

Actually, and with your help, I presented my game plan to the guy but told him that if I had to choose, I would have never gotten this far to give him what he needs. To this comment, he stated that he was following the advise he had been given by the old IT. Basically what he has is the network that I told you: the one with a perimeter router, the 6509, and 8 3560s. In this network, he has like 50 VLANs. His company is down-sizing big time and he called in for help. Out of those VLANs he will only need like 5 of them on the new network. So I advised him to do the following based on what he will have after the cut (one 1841 and 2 3560s): The 1841 will replicate the duty of that of his current perimeter router. Then one of the 2 3560s will act as his old 6509 (core switch) and the second 3560 will just be connected to this "core" switch so his network can have more available ports. This way, the network will be configured exactly as that of his current network, and once he is ready to cut over, all he has to do is physically move his devices into the new switches. Thus, it will be a plug-and-play.

This is exactly what he was looking, so we are now going this route.

Jon, by the way, thank you again for the lecture. Thru the process, you answered all my questions I had, especially the original ones on the "default-gateway" command on the switches. All my respects go to you and everyone else on cisco forums.

Going back to thread, I have never used HSRP for a scenario like the one I have right now. I have used HSRP just for router's redundancy but that is about it.

Review Cisco Networking for a $25 gift card