05-08-2005 03:55 AM - edited 03-02-2019 10:42 PM
I have got 3 routers A , B ,C
1- Router A connected to Router B via serials cable S0/0->S0/0
2- Router B connected to Router C (simulated as ISP) via serial cable S0/1->S0/1
3- A S0/0 192.168.3.1/24 and B S0/0 192.168.3.2/24
4- A Loopback0 192.168.2.1/24 ,,,,simulate LAN for A.
5- B S0/1 172.20.20.6/30, C S0/1 (simulated as ISP) 172.20.20.5/30
6- B Loopback0 0.90.3.1/24,,,,,,simulate LAN for B.
I want to use static IP route, and default IP route for this scenario (I do not want to use dynamically routing protocol), I configured these:
A (Config)# ip route 0.0.0.0 0.0.0.0 192.168.3.2 ------default route
B (Config)# ip route 0.0.0.0 0.0.0.0 172.20.20.5------default route
B (Config)# ip route 192.168.2.0 255.255.255.0 192.168.3.1-----static route
C (Config)# ip route 192.168.3.0 255.255.255.0 172.20.20.6------static route
C (Config)# ip route 10.90.3.0 255.255.255.0 172.20.20.6------static route
Router A was able to ping 172.20.20.5 (C S0/1). But when I tried to ping from router C to 192.168.2.1 (A loopback0),,I could not,
05-08-2005 04:35 AM
Based on what you said, you are missing a route to 192.168.2.0/24 in router C
e.g.
show ip route 192.168.2.0 255.255.255.0 in router C will say network is not in the routing table
You can use the following debugs if this setup is in a lab
1. debug ip icmp
2. debug ip packet 100
access-li 100 per icmp any any
3. show run | i ip class
Good luck
Sanjeewa
05-08-2005 08:19 AM
My understanding (correct me if I am wrong),if I want to configure static route,I have to choose the network of the directly next hop.
Can we configure from Router C static route for the network (192.168.2.0), which is belong to the second hop (Router A), (i.e it is not belong to next hop which is Router B my case) ?
05-08-2005 06:26 PM
Well, not really. I will correct it with following
This is what you should keep in mind.
every router in the network should know the route to destination (default route is considered a candidate route)
e.g.
This what happen when you ping from the router A to router C
1. router A will take the source ip as leaving ip (192.168.3.1) and place destination 172.20.20.5
2. Since router A does not have an explicit route, it will follow the default route
3. Packet arrives at the router B
4. Router B will look at the packet/destination (172.20.20.5)
5. Router B finds 172.20.20.5 is connected route, and ARP for the 172.20.20.5
6. Router B sends the packet to router C
Now router C will examine the packet, it understand it needs to send ICMP echo reply to 192.168.3.1
1. Now routers C have to revert the source and destination
2. Router C will place its leaving interface (172.20.20.5) and send the packet to destination 192.168.3.1
3. Router C will look at his routing table and find 192.168.3.0 is via 172.20.20.6
4. Then router C will find the route to 172.20.20.6 is via connected
5. Router will send the packet to router B after ARP process
6. routerB will get the packet and ARP for 192.168.3.0
Now let see the your question
1. When you ping from router C to 192.168.2.1, router C has to have a route to destination
2. You only have a route to destination 192.168.3.0
3. Therefore the packet is dropped in router C
Suppose you had a route to 192.168.3.0 via 172.20.20.6 (in router C) then packet will be sent to router B
Then router B will look at the packet, find the route to 192.168.2.1 from the static route and ARP for 192.168.3.1
Rule : every hop (router) should know the route to destination
05-08-2005 07:48 PM
You said:
"Suppose you had a route to 192.168.3.0 via 172.20.20.6 (in router C) then packet will be sent to router B
Then router B will look at the packet, find the route to 192.168.2.1 from the static route and ARP for 192.168.3.1 "
Is there any mistyping here ?
because I get confuse. C has static route to 192.168.3.0 (I have already configured this),,,,and B has static route to 192.168.2.0 (I have already configured this also),,,,,.
My understand to what you said in quoted above (before I add static route for 192.168.2.0 in C),if C tries to send packet to 192.168.2.0, (Which is not included in its routing table)then C sends to B, if the packet reaches B, then B will be able to send it to A because it has static route to A
Second question:
In my case I have got 3 routers, between A and C, I have got only one router which is B.
Now If I have got another scenario with 4 routers, 2 routers between A and C, called them B1, B2,,,,,Do still I need to configure static route in router C pointing to Router A ? in this case as you know I have got 2 hops from C to A (not one hop like before)
05-08-2005 08:47 PM
Yes, I was a typo mistake.
should read as "Suppose you had a route to 192.168.2.0 via 172.20.20.6", Router C will drop the packet if the route is missing in the routing table
Going back to the rule, every router should have a route to destination.
router C should know that route to 192.168.2.0 via router B2 (172.20.20.6)
router B2 should know that route to 192.168.2.0 via router B1
and B1 should know the route is via A
Hope this is clear to you now
Regards
Sanjeewa
05-09-2005 01:21 AM
Thanks for that
05-09-2005 08:38 PM
Recall my first scenario,as you suggested we have to do this:
C(Config)# ip route 192.168.3.0 255.255.255.0 172.20.20.6------static route
C (Config)# ip route 10.90.3.0 255.255.255.0 172.20.20.6------static route
C (Config)# ip route 10.90.3.0 255.255.255.0 172.20.20.6------static route (I had missed this one)
Can we replace all the three static routes by default one:
New configuration will be:
C (Config)# ip route 0.0.0.0 0.0.0.0 172.20.20.6------default route (replace the three static)
05-09-2005 10:31 PM
Yes, you can replace all three static routes with one default route in Router C
05-10-2005 08:40 AM
I replaced the three static routes in C, by one which is default.
I was able to reach all networks except the network for LAN B (which is simulated be loopback 10.90.3.1)
05-11-2005 08:03 PM
Any idea about this issue ?
05-14-2005 07:07 AM
Any help
05-23-2005 08:17 AM
Any other help
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide