Static Routing

Static Routing

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].

Where-

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 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
  • 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 20.0.0.1.

fast Ethernet interface
  • Assign the IP addresses to the PCs.

PC0

IP Configuration

PC1

IP Cofig 2

PC2

PC2 IP Config

PC3

IP Config pc3

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

Router0’s routing table shows the networks that are directly connected to the Router0.

routing table shows

Router1

Router1’s routing table shows the networks that are directly connected to the Router1.

Router 1

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.

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.

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.”

screenshot ping replies

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.

Destination host unreachable

To provide communication between different networks, we need to configure the static routing using the following syntax:

ip route [destination_network]

[subnet_mask]

[next-hop_address or exitinterface].

On Router0, configure static route:

configure static route

On Router1, configure static route:

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.

some static router entry

Now to verify static routing ping from PC0 to PC2, ping replies successfully because the routing table has a static entry of the network 20.0.0.0.

ping replies successfully

Similarly, check Router1’s routing table, we see some static route entry in the routing table.

verify static routing

 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.

static entry of the network