O'Reilly logo

CompTIA® Linux+ / LPIC-1 Cert Guide: (Exams LX0-103 & LX0-104/101-400 & 102-400) by Sean Walberg, Ross Brunson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Viewing and Configuring Gateway Addresses

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.

Viewing the Default Gateway
Image

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required