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 B Switch
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
secondsF 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 secondsF 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 B Switch
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
tim
e one p
acket
two p
ackets
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
H t
H t H
n H
t H n H
l
M
M
M
M
H t
H t H
n H
t H n H
l
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 4 Net 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!!!
Top Related