|
-
February 14th, 2011, 12:52 AM
#1
about Ping
I started to learn about ping and had some questions.
>> Ping ipadrr
So when we ping on some IP address, we send an ICMP message to the IP address. but how does the NIC on the receiver side knows which application or port number to pass the ICMP message.
Sorry i just started reading about ICMP and ping and TCP. and i am just trying to see how this works. I will really appreciate any help.
--Dan
-
February 14th, 2011, 01:27 AM
#2
Re: about Ping
 Originally Posted by DanBug
So when we ping on some IP address, we send an ICMP message to the IP address.
Specifically, you send an ICMP Echo Request and wait for an ICMP Echo Response. RFC 792 outlines ICMP. You will see that there are many types of ICMP messages.
 Originally Posted by DanBug
but how does the NIC on the receiver side knows which application or port number to pass the ICMP message.
ICMP does not use a port. TCP and UDP are examples of protocols that use ports to identify which listening service to give an incoming packet to. ICMP is a separate protocol from TCP and UDP and does not use ports.
-
February 14th, 2011, 02:17 AM
#3
Re: about Ping
Austin,
Thanks for the quick reply and pointing to the ICMP RFC. But i still have a quick question.
For example: ping 192.145.22.3
Doesn't the above command imply that there should be some application that is bind to the IPt.
-
February 14th, 2011, 04:13 AM
#4
Re: about Ping
 Originally Posted by DanBug
Austin,
Thanks for the quick reply and pointing to the ICMP RFC. But i still have a quick question.
For example: ping 192.145.22.3
Doesn't the above command imply that there should be some application that is bind to the IPt.
Yes, there is an application level service that responds to ICMP Echo Requests. Here is another good reference that will introduce RFC 1122, which states all hosts MUST offer this service.
But don't get confused with port numbers. Port numbers are just a conceptual way of handling data in certain protocols(TCP, UDP). For example, your computer may receive 5 TCP packets in quick succession...what is it supposed to do with them? Should it let every service/application look at the packet and decide whether it wants the data or not? This would be extremely inefficient. So the solution is to create a way to relate an incoming TCP packet to a running application....PORTS!
ICMP does not rely on TCP and does not use the ports concept. Although, ICMP uses Types which will identify what kind of ICMP message it is. Similar concepts but not interchangeable.
The bottom line is not every network transmission has to have a 'Port', this is just specific to certain widely used protocols to manage the data. Looking at RFC 792 you can see the breakdown of an ICMP packet and there is no mention of a port number.
-
February 14th, 2011, 09:53 PM
#5
Re: about Ping
Austin,
Thanks a lot for the link that was very helpful and made really good sense.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|