You are on page 1of 21

SJA PGDCA ONLINE CLASSES

WE WILL BE LIVE IN
FEW MINUTES
SJA PGDCA ONLINE CLASSES

D AY – 7
COMPUTER NETWORKING
UNIT 3

NETWORK LAYER FUNCTIONS: IP


ADDRESSING & SUB NETTING, SWITCH
PACKET FORMATION (DATAGRAM &
VIRTUAL CIRCUIT)
IP Addressing

IPv4 supports three different types of addressing


modes −

 Unicast Addressing Mode

 Broadcast Addressing Mode

 Multicast Addressing Mode

 Hierarchical Addressing Scheme


IP Addressing

Unicast Addressing Mode


 In this mode, data is sent only to one destined host. The Destination
Address field contains 32- bit IP address of the destination host.
Here the client sends data to the targeted server −
IP Addressing

Broadcast Addressing Mode


 In this mode, the packet is addressed to all the hosts in a network segment.
The Destination Address field contains a special broadcast address,
i.e. 255.255.255.255. When a host sees this packet on the network, it is
bound to process it. Here the client sends a packet, which is entertained by
all the Servers −
IP Addressing

Multicast Addressing Mode


 This mode is a mix of the previous two modes, i.e. the packet sent is neither
destined to a single host nor all the hosts on the segment. In this packet, the
Destination Address contains a special address which starts with 224.x.x.x
and can be entertained by more than one host.

Here a server sends packets


which are entertained by more
than one servers. Every
network has one IP address
reserved for the Network
Number which represents the
network and one IP address
reserved for the Broadcast
Address, which represents all
the hosts in that network.
IP Addressing

Hierarchical Addressing Scheme


 IPv4 uses hierarchical addressing scheme. An IP address, which is
32-bits in length, is divided into two or three parts as depicted −

 A single IP address can contain information about the network


and its sub-network and ultimately the host. This scheme
enables the IP Address to be hierarchical where a network can
have many sub-networks which in turn can have many hosts.
SUBNETTING

Subnetting is a process of dividing a single large


network in multiple smaller networks. A single large
network is just like a town without any sector and
street address.

 In such a town, a postman may take 3 to 4 days in


finding a single address. While if town is divided in
sectors and streets, he can easily find any address in
less than one hour.
SUBNETTING

Computer networks also follow the same concept. In


computer networking, Subnetting is used to divide a
large IP network in smaller IP networks known as
subnets.

A default class A, B and C network provides


16777214, 65534, 254 hosts respectively. Having so
many hosts in a single network always creates
several issues such as broadcast, collision,
congestion, etc.
SUBNETTING

Computer networks also follow the same concept. In


computer networking, Subnetting is used to divide a
large IP network in smaller IP networks known as
subnets.

A default class A, B and C network provides


16777214, 65534, 254 hosts respectively. Having so
many hosts in a single network always creates
several issues such as broadcast, collision,
congestion, etc.
SUBNETTING

 Let’s take a simple example. In a company there are four departments;


sales, production, development and management. In each department
there are 50 users. Company used a private class C IP network. Without
any Subnetting, all computers will work in a single large network.
SUBNETTING

 Computers use broadcast messages to access and provide


information in network. A broadcast message is an
announcement message in computer network which is
received by all hosts in network.
 In this example since all computers belong to same
network, they will receive all broadcast messages regardless
the broadcast messages which they are receiving are
relevant to them or not.
 Just like town is divided in sectors, this network can also be
divided in subnets. Once network is divided in subnets,
computers will receive only the broadcasts which belong to
them.
SUBNETTING

 Since company has four departments, it can divide its network in four
subnets. Following figure shows same network after Subnetting.
Packet Switching

 Packet switching is a method of transferring the data to a


network in form of packets. In order to transfer the file fast
and efficient manner over the network and minimize the
transmission latency, the data is broken into small pieces of
variable length, called Packet.

 At the destination, all these small-parts (packets) has to be


reassembled, belonging to the same file. A packet composes
of payload and various control information. No pre-setup
or reservation of resources is needed.
Packet Switching

 Packet Switching uses Store and Forward technique while


switching the packets; while forwarding the packet each hop first
store that packet then forward. This technique is very beneficial
because packets may get discarded at any hop due to some
reason.

 More than one path is possible between a pair of source and


destination. Each packet contains Source and destination address
using which they independently travel through the network.

 Packet-Switched networks were designed to overcome


the weaknesses of Circuit-Switched networks since circuit-
switched networks were not very effective for small messages.
Packet Switching

Modes of Packet Switching :

 Connection-oriented Packet Switching (Virtual


Circuit)

 Connectionless Packet Switching (Datagram)


Packet Switching

 Connection-oriented Packet Switching (Virtual


Circuit)
 Before starting the transmission, it establishes a logical path or
virtual connection using signalling protocol, between sender and
receiver and all packets belongs to this flow will follow this
predefined route.

 Virtual Circuit ID is provided by switches/routers to uniquely


identify this virtual connection. Data is divided into small units and
all these small units are appended with help of sequence number.
Overall, three phases takes place here- Setup, data transfer and tear
down phase.
Packet Switching

 All address information is only transferred during setup phase. Once


the route to destination is discovered, entry is added to switching
table of each intermediate node. During data transfer, packet header
(local header) may contain information such as length, timestamp,
sequence number etc.

Connection-oriented
switching is very useful in
switched WAN. Some
popular protocols which use
Virtual Circuit Switching
approach are X.25, Frame-
Relay, ATM and
MPLS(Multi-Protocol Label
Switching).
Packet Switching

 Connectionless Packet Switching (Datagram)

 Unlike Connection-oriented packet switching, In Connectionless


Packet Switching each packet contains all necessary addressing
information such as source address, destination address and port
numbers etc.

 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 arrived at
destination might be out of order. It has no connection setup and
teardown phase, like Virtual Circuits.
Packet Switching

 Packet delivery is not guaranteed in connectionless packet switching,


so the reliable delivery must be provided by end systems using
additional protocols.
SJA PGDCA ONLINE CLASSES

END OF PART-1
OF
UNIT -3
COMPUTER NETWORKING

You might also like