Ticker

6/recent/ticker-posts

Introduction to Network Protocols


✅Contents of session

🔻 Need of Protocol

🔻Layered Approach

🔻 Connection oriented Protocol Vs. Connection less Protocol

🔻TCP/IP Protocol Suite


✅Protocol

🔻Network is an interconnection of two or more communication devices.

🔻Communication between two devices occurs when those entities send/receive data to from each other.

🔻For communication to occur, both the entities must agree on some set of rules.

🔻The set of rules that govern control data communications among various devices is called Protocol.

Following are the key elements of protocol: 

Syntax
Structure or format of data packet being sent. Order of bits in packet. 

Semantics: Meaning of each section of bits. 

🔻It refers to how each bit section of data packet should be interpreted and what action should be taken after interpretation of bit patterns.

Timing:
It refers to when data should be sent and how fast data items can be sent. 

It also refers to sequencing of data packets.


✅Need of Protocol

🔻The communication devices used in Computer Networks are often designed and manufactured by different manufacturers.

🔻They might have different hardware and software configurations. 

🔻Protocol enables these devices to exchange data and other services.

🔻Protocol defines the format of data to be sent over the network.

🔻It specifies the commands used to send and receive data.

✅Types of Protocol

1. Standard Protocols:

🔻Standard protocols are developed by collaborative effort of experts from different organizations.

🔻Standard Protocols are not vendor specific, i.e. They are not developed for specific company or organization.

🔻Standard protocols are publicly open and no need to pay for its uses. 
🔻Ex: FTP, DHCP, SMTP,IP, TCP, UDP, TELNET, DNS etc.

2. Proprietary Protocols:

🔻Proprietary Protocols are developed by a single company for its specific devices or Operating System. 

🔻These are device specific Permission need to be taken from developing organization to use these protocols.

✅Layered Approach

🔻The main aim of Layered approach of programming or network design is to divide design into smaller sections parts.

🔻In layered network approach, networking functions are divided into several layers. Each of the layers has some specific task to complete.

🔻Each layer passes data up/down to the subsequent layer.  It also provides some services to higher layer.

🔻It makes system more manageable.

🔻 Layered approach simplifies design of protocols.

🔻System becomes extensible as new protocols and services can be easily added to specific layer.

🔻It enables different hardware devices, manufactured by different manufacturers to communicate with each other through layers.

🔻The layers are independent of each other. They can be modified without affecting subsequent layer.

🔻Each layer can be analyzed and tested separately.

✅Connection-Oriented Protocol

🔻It requires logical/virtual connection to be established between sender and receiver before data is exchanged.

🔻It uses Handshake method to establish a connection. It requires authentication before communication.

🔻All packets follow same path to reach to the receiver.

🔻Receiver receives data packets in the same order as sent by sender.

🔻It guarantees data transfer from sender to receiver.

🔻After data transmission, sender terminates the connection.

🔻No congestion during data transfer.

🔻In case of packet loss, it resend the packet.

⛔Ex: Transmission Control Protocol (TCP).

✅Connectionless Protocol

🔻It does not require logical/virtual connection to be established between sender and receiver before data is exchanged.

🔻No handshake method or authentication is required for data exchange. Data packets may follow different paths to reach to the receiver.

🔻Some data packets may loss during transmission. Also receiver may receives data packets in the random.

🔻It does not guarantee successful data transfer to receiver.

🔻Congestion may occur during data transfer.

🔻It is faster that connection-oriented protocol.

🔻It is used in time sensitive applications where sometimes data loss canbe tolerated.
🔻 E.g. Voice/video transmission, online gaming applications.

⛔Ex: User Datagram Protocol(UDP), ICMP etc.


✅Functions of Protocol

1. Flow Management.

It refers to the sending data to correct destination.

2. Data Routing:

Select best route to send data from sender to receiver.

3. Connection Control:

It manages connection oriented data transfer.

4. Data Sequencing

Protocol provides unique sequence numbers to data packets so that receiver can receive data in order.

5. Error Control:

It uses checksum bits for error detection and control.


✅TCP/IP Protocol Suite

🔻Protocol Suite is a set of protocol that are design to work together.

🔻TCP IP was developed by U.S. Department of Defence's Project Research Agency(ARPA).

🔻TCP/IP stands for Transmission Control Protocol Internet Protocol.

🔻Its a communication protocol for Internet.

🔻It defines how electronic devices should be connected to the Internet and how data should be transmitted between them.

🔻TCP IP work together.

🔻TCP breaks data into packets before transfet and IP sends packets to the destination.

Host-to-network Layer is equivalent to Physical and Data link Layer of OSI model.

Internet Layer is equivalent to Network Layer. Application Layer is roughly doing the job of Session. Presentation and Application layers of OSI model.

Transport layer is doing some of the functions of Session layer also.

✅1. Host-to-Network Layer:

🔻It does not specify any specific protocol.

🔻• It defines how data should be sent physically over the network.

🔻It performs mapping of IP address into Physical address.

🔻It defines how device is physically connected to the network.

2. Internet Layer:

🔻• It supports IP, ARP, RARP, ICMP, IGMP protocols.

🔻IP is connectionless protocol.

🔻IP transports data packets over network, these packets may travel through different routes and may arrive out of sequence.

🔻IP is used to get the IP address of devices connected to the network. It also decides the path of packets.

🔻It also decides the path of packets.


✅Address Resolution Protocol(ARP):

🔻ARP is used to associate logical address with the physical address.

🔻It finds out physical address of device when internet address is known.

Reverse Address Resolution Protocol(RARP): .

🔻 It allows host to find out Logical/Internet address when Physical address is known.

🔻It is used when computer is connected to the network.

Internet Control Message Protocol(ICMP):

🔻. It is used by the host and gateways to send notification of datagram problems to the sender.

🔻It sends query and error reporting messages.

Internet Group Message Protocol (ICMP):

🔻It is used when host want to send message to group of devices simultaneously, i.e. Message broadcasting.

3. Transport Layer:

🔻 I supports TCP, UDP and SCTP protocols.

✅Transmission Control Protocol(TCP):

🔻• Its a Connection-Oriented Protocol.

🔻At the sender side, it divides data stream into smaller packets called Segments. 
🔻It assigns sequence number to each segment. 
🔻At receiver side, it receives all segment and reorders them as per sequence number

🔻It detects error and retransmits the damaged frames.

✅User Datagram Protocol(UDP):

🔻. It provides Connectionless services.

🔻UDP performs error detection and error is reported by ICMP

🔻Datagram consists of port addresses, length of datagram in bytes, checksum for error detection.

3. Transport Layer:

Stream Control Transmission Protocol(SCTP):

It combines the features of TCP and UDP. It supports new technologies like VOIP.

4. Application Layer:

It handles many protocols and enables to communicate with applications.

HTTP:

It allows to access data over WWW.

Simple Network Management Protocol(SNMP): Manages devices over Internet.

✅4. Application Layer:

🔻Simple Mail Transfer Protocol(SMTP):

• It is used to manage e-mail transmission. 

🔻Domain Name System(DNS):

It is used to map IP addresses to domain names. 

🔻File Transfer Protocol(FTP):

• It is used to transfer files from one computer to another.

✅Communication Standards

🔻Network Standards are documented guidelines that define rules for connection of communication devices in network.

🔻It also specify guidelines for data communication/transmission over the network.

🔻Protocol allows various components of network to communicate to each other whereas Standards allow different networking components, developed by different manufacturers to connect and work together.

Some of the networking standards are as follows:

🔻OSI
🔻TCP/IP
🔻ITU
🔻IEEE
🔻PSTN

✅IEEE

🔻IEEE stands for Institute of Electrical and Electronics Engineers.

🔻The aim of this organization is to promote development and education in Electrical engineering and Computer science.

🔻IEEE SA is unit in IEEE for developing global standards of industries including AI, IOT, Biomedical. Telecommunication, Automation.
Networking etc.

🔻IEEE 802.3 is notable standard of IEEE developed for Wired LAN.

🔻Another notable standard of IEEE is IEEE 802.11 for wireless LAN. In 1985, Computer Society of the IEEE started a project, Project 802 to define standard to enable intercommunication among devices from
different manufacturers.

🔻IEEE 802 standard deals with the set up of LAN and MAN.

🔻It regulate the interconnectivity between different LANS.

🔻IEEE provides membership to community for accessing technical information and also provides networking opportunities.

🔻Membership enables community to participate in IEEE SA activities. standards development etc.

There are two main types of membership:

1. Corporate Membership

2. Individual Membership


Types of Addresses

1. Physical Address(MAC address):

It is MAC address imprinted by device manufacturer in NIC

Used by data link layer for node-to-node delivery of packet. It may vary from network to network.

When data packet travels over a network, physical address varies from hop to hop.

2. Logical Address IP Address):

It is an IP address of machine connected over network. Physical addresses can not be used efficiently over network for communication.

IP address is 32-bit address that uniquely identify host connected to internet.

IP address in data packet remain same

3. Port address:

Port address is mainly used for process to process data communication

It is referred to as a communication end point.

Port numbers are 16-bit integers within range, 0 to 65535,

There are two types of ports:

Hardware ports are used to connect external devices to computer system.

 Software ports are used for data communication in network or over the Internet.

All the processes running on one computer are associated with different ports

• TCP and UDP protocols use port addresses for communication

 • The data packet first routed through the network using IP address and once it reached to the destination, it uses port address to communicate with the process. 


Multiplexing:

At sender side, when multiple processes need to send packets. 

Transport layer protocol accepts messages from different processes, differentiated by their port numbers.

After adding header to packets, transport layer passes it to destination.

Demultiplexing:

At receiver side, after receiving packets transport layer removes headers and forward packets to specific process by port number.

✅User Data gram Protocol

UDP is connectionless protocol developed in year 1980. It is a transport layer protocol of TCP/IP protocol suite

No logical connection gets established between sender and receiver.

Sender sends data without knowing whether receiver is ready to receive

Also receiver does not acknowledgement for the received packet.

UDP packets are called Datagrams.

It sends datagram over Internet Protocol (IP), called UDP/IP

. It does not guarantee ordered delivery of data.

. It is faster communication protocol as compared to TCP

The size of UDP header is 8 bytes.

1. Source Port Number:

Its a port number used by the process running on source host.

If source host is client, in most of the cases. port number is dynamic/ephemeral.

2. Destination Port Number:

Its a port number used by the process running on destination host.

If destination host is client, in most of the cases, port number dynamic / ephemeral

If destination host is server, in many cases, port number is well-known port.

Here server copies ephemeral port number specified in request packet.


3. Length:

It specifies the total length of user datagram.

4. Checksum

. It is used to check whether information received by destination is accurate,

Its an optional field.

If any application does not want to include checksum then all bits are set to 0.

✅Transmission Control Protocol

TCP is connection-oriented protocol.

It is a transport layer protocol of TCP IP protocol suite It requires logical connection to establish between sender and receiver. 

Communicating devices uses handshake method to establish connection and for authentication.

Receiver send an acknowledgement for the every received packet.

TCP packets are called segments.

• It sends segments over Internet Protocol (IP), called TCP/IP

. All the transferred packets are received by receiver in the same order as sent by sender.


All data packets possibly follow same path to reach to the destination.

TCP is also called stateful protocol. Both communicating devices maintain session information.

If any data packet gets lost during transfer, sender retransmits it.

TCP uses sending and receiving buffers to synchronize data communication between processes that have different data transfer speed.

It provides error and flow control mechanism.


1. Source Port Number:

Its a port number used by the process running on source host.

2. Destination Port Number:

Its a port number used by the process running on destination host..

3. Sequence Number:

32 bit sequence number is the byte number of first byte in segment.

4. Acknowledge Number:

32 bit acknowledgement number is the byte number of segment that the receiver expects to receive.

5. HLEN:

Its a 4-bit field used to indicate length of TCP header.

The value ranges from 5 to 15.


Host A is sending packet with acknowledgement number 1001, 

that means it has received bytes till 1000 and is expecting to receive bytes starting from 1001.

Host B is sending packet with sequence number 1001

 i.e. It is sending data segment requested by host A. And B is expecting next segment starting from 1001 so the acknowledge number is 11001.

Post a Comment

0 Comments