Latest News

Static Routing when point to point interfaces are on different subnet: Case Study

Static Routing

Static routing is entering routes into the routing table manually.


Configuring static routes on R1, R2 & R3 when all point to point interfaces has been assigned with different subnet IP address.

By default all point to point interfaces are configured in same subnet and we use IP address as a gateway for configuring static routes.

Now if Gateway IP is of different subnet (Not reachable) then how to do static routing? So lets start guys.

Below is the testing topology.


Configuring IP addresses on interfaces

For Router1


R1#conf igure terminal

R1(config)#interface Serial0/0

R1(config)# ip address

For Router2


R2#conf igure terminal

R2(config)#interface Serial0/0

R2(config)# ip address

R2(config)#interface Serial0/1

R2(config)# ip address

For Router3


R3#conf igure terminal

R3(config)#interface Serial0/0

R3(config)# ip address

Checking ip address on Router interfaces




Configuring Static routes on Router R1


Now as shown above, static route has been configured with gateway as outgoing interface.


ip route - used for assigning static ip routing . / .8 / .12 – Defines the destination network address . defines subnet mask of destination ( / .8 / .12) network address .

S0/0- defines the outgoing interface of router R1 from which packet should came out to reach destination.

Note: Instead of using interface of router, we can also use next hop ip address as a gateway. Condition is it should be on same subnet and reachable.

In the same way, we will define static routes for R2 and R3 as shown below.

For R2:


For R3:


Checking the ip routes on routers .

For R1:


For R2:


For R3:


Should it work or not …..confusion ?

Why it should not work :

Since end to end interfaces of routers having different subnet and thus to make communication between them we need to use a Router to communicate them (L3 device).

Why it should work:

As we have defined static routes, router will just check :

  • In which network it has to send packet.
  • From which interface it packet will should be send.

Now see there static route exist in R2 routing table as it’s network address is


Ø Now, On R2 we have defined path to (network address of thorough interface S0/0.

Ø Thus, packet reach the destination .


Similarly, process will work for other routes from all routers.

Difference in routing table when end to end devices IP addresses are defines in same Subnet or in different Subnet

For end to end interfaces with different subnet


For End to end interfaces with same subnet




S - Static route

C - Connected route

Now, conclusion :

  • If subnet will be changed on end to end interfaces and we need to define static routes to send packets to/through outgoing interface. routing table will add that route as Static Route. Display them as S
  • If subnet remain same on end to end interfaces, no need to define static routes for them as they are directly connected . display them as C

No comments:

Post a Comment

Contact Us

24x7 online , we happy to answer you , ,
skype: greeenchip


This Blog and its TUT's are intended for educational purposes only, no-one involved in the creation of this TuT may be held responsible for any illegal acts brought about by this Blog or TuT.

Featured Post

Custom Domains And HTTPS Redirection Code