SlideShare a Scribd company logo
1 of 29
Download to read offline
Communication Networks
Sanjay K. Bose
1
Lecture Set I
Introduction
Recommended Texts
Texts:
1. A. L.eon-Garcia and I. Widjaja: Communication Networks
2. A. S. Tanenbaum: Computer Networks
3. D. Bertsekas and R. Gallagar: Data Networks
References:
1. Kurose and Ross: Computer Networking
2. W. Stallings: Data and Computer Communication; Prentice-Hall, 1997.
2
Introduction
• An overview of networks, the Internet, services and
protocols
• Circuit Switching, Packet Switching
• Store-&-Forward Operation in Packet Switching,
Pipelining
• Layered Network Architecture, Summary overview of
the TCP/IP Network Layers
3
4
• Network Devices
– Routers, servers, switches,
multiplexers, hubs, modems, …
• Communication links
– fiber, copper, radio, satellite, ..
• Protocols control sending,
receiving of messages
– e.g., TCP, IP, HTTP, FTP, PPP
Elements of the Internet
Local ISP
Campus
LAN
Regional ISP
router
workstation
server
mobile
The Internet is a loosely hierarchical,
network of networks
5
Circuit Switching
Direct connection through
interconnected wires
Circuit
Switched
Communication
Network
Packet
Switched
Packet switching preferred in
computer communications
Packet Switching
Data divided into packets and
sent through a network – no
direct connection between the
end nodes
6
Communication Through a Public Circuit
Switched Network
Modem
Modem
Typical way of setting up a Circuit-Switched connection between
computers using a Public Switched Network such as the PSTN
(Public Switched Telephone Network)
Circuit Switching
• Dedicated communication path between the end
nodes set up through circuit switches of the
network
• Three phases
– Circuit establishment set up circuit
– Data transfer use circuit to send/receive data
– Circuit disconnect disconnect the circuit
Must have sufficient switching capacity and channel
capacity to establish connection
8
Circuit Switching
• Inefficient
– Channel capacity dedicated for duration of connection
– If no data is being transmitted, capacity is wasted
• Set up (connection) takes time
• Once connected, transfer is transparent
– Data is not examined by network, no delay
– Data rate is fixed for circuit-switching network
– Both ends must operate at the same rate
9
Communication Through a Packet Switching Network
• Network consists of
interconnected routers or
switches
• Data transmitted in small packets
– Data is organized into packets
with size typically up to 1000
octets
– Each packet contains a portion
of user data (Data) plus some
control information (Header)
• Packets are received, stored
briefly (buffered) and passed on
to the next node
– Store and forward causes
packet delay
Note that the Header is actually
“overhead” as what we really want to
send is just the Data.
However, in packet switching the header
is required to make sure that the packet
reaches the destination
packets
Destination
packets
packets
packets
Routers or
Switches
Source
10
Using Packet Switching
Intermediate nodes(routers) store the
packet, decide the route, and forward
the packet: processing delay
packet header contains routing
information
11
Packet Switching Implementations
• Station breaks long message into packets
• Packets sent one at a time to the network
• Packets handled in two approaches
– Datagram Service
• For each packet, each node makes its own decision as to
how to forward it so that it eventually reaches its
destination
– Virtual circuit
• A path for the packet is pre-determined for the sender-
receiver pair and the packet always follows this path
12
Datagram Packet Switching
• Each packet contains a full destination address
• Packets can take any practical route
• Each packet treated independently
• Packets may arrive out of order (receiver must re-order the
packets)
• Packets may go missing (end-nodes handle recovery of
missing packets)
3
2
1
1 3 2
Store-&-Forward Operation required at
each node for each packet
13
Virtual Circuit Packet Switching
• Preplanned route established before any packets sent
– Call setup establishes the route for data connection
– All packets in a connection follow the established route
• Each packet contains a virtual circuit identifier instead of
destination address
• No routing decisions required for each packet
• Virtual circuit is not a dedicated path (may be shared)
3
2
1
3 2 1
Store-&-Forward Operation required at
each node for each packet
14
Virtual Circuit vs Datagram Switching
• Virtual circuit
– Network can provide sequencing and error control
– Packets are forwarded more quickly
• No routing decisions to make
– Less reliable
• Loss of a node loses all circuits through that node
• Datagram
– No call setup phase
• More efficient for short message or fewer packets
– More flexible
• Routing can be used to avoid congested parts of the
network
Intermediate nodes will need to do Store-&-
Forward for both kinds of packet switching
15
Advantages of Packet Switching
• Line efficiency
– Single node to node link can be shared by many packets
over time
– Packets queued and transmitted as fast as possible
• Data rate conversion
– Each station 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
– Delivery may slow down
• Priorities can be used
• Robust against link and node failure
16
Store-&-Forward Operation in Packet
Switching
A BSwitch
R bits/second R bits/second
• A transmits a message of F
bits to B in one packet
• Header of h bits attached to
make a packet of F +h bits
• Link Speed R bits per second
(bps)
• No link congestion so no
queueing delay
Example
Time to transfer
message
from A to the Switch
seconds
F h
R


Time to transfer
message
from the Switch to B
seconds
F h
R


Total Time to Transfer
message from A to B
2 seconds
F h
R
 
  
 
Note that having more
intermediate switches
will cause more delays!
Can we do better than this?
17
Store-&-Forward Operation in Packet
Switching
A BSwitch
R bits/second R bits/second
•
Example (continued)
Time to transfer a
packet
from A to the Switch
2 seconds
F h
R


Time to transfer a
packet
from the Switch to B
Total Time to Transfer
message from A to B
23 seconds
F h
R
 
 
 
 
2 seconds
F h
R


Pipelining
(illustrated in the next slide)
•A transmits message of F
bits as two segments of F/2
bits each
• Header of h bits attached to
each segment to form packet
of F/2 +h bits
• After receiving packet 1, the
Switch starts forwarding it to
B while it receives packet 2.
After packet 2 is received (and
packet 1 is transmitted), the
Switch starts forwarding
packet 2 to B.
Message may be divided into
more than two segments
18
“Pipelining”
Pipelining packets (of a
multi-packet message)
may improve overall
delay performance when
packets go through
store-&-forward nodes
in between
A B
Store-&-Forward
Switch/Node
time
onepackettwopackets
19
Some Simple Thumb-rules for Pipelining in
Store-&-Packet Transmissions
• Generally better to divide a long message into smaller segments
even though the header bits have to be added to each segment
to form each packet (i.e. more overhead bits)
• This is because Pipelining can then be used to reduce the overall
message transfer delay
• This would be even more effective when there are multiple
switches between the source and the destination nodes
• Avoid making the segments too small as then the added
overhead of h bits per packet will begin to have a detrimental
effect (i.e. higher delays)
20
What is a protocol?
• Communications between computers requires very specific
unambiguous rules
• A protocol is a set of rules that governs how two or more
communicating parties are to interact
• The purpose of a protocol is to provide some type of
communications services, e.g.
• Internet Protocol (IP) – packet transfer
• Transmission Control Protocol (TCP) – transfer reliability
• Hyper Text Transfer Protocol (HTTP) – web service
• Simple Mail Transfer Protocol (SMTP) – email service
21
Example of a Protocol
(Calling Directory Assistance)
“Do you have an address?”
Caller
“What name?”
Give Name
Caller
replies
System replies
with number
System
replies
System
replies
System
replies
Operator
replies
“Thank you, please hold”
Give Address
Caller
replies
Give City Name
Dials Directory Assistance
“What city”?
Caller
replies
Operator
replies
Caller
waits
“Thank you, please hold”
Caller
waits
Caller
dials
22
Protocol “Layers”
Networks are complex!
• many “pieces”:
– hosts
– routers
– links of various media
– applications
– protocols
– hardware, software
Question:
Is there any hope of organizing
the structure of network?
This is where “layering”
helps!
Each layer does a small bit of the
work required and the overall work is
divided between the layers
Basic Philosophy: Layer n at one node talks to Layer n at another node
using the Layer n Protocol
23
Internet protocol stack
• Application: supporting network
applications
– FTP, SMTP, HTTP
• Transport: host-host data transfer
– TCP, UDP
• Network: routing of datagrams from
source to destination
– IP, routing protocols
• Link: data transfer between neighboring
network elements
– PPP, Ethernet
• Physical: bits “on the wire”
Application
Transport
Network
Link
Physical
24
Layering: Physical Communication
application
transport
network
link
physical
application
transport
network
link
physical
application
transport
network
link
physical
application
transport
network
link
physical
network
link
physical
data
data
25
Protocol layering and data
Each layer takes data from above
• adds header information to create new data unit
• passes new data unit to layer below
application
transport
network
link
physical
application
transport
network
link
physical
source destination
M
M
M
M
Ht
Ht
Hn
Ht
Hn
Hl
M
M
M
M
Ht
Ht
Hn
Ht
Hn
Hl
message
segment
datagram
frame
Internet Protocol (IP)
• This is the protocol most commonly used for the
Network Layer
• Routers interconnect different networks
• Host computers prepare IP packets and transmit them
over their attached network (complexity at edge)
• Routers forward IP packets across networks
• Best-effort IP transfer service, no retransmission
Net 1 Net 2
Router
27
Addressing & Routing
• Hierarchical address: Net ID + Host ID (e.g. 128.100.11.1)
• IP packets routed according to Net ID
• Routers compute routing tables using distributed algorithm
G
G
G
G
G
G
Net 1
Net 5
Net 3
Net 4Net 2
H
H H
H
Transport Protocols
• Host computers run two transport protocols on top of IP to
enable process-to-process communications
• User Datagram Protocol (UDP) enables best-effort transfer of
individual blocks of information
• Transmission Control Protocol (TCP) enables reliable transfer of
a stream of bytes
Internet
Transport Protocol
29
Internet Applications
• Internet applications run on either TCP or UDP
• TCP: HTTP (web); SMTP (e-mail); FTP (file transfer);
telnet (remote terminal)
• UDP: DNS, RTP (voice & multimedia)
• TCP & UDP incorporated into computer operating
systems
• Any application designed to operate over TCP or UDP
will run over the Internet!!!

More Related Content

What's hot

Message switched
Message switchedMessage switched
Message switchedHawkarOsman
 
10 Circuit Packet
10 Circuit Packet10 Circuit Packet
10 Circuit PacketWaqas !!!!
 
Switching Techniques
Switching TechniquesSwitching Techniques
Switching Techniquestameemyousaf
 
Circuit and packet_switching
Circuit and packet_switchingCircuit and packet_switching
Circuit and packet_switchinghoanv
 
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)Tutun Juhana
 
Topic: Virtual circuit & message switching
Topic: Virtual circuit & message switchingTopic: Virtual circuit & message switching
Topic: Virtual circuit & message switchingDr Rajiv Srivastava
 
WT - Circuit & Packet switching
WT - Circuit & Packet switchingWT - Circuit & Packet switching
WT - Circuit & Packet switchingvinay arora
 
Packet Switching and X.25 Protocol
Packet Switching and X.25 ProtocolPacket Switching and X.25 Protocol
Packet Switching and X.25 ProtocolMiles Kevin Galario
 
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...Kaushik Panta
 
Switching Techniques Lecture12,wireless
Switching Techniques Lecture12,wirelessSwitching Techniques Lecture12,wireless
Switching Techniques Lecture12,wirelessNavaizImtiaz1
 
Unit 3 CND_Physical Layer_Multiplexing_Pranoti Doke
Unit 3  CND_Physical Layer_Multiplexing_Pranoti DokeUnit 3  CND_Physical Layer_Multiplexing_Pranoti Doke
Unit 3 CND_Physical Layer_Multiplexing_Pranoti DokePranoti Doke
 
Circuit Packet
Circuit PacketCircuit Packet
Circuit PacketWaqas !!!!
 
switching techniques
switching techniques switching techniques
switching techniques ziaulhaq96
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networkingHarshita Yadav
 

What's hot (20)

packet switching
packet switchingpacket switching
packet switching
 
Message switched
Message switchedMessage switched
Message switched
 
Packet switching
Packet switchingPacket switching
Packet switching
 
10 Circuit Packet
10 Circuit Packet10 Circuit Packet
10 Circuit Packet
 
Topic Packet switching
Topic Packet switchingTopic Packet switching
Topic Packet switching
 
Packet Switching
Packet SwitchingPacket Switching
Packet Switching
 
Switching Techniques
Switching TechniquesSwitching Techniques
Switching Techniques
 
Packet Switching
Packet SwitchingPacket Switching
Packet Switching
 
Circuit and packet_switching
Circuit and packet_switchingCircuit and packet_switching
Circuit and packet_switching
 
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
 
Topic: Virtual circuit & message switching
Topic: Virtual circuit & message switchingTopic: Virtual circuit & message switching
Topic: Virtual circuit & message switching
 
11 circuit-packet
11 circuit-packet11 circuit-packet
11 circuit-packet
 
WT - Circuit & Packet switching
WT - Circuit & Packet switchingWT - Circuit & Packet switching
WT - Circuit & Packet switching
 
Packet Switching and X.25 Protocol
Packet Switching and X.25 ProtocolPacket Switching and X.25 Protocol
Packet Switching and X.25 Protocol
 
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
Circuit Switching, Packet Switching, Virtual Circuit Networks and Datagram Ne...
 
Switching Techniques Lecture12,wireless
Switching Techniques Lecture12,wirelessSwitching Techniques Lecture12,wireless
Switching Techniques Lecture12,wireless
 
Unit 3 CND_Physical Layer_Multiplexing_Pranoti Doke
Unit 3  CND_Physical Layer_Multiplexing_Pranoti DokeUnit 3  CND_Physical Layer_Multiplexing_Pranoti Doke
Unit 3 CND_Physical Layer_Multiplexing_Pranoti Doke
 
Circuit Packet
Circuit PacketCircuit Packet
Circuit Packet
 
switching techniques
switching techniques switching techniques
switching techniques
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networking
 

Similar to Lecture set 1

UNIT-3 network security layers andits types
UNIT-3 network security layers andits typesUNIT-3 network security layers andits types
UNIT-3 network security layers andits typesgjeyasriitaamecnew
 
High performance browser networking ch1,2,3
High performance browser networking ch1,2,3High performance browser networking ch1,2,3
High performance browser networking ch1,2,3Seung-Bum Lee
 
unit 2_switchingtechniques.ppt
unit 2_switchingtechniques.pptunit 2_switchingtechniques.ppt
unit 2_switchingtechniques.pptThangamaniR3
 
Switching techniques
Switching techniquesSwitching techniques
Switching techniquesGLIM Digital
 
Switching techniques
Switching techniquesSwitching techniques
Switching techniquesGupta6Bindu
 
switchingtechniques.ppt
switchingtechniques.pptswitchingtechniques.ppt
switchingtechniques.pptShoukatRiaz
 
Switching Techniques - Unit 3 notes aktu.pptx
Switching Techniques - Unit 3 notes aktu.pptxSwitching Techniques - Unit 3 notes aktu.pptx
Switching Techniques - Unit 3 notes aktu.pptxxesome9832
 
Unit 3 CND physical layer_switching_pranoti doke
Unit 3  CND physical layer_switching_pranoti dokeUnit 3  CND physical layer_switching_pranoti doke
Unit 3 CND physical layer_switching_pranoti dokePranoti Doke
 
Unit 3 cnd physical layer_switching_pranoti doke
Unit 3  cnd physical layer_switching_pranoti dokeUnit 3  cnd physical layer_switching_pranoti doke
Unit 3 cnd physical layer_switching_pranoti dokePranoti Doke
 
DATA COMMUNICATION BY BP. ...
DATA COMMUNICATION BY BP.                                                    ...DATA COMMUNICATION BY BP.                                                    ...
DATA COMMUNICATION BY BP. ...BPRAVEENROLEX
 
Dc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switchingDc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switchingSyaiful Ahdan
 

Similar to Lecture set 1 (20)

Switch networking
Switch networking Switch networking
Switch networking
 
UNIT-3 network security layers andits types
UNIT-3 network security layers andits typesUNIT-3 network security layers andits types
UNIT-3 network security layers andits types
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Switching
SwitchingSwitching
Switching
 
High performance browser networking ch1,2,3
High performance browser networking ch1,2,3High performance browser networking ch1,2,3
High performance browser networking ch1,2,3
 
unit 2_switchingtechniques.ppt
unit 2_switchingtechniques.pptunit 2_switchingtechniques.ppt
unit 2_switchingtechniques.ppt
 
Switching techniques
Switching techniquesSwitching techniques
Switching techniques
 
Switching techniques
Switching techniquesSwitching techniques
Switching techniques
 
switchingtechniques.ppt
switchingtechniques.pptswitchingtechniques.ppt
switchingtechniques.ppt
 
Switching Techniques - Unit 3 notes aktu.pptx
Switching Techniques - Unit 3 notes aktu.pptxSwitching Techniques - Unit 3 notes aktu.pptx
Switching Techniques - Unit 3 notes aktu.pptx
 
switching.ppt
switching.pptswitching.ppt
switching.ppt
 
SwitchingTechniques.ppt
SwitchingTechniques.pptSwitchingTechniques.ppt
SwitchingTechniques.ppt
 
Dcn lecture 3
Dcn lecture 3Dcn lecture 3
Dcn lecture 3
 
Week 3
Week 3Week 3
Week 3
 
Unit 3 CND physical layer_switching_pranoti doke
Unit 3  CND physical layer_switching_pranoti dokeUnit 3  CND physical layer_switching_pranoti doke
Unit 3 CND physical layer_switching_pranoti doke
 
Unit 3 cnd physical layer_switching_pranoti doke
Unit 3  cnd physical layer_switching_pranoti dokeUnit 3  cnd physical layer_switching_pranoti doke
Unit 3 cnd physical layer_switching_pranoti doke
 
DATA COMMUNICATION BY BP. ...
DATA COMMUNICATION BY BP.                                                    ...DATA COMMUNICATION BY BP.                                                    ...
DATA COMMUNICATION BY BP. ...
 
Dc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switchingDc ch10 : circuit switching and packet switching
Dc ch10 : circuit switching and packet switching
 
ITFT_Switching
ITFT_Switching ITFT_Switching
ITFT_Switching
 
Chapter#3
Chapter#3Chapter#3
Chapter#3
 

More from Gopi Saiteja

More from Gopi Saiteja (20)

Trees gt(1)
Trees gt(1)Trees gt(1)
Trees gt(1)
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearching
 
Heapsort
HeapsortHeapsort
Heapsort
 
Hashing gt1
Hashing gt1Hashing gt1
Hashing gt1
 
Ee693 sept2014quizgt2
Ee693 sept2014quizgt2Ee693 sept2014quizgt2
Ee693 sept2014quizgt2
 
Ee693 sept2014quizgt1
Ee693 sept2014quizgt1Ee693 sept2014quizgt1
Ee693 sept2014quizgt1
 
Ee693 sept2014quiz1
Ee693 sept2014quiz1Ee693 sept2014quiz1
Ee693 sept2014quiz1
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomework
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Cs105 l15-bucket radix
Cs105 l15-bucket radixCs105 l15-bucket radix
Cs105 l15-bucket radix
 
Chapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiencyChapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiency
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
Sorting
SortingSorting
Sorting
 
Solution(1)
Solution(1)Solution(1)
Solution(1)
 
Pthread
PthreadPthread
Pthread
 
Open mp
Open mpOpen mp
Open mp
 
Introduction
IntroductionIntroduction
Introduction
 
Cuda
CudaCuda
Cuda
 
Vector space interpretation_of_random_variables
Vector space interpretation_of_random_variablesVector space interpretation_of_random_variables
Vector space interpretation_of_random_variables
 

Lecture set 1

  • 1. Communication Networks Sanjay K. Bose 1 Lecture Set I Introduction
  • 2. Recommended Texts Texts: 1. A. L.eon-Garcia and I. Widjaja: Communication Networks 2. A. S. Tanenbaum: Computer Networks 3. D. Bertsekas and R. Gallagar: Data Networks References: 1. Kurose and Ross: Computer Networking 2. W. Stallings: Data and Computer Communication; Prentice-Hall, 1997. 2
  • 3. Introduction • An overview of networks, the Internet, services and protocols • Circuit Switching, Packet Switching • Store-&-Forward Operation in Packet Switching, Pipelining • Layered Network Architecture, Summary overview of the TCP/IP Network Layers 3
  • 4. 4 • Network Devices – Routers, servers, switches, multiplexers, hubs, modems, … • Communication links – fiber, copper, radio, satellite, .. • Protocols control sending, receiving of messages – e.g., TCP, IP, HTTP, FTP, PPP Elements of the Internet Local ISP Campus LAN Regional ISP router workstation server mobile The Internet is a loosely hierarchical, network of networks
  • 5. 5 Circuit Switching Direct connection through interconnected wires Circuit Switched Communication Network Packet Switched Packet switching preferred in computer communications Packet Switching Data divided into packets and sent through a network – no direct connection between the end nodes
  • 6. 6 Communication Through a Public Circuit Switched Network Modem Modem Typical way of setting up a Circuit-Switched connection between computers using a Public Switched Network such as the PSTN (Public Switched Telephone Network)
  • 7. Circuit Switching • Dedicated communication path between the end nodes set up through circuit switches of the network • Three phases – Circuit establishment set up circuit – Data transfer use circuit to send/receive data – Circuit disconnect disconnect the circuit Must have sufficient switching capacity and channel capacity to establish connection
  • 8. 8 Circuit Switching • Inefficient – Channel capacity dedicated for duration of connection – If no data is being transmitted, capacity is wasted • Set up (connection) takes time • Once connected, transfer is transparent – Data is not examined by network, no delay – Data rate is fixed for circuit-switching network – Both ends must operate at the same rate
  • 9. 9 Communication Through a Packet Switching Network • Network consists of interconnected routers or switches • Data transmitted in small packets – Data is organized into packets with size typically up to 1000 octets – Each packet contains a portion of user data (Data) plus some control information (Header) • Packets are received, stored briefly (buffered) and passed on to the next node – Store and forward causes packet delay Note that the Header is actually “overhead” as what we really want to send is just the Data. However, in packet switching the header is required to make sure that the packet reaches the destination packets Destination packets packets packets Routers or Switches Source
  • 10. 10 Using Packet Switching Intermediate nodes(routers) store the packet, decide the route, and forward the packet: processing delay packet header contains routing information
  • 11. 11 Packet Switching Implementations • Station breaks long message into packets • Packets sent one at a time to the network • Packets handled in two approaches – Datagram Service • For each packet, each node makes its own decision as to how to forward it so that it eventually reaches its destination – Virtual circuit • A path for the packet is pre-determined for the sender- receiver pair and the packet always follows this path
  • 12. 12 Datagram Packet Switching • Each packet contains a full destination address • Packets can take any practical route • Each packet treated independently • Packets may arrive out of order (receiver must re-order the packets) • Packets may go missing (end-nodes handle recovery of missing packets) 3 2 1 1 3 2 Store-&-Forward Operation required at each node for each packet
  • 13. 13 Virtual Circuit Packet Switching • Preplanned route established before any packets sent – Call setup establishes the route for data connection – All packets in a connection follow the established route • Each packet contains a virtual circuit identifier instead of destination address • No routing decisions required for each packet • Virtual circuit is not a dedicated path (may be shared) 3 2 1 3 2 1 Store-&-Forward Operation required at each node for each packet
  • 14. 14 Virtual Circuit vs Datagram Switching • Virtual circuit – Network can provide sequencing and error control – Packets are forwarded more quickly • No routing decisions to make – Less reliable • Loss of a node loses all circuits through that node • Datagram – No call setup phase • More efficient for short message or fewer packets – More flexible • Routing can be used to avoid congested parts of the network Intermediate nodes will need to do Store-&- Forward for both kinds of packet switching
  • 15. 15 Advantages of Packet Switching • Line efficiency – Single node to node link can be shared by many packets over time – Packets queued and transmitted as fast as possible • Data rate conversion – Each station 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 – Delivery may slow down • Priorities can be used • Robust against link and node failure
  • 16. 16 Store-&-Forward Operation in Packet Switching A BSwitch R bits/second R bits/second • A transmits a message of F bits to B in one packet • Header of h bits attached to make a packet of F +h bits • Link Speed R bits per second (bps) • No link congestion so no queueing delay Example Time to transfer message from A to the Switch seconds F h R   Time to transfer message from the Switch to B seconds F h R   Total Time to Transfer message from A to B 2 seconds F h R        Note that having more intermediate switches will cause more delays! Can we do better than this?
  • 17. 17 Store-&-Forward Operation in Packet Switching A BSwitch R bits/second R bits/second • Example (continued) Time to transfer a packet from A to the Switch 2 seconds F h R   Time to transfer a packet from the Switch to B Total Time to Transfer message from A to B 23 seconds F h R         2 seconds F h R   Pipelining (illustrated in the next slide) •A transmits message of F bits as two segments of F/2 bits each • Header of h bits attached to each segment to form packet of F/2 +h bits • After receiving packet 1, the Switch starts forwarding it to B while it receives packet 2. After packet 2 is received (and packet 1 is transmitted), the Switch starts forwarding packet 2 to B. Message may be divided into more than two segments
  • 18. 18 “Pipelining” Pipelining packets (of a multi-packet message) may improve overall delay performance when packets go through store-&-forward nodes in between A B Store-&-Forward Switch/Node time onepackettwopackets
  • 19. 19 Some Simple Thumb-rules for Pipelining in Store-&-Packet Transmissions • Generally better to divide a long message into smaller segments even though the header bits have to be added to each segment to form each packet (i.e. more overhead bits) • This is because Pipelining can then be used to reduce the overall message transfer delay • This would be even more effective when there are multiple switches between the source and the destination nodes • Avoid making the segments too small as then the added overhead of h bits per packet will begin to have a detrimental effect (i.e. higher delays)
  • 20. 20 What is a protocol? • Communications between computers requires very specific unambiguous rules • A protocol is a set of rules that governs how two or more communicating parties are to interact • The purpose of a protocol is to provide some type of communications services, e.g. • Internet Protocol (IP) – packet transfer • Transmission Control Protocol (TCP) – transfer reliability • Hyper Text Transfer Protocol (HTTP) – web service • Simple Mail Transfer Protocol (SMTP) – email service
  • 21. 21 Example of a Protocol (Calling Directory Assistance) “Do you have an address?” Caller “What name?” Give Name Caller replies System replies with number System replies System replies System replies Operator replies “Thank you, please hold” Give Address Caller replies Give City Name Dials Directory Assistance “What city”? Caller replies Operator replies Caller waits “Thank you, please hold” Caller waits Caller dials
  • 22. 22 Protocol “Layers” Networks are complex! • many “pieces”: – hosts – routers – links of various media – applications – protocols – hardware, software Question: Is there any hope of organizing the structure of network? This is where “layering” helps! Each layer does a small bit of the work required and the overall work is divided between the layers Basic Philosophy: Layer n at one node talks to Layer n at another node using the Layer n Protocol
  • 23. 23 Internet protocol stack • Application: supporting network applications – FTP, SMTP, HTTP • Transport: host-host data transfer – TCP, UDP • Network: routing of datagrams from source to destination – IP, routing protocols • Link: data transfer between neighboring network elements – PPP, Ethernet • Physical: bits “on the wire” Application Transport Network Link Physical
  • 25. 25 Protocol layering and data Each layer takes data from above • adds header information to create new data unit • passes new data unit to layer below application transport network link physical application transport network link physical source destination M M M M Ht Ht Hn Ht Hn Hl M M M M Ht Ht Hn Ht Hn Hl message segment datagram frame
  • 26. Internet Protocol (IP) • This is the protocol most commonly used for the Network Layer • Routers interconnect different networks • Host computers prepare IP packets and transmit them over their attached network (complexity at edge) • Routers forward IP packets across networks • Best-effort IP transfer service, no retransmission Net 1 Net 2 Router
  • 27. 27 Addressing & Routing • Hierarchical address: Net ID + Host ID (e.g. 128.100.11.1) • IP packets routed according to Net ID • Routers compute routing tables using distributed algorithm G G G G G G Net 1 Net 5 Net 3 Net 4Net 2 H H H H
  • 28. Transport Protocols • Host computers run two transport protocols on top of IP to enable process-to-process communications • User Datagram Protocol (UDP) enables best-effort transfer of individual blocks of information • Transmission Control Protocol (TCP) enables reliable transfer of a stream of bytes Internet Transport Protocol
  • 29. 29 Internet Applications • Internet applications run on either TCP or UDP • TCP: HTTP (web); SMTP (e-mail); FTP (file transfer); telnet (remote terminal) • UDP: DNS, RTP (voice & multimedia) • TCP & UDP incorporated into computer operating systems • Any application designed to operate over TCP or UDP will run over the Internet!!!