LANs (Local Area Networks)
Home > Ask the Networking Experts > Questions & Answers
Ask The Networking Expert: Questions & Answers
EMAIL THIS

OSI Crash Course 101

Chris Partsenidis EXPERT RESPONSE FROM: Chris Partsenidis

Pose a Question
Other Networking Categories
Meet all Networking Experts
Become an Expert for this site
>
QUESTION POSED ON: 07 July 2003
What is the command to ping a TCP port?

>
EXPERT RESPONSE
In order to help you understand the answer to your question, we must sit through a quick crash course on the OSI Model. – I call it, OSI Crash Course 101 :)

The OSI model is a 'virtual' model which helps us describe how computers and their protocols communicate between each other and what steps are required to be taken in order to construct a message and send it to the receiving end.

The OSI model is broken into 7 layers, or levels if you like:

----------------
| Application  | <- Layer 7
----------------
| Presentation | <- Layer 6
----------------
| Session      | <- Layer 5
----------------
| Transport    | <- Layer 4 (TCP,UDP) – Ports work on this level
----------------
| Network      | <- Layer 3 (IP, ICMP) – 'Ping' works on this level
----------------
| Datalink     | <- Layer 2 (ARP)
----------------
| Physical     | <- Layer 1
----------------

While I really can't draw, I'm sure you get the idea of the above diagram:)

Some protocols, I.E., TCP, UDP, work on the same layer, while others on different layers I.E., ICMP, IP, ARP, etc.

It is important here to understand that the layers these protocols work on are not random, but due to the way data communications work, as all of them require a few steps to be completed before certain data can be exchanged.

For example, if you wanted to read a page off searchnetworking.com, you need to know the IP Address of the server, before you can send the HTTP (Port 80) request to the Web server and download the page.

The Network layer is where we define an IP Address while, as it would be logical. The Port number, which allows you to select the service you need (HTTP), is located on Layer 4 - The Transport layer.

It is logical to firstly need to identify where you need to send you request (in other words, which IP Address), and then tell the host what service you require (http - port 80).

Now that you have a fair idea how IP Address and Ports work on the OSI Model, I can address your answer!

The 'Ping' command is a function the Internet Control Message Protocol (ICMP). A host cannot 'ping' a TCP port, simply because the ICMP protocol works on the Network Layer and does not 'communicate' in any way with the layer above, which is where your port is defined.

You can ping and IP Address, but not a port.

There are special programs to help you 'see' if a port is active or 'listening', these are the so called 'Port Scanners', where you define the IP Address and port number (or port range, I.E., ports 1 to 1024) which you would like to scan, and the program will scan these ports to see which one is open.

When such programs are scanning ports, they do not ping them, but simply try to establish a connection to them by sending a packet with the tcp 'SYN' flag set, which will cause the remote host to respond in the case the port is active.

I should state that in order to understand how all the above works, you must understand the OSI Model.

If you would like to read more about the OSI model and its protocols, simply visit www.Firewall.cx. The colorful diagrams and step by step analysis will help you with the learning process.

OSI Crash course 101 is now officially complete !


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersNetworking Product Trials
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts