UNIT 1 Networking Fundamentals

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 39

UNIT 1- Importance of computer networks, broadcast and point to point networks, Local area networks and Wide

area networks , ISO-OSI reference model, TCP/IP model , interfaces and services, Protocol data unit, connection
oriented and connectionless services, service primitives, Binding Protocol Address- ARP & RARP, packet format,
Encapsulation.

Data Communication: When we communicate, we are sharing information. This sharing can be local or remote.
Between individuals, local communication usually occurs face to face, while remote communication takes place
over distance.

Components:
A data communications system has five components.

1. Message. The message is the information (data) to be communicated. Popular forms of information include
text, numbers, pictures, audio, and video.
2. Sender. The sender is the device that sends the data message. It can be a computer, workstation, telephone
handset, video camera, and so on.
3. Receiver. The receiver is the device that receives the message. It can be a computer, workstation, telephone
handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message travels from sender
to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-optic cable,
and radio waves
5. Protocol. A protocol is a set of rules that govern data communications. It represents an agreement between the
communicating devices. Without a protocol, two devices may be connected but not communicating, just as a
person speaking French cannot be understood by a person who speaks only Japanese.
Data Representation:

Information today comes in different forms such as text, numbers, images, audio, and video.
Text:
In data communications, text is represented as a bit pattern, a sequence of bits (Os or Is). Different sets of
bit patterns have been designed to represent text symbols. Each set is called a code, and the process of
representing symbols is called coding.

Images:
Images are also represented by bit patterns. In its simplest form, an image is composed of a matrix of
pixels (picture elements), where each pixel is a small dot. The size of the pixel depends on the resolution. For
example, an image can be divided into 1000 pixels or 10,000 pixels

Audio
: Audio refers to the recording or broadcasting of sound or music. Audio is by nature different from text, numbers,
or images. It is continuous, not discrete. Even when we use a microphone to change voice or music to an electric
signal, we create a continuous signal.
Video:
Video refers to the recording or broadcasting of a picture or movie. Video can either be produced as a continuous
entity (e.g., by a TV camera), or it can be a combination of images, each a discrete entity, arranged to convey the
idea of motion. Again we can change video to a digital or an analog signal.

Data Flow
Communication between two devices can be simplex, half-duplex, or full-duplex as shown in Figure

Simplex:
In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two devices
on a link can transmit; the other can only receive (see Figure a). Keyboards and traditional monitors are
examples of simplex devices
Half-Duplex:
In half-duplex mode, each station can both transmit and receive, but not at the same time. When one
device is sending, the other can only receive, and vice versa the half-duplex mode is like a one-lane road with
traffic allowed in both directions.

Full-Duplex:
In full-duplex both stations can transmit and receive simultaneously (see Figure c). The full-duplex mode
is like a two way street with traffic flowing in both directions at the same time. In full-duplex mode,

NETWORKS
A network is a set of devices (often referred to as nodes) connected by communication links. A node can be a
computer, printer, or any other device capable of sending and/or receiving data generated by other nodes on the
network.
Distributed Processing
Most networks use distributed processing, in which a task is divided among multiple computers. Instead of one
single large machine being responsible for all aspects of a process, separate computers (usually a personal
computer or workstation) handle a subset.
Network Criteria
A network must be able to meet a certain number of criteria. The most important of these are performance,
reliability, and security.
Performance:
Performance can be measured in many ways, including transit time and response time. Transit time is the
amount of time required for a message to travel from one device to another. Response time is the elapsed time
between an inquiry and a response. The performance of a network depends on a number of factors, including the
number of users, the type of transmission medium, the capabilities of the connected hardware, and the efficiency
of the software. Performance is often evaluated by two networking metrics: throughput and delay.

Reliability:
In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the time it
takes a link to recover from a failure, and the network's robustness in a catastrophe.
Security:
Network security issues include protecting data from unauthorized access, protecting data from damage
and development, and implementing policies and procedures for recovery from breaches and data losses.

Physical Structures:
Type of Connection
A network is two or more devices connected through links. A link is a communications pathway that
transfers data from one device to another. There are two possible types of connections: point-to-point and
multipoint.
Point-to-Point
A point-to-point connection provides a dedicated link between two devices. The entire capacity of the link
is reserved for transmission between those two devices.
Multipoint
A multipoint (also called multidrop) connection is one in which more than two specific devices share a
single link. In a multipoint environment, the capacity of the channel is shared.
Physical Topology
The term physical topology refers to the way in which a network is laid out physically. The topology of a
network is the geometric representation of the relationship of all the links and linking devices (usually called
nodes) to one another. There are four basic topologies possible: mesh, star, bus, and ring

Mesh: In a mesh topology, every device has a dedicated point-to-point link to every other device.
Advantages:
1. The use of dedicated links guarantees that each connection can carry its own data load, thus eliminating
the traffic problems that can occur when links must be shared by multiple devices.
2. A mesh topology is robust. If one link becomes unusable, it does not incapacitate the entire system. Third,
there is the advantage of privacy or security.
Disadvantages:
1. Disadvantage of a mesh are related to the amount of cabling because every device must be connected to
every other device, installation and reconnection are difficult.
2. Second, the sheer bulk of the wiring can be greater than the available space (in walls, ceilings, or floors)
can accommodate. Finally, the hardware required to connect each link (I/O ports and cable) can be
prohibitively expensive.
For these reasons a mesh topology is usually implemented in a limited fashion, for example, as a backbone
connecting the main computers of a hybrid network that can include several other topologies.
Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central controller, usually
called a hub. The devices are not directly linked to one another.

A star topology is less expensive than a mesh topology

Other advantages include robustness. If one link fails, only that link is affected.

One big disadvantage of a star topology is the dependency of the whole topology on one single point, the hub. If
the hub goes down, the whole system is dead.

Bus Topology:
The preceding examples all describe point-to-point connections. A bus topology, on the other hand, is
multipoint. One long cable acts as a backbone to link all the devices in a network
Advantages of a bus topology include ease of installation.
A bus uses less cabling than mesh or star topologies.

Disadvantages include difficult reconnection and fault isolation

Ring Topology In a ring topology, each device has a dedicated point-to-point connection with only the two
devices on either side of it.

A ring is relatively easy to install and reconfigure. Each device is linked to only its immediate neighbors (either
physically or logically). To add or delete a device requires changing only two connections. The only constraints
are media and traffic considerations (maximum ring length and number of devices). Problem and its location.
Unidirectional traffic can be a disadvantage. In a simple ring, a break in the ring (such as a disabled
station) can disable the entire network. This weakness can be solved by using a dual ring or a witch capable of
closing off the break.

Tree

A computer network
It allows for the sharing of resources such as printers, files, and data storage, as well as the ability to
communicate with other computers and access the internet.
Computer networking
It refers to the practice of connecting computers and other digital devices together to share resources and
exchange information.
It involves the use of hardware and software technologies that enable communication between computers and
other devices, whether they are located in the same physical location or are geographically dispersed.

Categories of Networks

Local Area Networks:


Local area networks, generally called LANs, are privately-owned networks within a single building or campus
of up to a few kilometer’s in size. They are widely used to connect personal computers and workstations in
company offices and factories to share resources (e.g., printers) and exchange information. LANs are
distinguished from other kinds of networks by three characteristics:
(1) Their size,
(2) Their transmission technology, and
(3) Their topology.
Metropolitan Area Network (MAN):
A metropolitan area network, or MAN, covers a city. The best-known example of a MAN is the cable television
network available in many cities.
This system grew from earlier community antenna systems used in areas with poor over-the-air television
reception. In these early systems, a large antenna was placed on top of a nearby hill and signal was then piped to
the subscribers' houses. At first, these were locally-designed, ad hoc systems.
Fig.2: Metropolitan area network based on cable TV.

Wide Area Network (WAN).


A wide area network, or WAN, spans a large geographical area, often a country or continent. It contains a
collection of machines intended for running user (i.e., application) programs.
These machines are called as hosts. The hosts are connected by a communication subnet, or just subnet for
short. The hosts are owned by the customers (e.g., people's personal computers), whereas the communication
subnet is typically owned and operated by a telephone company or Internet service provider. The job of the
subnet is to carry messages from host to host, just as the telephone system carries words from speaker to
listener.

THE INTERNET
The Internet has revolutionized many aspects of our daily lives. It has affected the way we do business as well
as the way we spend our leisure time. Count the ways you've used the Internet recently.

Importance of computer networks


 Provides best way of business communication.
 Streamline communication.
 Cost-effective resource sharing.
 Improving storage efficiency and volume.
 Cut costs on software.
 Cut costs on hardware.
 Utilizes Centralized Database.
 Increase in efficiency.
 Optimize convenience and flexibility.
 Allows File sharing.
 sharing of peripherals and internet access.
 Network gaming.
 Voice over IP (VoIP).
 Media Center Server.
 Centralize network administration, meaning less IT support.
 Flexibility.
 Allowing information sharing.
 Supporting distributed processing.
 User communication.
 Overcoming geographic separation.

The transmission
It is that sending a signal from one location to another. Transmission technologies refer to the physical
layer protocol such as modulation, demodulation, line coding, error control etc. The transmission technology
can be categorized broadly into two types:
Point-to-point networks
Broadcast Networks

Broadcast Networks

Transmitting data from one source host to all other hosts present in the same or other network is called
broadcast. It is called a one to all transmission.
Types of broadcast
Broadcast is classified into two types, which are as follows −
Limited Broadcast
Transmitting data from one source host to all other hosts present in the same network is called a limited
broadcast. Given below is the diagram of limited broadcast −

In Limited Broad casting if the destination address is 255.255.255.255 then the packet will be sent to all
the hosts in the network.
Limited Broadcast address of any network=255.255.255.255 = 11111111.11111111.11111111.11111111
For example: If the source IP address is 12.23.2.5 sending data to all other hosts present in the same
network, then the destination address is 255.255.255.255.
Direct Broadcast
Transmitting data from source host to all other hosts present in different networks then it is called as direct
broadcast. Given below is the diagram of direct broadcast −

In direct broadcast Host ID bits are all set to 1, Network ID is the IP address where all destination hosts
are present.
For example: Source IP address is 12.34.5.6 sending data to all other nodes present at different network
having IP address 24.0.0.0
Therefore source address= 12.34.5.6
Destination address= 24.255.255.255.

PROTOCOLS
Protocols:
In computer networks, communication occurs between entities in different systems. An entity is anything
capable of sending or receiving information. However, two entities cannot simply send bit streams to each other
and expect to be understood. For communication to occur, the entities must agree on a protocol.
Syntax. The term syntax refers to the structure or format of the data, meaning the order in which they are
presented.
Semantics. The word semantics refers to the meaning of each section of bits. How is a particular pattern to
be interpreted, and what action is to be taken based on that interpretation.

Timing. The term timing refers to two characteristics: when data should be sent and how fast they can be
sent. For example, if a sender produces data at 100 Mbps but the receiver can process data at only 1 Mbps, the
transmission will overload the receiver and some data will be lost.

The OSI Reference Model:


This model is based on a proposal developed by the International Standards Organization (ISO) as a first step
toward international standardization of the protocols used in the various layers (Day and Zimmermann, 1983).
It was revised in 1995(Day, 1995).
The model is called the ISO-OSI (Open Systems Interconnection) Reference Model because it deals with
connecting open systems—that is, systems that are open for communication with other systems.
The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly
summarized as follows:

1. A layer should be created where a different abstraction is needed.


2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally standardized
protocols.
4. The layer boundaries should be chosen to minimize the information flow across the interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown together in the same
layer out of necessity and small enough that the architecture does not become unwieldy.
The Physical Layer

The physical layer is concerned with transmitting raw bits over a communication channel. The design issues
have to do with making sure that when one side sends a 1 bit, it is received by the other side as a 1 bit, not as a 0
bit.
The Data Link Layer:
The main task of the data link layer is to transform a raw transmission facility into a line that appears free of
undetected transmission errors to the network layer.
It accomplishes this task by having the sender break up the input data into data frames (typically a few hundred
or a few thousand bytes) and transmits the frames sequentially. If the service is reliable, the receiver confirms
correct receipt of each frame by sending back an acknowledgement frame.
Another issue that arises in the data link layer (and most of the higher layers as well) is how to keep a fast
transmitter from drowning a slow receiver in data. Some traffic regulation mechanism is often needed to let the
transmitter know how much buffer space the receiver has at the moment. Frequently, this flow regulation and
the error handling are integrated.

The Network Layer:


The network layer controls the operation of the subnet. A key design issue is determining how packets are
routed from source to destination. Routes can be based on static tables that are ''wired into'' the network and
rarely changed.
They can also be determined at the start of each conversation, for example, a terminal session (e.g., a login to a
remote machine). Finally, they can be highly dynamic, being determined anew for each packet, to reflect the
current network load.
The Transport Layer:
The basic function of the transport layer is to accept data from above, split it up into smaller units if need be,
pass these to the network layer, and ensure that the pieces all arrive correctly at the other end.
The transport layer also determines what type of service to provide to the session layer, and, ultimately, to the
users of the network.
The most popular type of transport connection is an error-free point-to-point channel that delivers messages or
bytes in the order in which they were sent. However, other possible kinds of transport service are the
transporting of isolated messages, with no guarantee about the order of delivery, and the broadcasting of
messages to multiple destinations. The type of service is determined when the connection is established.
The transport layer is a true end-to-end layer,
.

The Session Layer:


The session layer allows users on different machines to establish sessions between them. Sessions offer various
services, including dialog control (keeping track of whose turn it is to transmit), token management (preventing
two parties from attempting the same critical operation at the same time), and synchronization (check pointing
long transmissions to allow them to continue from where they were after a crash).

The Presentation Layer:


The presentation layer is concerned with the syntax and semantics of the information transmitted. In order to
make it possible for computers with different data representations to communicate, the data structures to be
exchanged can be defined in an abstract way, along with a standard encoding to be used ''on the wire.''

The Application Layer:


The application layer contains a variety of protocols that are commonly needed by users. One widely-used
application protocol is HTTP (Hypertext Transfer Protocol), which is the basis for the World Wide Web. When
a browser wants a Web page, it sends the name of the page it wants to the server using HTTP. The server then
sends the page back. Other application protocols are used for file transfer, electronic mail, and network news.

The TCP/IP Reference Model:


o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer, network layer, data link layer
and physical layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides specific
functionality.

Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level protocols.

Functions of TCP/IP layers:

Network Access Layer


o A network layer is the lowest layer of the TCP/IP model.
o A network layer is the combination of the Physical layer and Data Link layer defined in the OSI reference
model.
o It defines how the data should be sent physically through the network.
o This layer is mainly responsible for the transmission of the data between two devices on the same network.
o The functions carried out by this layer are encapsulating the IP datagram into frames transmitted by the
network and mapping of IP addresses into physical addresses.
o The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

Internet Layer
o An internet layer is the second layer of the TCP/IP model.

o An internet layer is also known as the network layer.

o The main responsibility of the internet layer is to send the packets from any network, and they arrive at the
destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite.

Following are the responsibilities of this protocol:

o IP Addressing: This protocol implements logical host addresses known as IP addresses. The IP addresses
are used by the internet and higher layers to identify the device and to provide internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport layer protocol. An
IP protocol ensures that the data is sent and received securely, it encapsulates the data into message known as
IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data link layer
protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram is greater than the MTU
unit, then the IP protocol splits the datagram into smaller units so that they can travel over the local network.
Fragmentation can be done by the sender or intermediate router. At the receiver side, all the fragments are
reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it is known as
direct delivery. When source and destination are on the distant network, then the IP datagram is sent
indirectly. This can be accomplished by routing the IP datagram through various devices such as routers.

ARP Protocol

o ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address from the IP address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it broadcasts the ARP
request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and process the request,
but only recipient recognize the IP address and sends back its physical address in the form of ARP
reply. The recipient adds the physical address both to its cache memory and to the datagram header

ICMP Protocol

o ICMP stands for Internet Control Message Protocol.


o It is a mechanism used by the hosts or routers to send notifications regarding datagram problems back to the
sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is unable to route the data
because of some unusual conditions such as disabled links, a device is on fire or network congestion, then the
ICMP protocol is used to inform the sender that the datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or not.

o ICMP Reply: ICMP Reply is used to check whether the destination device is responding or not.

o The core responsibility of the ICMP protocol is to report the problems, not correct them. The responsibility
of the correction lies with the sender.
o ICMP can send the messages only to the source, but not to the intermediate routers because the IP datagram
carries the addresses of the source and destination but not of the router that it is passed to.

Transport Layer

The transport layer is responsible for the reliability, flow control, and correction of data which is being sent over
the network.

The two protocols used in the transport layer are User Datagram protocol and Transmission control protocol.

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of transmission.

o It is an unreliable protocol as it discovers the errors but not specify the error.

o User Datagram Protocol discovers the error, and ICMP protocol reports the error to the sender that user
datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the application program that has created
the message.
Destination port address: The destination port address is the address of the application program that
receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it does not contain any ID of
a data segment.

o Transmission Control Protocol (TCP)


o It provides a full transport layer services to applications.

o It creates a virtual circuit between the sender and receiver, and it is active for the duration of the
transmission.
o TCP is a reliable protocol as it detects the error and retransmits the damaged frames. Therefore, it
ensures all the segments must be received and acknowledged before the transmission is considered to
be completed and a virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units known as segment, and each
segment contains a sequence number which is required for reordering the frames to form an original
message.
o At the receiving end, TCP collects all the segments and reorders them based on sequence numbers.

Application Layer
o An application layer is the topmost layer in the TCP/IP model.
o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application layer, it forwards its
data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be placed inside the
application layer except those who interact with the communication system. For example: text editor cannot
be considered in application layer while web browser using HTTP protocol to interact with the network
where HTTP protocol is an application layer protocol.

Following are the main protocols used in the application layer:


o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data over the
world wide web. It transfers the data in the form of plain text, audio, video. It is known as a Hypertext
transfer protocol as it has the efficiency to use in a hypertext environment where there are rapid jumps from
one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for managing the
devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-mail is
known as a Simple mail transfer protocol. This protocol is used to send the data to another e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the connection of a host to the
internet uniquely. But, people prefer to use the names instead of addresses. Therefore, the system that maps
the name to the address is known as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection between the local
computer and remote computer in such a way that the local terminal appears to be a terminal at the remote
system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for transmitting the files
from one computer to another computer.

Interfaces and Services

Interfaces and Services is a process that generally provides and gives a common technique for each layer
to communicate with each other. Standard terminology basically required for layered networks to request
and aim for the services are provided.

Services are provided by layer to each of layers above it.


 Service Data Unit (SDU) – SDU is a piece of information or data that is generally passed by layer just above
current layer for transmission. Unit of data or information is passed down to a lower layer from an OSI (Open
System Interconnection) layer or sublayer. Data is passed with request to transmit data. SDU basically
 identifies or determines information that is been transferred among entities of peer layers that are not

interpreted by supporting entities of lower-layer .


 Protocol Data Unit (PDU) – PDU is a single unit of information or data that is transmitted or transferred
among entities of peer layers of a computer network. When application data is passed down to protocol stack
on its way to being transmitted all over network media, some of protocols add information and data to it at
each and every level. PDU is used to represent and describe data is it gets transferred from one layer of OSI

model to another layer.


Connection oriented and connectionless services

Connection-Oriented Services

In a connection-oriented service, each packet is related to a source/destination connection. These packets are
routed along a similar path, known as a virtual circuit. Thus, it provides an end-to-end connection to the client for
reliable data transfer.

It delivers information in order without duplication or missing information. It does not congest the communication
channel and the buffer of the receiving device. The host machine requests a connection to interact and closes the
connection after the transmission of the data.

Mobile communication is an example of a connection-oriented service.

Connectionless-Service

In connectionless service, a router treats each packet individually. The packets are routed through different paths
through the network according to the decisions made by routers. The network or communication channel does not
guarantee data delivery from the host machine to the destination machine in connectionless service.

The data to be transmitted is broken into packets. These independent packets are called datagrams in analogy with
telegrams.

The packets contain the address of the destination machine. Connectionless service is equivalent to the postal
system. In the postal system, a letter is put in an envelope that contains the address of the destination. It is then
placed in a letterbox.
The letter finally delivers to the destination through the postal network. However, it does not guarantee to appear
in the addressee's letterbox.

Differences

The major differences between connection oriented services and connectionless services in computer network are
as follows−

Connection Oriented Services Connectionless Services−


It can generate an end to end connection between the It can transfer the data packets between senders to the
senders to the receiver before sending the data over the receiver without creating any connection.
same or multiple networks.
It generates a virtual path between the sender and the It does not make any virtual connection or path
receiver. between the sender and the receiver.
It needed a higher bandwidth to transmit the data It requires low bandwidth to share the data packets.
packets.
There is no congestion as it supports an end-to-end There can be congestion due to not providing an end-
connection between sender and receiver during data to-end connection between the source and receiver to
transmission. transmit data packets.
It is a more dependable connection service because it It is not a dependent connection service because it
assures data packets transfer from one end to the other does not ensure the share of data packets from one end
end with a connection. to another for s

upporting a connection.

Service primitives
A service is specified by a set of primitives. A primitive means operation. To access the service a user process can
access these primitives. These primitives are different for connection oriented service and connectionless service.
There are five types of service primitives:

1. LISTEN : When a server is ready to accept an incoming connection it executes the LISTEN primitive. It
blocks waiting for an incoming connection.
2. CONNECT : It connects the server by establishing a connection. Response is awaited.
3. RECIEVE: Then the RECIEVE call blocks the server.
4. SEND : Then the client executes SEND primitive to transmit its request followed by the execution of
RECIEVE to get the reply. Send the message.
5. DISCONNECT : This primitive is used for terminating the connection. After this primitive one can’t send
any message. When the client sends DISCONNECT packet then the server also sends the DISCONNECT
packet to acknowledge the client. When the server package is received by client then the process is
terminated.

Connection Oriented Service

The service primitives for the connection oriented services are as follows −

 CONNECT. request: Request a connection to be established.


 CONNECT. indication: Signal the called party (phone ringing).
 CONNECT. response: Accept / reject calls.
 CONNECT. confirm: Tell the caller whether the call was accepted.
 DATA. request: Request that data be sent.
 DATA. indication: Signal the arrival of data.
 DISCONNECT. request: Request that a connection be released.
 DISCONNECT. indication: Signal the peer about the request.
 Example: Modern Telephone and Internet Services
Connection less Service
The service primitives for the connection less services are as follows −

 SENDING. data − Sender just sending data (traditional postal service).


 REPORT. confirm − availability of reports the data reached at destination (registered post)
Binding Protocol Address- ARP & RARP

ARP RARP
A protocol used to map an IP address to a physical A protocol used to map a physical (MAC) address to an
(MAC) address IP address
To obtain the MAC address of a network device To obtain the IP address of a network device when only
when only its IP address is known its MAC address is known
Client broadcasts its IP address and requests a MAC Client broadcasts its MAC address and requests an IP
address, and the server responds with the address, and the server responds with the corresponding
corresponding MAC address IP address
IP addresses MAC addresses
Widely used in modern networks to resolve IP Rarely used in modern networks as most devices have a
addresses to MAC addresses pre-assigned IP address
ARP stands for Address Resolution Protocol. Whereas RARP stands for Reverse Address Resolution
Protocol.
Through ARP, (32-bit) IP address mapped into (48- Whereas through RARP, (48-bit) MAC address of 48
bit) MAC address. bits mapped into (32-bit) IP address.
In ARP, broadcast MAC address is used. While in RARP, broadcast IP address is used.
In ARP, ARP table is managed or maintained While in RARP, RARP table is managed or maintained
by local host. by RARP server.
In Address Resolution Protocol, Receiver’s MAC While in RARP, IP address is fetched.
address is fetched.
In ARP, ARP table uses ARP reply for its updation. While in RARP, RARP table uses RARP reply for
configuration of IP addresses .
Hosts and routers uses ARP for knowing the MAC While RARP is used by small users having less
address of other hosts and routers in the networks. facilities.
ARP is used in sender’s side to map the receiver’s RARP is used in receiver’s side to map the sender’s IP.
MAC address.

Packet format

TCP Packet Format


TCP (Transmission Control Protocol) is a fundamental protocol in the TCP/IP (Transmission Control
Protocol/Internet Protocol) family. It offers a dependable and organized data distribution between applications
that are executed on several hosts in a network. The TCP packet format must be understood in order to analyze
and resolve network communication issues. The TCP packet format will be thoroughly examined in this article,
along with its many fields and their importance.
Diagram Showing the TCP packet Format

TCP Packet format has these fields


 Source Port(16 bits): It holds the source/transmitting application’s port number and helps in determining the
application where the data delivery is planned.
 Destination Port (16 bits): This field has the port number of the transmitting application and helps to send
the data to the appropriate application.
 Sequence Number (32 bits): It ensures that the data is received in proper order by ordered segmenting and
reassembling them at the receiving end.
 Acknowledgment Number (32 bits): This field contains the upcoming sequence number and it acknowledges
the feedback up to that.
 Data Offset (4 bits): The data offset field indicates the starting point of the TCP data payload also storing the
size of the TCP header.
 Control Flags (9 bits): TCP uses a few control flags to regulate communication. Some of the important flags
include:
 SYN (Synchronize): Responsible for connecting the sender and receiver.
 ACK (Acknowledgment): Its purpose is transfer the acknowledgement of whether the the sender has
received data.
 FIN (Finish): It informs whether the TCP connection is terminated or not.
 RST (Reset): Mainly used to reset the connection when an error occurs.
 Window Size (16 bits): The size of the sender’s receive window is specified by this property.
 Checksum (16 bits): It reveals if the header was damaged during transportation.
 Urgent Pointer (16 bits): This field points to the packet’s first byte of urgent data.
 Options (Variable length): This field represents the different TCP options.
 Data Payload: This field mainly contains the information which is the actual application data that is being
transmitted.
IP Packet Format
IP (Internet Protocol) packet structure is used for data transmission in computer networks. Data units received
from the layer above are encapsulated in an IP packet, and additional header data is added. IP Payload is the term
used to describe the enclosed data. All the information required to deliver the packet at the other end is in the IP
header.
Diagram Showing the IP Packet Format

Key IP Packet Format Fields


 Version (4 bits): This field contains a value in four bits which is 0100 generally. This value is utilized in
distinguishing between IPv4 and IPv6, using four bits.
 Header Length (4 bits): This value is 4 bits in size and it represents how many 32-bit words are present in the
IP header. In short it is also called as HE-LEN.
 Type of Service (TOS) (8 bits): This field mainly deals with the information about how the quality of the
service is being delivered. The first 3 bits provides distinction and prioritization of IP packets depending on
certain service needs, such as precedence, delay, throughput, dependability, and cost.
 Total Length (16 bits): The total length of the IP packet is stored in bytes. This value and the HE-LEN sums
up to the value of the Payload.
 Identification (16 bits): This field gives a specific IP packet a distinctive identity. This helps to identify the
fragments of the an IP Datagram Uniquely.
 Flags (3 bits): Contains control flags for packet fragmentation and reassembly, such as the “Don’t Fragment”
and “More Fragments” flags.
 Fragment Offset (13 bits): After a packet is fragmented and put back together, this field contains the location
of it inside the original packet. It represents the number of Data Bytes ahead of the particular fragment in the
specific Datagram.
 Time to Live (TTL) (8 bits): This field specifies the total lifetime of the Data packet in the internet system.
This field indicates how many hops (routers) an IP packet can make before being terminated. This values goes
from 0-255.
 Protocol (8 bits): This IPv4 headerspecifies the type of transport layer protocol, such as TCP, UDP, or ICMP,
to which the IP packet will be routed. For example, TCP is indicated by number 6 and UDP protocol us
denoted by number 17.
 Header Checksum (16 bits): This is an error checking layer which is added to identity errors in the header.
By comparing the IP header with its checksum for error detection, it ensures the IP header’s integrity.
 Source IP Address (32 bits): The IPv4 sender’s 32-bit address is represented by this value.
 Destination IP Address (32 bits): This value represents the 32-bit IP address of the intended recipient.
 Options (variable length): This field has options and parameters for security, record route, time stamp, etc.
You can see that the End of Options, or EOL, usually marks the end of the list of options component.

Encapsulation

Data Encapsulation :
Encapsulation is the process of adding additional information when data is traveling in OSI or TCP/IP model.
The additional information has been added on sender’s side, starting from Application layer to Physical layer.
working of Encapsulation :
 There will be no additional information added in the user’s data in the Application layer in TCP/IP model or
Application, Presentation, Session layers in OSI model.
 Then Session layer sends data to Transport layer.
 In the Transport layer, the data broken up into different pieces. It adds the header in each of the broken data,
which contains information like source port, destination port, sequence number, etc. Now, everything
combined to a new form.
 The encapsulated data in Transport layer is called Segments or Datagrams. If the transmission uses TCP, then
it is called Segments, or UDP is called Datagrams.

You might also like