The default gateway is used for sending traffic to an interface that is the doorway or gateway to the rest of your networks, hence the name. A default gateway is necessary because you don’t want to have static routes on all your machines for every destination network—that would be unwieldy and quickly become outdated.
To view the default gateway configured on your machine, you can use either the route command or the netstat –r command.
This displays output similar to the following:
Kernel IP routing tableDestination Gateway Genmask Flags MSS ...