Routing

What is Static Routing and How to Configure It? Detail Explained

G Gurpreet Singh • February 18, 2024 • 5 min read
Animated diagram for What is Static Routing and How to Configure It? Detail Explained, showing four routers in a line with a packet travelling hop by hop and a route table lookup highlighting each column in turn
📖 6 min read · 1,108 words

What is Static Routing in Networking?

Static routing is a type of network routing technique that involves manually setting up routes between two or more nodes in a given network. Static routing works by having the administrator of the network configure specific routes between certain nodes, allowing data packets to travel only along those predetermined paths instead of seeking out other available routes.

📌 Key Takeaways

  • What is Static Routing in Networking?
  • What are the Advantages of Static Routing?
  • What are the Disadvantages of Static Routing?
  • How to Configure a Static Routing in a Router?
  • How to Modify the Static Routing?

What are the Advantages of Static Routing?

Here are several advantages of static routing:

  • Security: Static routing is considered more secure than dynamic routing, as it allows administrators to control exactly which nodes can access which resources. This makes it much harder for malicious actors to gain access to the network.
  • Simplicity and Reliability: This remains unchanged unless an administrator makes a manual change because static routes are manually configured, which makes them more reliable.
  • Efficiency: Many networks are likely to have many static routes as opposed to dynamic routes, meaning that the amount of processing needed to find an optimal route is reduced compared to dynamic routing. This can help reduce bandwidth usage and make the network more efficient.

What are the Disadvantages of Static Routing?

Although static routing has its advantages, it also has some significant disadvantages, including:

  • Inefficiency: As with dynamic routing, static routes can become inefficient if a network topology changes or if there are new nodes added to the network. This is because the routes need to be manually updated, meaning that resources can be wasted if the network is not actively monitored.
  • Lack of Flexibility: Static routing works best in simple networks as it only allows for one pre-determined route between two nodes. This lack of flexibility can cause problems in larger and more complex networks where different paths may be needed depending on the situation.
  • The difficulty of Configuration: Configuring static routes in a network can be difficult and time-consuming, as it requires an administrator to manually enter each route. This process can become even more complex when dealing with larger networks that have multiple devices and nodes.

How to Configure a Static Routing in a Router?

Configuring Via CLI

Here are the steps for setting up a static route via CLI:

1. Connect to the router using an SSH client, such as PuTTY.

2. Enter enable mode by typing in “enable” and entering your password when prompted.

3. Configure the Router Interface according to your Network Requirements.

Configure Static Route

4. Enter “IP route {IP address} {Subnet Mask} {Gateway IP Address}”, where the IP address is the destination network, a subnet mask is a mask for that network, and the gateway IP address is the next hop router for this static route.

5. Configure Static Route on Router 3 as per the diagram.

6. Type out “end” to exit configure terminal mode and then type “write memory” to save your changes.

  • Example: Router(Config)# IP route 10.0.0.0 255.255.255.0 10.1.2.3

This command will set up a static route for the network 10.0.0.0/24 to the next hop router at 10.1.2.3

How to Modify the Static Routing?

How to Modify the Static Routing

Here are the steps for modifying a static route via CLI:

  1. Connect to the router using an SSH client, such as PuTTY.
  2. Enter enable mode by typing in “enable” and entering your password when prompted.
  3. Type out the command “configure terminal” and press enter.
  4. Enter “no IP route {IP address} {Subnet Mask} {Gateway IP Address}”, where the IP address is the destination network, a subnet mask is a mask for that network, and the gateway IP address is the next hop router for this static route.
  5. Type out the command “IP route {IP address} {Subnet Mask} {New Gateway IP Address}” to make the new changes.
  6. Press enter to save your new static route.
  7. Type out “end” to exit configure terminal mode and then type “write memory” to save your changes.

Example:

  • Router(Config)# no IP route 10.0.0.0 255.255.255.0 10.1.2.3
  • Router(Config)# IP route 10.0.0.0 255.255 255 0 10.1 .3 .4

This command will remove the existing static route for the network 10.0.0.0/24 to the next hop router at 10.1.2.3, and replace it with a new one pointing to 10.1 .3 .4 as the next hop router for this static route.

Which commands would help you solve a static route problem?

The following commands will help you troubleshoot and solve a static route problem:

  • Show IP route: Displays all IP routes configured on the router.
  • Traceroute: Helps identify which hop is causing an issue with the specified destination address.
  • Ping: Allows for diagnostic testing to check if a particular host is reachable.
  • Show IP protocols: Displays all the configured routing protocols on the router.
  • Clear IP route * (all): Removes a static route from the router’s routing table.
  • Show IP interface brief: Displays the status of each interface on the router.
  • Show IP route static: Displays all static routes configured on the router.

Where this shows up in real life

Static Routing and How to Configure It? Detail Explained sounds abstract until you meet it in a normal setup. Take the sections above on What is Static Routing in Networking? and What are the Advantages of Static Routing?: every one of them maps to a device or a setting you can point at. Once you can point at it, the idea stops being theory.

The test is simple. Can you explain it to someone in two sentences, using your own network as the example? If yes, you understand it. If not, re-read the part where you got stuck, not the whole article.

The parts people mix up

  • Names that sound alike. Networking is full of terms that differ by one word and mean different things. When two ideas blur together, write both definitions side by side. The difference is usually one sentence.
  • What it does versus what it is called. Product names and protocol names get used loosely. Trust the function, not the label.
  • Old rules that no longer apply. Advice from ten years ago still circulates. Check whether it matches current hardware before you follow it.

When does this actually matter?

Not every day. Static Routing and How to Configure It? Detail Explained matters on three occasions: when something breaks, when you buy equipment, and when you plan a change. Knowing it before those moments is what turns a two-hour problem into a ten-minute fix.

What to learn next

Pick the topic that connects directly to this one, not a random next article. Knowledge in networking compounds: each idea makes the next one easier, but only if the two are actually connected. The related articles at the end of this page are the right place to look.

🧠 Quick Check — Test Yourself

Can you explain this topic to someone else in 30 seconds? If not, re-read the key takeaways above.

What should you remember most?

The core concepts in the takeaways box above. Bookmark this page and come back when you need a refresher.

GU
Written by

Gurpreet Singh

Hey! I"m Gurpreet Singh and I Have 7+ Years of experience in the Network & Security Domain as well as the Cloud Infra Domain. I am Certified with Cisco ( CCNA ), CheckPoint ( CCSA ), 1xAWS, 3xAZURE, and 3xNSE. So I love to share my tech knowledge with you.

2 responses to “What is Static Routing and How to Configure It? Detail Explained”

  1. Hi Gurpreet…I enjoy your articles…thank you for your work. I have a rather interesting situation on a linux box – here are the details.

    Is there a failover mechanism that exist in the routing? For example – in a multi homed linux server(imagine – 2 NICs with different IPs in different subnets and each having its own gateway) how it will be able to identify which NIC to use to reach a destination that is reachable only via (say) NIC2? If it chooses (say) NIC1 whereas the right decision is NIC2, can I somehow make the kernel failover and upon ICMP network unreachable message, the system doesn’t give up but tries the other NIC? This is important when you are trying to initiate connections (not as a router but for outgoing connections). Thanks

    • In Router, We can achieve a failover mechanism via Static Routing ( Policy Base Route ) and We can configure track there for trigger ICMP messages.

      As per my understanding, Failover mechanisms can be implemented in Linux using the routing daemon “Quagga”. Quagga provides a number of tools for managing network traffic and can be used to configure failover mechanisms. To configure a failover mechanism with Quagga, you need to use the “route-map” command.

Leave a Reply

Your email address will not be published. Required fields are marked *