PDA

View Full Version : Ping & Routing Question


typesh
01-05-2009, 02:49 PM
Hey everyone,

I had a question about Pinging (somewhat related to tony_bilton's post). I have run into a strange problem.

I have 3 2501 routers connected to each other (RouterA, RouterB, RouterC).

RouterA has a laptop (running as a TFTP Server) connected to it's Ethernet0 interface.

I have configured the static routing tables on each Router.

The laptop on RouterA can successfully ping RouterC (via RouterB), and RouterC can also successfully ping the laptop (via RouterB). I am even able to successfully back up the running-config of RouterC to the TFTP server on RouterA. So I am pretty sure I have configured my static routes correctly.

RouterA connects to RouterB via Serial.
RouterB connects to RouterC via Serial.

The strange thing is, when I connect to RouterA via the console cable, I cannot ping RouterC.

My question is... why is the laptop connected to RouterA able to successfully ping RouterC, yet when I am consoled into RouterA I cannot successfully ping RouterC?

Thank you.

crissa
01-05-2009, 03:15 PM
[...]

I have 3 2501 routers connected to each other (RouterA, RouterB, RouterC).

RouterA has a laptop (running as a TFTP Server) connected to it's Ethernet0 interface.

I have configured the static routing tables on each Router.

The laptop on RouterA can successfully ping RouterC (via RouterB), and RouterC can also successfully ping the laptop (via RouterB). I am even able to successfully back up the running-config of RouterC to the TFTP server on RouterA. So I am pretty sure I have configured my static routes correctly.

RouterA connects to RouterB via Serial.
RouterB connects to RouterC via Serial.

The strange thing is, when I connect to RouterA via the console cable, I cannot ping RouterC.

My question is... why is the laptop connected to RouterA able to successfully ping RouterC, yet when I am consoled into RouterA I cannot successfully ping RouterC?

[...]

Hello,
first: could you draw a network diagram, please?
I presume that you setup a triangle, but I want to make sure.

Second: Could you post the configs of the three routers, please?
Bye, Tore

typesh
01-05-2009, 03:33 PM
Hey sorry about the double post.. I am not sure what happened there..

The routers aren't set up in a triangle.
They are set up this way:
RouterA connected to the TFTP Server via Ethernet0.
RouterA's Serial0 connects to RouterB's Serial0
RouterB's Serial1 connects to RouterC's Serial0

RouterA's running config:


!
version 12.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service udp-small-servers
service tcp-small-servers
!
hostname RouterA
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$PNTP$dvN1ShfFSefhXVInX/fhx1
!
no aaa new-model
ip subnet-zero
no ip domain lookup
ip host RouterB 192.168.1.6
!
!
!
!
interface Ethernet0
description Connection to IBM Laptop
ip address 192.168.1.1 255.255.255.252
no ip route-cache
!
interface Serial0
description Connection to RouterB
bandwidth 64
ip address 192.168.1.5 255.255.255.252
no ip route-cache
clockrate 64000
!
interface Serial1
no ip address
no ip route-cache
shutdown
!
no ip http server
ip classless
ip route 192.168.1.8 255.255.255.252 192.168.1.6 150
!
!
!
banner motd Welcome To RouterA

!
line con 0
logging synchronous
line aux 0
transport input all
line vty 0 4
no login
!
!
end



RouterB's running config:



!
version 12.3
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service udp-small-servers
service tcp-small-servers
!
hostname RouterB
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$XZkf$5szmrgSR4VxEHQ3uYwtmE1
!
no aaa new-model
ip subnet-zero
no ip domain lookup
ip host RouterA 192.168.1.5
ip host RouterC 192.168.1.10
!
!
!
!
interface Ethernet0
no ip address
no ip route-cache
shutdown
!
interface Serial0
ip address 192.168.1.6 255.255.255.252
no ip route-cache
no fair-queue
!
interface Serial1
bandwidth 64
ip address 192.168.1.9 255.255.255.252
no ip route-cache
clockrate 64000
!
no ip http server
ip classless
ip route 192.168.1.0 255.255.255.252 192.168.1.5 150
!
!
!
banner motd Welcome To RouterB

!
line con 0
logging synchronous
line aux 0
transport input all
line vty 0 4
no login
!
!
end


RouterC's running config:



!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RouterC
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$0DIf$ikchLDuHFRopGzWdrcgo2/
!
no aaa new-model
ip subnet-zero
no ip domain lookup
ip host RouterB 192.168.1.9
!
!
!
!
interface Ethernet0
no ip address
shutdown
!
interface Serial0
ip address 192.168.1.10 255.255.255.252
!
interface Serial1
no ip address
shutdown
!
ip http server
ip classless
ip route 192.168.1.0 255.255.255.252 192.168.1.9 150
!
!
!
banner motd Welcome To RouterC

!
line con 0
logging synchronous
line aux 0
line vty 0 4
no login
!
!
end


Thank you for your help.

typesh
01-05-2009, 03:51 PM
Here are the ip routes:

RouterA>sh ip route
[Output cut]

Gateway of last resort is not set

192.168.1.0/30 is subnetted, 3 subnets
S 192.168.1.8 [150/0] via 192.168.1.6
C 192.168.1.0 is directly connected, Ethernet0
C 192.168.1.4 is directly connected, Serial0

RouterB>sh ip route
[Output cut]

Gateway of last resort is not set

192.168.1.0/30 is subnetted, 3 subnets
C 192.168.1.8 is directly connected, Serial1
S 192.168.1.0 [150/0] via 192.168.1.5
C 192.168.1.4 is directly connected, Serial0


RouterC>sh ip route
[Output cut]

Gateway of last resort is not set

192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.8 is directly connected, Serial0
S 192.168.1.0 [150/0] via 192.168.1.9

crissa
01-05-2009, 03:55 PM
Hey sorry about the double post.. I am not sure what happened there..

The routers aren't set up in a triangle.
They are set up this way:
RouterA connected to the TFTP Server via Ethernet0.
RouterA's Serial0 connects to RouterB's Serial0
RouterB's Serial1 connects to RouterC's Serial0

[...]

Thank you for your help.

Hello,
ok, I saw to many network diagrams with three routers connected in a triangle ... ;-)

What IP address and subnet mask are configured on the labtop?
I expect 192.168.1.2/30!

I'm preparing this setup using dynamips/dynagen, give me some minutes ...
Bye, Tore

typesh
01-05-2009, 04:03 PM
Thank you..

My laptop is configured with:

IP address: 192.168.1.2
Subnet Mask: 255.255.255.252
Default Gateway: 192.168.1.1

crissa
01-05-2009, 04:25 PM
Thank you..

My laptop is configured with:

IP address: 192.168.1.2
Subnet Mask: 255.255.255.252
Default Gateway: 192.168.1.1

Hello,
you used three routers with serial links and on laptop. The connections are like a string:

Laptop---RouterA---RouterB---RouterC

Try a default route on Router C:

ip route 0.0.0.0 0.0.0.0 192.168.1.9

Router C only knows how to reach the direct connected subnet (192.168.1.8/30) and a one routing for 192.168.1.0/30. There is no routing for any other network ...

So you can ping 192.168.1.2 (laptop) and 192.168.1.1 (ethernet of Router A) but not 192.168.1.5 and 192.168.2.6 (serial link between RouterA and Router B).

Another solution is to add

ip route 192.168.1.4 255.255.255.252 192.168.1.9

on RouterC!

HTH!
Bye, Tore

crissa
01-05-2009, 04:34 PM
Hello,
another "solution":

- Don't change the routing on RouterC!
- Do a "ping 192.168.1.10 source ethernet 0" on Router A ...

I think you will find the problem on your own! ;-)
Bye, Tore

typesh
01-05-2009, 05:11 PM
Hello,
another "solution":

- Don't change the routing on RouterC!
- Do a "ping 192.168.1.10 source ethernet 0" on Router A ...

I think you will find the problem on your own! ;-)
Bye, Tore

Yes, I have them connected like this:
Laptop----RouterA----RouterB----RouterC


It worked!

First I added

ip route 192.168.1.4 255.255.255.252 192.168.1.9 on RouterC.
And it worked perfectly.

Then I tried your 3rd solution and used "ping 192.168.1.10 source ethernet 0" on Router A. That worked also. Why did this method of pinging work and not my initial way?

So the problem was basically that RouterC did not have this entry:
ip route 192.168.1.4 255.255.255.252 192.168.1.9

But how does that explain the successful ping from Laptop to RouterC (and unsuccessful ping when consoled in and trying to ping from RouterA)?

I guess what I am trying to understand is how can the laptop do a successful ping since it has to use RouterA to get to RouterC...yet RouterA itself cannot do a successful ping to RouterC.

crissa
01-06-2009, 12:42 AM
[...]

I guess what I am trying to understand is how can the laptop do a successful ping since it has to use RouterA to get to RouterC...yet RouterA itself cannot do a successful ping to RouterC.

Hello,
the problem is not on RouterA!

With "ping 192.168.1.10 source ethernet 0" you use an IP address as source for which RouterC has a route for (192.168.1.1). In your config RouterC only knows how to handle the directly connected subnet (192.168.1.8/30) and the subnet between RouterA and the Laptop (192.168.1.0/30).

If you add a second route on RouterC ("ip route 192.168.1.4 255.255.255.252 192.168.1.9") or configure a default route ("ip route 0.0.0.0 0.0.0.0 192.168.1.9" as only route) you give RouterC a chance to handle traffic from the IP address 192.168.1.5 from RouterA.

See your output from RouterC:


RouterC>sh ip route
[Output cut]

Gateway of last resort is not set

192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.8 is directly connected, Serial0
S 192.168.1.0 [150/0] via 192.168.1.9


RouterC only knows how to reach 192.168.1.8/30 (the C line) and 192.168.1.0/30 (the S line)!

HTH!
Bye, Tore

typesh
01-06-2009, 12:59 AM
Hello,
the problem is not on RouterA!

With "ping 192.168.1.10 source ethernet 0" you use an IP address as source for which RouterC has a route for (192.168.1.1).



Oh that makes sense! I understand now!
Using "ping 192.168.1.10 source ethernet 0" is sending the source IP for which RouterC has a route.

So when I am connected to RouterA via a console cable and use "ping 192.168.1.10" without adding "source ethernet 0," what IP does RouterC see as the source?

crissa
01-06-2009, 01:26 AM
[...]

So when I am connected to RouterA via a console cable and use "ping 192.168.1.10" without adding "source ethernet 0," what IP does RouterC see as the source?

Hello,
the IP address of the outgoing interface!
And Serial0 is the outgoing interface and has the IP address 192.168.1.5.
RouterC has no route for subnet 192.168.1.4/0 and no default gateway.

HTH!
Bye, Tore

Fuzz
01-06-2009, 03:36 AM
When you use the simple ping command, a router always uses the outgoing interface for the source address. If you use the extended ping command, you can simulate a host on a subnet by supplying an ip address to use as source. This can be useful for testing connectivity from hosts when you can't physically use the host to test with.

This proves though how important it is to make sure you have your static routes configured correctly. It can appear they are correct when in fact they are not. In fact, if you were to run RIP on all three routers from the initial configuration, you would see only one RIP discovered route on router C - the missing static route.

typesh
01-06-2009, 02:31 PM
Thank you all very much!
That really helps a lot!

typesh
01-06-2009, 03:29 PM
Thank you all very much!
That really helps a lot!

I re-did the static routes on all three routers and it works perfectly.

I tried experimenting using the interface instead of the next hop address, it doesn't seem to work. I initially did this on RouterA:

RouterA(config)# ip route 192.168.1.8 255.255.255.252 192.168.1.6 150
Everything worked great with that configuration.

I tried changing it up slightly and using:
RouterA(config)# ip route 192.168.1.8 255.255.255.252 Serial 0 150
It doesn't work anymore.

I used Serial 0 because RouterA connects to RouterB via RouterA's Serial 0.

Any idea why?

crissa
01-06-2009, 04:57 PM
[...]

I tried changing it up slightly and using:
RouterA(config)# ip route 192.168.1.8 255.255.255.252 Serial 0 150
It doesn't work anymore.

I used Serial 0 because RouterA connects to RouterB via RouterA's Serial 0.

Any idea why?

Hello,
do a "show run | inc route" and a "show ip route" on RouterA and post the outcome, please.
Bye, Tore

typesh
01-06-2009, 08:13 PM
RouterA#sh run | inc route
no ip route-cache
no ip route-cache
no ip route-cache
ip route 192.168.8.0 255.255.255.252 Serial0 150
ip route 192.168.8.0 255.255.255.252 Serial1 150
RouterA#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

192.168.8.0/30 is subnetted, 1 subnets
S 192.168.8.0 is directly connected, Serial0
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected, Ethernet0
C 192.168.1.4 is directly connected, Serial0
RouterA#

crissa
01-07-2009, 12:14 AM
RouterA#sh run | inc route
[...]
ip route 192.168.8.0 255.255.255.252 Serial0 150
ip route 192.168.8.0 255.255.255.252 Serial1 150
[...]

Gateway of last resort is not set

192.168.8.0/30 is subnetted, 1 subnets
S 192.168.8.0 is directly connected, Serial0
192.168.1.0/30 is subnetted, 2 subnets
C 192.168.1.0 is directly connected, Ethernet0
C 192.168.1.4 is directly connected, Serial0
RouterA#

Hello,
did you changed the setup of your lab? Where does 192.168.8.0/30 come from? And why do you route this IP range on two different interfaces? Serial1 was unused!

I expected
ip route 192.168.1.8 255.255.255.252 Serial0 150
as only static route on RouterA.

HTH!
Bye, Tore

typesh
01-07-2009, 09:19 AM
Hmm, I must've change something.
I am going to erase the startup-config and try again this evening.

Fuzz
01-07-2009, 01:34 PM
You're original static route on routerA was 192.168.1.8/30. Now it is 192.168.8.0/30, which is a completely different network address. Notice how you now have 2 addresses being shown in the routing table as being subnetted (192.168.1.0 and 192.168.8.0)?