What is a default gateway

Hello Ian.

This is a very good question. This often causes confusion.

The ip default-gateway command is used to allow the switch itself to communication with devices outside its subnet. If you have an SVI configured, say interface vlan 10 with an IP address of 10.10.10.5/24, in order for this interface to communicate with the administrator’s PC on another subnet for telnet or SSH connectivity, then it requires a default gateway. You would enter the command ip default-gateway 10.10.10.1. This is similar to the default gateway you configure on a PC. Note that this has NOTHING to do with the routing functionality of the L3 switch. This is called a default gateway.

The ip route 0.0.0.0 0.0.0.0 20.20.20.20command actually places this default route within the routing table and is used to route packets that enter and exit the L3 switch. This is called a default route.

I hope this has been helpful!!

Laz

1 Like