This article gives an overview of Static And Default Route Configuration CISCO in detail.
CISCO Static Route Configuration

In static routing, routes are manually added to each router’s routing table by a network administrator. This approach is in contrast to dynamic routing systems, which allow routers to automatically share route information. Even though dynamic routing is more commonly utilized in large, complicated networks, static routing has its uses.
When to Use Static Routes
These situations typically call for the usage of static routing:
- In a little network that just needs basic routing.
- In the topology of a hub-and-spoke network.
- In situations where a network administrator must quickly construct an ad hoc route.
- A floating static route is a fallback option used in the event that a primary route fails.
Benefits and Drawbacks
Because it doesn’t send route changes like dynamic routing systems do, static routing lowers overhead. Nevertheless, it needs to be manually configured and maintained, and it is unable to respond immediately to link failures or network changes.
IPv4 Static Route Configuration Command Syntax
To configure an IPv4 static route, the global configuration command ip route
is used. The basic syntax is: Router(config)# ip route network-address subnet-mask {ip-address | exit-interface} [administrative-distance] [permanent]
.
You can also read Optimized Link State Routing Protocol And Applications
Parameters
network-address: That of the remote network’s destination network.
subnet-mask: The distant network’s subnet mask. To summarise a collection of networks, this mask can be altered.
ip-address: The IP address of the receiving interface on the next-hop router is the router’s IP address. This IP needs to be on a network that is directly connected, and the local router needs to be able to ping it.
exit-interface: The outgoing interface of the local router, which is used to forward packets to the target network.
administrative-distance: To define the administrative distance (AD), use this optional parameter. Static routes’ AD is set to 1 by default. When using only an exit interface, AD is set to 0. A lower AD denotes greater reliability.
permanent: If the outgoing interface or the route to the next-hop IP fails, this optional keyword maintains the static route in the routing table. This won’t “magically fix a broken route” if the interface is actually down, though.
You can also read Intermediate System to Intermediate System (IS-IS) Features
Types of IPv4 Static Routes
Four categories of IPv4 static routes are distinguished in the CCNA exam topics:
Network Route: Using its network ID and mask, this most popular kind of static route defines a path to a particular subnet or to a Class A, B, or C network as a whole.
- Example:
ip route 172.16.1.0 255.255.255.0 172.16.2.1
configures a route to the 172.16.1.0/24 network via next-hop 172.16.2.1.
Host Route: A static path to a single, designated IP address, accomplished with IPv4’s /32 subnet mask (255.255.255.255).
- When directing packets to a host via a certain path, an engineer may utilize host routes, although other traffic to that host’s subnet may take a different route.
Floating Static Route: Only in the event that a primary, more desired route fails does a backup static route become active. This is accomplished by setting the administrative distance of the floating static route higher than that of the primary route (for example, AD 130 for the static backup against AD 110 for OSPF).
You can also read What Is Inter VLAN Routing And How Inter VLAN Routing Works
Forwarding Instructions: Next-Hop IP Address vs. Exit-Interface
Packet forwarding is specified when setting up a static route. One way to accomplish this is by offering either:
Next-Hop IP Address: Packets are forwarded to this IP address on the neighbouring router that is directly connected by the router. The route will show up in the routing table as “via” this IP address.
Exit-Interface: Packets are sent by the router from the designated local interface. The route may show up in the routing table as “directly connected” even though it is a static route when an exit interface is used, particularly on serial lines. This can be considered a great practice because it is independent of the following hop’s IP address stability.
Verification of IPv4 Static Routes
To verify static routes, use the show ip route
command. Static routes are typically indicated by the code S
.
show ip route static
filters the routing table to show only statically configured routes.- The
traceroute
command can be used to test end-to-end connectivity and the path taken by packets.
Troubleshooting Static Routes
Routes that don’t show up in the table (if the next-hop is inaccessible and permanent isn’t utilized), have wrong parameters, or show up but perform poorly are some examples of problems.
You can also read How Does A Router Table Work, Types of Routing Table Entries
Default Route Configuration CISCO

A default route is a particular kind of static route that serves as a “catch-all” for packets in the event that the router’s routing table does not contain any other more specific routes.
Purpose and When to Use Default Routes
- In stub networks networks with a single egress channel to other networks default routes are very helpful.
- A stub router can employ a single default route to forward all traffic towards the network’s core rather than establishing thousands of distinct routes.
- The “gateway of last resort” they offer is for any packet whose destination does not specifically match another entry in the routing table. The router often discards packets that don’t fit a certain route if no default route is set up.
IPv4 Default Route Configuration CISCO Command Syntax
A static default route for IPv4 is configured using the ip route
command with 0.0.0.0
as both the network address and subnet mask. This represents “all networks”. Router(config)# ip route 0.0.0.0 0.0.0.0 {ip-address | exit-interface}
.
- 0.0.0.0 0.0.0.0: Matches any destination IP address.
- ip-address or exit-interface: Specifies the IP address of the local router’s outgoing interface or the next-hop router to be used for traffic forwarding. The route may appear in the routing table as “directly connected” if an exit interface is used in the configuration, much like a static route done with an exit interface.
Verification of Default Routes
In the show ip route
command output, a default route is identified by S*
(Static, candidate default) and the “Gateway of last resort is…” line.
Administrative Distance for Default Routes
- A statically configured default route (using
ip route 0.0.0.0 0.0.0.0
) has a default administrative distance of 1. - A default route learned dynamically via DHCP will be displayed by IOS as a static route (
S* 0.0.0.0/0
), but with a distinguishing administrative distance of 254. This value helps to differentiate it from manually configured static routes.
Important Considerations
- Default routes must be placed carefully since, if set up incorrectly on a router that isn’t a stub router, they can quickly result in routing loops.
- In the event that the target network is not listed in the routing table, the
ip classless
command instructs a router to redirect packets to a default route.
Difference between Static and Default Route Configuration CISCO
Feature | Static Route | Default Route |
Purpose | To direct traffic for a specific, known remote network. | To direct traffic for all unknown destinations. It acts as a “catch-all” for any packet that doesn’t match a more specific route in the routing table. |
Destination IP | A specific network address and its corresponding subnet mask (e.g., 192.168.2.0 ). | The special address 0.0.0.0 with a subnet mask of 0.0.0.0 . This represents “any network.” |
Configuration Command | ip route [destination-network] [subnet-mask] [next-hop-ip-address] <br><br>Example: ip route 172.16.1.0 255.255.255.0 10.10.10.2 | ip route 0.0.0.0 0.0.0.0 [next-hop-ip-address] <br><br>Example: ip route 0.0.0.0 0.0.0.0 10.10.10.1 |
Use Case | Best for simple network topologies with a limited number of remote networks that are not expected to change frequently. | Most commonly used in stub networks, which have only a single point of exit to the rest of the internet. It simplifies the routing table significantly. |
Routing Table Entry | Appears as a specific route to a network (e.g., S* 172.16.1.0/24 [1/0] via 10.10.10.2 ). | Appears as the “Gateway of last resort” and is indicated by 0.0.0.0 or S* followed by 0.0.0.0/0 . |
You can also read Understanding Exterior Gateway Protocols EGP In Networking