Professional Documents
Culture Documents
CN Unit-Iii Notes-1
CN Unit-Iii Notes-1
Switching techniques
In large networks, there can be multiple paths from sender to receiver. The switching technique will
decide the best route for data transmission.Switching technique is used to connect the systems for
making one-to-one communication.
Switched communication networks are those in which data transferred from source to
destination is routed between various intermediate nodes. Switching is the technique by which
nodes control or switch data to transmit it between specific points on a network. There are 3
common switching techniques:
1. Circuit Switching
2. Packet Switching
3. Message Switching
1.Circuit Switching:
In circuit switching network resources (bandwidth) are divided into pieces and bit delay is constant
during a connection. The dedicated path/circuit established between sender and receiver provides a
guaranteed data rate. Data can be transmitted without any delays once the circuit is
established.
Telephone system network is one of the example of Circuit switching. TDM (Time Division
Multiplexing) and FDM (Frequency Division Multiplexing) are two methods of multiplexing
multiple signals into a single carrier.
2.MessageSwitching
Message switching was a technique developed as an alternative to circuit switching before packet
switching was introduced. In message switching, end-users communicate by sending and receiving
messages that included the entire data to be shared. Messages are the smallest individual unit.
Also, the sender and receiver are not directly connected. There are a number of intermediate nodes
that transfer data and ensure that the message reaches its destination. Message switched data
networks are hence called hop-by-hop systems.
They provide 2 distinct and important characteristics:
1. Store and forward – The intermediate nodes have the responsibility of transferring the
entire message to the next node. Hence, each node must have storage capacity. A message
will only be delivered if the next hop and the link connecting it are both available,
otherwise, it’ll be stored indefinitely. A store-and-forward switch forwards a message only
if sufficient resources are available and the next hop is accepting data. This is called the
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
store-and-forwardproperty.
2. Message delivery – This implies wrapping the entire information in a single message and
transferring it from the source to the destination node. Each message must have a header
that contains the message routing information, including the source and destination.
Packet Switching transmits data across digital networks by breaking it down into blocks or
packets for more efficient transfer using various network devices. Each time one device sends a
file to another, it breaks the file down into packets so that it can determine the most efficient
route for sending the data across the network at that time. The network devices can then route the
packets to the destination where the receiving device reassembles them for use.
Packet switching is the transfer of small pieces of data across various networks. These data
chunks or “packets” allow for faster, more efficient data transfer.
Often, when a user sends a file across a network, it gets transferred in smaller data packets, not in
one piece. For example, a 3MB file will be divided into packets, each with a packet header that
includes the origin IP address, the destination IP address, the number of packets in the entire
data file, and the sequence number.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
Types of Packet Switching
Connectionless Packet Switching. This classic type of packet switching includes multiple
packets, each individually routed. This means each packet contains complete routing
information—but it also means different paths of transmission and out-of-order delivery are
possible, depending on the fluctuating loads on the network’s nodes (adapters, switches and routers)
at the moment. This kind of packet switching is sometimes called datagram switching.
Each packet in connectionless packet switching includes the following information in its header
section:
Source address
Destination address
Total number of packets
Sequence number (Seq#) for reassembly
Once the packets reach their destination via various routes, the receiving devices rearrange them
to form the original message.
Here are some of the types of delays that can occur in packet switching:
1. Transmission delay: This is the time it takes to transmit a packet over a link. It is affected by the
size of the packet and the bandwidth of the link.
2. Propagation delay: This is the time it takes for a packet to travel from the source to the destination.
It is affected by the distance between the two nodes and the speed of light.
3. Processing delay: This is the time it takes for a packet to be processed by a node, such as a router or
switch. It is affected by the processing capabilities of the node and the complexity of the routing
algorithm.
4. Queuing delay: This is the time a packet spends waiting in a queue before it can be transmitted. It
is affected by the number of packets in the queue and the priority of the packets.
In Datagram Packet Switching, each packet is treated independently. Packets belonging to one
flow may take different routes because routing decisions are made dynamically, so the packets
that arrived at the destination might be out of order. It has no connection setup and teardown phase,
like Virtual Circuits.
A---R1---R2---B
To send a packet from A to B there are delays since this is a Store and Forward network.
Chapter2:
2.Internet protocol
a. IPV4 – IP Addressing – Subnetting
What is IPv4?
IP stands for Internet Protocol and v4 stands for Version Four (IPv4). IPv4 was the primary
version brought into action for production within the ARPANET in 1983.
IP version four addresses are 32-bit integers which will be expressed in decimal notation.
Parts of IPv4
Network part:
The network part indicates the distinctive variety that’s appointed to the network. The network part
conjointly identifies the category of the network that’s assigned.
Host Part:
The host part uniquely identifies the machine on your network. This part of the IPv4 address is
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
assigned to every host.
For each host on the network, the network part is the same, however, the host half must vary.
Subnet number:
This is the nonobligatory part of IPv4. Local networks that have massive numbers of hosts are
divided into subnets and subnet numbers are appointed to that.
Characteristics of IPv4
Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the
maximum is 65,535 bytes.
Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16
bits)
Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag
(same order)
Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the
particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of
65,528 bytes.
Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network by
restricting the number of Hops taken by a Packet before delivering to the Destination.
Header Checksum: 16 bits header checksum for checking errors in the datagram header
Option: Optional information such as source route, record route. Used by the Network
administrator to check whether a path is working or not.
IPv4
An IPv4 address is made up of 32 binary bits, which is divided into a Network portion and a Host
portion with the help of a Subnet Mask.
The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to
decimal and separated by a period (dot).
IP addresses have two common formats. IP version 4 addresses are comprised of four numbers-only
segments separated by dots:
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
e.g. 127.0.0.1
e.g. 253.17.35.22
e.g. 192.168.108.105
The value in each octet ranges from 0 to 255 decimal, or 00000000 – 11111111
binary.
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1 = (128+64+32+16+8+4+2+1=255)
And this sample below shows an IP address represented in binary and decimal.
192 . 168 . 4 . 10 (decimal)
11000000.10101000.00000100.00001010 (binary).
2.IPV6:
IPv6
The IPv4 provides host to host communication systems, which are connected through the Internet.
The IPv6 (Internetworking Protocol, version 6) is designed to overcome the shortfalls of the IPv4.
Advantages of IPv6
Some advantages of IPv6 over IPv4 are mentioned below:
1. Address Space : IPv6 has a 128 bit long address, which is larger than IPv4.
2. Header format : IPv6 has a new header format, in which options are separated from the base header
and inserted between the base header and the upper layer data.
3. Extension : IPv6 is designed to allow the extension of the protocol, if required for new applications.
4. Security : Encryption and authentication mechanism provides confidentiality and integrity to the
packets in IPv6.
1. Version : This is 4 bit field, which defines the version number of an IP and its value is 6 for IPv6.
2. Priority : This is 4 bit field, which defines the priority of the packet with respect to the traffic congestion.
3. Flow label : This is 24 bit field, which is designed to provide facility of specially handling the specific
flow of the data.
4. Payload length : This is 16 bit field, which defines the length of an IP datagram excluding the base
header.
5. Next header : This is 8 bit field, which defines the header that follows the base header in the datagram.
6. Hop limit : This is 8 bit field, which serves the same purpose as the TTL( Time to Live field in IPv4)
field. It is a mechanism that limits the life span of the data in computer networks.
7. Source address : This is 128 bit source address field, which identifies the original source of the datagram.
8. Destination address : It is 128 bit destination address field, which identifies the original destination of the
datagram.
Congestion-Controlled Traffic : If source can adjust itself with traffic slowdown due to congestion,
the traffic is referred to as congestion controlled traffic.
Non Congestion-Controlled Traffic : Non-Congestion - Controlled Traffic is a type of traffic
which can accept a minimum delay.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
It is a compulsory base header followed by the payload. The payload includes two parts (1) optional
extension headers and data called payload from the upper layer.
The base header occupies 40 bytes, and extension headers and data from the upper layer usually
contain up to 65, 535 bytes of data.
Version: It is a four-bit field that defines the version number of the IP. IP6 version is 6, IP4
version is 4.
Priority: It is a 4-bit priority field that defines the priority of the packet with respect to
traffic congestion that a packet is to reject or not.
Flow Label: It is three bytes or 24-bit field designed to provide special handling for a
particular flow of data to speed flow on an already flowing packet path.
Payload Length: It is a two-byte payload length field that defines the total length of the IP
datagram, excluding the base header.
Next Header: It is an 8-bit field that defines the header that follows the base header in the
datagram. In IPV4, this field is called a protocol. Some of the values in this field indicate
options that are
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
Source Address: This field is 16-byte which specifies the original source of the datagram
destination address. This is a 16-byte internet address that usually identifies the final
destination of the datagram.
Priority: IPV6 divides traffic into two broad categories, which are as follows:
Chapter3:
ARP
Address Resolution Protocol (ARP) is a procedure for mapping a dynamic IP address to a permanent
physical machine address in a local area network (LAN). The physical machine address is also known as
a media access control (MAC) address.
What is ARP?
Address Resolution Protocol (ARP) is an important protocol of the network layer in the OSI
model, which helps find the MAC (Media Access Control) address given the system’s IP address.
The ARP’s main task is to convert the 32-bit IP address (for IPv4) to a 48-bit MAC address.
This protocol is mostly used to determine the hardware (MAC) address of a device from an IP
address. It is also used when one device wants to communicate with some other device on a local
network. The full form of ARP is Address Resolution Protocol.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
Most of the computer programs/applications use logical address (IP address) to send/receive messages,
however, the actual communication happens over the physical address (MAC address) i.e from layer 2 of
the OSI model. So our mission is to get the destination MAC address which helps in communicating with
other devices. This is where ARP comes into the picture, its functionality is to translate IP address to
physical addresses.
The acronym ARP stands for Address Resolution Protocol which is one of the most important protocols of
the Network layer in the OSI model.
Note: ARP finds the hardware address, also known as Media Access Control (MAC) address, of a host from
its known IP address.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
ARP: ARP stands for (Address Resolution Protocol). It is responsible to find the hardware
address of a host from a known IP address. There are three basic ARP terms.
The important terms associated with ARP are:
1. ARP Cache: After resolving the MAC address, the ARP sends it to the source where it is
stored in a table for future reference. The subsequent communications can use the MAC
address from the table
2. ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache
can reside
3. ARP request: This is nothing but broadcasting a packet over the network to validate
whether we came across the destination MAC address or not.
1. The physical address of the sender.
2. The IP address of the sender.
3. The physical address of the receiver is FF:FF:FF:FF:FF:FF or 1’s.
4. The IP address of the receiver
4. ARP response/reply: It is the MAC address response that the source receives from the
destination which aids in further communication of the data.
Now, entries of the ARP table can be seen by typing the command.
This is how ARP table looks like:
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
Types of ARP
Here are four types of Address Resolution Protocol, which is given below:
Proxy ARP
Gratuitous ARP
Reverse ARP
Inverse ARP
RARP
Reverse Address Resolution Protocol (RARP) is a protocol a physical machine in a local area network
(LAN) can use to request its IP address. It does this by sending the device's physical address to a
specialized RARP server that is on the same LAN and is actively listening for RARP requests.
RARP, short for “Reverse Address Resolution Protocol” or “Reverse ARP,” is a networking
protocol employed by a computer to ask for its IP address from a gateway server’s Address
Resolution Protocol (ARP) table or cache. Let’s simplify by looking at the tech terms individually.
A gateway server serves as a middleman between a computer and a remote server, providing
additional security by hiding the remote server’s address from the computer. The ARP, meanwhile,
is the communication protocol used to discover the media access control (MAC) address associated
with an IP address. The ARP table lists the MAC addresses and their corresponding IP addresses.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
The network administrator creates the ARP table, which gets stored in the gateway server. This
table points the user to the server (identified by its MAC address) that provides the computer’s IP
address.
This protocol is used to communicate data between two points in a server. The client doesn’t
necessarily need prior knowledge the server identities capable of serving its request. Media Access
Control (MAC) addresses requires individual configuration on the servers done by an administrator.
RARP limits to the serving of IP addresses only.
When a replacement machine is set up, the machine may or might not have an attached disk that
may permanently store the IP Address so the RARP client program requests IP Address from the
RARP server on the router. The RARP server will return the IP address to the machine under the
belief that an entry has been setup within the router table.
Working of RARP :
The RARP is on the Network Access Layer and is employed to send data between two points in a
very network.
Each network participant has two unique addresses:- IP address (a logical address) and MAC
address (the physical address).
The IP address gets assigned by software and after that the MAC address is constructed into the
hardware.
The RARP server that responds to RARP requests, can even be any normal computer within the
network. However, it must hold the data of all the MAC addresses with their assigned IP addresses.
If a RARP request is received by the network, only these RARP servers can reply to it. The info
packet needs to be sent on very cheap layers of the network. This implies that the packet is
transferred to all the participants at the identical time.
The client broadcasts a RARP request with an Ethernet broadcast address and with its own physical
address. The server responds by informing the client its IP address.
CS3591 COMPUTER NETWORKS
GNANAMANI COLLEGE OF TECHNOLOGY
DEPARTMENT OF AI&DS
Chapter 5:
ICMP
ICMP (Internet Control Message Protocol) is an error-reporting protocol that network devices such as
routers use to generate error messages to the source IP address when network problems prevent
delivery of IP packets.
Since IP does not have an inbuilt mechanism for sending error and control messages. It depends on Internet
Control Message Protocol(ICMP) to provide an error control. It is used for reporting errors and management
queries. It is a supporting protocol and is used by networks devices like routers for sending error messages
and operations information., e.g. the requested service is not available or that a host or router could not be
reached.
Then source will reduce the speed of transmission so that router will be free from congestion.
When the congestion router is far away from the source the ICMP will send hop by hop source quench
message so that every router will reduce the speed of transmission.
Destinationun-reachable:
Destination unreachable is generated by the host or its inbound gateway to inform the client that the
destination is unreachable for some reason.
There is no necessary condition that the only the router gives the ICMP error message some time
the destination host sends an ICMP error message when any type of failure (link failure, hardware
failure, port failure, etc) happens in the network.
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).
Chapter6:
DHCP
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an
Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet
mask and default gateway.
DHCP is based on a client-server model and based on discovery, offer, request, and ACK.
DHCP port number for server is 67 and for the client is 68. It is a Client server protocol which
uses UDP services. IP address is assigned from a pool of addresses. In DHCP, the client and the
server exchange mainly 4 DHCP messages in order to make a connection, also called DORA
process, but there are 8 DHCP messages in the process.
DHCP decline –
If DHCP client determines the offered configuration parameters are different or invalid, it sends
DHCP decline message to the server .When there is a reply to the gratuitous ARP by any host to
the client, the client sends DHCP decline message to the server showing the offered IP address
is already in use.
DHCP release –
A DHCP client sends DHCP release packet to server to release IP address and cancel any
remaining lease time.