Static Routing is the process in which static routes are manually added to the routing table through the direct configuration.
Static routing is configured in the global configuration mode using syntax:
Router(config)#ip route [destination_network][subnet_mask][next-hop_address or exitinterface].
ip route is used to create a static route.
destination_network is the network in which you are trying to reach.
subnet_mask is used on the network.
next-hop_address is the ip address of a router’s interface that is a directly connected network. It will receive the packet from the router and forward it to the remote network.
exit interface is used in place of the next-hop address (if required).
Advantages of Static Routing:
There are the following advantages of static routing:
- It is easy to implement.
- It is the most secure way of the routing.
- No overhead
- Bandwidth is not used for sending the routing updates.
Disadvantages of Static Routing:
There are the following disadvantages of Static Routing:
- It is suitable only for small networks.
- Administrator must update all routers.
- It does not handle multiple paths to a destination.
- It cannot be dynamically updated if the topology changes.
Configure Static Routing in the topology:
- Configure IP addresses to the Routers
- Configure the IP addresses to the Router0’s interfaces:
Serial interface (s0/0/0) with an IP address 192.168.10.1, and fast Ethernet interface (f0/0) with an IP address 10.0.0.1.
- Configure the IP addresses to the Router1’s interfaces:
Serial interface (s0/0/0)with an IP address 192.168.10.2, and fast Ethernet interface(f0/0) with an IP address 18.104.22.168.
- Assign the IP addresses to the PCs.
You can also learn it in detail from here. https://www.tutorialandexample.com/configure-ip-address-to-router-and-pc-in-packet-tracer/
- Check both Router’s Routing table using the “show ip route” command:
Router0’s routing table shows the networks that are directly connected to the Router0.
Router1’s routing table shows the networks that are directly connected to the Router1.
Now, when we ping from PC0 to PC1, we get ping replies in the format, “ip address: bytes time, and TTL”, because both the PCs (PC0 & PC1) are in the same network.
When we ping from PC0 to PC2, we get ping replies with a failure message “Destination host unreachable” because both (PC0 & PC2) are in the different network.
To verify again with the second network address, check ping from PC2 to PC3 and we see the below screenshot ping replies with ip address, bytes, time, and TTL.”
But, when we ping PC2 from PC0 & PC1, we get ping replies a failure message “Destination host unreachable” because PCs are on a different network.
To provide communication between different networks, we need to configure the static routing using the following syntax:
ip route [destination_network]
[next-hop_address or exitinterface].
On Router0, configure static route:
On Router1, configure static route:
Now check Router0’s routing table, we can see some static router entry in the table. To check routing table use “show ip route”command.
Now to verify static routing ping from PC0 to PC2, ping replies successfully because the routing table has a static entry of the network 22.214.171.124.
Similarly, check Router1’s routing table, we see some static route entry in the routing table.
To verify static routing, ping from PC2 to PC1, ping replies because now the Router1’s routing table has a static entry of the network 10.0.0.0.