Thursday, April 2, 2009

TCP/IP Tutorial and Technical Overview

  • Introduction
This tutorial is helpful for understanding TCP/IP stack,Writing Network programs,Network System administration, Writing TCP/IP applications. TCP/IP is a collection of layers.Each layer contains some list of protocols which perform specific function. Generally TCP/IP contains 4 layers.

  1. Application Layer : mail,telnet
  2. Transport Layer : UDP,TCP
  3. Network Layer : IP,ICMP,IGMP
  4. Link Layer : Drivers
Link layer sometimes called as data link layer or network interface layer.They handles all types of hardware details.

Network layer(internet layer) is used for routing of packets between various networks.

Transport layer provides data transmission between hosts.In transport layer two protocols are used
transmission control protocol and User Datagram protocol.

  1. TCP : Reliable transmission of data between two hosts,Exchange of acknowledge takes place for reliable transmission. We can easily set the timeout for the transmission.Application should not have to put any effort to check data reliability.
  2. UDP : Unreliable flow of data.Some mechanism in application layer has to be implemented to check reliability.
Application layer is mainly at user level and other three layers are at kernel layer.


when one or more computers connected together it forms LAN. When two or more networks are connected together it is called as Inter Network or Internet. The hardware which is used to connect two networks is called as Router. Example of network are Ethernet, Token ring, FDDI ( Fiber distributed data Interface). Router connects Network at Network layer but Bridge connect different networks at datalink layer.Bridges makes appearance of multiple network to upper layer as same Network.
  • Internet Address
Internet address contains 4 bytes. Internet address is divided into 5 classes.
Easy way to remember is shift one bit from the left to right by adding 1's.














Class A : Range : 0.0.0.0 to 127.255.255.255

Class B: Range :128.0.0.0 to 191.255.255.255

Class C: Range : 192.0.0.0 to 223.255.255.255

Class D: Range : 224.0.0.0 to 239.255.255.255
(Multicast Group Id)

Class E:Range : 240.0.0.0 to 247.255.255.255 ( Reserved for future use)

The Internet Network interface Center is responsible for assigning the IP Address to Various Networks.

IP Address is divided into three parts:
1) Unicast : Only for single host in a Network.
2) Multicast : set of hosts in a Multicast Group.
3) Broadcast: All the hosts in a given Network.

DNS: Domain Name System is a Distributed database that provides the mapping between IpAddress and hostname. For remembering of Hostname Easily.

Adding headers to the data is called Encapsulation and removing headers is c
Application to transport layer : Plain Data.
Transport to IP layer : TCP Segment.
IP layer to Network layer : IP segment
Network layer to link layer: frames.

Network always contains one Client and one Server.
Client send request and server process the request in 2 ways either iterative or concurrent way.

Iterative one request at a time.Concurrent Many request at a time.

Port Numbers are mainly used to identify the type application we are working. The well known port numbers are from 0 to 1023. for eg : ftp on port 21, telnet 23,tftp on 69 etc.The well known port numbers of TCP/IP are managed by Internet Assigned numbers Authority.

Epemeral ports: These are port numbers which can be used by Applications in their hosts. Every Application port must be unique.Most TCP/IP applications use epemeral ports in the range from 1024 to 5000.
Some examples of reserved ports are:
echo = 7 ( server sends whatever client sends).
discard = 9 ( Server discards whatever client sends).
daytime = 13 (server sends date and time to client in human readable form).

Internet = collection of hosts around the world that communicate using TCP/IP
internet = multiple networks connected together using common protocol suite.

No comments:

Post a Comment