Host at the access layer of a hierarchical network take advantages of the alternate default gateways. If a gateway (router interface) fails, the hosts configured with that gateway are cut off from outside networks. A method is needed to provide alternate default gateways in switched networks where two or more routers are connected to the same VLANs.
The function of the router and multilayer switch is not different at the distribution layer. So, mostly the multilayer switch acts as the default gateway for each VLAN in a switched network. Each client receives only one gateway in a switched network. There is no method to configure a secondary gateway, even if there is a second path available to carry packets off the local segment. The look ant the figure below:-
In the figure, Switch4 is the default gateway for routing packets from PC0. It is a layer 3 switch. If switch4 becomes unavailable for any reason, the spanning-tree protocols can dynamically converge the network.
Switch3 will now route packets from outside networks that would have gone through switch2. But, traffic from the inside network associated with switch4, including traffic from hosts configured with switch4 as their default gateway, are still sent to switch3 and dropped.
End devices are usually configured with a single gateway and the gateway address does not change when the network topology changes. If that gateway unreachable for any reason, the host of this gateway cannot send packets except sending a packet to the local network segment.
Still, if a redundant path exists that could serve as a default gateway for that segment. There is no dynamic way by which these devices can establish a connection to a new default gateway.