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.

Experiment:

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.

clip_image002

Configuring IP addresses on interfaces

For Router1

R1>enable

R1#conf igure terminal

R1(config)#interface Serial0/0

R1(config)# ip address 71.4.32.1 255.255.255.252

For Router2

R2>enable

R2#conf igure terminal

R2(config)#interface Serial0/0

R2(config)# ip address 71.4.32.5 255.255.255.252

R2(config)#interface Serial0/1

R2(config)# ip address 71.4.32.9 255.255.255.252

For Router3

R3>enable

R3#conf igure terminal

R3(config)#interface Serial0/0

R3(config)# ip address 71.4.32.13 255.255.255.252

Checking ip address on Router interfaces

clip_image004

clip_image006

clip_image008

Configuring Static routes on Router R1

clip_image010

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

Where

ip route - used for assigning static ip routing .

71.4.32.4 / .8 / .12 – Defines the destination network address .

255.255.255.252- defines subnet mask of destination (71.4.32.4 / .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:

clip_image012

For R3:

clip_image014

Checking the ip routes on routers .

For R1:

clip_image016

For R2:

clip_image018

For R3:

clip_image020

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 71.4.32.12

clip_image018[1]

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

Ø Thus, packet reach the destination .

clip_image022

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

clip_image024

For End to end interfaces with same subnet

clip_image026

clip_image028

clip_image030

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
tamilcypc@gmail.com , ,manoj960000@gmial.com.
skype: greeenchip

Disclaimer

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