Chapter 10 Circuit and Packet Switching
Download
Report
Transcript Chapter 10 Circuit and Packet Switching
Introduction to Network Layer
Lesson 09
NETS2150/2850
http://www.ug.cs.usyd.edu.au/~nets2150/
School of Information Technologies
1
Lesson Outline
Switching is an effective way
of sharing network resources
Circuit switching
Packet Switching
2
Position of network layer
McGraw-Hill
3 2004
©The McGraw-Hill Companies, Inc.,
Network Layer in an Internetwork
Link 1
McGraw-Hill
Link 2
Link 3
4 2004
©The McGraw-Hill Companies, Inc.,
Network layer functions
transport packet from sending
to receiving hosts
network layer protocols in
every host, router
three important functions:
path determination: route
taken by packets from source
to dest. Routing algorithms
forwarding: move packets from
router’s input to appropriate
router output
call setup: some network
architectures require router
call setup along path
before data flows
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
5
Switching in Wide Area Switched Networks
McGraw-Hill
6 2004
©The McGraw-Hill Companies, Inc.,
Switching Networks
Long distance transmission is typically
done over a network of switched nodes
not through dedicated mesh lines
Nodes not concerned with content of
data
Data routed by being switched from
node to node
7
Switching Nodes
Switching nodes may connect to other
nodes only, or to end systems and other
nodes
Some redundant connections are
desirable for reliability
Two different switching technologies:
Circuit switching
Packet switching
8
An Example Network
9
Circuit Switching
Developed for voice traffic
Provides dedicated communication path between
two stations
Connected sequence of links
Resources reserved for exclusive use
Done at the physical layer
Transparent connection
Three phases in communication
Establish
Transfer
Disconnect
10
Circuit Switching (2)
Connection setup takes time
Once connected, transfer is transparent
Developed for voice traffic (phone)
11
Public Circuit Switched Network
(subscriber line)
Twisted-pair
Multiple voice frequency circuits
Subscribers, subs. Line, exchanges, and trunks
12
Circuit Establishment
Local call
Line c + one channel on the trunk to the ex
Long-distance
call
13
Circuit switching
Disadvantages
Circuit switching designed for voice
Resources dedicated to a particular call
Much of the time a data connection is
idle, unused capacity is wasted
Data rate is fixed
Both ends must operate at the same rate
Solution: Packet Switching
14
Packet Switching Principles
Developed for bursty data traffic
Data transmitted in small packets
Control info
Typically 1000 octets
Longer messages split into series of packets
Each packet contains a portion of user data plus
some control info (header)
Routing (addressing) info
Packets are received, stored briefly (buffered)
and passed on to the next node
Store and forward
Not concerned with the content of the data
15
The use of packets
16
A packet’s trip from Src to Dest
Destination
Source
17
Packet Switching…
Routing
table
18
Advantages
Line efficiency
Data rate conversion
Each end system connects to the local node at its own
speed
Nodes buffer data if required to equalize rates
Packets are accepted even when network is
busy (as opposed to call dropping)
Single node to node link can be shared by many
packets over time
Packets queued and transmitted
Delivery may slow down
Priorities can be used
Based on the priority, some packets can experience
less delay
19
Packet Switching Technique
End system breaks a long message into
packets
Packets sent one at a time to the
network
Packets handled in two modes:
Datagram used in today’s Internet
Virtual circuit used in ATM, frame-relay,
X.25
20
Datagram Mode:
No call setup at network layer
Each packet treated independently
the Internet model
No reference to packets handled before
from the same message
no network-level concept of “connection”
Packets can take any practical route
Packets may arrive out of order
Packets may go missing: Best-effort service!
Up to receiver to re-order packets and
recover from missing packets
21
Datagram Mode Illustration
Pkt re-ordered
Exit node
•Packets for same destination may not follow the same
route
•May arrive out of sequence
•Exit node or the destination does the re-ordering
22
Virtual Circuit Mode
Preplanned route established before any packets sent
Call request and clear packets to establish and drop circuit
(handshake)
Each packet contains a virtual circuit identifier instead of
destination address
Every router on source-dest path maintains “state” for each
passing virtual circuit (VC)
No routing decisions required for each packet
transport-layer connection only involved two end systems
link, router resources (bandwidth, buffers) may be allocated to
VC
to get circuit-like performance.
Non-dedicated path
23
Virtual circuits: signaling
protocols
used to setup, maintain teardown VC
used in ATM, frame-relay, X.25
not used in today’s Internet
application
transport 5. Data flow begins
network 4. Call connected
data link 1. Initiate call
physical
6. Receive data application
3. Accept call
2. incoming call
transport
network
data link
physical
24
Virtual
Circuit
Diagram
25
Packet Size
Packet size and transmission time
Breaking a message into smaller
packets
Transmission time drops
Too many smaller packets is not good
either!
Processing and queuing delays increase when
there are more packets to handle, for a single
message
26
Packet Size & Transmission time…
More and
smaller packets
mean
more of the
headers,
increasing the
octet-time
92 octettimes
77 octet-times
84 octet-times!
Total tx time: 43*3=129 octet-times
27
Virtual Circuits vs Datagram
Virtual circuits
Network can provide sequencing and error control
Packets are forwarded more quickly
Less reliable
No routing decisions to make
Loss of a node looses all circuits through that node
Datagram
No call setup phase
Better if few packets
More flexible
Routing can be used to avoid congested parts of the
network
28
Datagram or VC network: why?
Internet
data exchange among
computers
“elastic” service, no strict
timing req.
“smart” end systems
(computers)
can adapt, perform control,
error recovery
simple inside network,
complexity at “edge”
many link types
different characteristics
uniform service difficult
ATM
evolved from telephony
human conversation:
strict timing, reliability
requirements
need for guaranteed
service
“dumb” end systems
telephones
complexity inside
network
29
Circuit v Packet Switching
Performance comparison involves:
Propagation delay
Transmission time
Node processing delay
Constant
factors
Variable
factor
30
Event Timing Sequence
Node delay
Single block
Packetised
data
31
Network layer functions
transport packet from sending
to receiving hosts
network layer protocols in
every host, router
three important functions:
path determination: route
taken by packets from source
to dest. Routing algorithms
forwarding: move packets from
router’s input to appropriate
router output
call setup: some network
architectures require router call
setup along path before data
flows
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
32
Required Reading
Circuit Switching
Packet Switching
Virtual circuit
Datagram
Read Stallings 10.1,10.2, and 10.6
Next: Routing
33