0% found this document useful (0 votes)
38 views

7.4.2 Static and Default Route Command List

Static routes are configured manually for situations like default routes, stub networks with a single connection, small networks that don't change often, or to disable dynamic routing. Common reasons to configure static routes include a default route to a gateway or out of a stub network. Static routes can replace many dynamically learned routes. Commands are used to configure static routes by destination, next hop, or interface and view existing routes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

7.4.2 Static and Default Route Command List

Static routes are configured manually for situations like default routes, stub networks with a single connection, small networks that don't change often, or to disable dynamic routing. Common reasons to configure static routes include a default route to a gateway or out of a stub network. Static routes can replace many dynamically learned routes. Commands are used to configure static routes by destination, next hop, or interface and view existing routes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Most networks will use one or more routing protocols to automatically share and learn routes.

Listed below are several situations when you might want to configure static routes:

 To configure a default route or a route out of a stub network (a stub network is one that
has a single route into and out of the network)
 For small networks that do not change very often and that have only a few networks

 To turn off all routing protocols and reduce traffic or improve security

 To configure routes that are lost due to route summarization

A default route is a route that is considered to match all destination IP addresses. With a default
route, when a packet's destination IP address does not match any other routes, the router uses
the default route for forwarding the packet. Be aware of the following default route details:

 Default routes work best when only one path exists to a part of the network.
 One default route in the routing table could replace hundreds of static route entries in
the routing table.

 When the default route is not set, the router discards packets that do not match a route
in the routing table.

The following table lists the commands for configuring static routes:

Command Action

Identifies a next hop router to receive


Router(config)#ip route
[destination] [next_hop] packets sent to the specified destination
network.

Identifies the interface used to forward


Router(config)#ip route
[destination] [interface] packets to the specified destination
network.

Identifies a default route to the specified


Router(config)#ip route 0.0.0.0 destination network or through an
0.0.0.0 interface.
[next_hop|interface] This is a method to set the gateway of last
resort on a router.

Enables the router to match routes based


Router(config)#ip classless on the number of bits in the mask and not
the default subnet mask.
Router#show ip route Displays the routing table.

Router#show ip route [hostname


or address] Displays details about the specific route.

Configuring a static route to network 0.0.0.0 with mask of 0.0.0.0 is the most common method
of configuring a default gateway. However, the following methods can also be used under
certain circumstances:

 Use the ip default-network command to designate a route already in the routing table
as the default route. For example, if the router had learned of network 10.0.0.0/8
through a routing protocol, you could use the following command to designate that
network as the default network:
 ip default-network 10.0.0.0

Be aware that the ip default-network command only makes a route a candidate for the
default route, it does not necessarily guarantee that the route will be used to route packets
to unknown destinations.

 Use the ip default-gateway command if IP routing has been disabled on the router.
With IP routing disabled, routes will not be learned through a routing protocol, nor will
static routes be used if configured. With IP routing enabled, the ip default-
gatewaysetting will not be used.

The following command creates a static route to network 192.168.1.0 through the router with
the IP address 192.168.1.35 and gives it an administrative distance value of 25:

Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.1.35 25

The following command identifies a default route through an interface with address 10.1.1.2:

Router(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy