1. TCP/IP Protocol Suite
○ Application Layer
○ Transport Layer
○ Network/Internet Layer
○ Physical Layer/Network interface layer
3. How TCP/IP Model work?
4. Difference Between OSI and TCP/IP Model
6. TCP/IP Port numbers
7. TCP/IP Applications
TCP/IP Protocol Suite
TCP/IP (Transmission Control Protocol and Internet Protocol) was developed
by Department of Defence’s Project Research Agency (ARPA, later DARPA)
It is a project of network interconnection to connect remote machines.
The TCP/IP reference model :
● have a flexible architecture.Using TCP/IP model adding of more
machines to a network become easy.
● It make network robust and connections remained intact until the
source and destination machines were functioning.
TCP/IP Protocol Suite
The main aim to design this model is to provide end to end data
communication specifying how data should packetized, addressed,
transmitted , routed and received in the network.
TCP/IP model is also known as DARPA model which was named after the U.S.
government agency that initially developed TCP/IP.
TCP/IP is a two-layer program
The higher layer represent Transmission Control Protocol which manages
the assembling of a message into smaller packets that are transmitted
over the Internet and received by a TCP layer at receiver end that
reassembles the packets into the original message.
The lower layer represent Internet Protocol which add the IP or MAC
address to packets so that it gets to the right destination.
TCP/IP uses the client/server model of communication in which a client user
requests and server provide a service in the network.
The TCP/IP protocol suite is a collection of protocols that define the Internet.
Old Model of TCP/IP Consist of 4 Layers but its updated model consist of 5
1. Application Layer
2. Transport Layer
3. Network/Internet Layer
4. Data Link Layer
5. Physical Layer/Network interface layer
Each layer in TCP/IP model corresponds to one or more layers of the 7-layer
Open Systems Interconnection (OSI) model.
1. Application Layer
The Application layer provides interface between the application and
It represent ability to access the services of the other layers and
defines the protocols that applications use to exchange data.
The most widely-known Application layer protocols are :
● The Hypertext Transfer Protocol (HTTP) is used to transfer
files that make up the Web pages.
● The File Transfer Protocol (FTP) is used for file transfer.
The Application layer protocols which facilitate the use and
management of TCP/IP networks:
● The Domain Name System (DNS) is used to resolve a
hostname to an IP address.
● The Routing Information Protocol (RIP) is a routing protocol
that routers use to exchange routing information on an IP
Examples of Application layer are Windows Sockets and NetBIOS.
2. Transport layer
It is also known as Host to Host Transport Layer.
The Transport layer is responsible for end to end delivery of data
The protocols of the Transport layer are Transmission Control
Protocol (TCP) and the User Datagram Protocol (UDP).
● TCP provides a one-to-one, connection-oriented, reliable
communications service whereas UDP provides a one-to-one or
one-to-many, connectionless, unreliable communications service.
● It perform functions such as multiplexing, segmenting or splitting
● Transport layer adds header information to the data.
● Transport layer arrange the packets to be sent, in sequence.
3. Network Layer
It is also known as Internet Layer.
The Network layer perform basic functions such as addressing,
packaging, and routing of data packets.
This layer holds the whole architecture together and helps the packet
to travel independently to the destination.
The Internet layer is analogous to the Network layer of the OSI model.
The protocols used at Network layer are:
● The Internet Protocol (IP) is responsible for IP addressing, routing,
and the fragmentation and reassembly of packets.
● The Address Resolution Protocol (ARP) is responsible for the
resolution of the IP address to the Network Interface layer
address such as a MAC address.
● The Internet Control Message Protocol (ICMP) is responsible
reporting errors due to the unsuccessful delivery of IP packets.
4. Data Link Layer
The following are the functions performed by data link layer:
● Logical Link Control (LLC):
Logical link control is responsible for the establishment and
control of logical links between local devices on a network.
It is considered as DLL sublayer. LAN technology use the
IEEE 802.2 LLC protocol.
Data Link Layer
● Media Access Control (MAC):
This Layer is used by devices to control access to the
As many networks use a shared medium so management of
the shared medium is necessary to reduce conflicts.
For example – Ethernet uses the CSMA/CD method of media
● Data Framing: The data link layer is responsible for encapsulation
of data messages into frames that are sent over the network at
the physical layer.
● Addressing: Each device on a network has a unique number,
usually called a hardware address or MAC address,data link layer
add this MAC address with data message.
● Error Detection and Correction: The data link layer handles errors
that occur at the lower levels of the network stack. For example:
cyclic redundancy check (CRC) field.
5. Physical Layer
It is also known as network interface layer and Network access Layer.
Physical Layer is the lowest layer of the all.Here Protocols are used to
connect various host to host and network to network.
The Network Interface layer is responsible for sending and receiving
TCP/IP packets on the network medium.
These include LAN technologies and WAN technologies.
The Network Interface layer is same as Physical layers of the OSI
Advantages of TCP/IP Model
● TCP/IP model is model which is operated independently.
● It is scalable model.
● It follow client/server architecture.
● It is used with number of routing protocols.
● It can be easily used to establish a connection between two computers.
Disadvantages of TCP/IP Model
● The transport layer is not responsible for delivery of packets.
● The model cannot be used in any other application.
● Replacing any protocol is not easy.
● It has no clear description about services, protocols and interfaces at each
Difference b/w OSI and TCP/IP Model
OSI Reference Model
● OSI stand for Open System Interconnection.
● OSI is a protocol independent standard, which act as a communication gateway between the network.
● OSI Model consist of 7 Layers.
● In OSI model ,the transport layer take guarantee for the delivery of packets.
OSI model has a separate Presentation layer and Session layer.
● Here, network layer of provides both connection oriented and connectionless service.
● OSI model defines services,interfaces and protocols very clearly and makes clear distinction between them. It is
● TCP/IP stands for Transmission Control Protocol/ Internet Protocol.
● TCP/IP model is a communication protocol, which allows connection of hosts over allows connection of hosts over
● TCP/IP Model consist of 5 layers.
● In TCP/IP model the transport layer does not guarantees for the delivery of packets.
TCP/IP does not have a Presentation layer or Session layer.
● In this, network layer provides connectionless service.
● In TCP/IP, services, interfaces and protocols are not clearly separated. It is also protocol dependent.
● Transmission Control Protocol (TCP)
The main protocol of the Internet protocol suite is Transmission Control
Protocol (TCP),so that’s why the entire suite is referred as TCP/IP.
It provides reliable, ordered, and error-checked delivery of a stream of bits
between applications running on User device
Internet applications such as the World Wide Web, email and file transfer
rely on TCP.
● Transmission Control Protocol (TCP) Header
○ Source port – 16 Bit number it represents the Source Port number.
○ Destination port – 16 Bit number it represents the Destination Port
○ Sequence number – 32 Bit number is used for numbering TCP data
segments. Sequence number is added you each byte of data in TCP.
○ Acknowledgment Number – It is of 32 Bit number field that indicates
that the sending device is expecting a next sequence number from
the other device.
○ Data Offset – It is also known as Header Length field.The number of
32 bit words in the TCP Header. The minimum size header is 5 words .
This field hold the user.
○ Reserved – It is of 6 bit always set to 0 and reserved for future use.
○ Control Bits – It is of 6 bits. Control Bits manage the entire process of
connection establishment,maintenance and termination.
URG: Urgent Pointer field ACK: Acknowledgment field
PSH: Push Function RST: Reset the connection
SYN: Synchronize sequence no FIN: No more data from sender
○ Window – It indicates the size of the receive window that the receiver
is currently willing to receive. It specifies the number of bytes to be
received in the acknowledgment field
○ Checksum -The checksum field is used for error-checking of the
header field and data. It is of 16 bits long.
○ Urgent Pointer – When the URG bit is set, the urgent data is given
priority over other data streams. It is of 16 bits and shows the end of
the urgent data
● User datagram Protocol (UDP)
UDP is a simple connectionless transmission model.It uses minimum
number of protocol for data transmission.
UDP provides checksums for data integrity and port numbers for
addressing the packet in the network.
There is no guarantee of delivery, ordering, or duplicate of data packets in
User datagram Protocol (UDP) Header
UDP header consists of four fields each of 2 bytes in length:
○ Source Port – (16 bits) It indicate the port number of source device
from where data originates.
○ Destination Port – (16 bits) It indicate the port number of destination
device where the data have to send.
● User datagram Protocol (UDP) Header
○ UDP length – It indicates the length (in bytes)of the UDP header and
the encapsulated data. The minimum value for this field is 8 bytes.
○ UDP Checksum – (16 bits)The checksum field is used for
error-checking of the header field and data. This field is optional in
IPv4 addressing, and mandatory in IPv6 addressing. If this field remain
unused then it contain all zeros
● Internet Control Message Protocol (ICMP)
The Internet Control Message Protocol is a protocol which we use in
Internet protocol suite.
ICMP is used by network devices, like routers, to send error messages
and operational information.
Difference between ICMP and other transport protocols such as TCP and
UDP is that it is not used for exchanging data between systems in network.
● Internet Control Message Protocol (ICMP) Header:
The ICMP header starts after the IPv4 header. ICMP packets have an
8-byte header and variable-sized data section.
○ Type – The type field indicate the type of ICMP packet. This is always
different from ICMP type to type. This field is of 8 bits.
○ Code – All ICMP types have different codes. Some types only have a
single code, while others have several codes. This field is 8 bits in
● Internet Control Message Protocol (ICMP) Header:
○ Checksum – The Checksum is a 16 bit field used for error-checking of
the header field and data.
○ ICMP content – This field have variable size and contain the user data
● Internet Group Management Protocol (IGMP):
The Internet Group Management Protocol (IGMP) is a communications
It is used by hosts and routers on IPv4 networks to establish multicast
IGMP is also used for networking applications such as online streaming
video and gaming.
IGMP is used on IPv4 networks.
● Internet Group Management Protocol (IGMP) Header:
○ Version – (4 bits)It indicate the type of version of IGMP packet i.e. v1,v2
○ Type – (4 bits) It indicates the type of IGMP Packet Example Type 1 for
create group msg, type 2 for create group reply and so on.
○ Code – (8 bits) It indicate the IGMP packet code related to the type of
IGMP packet. Different IGMP types have different codes.
○ Checksum – The checksum is the 16-bit used for error-checking of the
header field and data.
○ Group Address – It is of 32 bit. In a Create Group Request message, the
group address field contains zero and In all other Request messages,
the group address field contains a host group address.
TCP/IP Port Number
A Port number is a 16 bit value and it range lies between 0 to 65535.
Port number from 0 to 1023 are the well known port numbers and these port
numbers are reserved for specific TCP/IP application.
Port number from 1024 to 49151 are registered ports and these are used by
less common TCP/IP applications.
Port number from 49152 to 65535 are dynamic or private ports.
For example: web server port number is 80
TCP/IP Port Number
Netstat commands to check TCP/IP port connection:
To know with whom our computer is communicating type netstat commands
in command line such as
netstat -n = show many different connections to which our computer is
connected through TCP/IP
netstat -an = show all active TCP/IP connection.
netstat -ano = show the process ID of different connection.
1. World Wide Web
Web is a collection of servers that stores specially formatted documents
using language such as HTML.
Web browsers are designed to request HTML pages from web servers
and then open them.
The Internet must to used to access the web pages from web server.
http:// plus IP address is used to access web page from web servers.
As internet addresses are difficult to remember,so text addresses of
websites are enter which are easy to memorize.
DNS protocol is used by web server to convert text addresses into IP
HTTP protocol is used by web to identify how message are formatted and
transmitted,requested and responds to the transfer of HTML formatted
Microsoft server name is (Internet Information Services)
Telnet is a user command which is used to access the remote
Telnet user can access remote computer by having its username and
It use TCP/IP port number 23
Mostly it is used by program developers and anyone who has a need to
use specific applications or data located at a particular host computer.
3. Secure Socket Shell (SSH)
Secure Socket shell is a network protocol which provides a capability to
the user to access a remote computer with a secure way
Secure Socket Shell program is similar to that of Telnet but it include data
encryption and authentication
It use a TCP/IP port 23
The encryption used by SSH provide confidentiality and integrity of data
over an unsecured network.
E-Mail or Electronic Mail play a major part in internet revolution.
It is a method of exchanging messages and attachments over the internet.
This is a free service which is offered by ISP.
It provide a quick way for people to communicate with one another.
Email servers accept, forward, deliver and store messages.
Web based services providing access to email are Google’s Gmail,
Microsoft Windows live Outlook, Yahoo! Mail
Protocols used by E-mail program are: SMTP,POP3 and IMAP4
● Simple Message Transfer Protocol (SMTP): SMTP protocol is used by a
client send mail .It use TCP/IP port 25.
● Post Office Protocol Version 3 (POP3): POP3 protocol is used to
receive email from SMTP server. It use TCP/IP port 110. This protocol
is not used now.
● Internet Message Access protocol version 4 (IMAP4): IMAP4 is an
alternative to POP3. it is used to retrieve an email from email server. It
use TCP/IP port 143. It also support some extra features.
5. File Transfer Protocol (FTP)
File Transfer Protocol is a standard network protocol used for transferring
computer files between network devices in a network.
FTP is similar to that of HTTP protocol but FTP transfer is more reliable
FTP provides a secure transmission that protect the username and
password and encrypt the content of a file.
FTP use SSL/TLS (Secure socket layer/Transport layer security) to
provide security. Sometime FTP is also known as SFTP.