0% found this document useful (0 votes)
45 views5 pages

Packet Switching Unit 3

The document discusses the concepts of packet switching and circuit switching in computer networks, highlighting their mechanisms and differences. Packet switching breaks messages into smaller packets with headers for routing, while circuit switching establishes a dedicated communication path. It also compares the datagram and virtual circuit approaches, detailing their characteristics and implications for network performance and reliability.

Uploaded by

gnana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views5 pages

Packet Switching Unit 3

The document discusses the concepts of packet switching and circuit switching in computer networks, highlighting their mechanisms and differences. Packet switching breaks messages into smaller packets with headers for routing, while circuit switching establishes a dedicated communication path. It also compares the datagram and virtual circuit approaches, detailing their characteristics and implications for network performance and reliability.

Uploaded by

gnana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

NETWORK LAYER 3

Switching: Packet Switching- Internet protocol -

IPV4
RARP, ICMP, DHCP IPAddressing Subnetting - IPV6, ARP,

3.1 PACKET SWITCHING


Amechanism that allows us to interconnect
links to form a large
network. A multi-input, multi-output device which transfers
an input to one or more
packets from
outputs.
A switch's primary job is to receive
incoming packets on one of its
links and to transmit them on some other link. This function is referred
as
switching and forwarding

Switching

Circuit Packet
Switching Switching9

Virtual circuit
Datagram
approach approach

Figure 3.1: Classification of Switching

Circuit switching states that dedicated communication path is


allable between two stations. A circuit network is heavily dependent on
the
e
number of channel available. Example -

T'elephone landline connection


3.2 cOMPUTER NETWORKS
In packet switching. the message gets broken into small data packets.
Each packet is sent with a header addresses. This header address tells it
where its final destination is, so it knows where to go.

Packet switching is done by


*Datagram approach (Connectionless
Virtual circuit approach(Connection oriented)

3.1.1 Datagram Approach


Every packet contains enough information to enable any switch
to decide how to get it to destination

Every packet contains the complete destination address


Switch maintains a forwarding table (sometimes called a routing
table) which is used to forward a packet.
Characteristics of Connectionless (Datagram) Network
A host can send a packet anywhere at any time., since any packet
that turns up at the switch can be immediately forwarded
(assuming a correctly populated forwarding table)
When a host sends a packet, it has no way of knowing if the
network is capable of delivering it or if the destination host is
even up and running.
A switch or link failure might not have any serious effect on
communication if it is possible to find an alternate route around
the failure and update the forwarding table accordingly.
3.1.2 Virtual Circuit Approach
Widely used technique for packet switching. Uses the concept of
virtual circuit (VC). Also called a connection-oriented model.

First set up a virtual connection from the source host to the


destination host and then send the data. VC approach has two-stage
procesS such as

Connection setup phase

Data Transfer phase


3.3
NETWORKLAYER

nnectiona setup phase


the
Establish "connection state" in each of the switches between
source and destination hosts.
T h e connection s t a t e f o r a single connection c o n s i s t s ol an c

in the "VC table" in each switch through which the connection


passeS.

o lo
2
Switch 1 Switch 2 2
Switch 2

2 Host B
Host A

Figure 3.2: Example for Connection setup phase


&One entry in the VC table on a single switch contains.

A Virtual Circuit Identifier (VCI) that uniquely identifies the


connection at this switch and that will be carried inside the header

of the that belong to this connection.


packets
on which packets for this VC arrive at the
An incoming interface
switch.

A n outgoing interface in which packets for this VC leave the switch.

A potentially different VCI that will be used for outgoing packets.

Table 3.1: VC Table for above diagramm

Incoming Incoming Outgoing Outgoing


S.N. Switch ID Interface VCI Interface VCI

2 5 1 11
Switch l

2. 3 11 2 7
Switch 2

7
3 Switch 3 1 4
3.4 OMPUTER NETWORKS
Two broad classes of approach to establishing connection state

Network Administrator will configure the state

The virtual circuit is permanent (PVC)


The network administrator can delete this

Can be thought of as a long-lived or administratively configured v


* A host can send
be established
messages into the network to cause the statetoto
This is referred as signaling and the resulting virtual circuit
is said to be switched (SVC)

A host may set up and delete such VC


a
dynamically without
the involvement of a network administrator.
Data Transfer Phase

For any packet that A wants to send to


B, A puts the VCI value 5 in
the header of the packet and sends it to
switch 1.

o
Switch 1
Switch 2 2

Switch 3

Host A 2
Host B
Figure 3.3: Example for Data Transfer
phase setup
Switch 1 receives any such
packet on interface 2, and it uses tnc
combination of the interface and the VCI in the packet header to find ue
appropriate VC table entry.

The table entry on switch 1 tells the switch to forward the packet out
of interface 1 and to put the VCI value 11 in the header.
NETWORK LAYER 3.5

Table 3.2: Difference between Datagram and Virtual circuit approac


Issues
SI No. Datagram network Virtual- circuit network

Circuit setup Not needed


Required
Addressing Each packet contains the full Each packet contains a short
source and destination address VC number

State infomation Routers do not hold state Each VC requires router table
infomation about connections space per connection

Routing Each packet is routed Route chosen when VC is


independently setup: all packets follow it

5 Effect of router failures None, except for packets lost All VCs that passed through
during the crash the failed router are terminated

6Qualityof service Difficult Easy if enough resources can


be allocated in advance for
each VC

Congestion control Difficult Easy if enough resources can


be allocated in advance for
each VC

Table 3.3: Difference between Circuit Switching and Packet Switching

SI.No. Circuit switching Packet switching

Guaranteed capacity No guarantees (best effort)

2. is wasted if data is bursty More efficient


Capacity
3 Before sending data establishes a path Send data immediately

4 All data in a single flow follow one path Different packets might follow different paths
5. No reordering; constant delay; Packets may be reordered, delayed or
no pkt drops dropped

You might also like