Ping question....

Prepare to pass CCNA, CCDA, CCIP, CCDP, CCNP, CCIE and specializations.

Moderator: sva

Ping question....

Postby Jimmy Sands on Fri Jul 09, 2010 9:28 am

Question.....what happens to the ICMP packet when I ping a local interface that is on a a different subnet than the opposite end? I guess I am looking for a litle depper explanation about why it isnt answered when the int is up/up and is the IP that is being pinged?

I have Router2 S0-----S0 Router1


Where R2S0 is 10.1.1.5 255.255.255.252
and R1S0 is 10.0.0.5 255.255.255.252

When I change R1S0 to be in the same subnet, then pings to R2S0 from R2 work.


Thanks

Code: Select all
Router2#sh run int s0
Building configuration...

Current configuration : 151 bytes
!
interface Serial0
description this is a serial port
bandwidth 64000
ip address 10.1.1.5 255.255.255.252
no ip route-cache
clock rate 56000
end

Router2#       
Router2#           
Router2#sh ip route 10.1.1.5
Routing entry for 10.1.1.4/30
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Serial0
      Route metric is 0, traffic share count is 1

Router2#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

C    202.119.249.0/24 is directly connected, Ethernet0
C    192.168.20.0/24 is directly connected, Loopback20
     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
C       10.2.2.0/24 is directly connected, BRI0
C       10.4.1.2/32 is directly connected, Loopback0
C       10.1.1.4/30 is directly connected, Serial0
Router2#ping 10.1.1.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.5, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Router2#sh int s0
Serial0 is up, line protocol is up
  Hardware is HD64570
  Description: this is a serial port
  Internet address is 10.1.1.5/30
  MTU 1500 bytes, BW 64000 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, loopback not set
  Keepalive set (10 sec)
  Last input 00:00:01, output 00:00:06, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/1/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 48000 kilobits/sec
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     4141 packets input, 264933 bytes, 0 no buffer
     Received 1697 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     1757 packets output, 116038 bytes, 0 underruns
     0 output errors, 0 collisions, 3 interface resets
     0 output buffer failures, 0 output buffers swapped out
     8 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
Router2#
Jimmy Sands
 

Re: Ping question....

Postby Aaron Cary on Fri Jul 09, 2010 9:30 am

I would say it is due to the fact that the interfaces that are connected are on different subnets.

When you say up and up, the first up is your physical connection, the second is you datalink (encapsulation) and with these 2 up you have a bit of connectivity. Now when you dont get a response due to the fact that the interfaces are on different subnets you now have a layer 3 issue. You said that

Where R2S0 is 10.1.1.5 255.255.255.252
and R1S0 is 10.0.0.5 255.255.255.252

When I change R1S0 to be in the same subnet, then pings to R2S0 from R2 work.

That is because you have solved the layer 3 issue.
Aaron Cary
 

Re: Ping question....

Postby Jimmy Sands on Fri Jul 09, 2010 9:30 am

Here is the debug from R2

03:14:16: ICMP: dst (10.1.1.5) host unreachable sent to 10.1.1.5
03:14:18: ICMP: dst (10.1.1.5) host unreachable sent to 10.1.1.5
03:14:20: ICMP: dst (10.1.1.5) host unreachable sent to 10.1.1.5
03:14:29: ICMP: redirect sent to 10.1.1.5 for dest 10.1.1.5, use gw 10.1.1.5

When I put the right ip address (10.1.1.6/30) on the other end, then the bottom message came up and pings work.
Jimmy Sands
 

Re: Ping question....

Postby Aaron Cary on Fri Jul 09, 2010 9:31 am

correct, it is still a layer 3 issue. there has to be some information exchange between the interfaces to communicate. put an ip address on an ethernet interface and the pings fail. bring that interface up via a loopback cable or connecting it to another device in the same network, and it works.
Aaron Cary
 

Re: Ping question....

Postby masson5288 on Fri Jul 09, 2010 9:32 am

Because the link between R1 and R2 is point-to-point , the ICMP packet will be sent to opposite .

If opposite has no route(not in same subnet) , the router will not sent ICMP Reply ,
masson5288
 

Re: Ping question....

Postby Jimmy Sands on Fri Jul 09, 2010 9:33 am

Masson,
I got to thinking about it....
masson5288 wrote:Because the link between R1 and R2 is point-to-point , the ICMP packet will be sent to opposite .

If it is sent across the link, and its being sent out the interface that I am pinging, then that leads me still wondering. I think I am thinking about this too hard....
Jimmy Sands
 

Re: Ping question....

Postby masson5288 on Fri Jul 09, 2010 9:34 am

The ICMP packet is really sent across the link , you can catch the packet on opposite as Keith; or you can write an ACL which deny the ICMP reply to test(when the subnet is the same).
If the interface is Ethernet interface, has not this problem.
When we study an issue, we should be in-depth study.
masson5288
 


Return to Cisco Career Certifications

Who is online

Users browsing this forum: No registered users and 7 guests

cron