Cn-Unit 3-1
Cn-Unit 3-1
Advantages:
No setup time: Datagram networks are connectionless and don't
require setup time.
No fixed route: If a link or node fails, there's no need to
reestablish a path.
Fault tolerance: Packets can be routed around busy parts of the
network or when an intermediate system fails.
Flexibility: Datagrams are the most flexible form of
communication, allowing senders and receivers to change along
with priorities.
Efficiency: Datagrams are more efficient than other packet types.
Virtual Circuit(VC) Approach: Connection-Oriented Service
It is a connection-oriented network.
In these networks, the path between the source
and the destination nodes that is followed by first
data packet gets allocated. All other data packets
transmitted between them will use the same path.
All the resources like buffers and bandwidth get
reserved before the transmission, and all data
packets consume same resources.
Since all packets follow the same path, a common
header and routing information is used by them.
They provide greater reliability and less complexity
owing to fixed paths and fixed resources.
3 Phases of Virtual - Circuit Transmission
Set up Phase − In this phase, a virtual circuit or a
route is established from the source to the destination
through number of switches. The source and destination
use global addresses using which the switches make
routing table entries.
Data Transfer − Once the virtual circuit is set up, all
packets follow the route established during the set up
phase adhering to the routing tables.
Teardown Phase − When data transfer is complete, the
source sends a teardown request. The destination
responds using a teardown confirmation. The switches
flush their routing table entries, thus relinquishing the
circuit.
ADDRESSING
Global Addressing:
It is used to create a Virtual-Circuit Identifier(VCI)
Local Addressing (Virtual-circuit identifier) :
It uniquely identifies the connection link at the switch and
carried in the header of the packet.
Advantages of Virtual Circuit:
Packets are delivered to the receiver in the same order sent
by the sender.
Virtual circuit is a reliable network circuit.
There is no need for overhead in each packet.
Single global packet overhead is used in virtual circuit.
Disadvantages of Virtual Circuit:
Virtual circuit is costly to implement.
It provides only connection-oriented service.
Always a new connection set up is required for transmission.
INTERNET PROTOCOL
The Internet Protocol (IP) is a protocol, or set of
rules, for routing and addressing packets of data so
that they can travel across networks and arrive at
the correct destination.
Data traversing the Internet is divided into smaller
pieces, called packets.
IP information is attached to each packet, and this
information helps routers to send packets to the
right place.
Every device or domain that connects to the
Internet is assigned an IP address, and as packets
are directed to the IP address attached to them,
data arrives where it is needed.
Internet Protocol Version 4 (IPv4)
It is connectionless services: Datagram approach
IPv4 could be a 32-bit IP Address.
IPv4 could be a numeric address, and its bits are
separated by a dot.
The number of header fields is twelve and the
length of the header field is twenty.
It has Unicast, broadcast, and multicast-style
addresses.
IPv4 supports VLSM (Virtual Length Subnet
Mask).
IPv4 uses the Post Address Resolution Protocol to
map to the MAC address.
IPv4 Datagram Format
VER - Version (4 bits): Indicates the version
of the IPv4 protocol being used.
HLEN - Header Length (4 bits): Indicates the
length of the header in 32-bit words.
Service - Type of Service (8 bits):
Indicates the priority of the packet and any
special handling that should be applied to it.
It is also called as differentiated services,
which has 3 fields.
Precedence(3 bits): Defines Priority, Ranging
from 0(000 in binary) to 7(111 in binary)
Type of Services (TOS): specify Type of
Services value.
Reserved (R) – 1 bit , reserved for future use.
Service - Type of Service (8 bits)
Type of Service (TOS)
Total Length (16 bits): Indicates the total length
of the packet in bytes, including the header and
data.
Identification (16 bits): A unique number that is
used to identify the packet.
Flags (3 bits): Used to control fragmentation and
reassembly of the packet.
bit 0: Reserved; must be Zero
bit 1: Don’t Fragment (DF)
bit 2: More Fragment (MF)
Fragment Offset (13 bits): Indicates the position
of this fragment in the original packet.
TTL - Time to Live (8 bits): Indicates the
maximum number of hops that the packet can
make before it is discarded.
Protocol (8 bits): Indicates the type of
transport layer protocol being used (e.g. TCP,
UDP).
Header Checksum (16 bits): A checksum that
is used to verify the integrity of the header.
Source IP Address (32 bits): The IP address of
the sender of the packet.
Destination IP Address (32 bits): The IP
address of the intended recipient of the packet.
Options (variable length): Optional fields that
can be used to specify additional information
about the packet.
Fragmentation and Reassembly
It is a method for transmission of messages larger
than the network’s Maximum Transmission
Unit(MTU), Messages are fragmented into smaller
pieces by the sender and reassembled by the
receiver.
Fragmentation is the breaking of an IPV4 packet
that exceeds the MTU of the data link layer into
smaller IPV4 packets. Fragmentation is a process
performed by the sender or the forwarding routers.
Fragmentation relies on some of the fields in the
IPV4 header, which are as follows:
Identification: To identify fragments, we use a 16-bit
field.
When the packet is fragmented, the identification field
is copied into the fragmented packet headers to help
determine that the packet belongs to a specific frame.
Fragment offset: This is a 13-bit field that is used
to order the data into fragments; it helps in the
rearranging part.
MF (More fragments): It is a one-bit flag that
specifies if there are more fragments of the frame.
DF (Don't fragment): It is a one-bit flag that tells
the routers whether to fragment the packet or not.
If it is set to 00 then the packet can be
fragmented.
Reassembly
The reassembly process is carried out at the destination.
This is because packets take different routes through the
network and arrive at different times.
The steps of the process of reassembly are as follows:
The destination identifies that the packet has been
fragmented using the MF and fragment offset fields.
The destination categorizes the incoming packets
according to their identification fields. Two packets with
the same identification field are put in the same category.
The packets within a category are sequenced using the MF
and fragment offset. First, the packets with MF equal
to 11 are sorted in ascending order based on their
fragment offset values. Then the packet having an MF
equal to 00 and a fragment offset not equal to 0 is placed at
the end, since it's the last packet.
IPv4 ADDRESSING
Logical (Universal) Address: 32 bit long(4
bytes), it encodes its network number and
host number. It remains the same.
Physical (Network) Address: It will change
from hop to hop.
ADDRESS SPACE:
It is defined as “The total number of addresses
used by the protocol”.
Eg: For N bits address, 2^N bits address space
can be used.
Notations: 3 types
Binary Notation: 32 bit address(4 byte address)
Dotted-Decimal Notation: 32 bit address
Hexadecimal Notation: 32 bit address
Mapping:
Mapping EUI-64 (Extended Unique Identifier)
Mapping Ethernet MAC(Media Access control) address
Special Address:
Unspecified address
Loopback address
Compatible address
Mapped address
IPv6 Header Format
Version
Traffic Class
Flow label:
Payload Length (16-bits)
Next Header (8-bits):
Hop Limit (8-bits)
Source Address (128 bits)
Destination Address (128 bits)
Address Resolution Protocol (ARP)
Address Resolution Protocol (ARP) is a
protocol that maps dynamic IP addresses to
permanent physical machine addresses in a
local area network (LAN).
The physical machine address is also known
as a media access control (MAC) address.
It is responsible to find the hardware address
of a host from a known IP address.
ARP Cache :- After receiving the MAC address,
ARP passes it to the sender where it is stored in
a table for future reference. And this is called
ARP Cache which is later used to obtain the
MAC address.
ARP Cache Timeout :- This is the time in which
the MAC address can remain in the ARP Cache.
ARP request :- Broadcasting a packet over the
network to verify whether we have arrived at the
destination MAC address.
ARP response/reply :- It is a MAC address
response that the sender receives from the
receiver which helps in further communication of
data.
How ARP Protocol Works?
Sender wants to communicate with a receiver-
>checks its ARP cache for receiver’s MAC address.
If receiver’s MAC address is already present in the
ARP cache, the sender will communicate with the
receiver using that MAC address.
Sender device broadcasts this ARP request
message in the LAN.
Device whose IP address matches the receiver IP
address ->ARP reply message, the sender’s IP
address and MAC address
It updates its ARP cache with the new information
(Receiver’s MAC address)
ARP PACKET FORMAT
Reverse Address Resolution Protocol
(RARP)
The Reverse Address Resolution Protocol
(RARP) is a networking protocol that is
used to map a physical (MAC) address to
an Internet Protocol (IP) address.
Internet Control Message Protocol (ICMP)
ICMP is used for reporting errors and
management queries.
It is a supporting protocol and is used by network
devices like routers for sending error messages
and operations information.
For example, the requested service is not
available or a host or router could not be reached.
Two Types:
Error-reporting message: Report problem
Query message: Host or network manager get
specific information from router or another host.
ICMP Packet Format
In the ICMP packet format, the first 32 bits of
the packet contain three fields:
Type (8-bit): Packet is for message type.
Some common message types are as follows:
Type 0 – Echo reply
Type 3 – Destination unreachable
Type 5 – Redirect Message
Type 8 – Echo Request
Type 11 – Time Exceeded
Type 12 – Parameter problem
Code (8-bit): Carries some additional
information about the error message and
type.
Checksum (16-bit): It is used to check the
number of bits of the complete message and
enable the ICMP tool to ensure that complete
data is delivered.
ICMP Header(32 bits): Extended Header
which has the work of pointing out the
problem in IP Message.
Data or Payload of variable length. The
bytes included in IPv4 are 576 bytes and in
IPv6, 1280 bytes.
Error-reporting message
Query message
Types of Error Reporting messages
Destination Un-reachable
The destination is unreachable and is
generated by the host or its inbound gateway
to inform the client that the destination is
unreachable for some reason.
Source Quench Message
A source quench message is a request to
decrease the traffic rate for messages sent is
too fast it sends the source quench message
to the source to slow the pace down so that
no packet can be lost.
Time Exceeded Message
A notification with the subject line “Time
Exceeded” is typically generated by routers
or gateways.
Parameter Problem
Whenever packets come to the router then
the calculated header checksum should be
equal to the received header checksum then
only the packet is accepted by the
router. Packet is dropped.
Redirection Message
Redirect requests data packets are sent on an
alternate route. The message informs a host
to update its routing information (to send
packets on an alternate route).
Dynamic Host Configuration Protocol
(DHCP)
Dynamic Host Configuration Protocol is a network
protocol used to automate the process of
assigning IP addresses and other network
configuration parameters to devices (such as
computers, smartphones, and printers) on a
network.
DHCP helps in managing the entire process
automatically and centrally.
DHCP servers maintain information on TCP/IP
configuration and provide configuration of address
to DHCP-enabled clients in the form of a lease
offer.
DHCP OPERATION
Components of DHCP
DHCP Server: holds IP Addresses and other
information related to configuration.
DHCP Client: It is a device that receives
configuration information from the server.
DHCP Relay: Basically work as a
communication channel between DHCP Client
and Server.
IP Address Pool: It has a range of addresses
that can be allocated to devices.
Subnets: Subnets are smaller portions of the
IP network partitioned to keep networks under
control.
Lease: The time that how long the information
received from the server is valid
DNS Servers: DHCP servers can also provide DNS
server information to DHCP clients.
Default Gateway: DHCP servers can also provide
information about the default gateway, which is the
device that packets are sent to when the
destination is outside the local network.
Options: DHCP servers can provide additional
configuration options to clients, such as the subnet
mask, domain name, and time server information.
Renewal: DHCP clients can request to renew their
lease before it expires to ensure that they continue
to have a valid IP address and configuration
information.
DHCP Packet Format
Click ico
n t o ad d
picture