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.
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
Configuring Static routes on Router R1
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:
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 its network address is 71.4.32.12
Ø 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 .
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
0 Visitor Reactions & Comments:
Post a Comment
For Guest Posts or your valuable suggestions... drop email on "[email protected]"