Configuring your Router’s IP Settings

Usually you need to configure a default IP gateway on your router. The default gateway is not set in the interface, but for the entire router. The default gateway will appear in the configuration as the Gateway of last resort, which means if no specific route is specified, the router uses this gateway. When you look at the routing table with the show ip route command, the gateway will appear as the gateway of last resort:

To set the gateway of last resort, enter Global Configuration mode and use the ip route command to set a route to a universal system. Numerically, it is the opposite of a broadcast address, which is 255.255.255.255. You can specify that you want to route to all systems with the network ID of 0.0.0.0 and mask of 0.0.0.0 or 0.0.0.0/0 in Classless InterDomain Routing (CIDR) notation.

So in this case, your network ID is defined as all binary zeros, and your mask says that all bits are host bits, which effectively defines all networks and all hosts. The only other thing that the route command needs is the actual gateway or router to use to get your data one step closer to its destination; this router needs to be on a network segment to which your router is connected.

The complete command looks like this:

Router2(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1

Dummies Insider

Sign up for insider news on books, authors, discounts and more content created just for you.