Title: MSc in Industrial Computing Systems Computer Communications Lecture 6'
1MSc in Industrial Computing SystemsComputer
CommunicationsLecture 6.
- Lecturer Dr. David Al-Dabass
- Room N315
- Tel. 6015
- email david.al-dabass_at_doc.ntu.ac.uk
2RADIO NETS
Major Characteristics - all nodes receive
every transmission, i.e. they are broadcast
nets. - radio is used for ranges up to 200/300
miles. - satellites are used for longer ranges.
Major Problem - How to assign channel to
Node?Historically University of Hawaii
developed 1st working computer network using
broadcast method, hence terminology has Hawaiian
flavour.Principles of Operation a) sender
sends its Packet with destination address. b)
every node receives packet and checks for errors
and destination address. c) node accepts packet
if node address packet destination address (in
the header) else ignores the packet.
3Problem - How can sender be sure that packet
has been received by destination? Need a
technique to ensure reliable communication.Pur
e ALOHA a) node sends out packet at any
time. b) after finishing transmission, node
waits for positive acknowledgement from
destination. c) if no ACK received within a
time-out period, sender re-sends after waiting
for a random period. Causes of Error if
more than one node tries to send out packet
Collision occurs (multiple transmission at
the same time). To minimise probability of
collision, resend after a random waiting period
(supplied by a local random number generator)
this will spread out the transmissions.
Transmission Node 2
Transmission Node 1
Second Transmission Node 1
Second Transmission Node 2
time-out
time-out
Channel wasted time
Random waiting for Node 2
Random waiting for Node 1
4Maximum wasted time is approximately 2t
collision when node 2 starts sending just before
end of node 1 transmission.
Slotted ALOHATime is divided into slots. Nodes
send out packets at start of slot time only. In
case of re-transmission node waits for a random
number of time slots and then re-sends.
Transmission Node 1 and Node 2
Second Transmission Node 1
Second Transmission Node 2
time-out
Channel wasted time
Random waiting for Node 2
Random waiting for Node 1
Collision wasted time t, i.e. ½ pure
ALOHA.Intelligent Re-transmission Algorithms
keep a record of the number of re-transmissions
over past 10 minutes (for example) and adjust
range of random waiting periods accordingly. Hi
re-sending rates means busy traffic need wider
waiting period range low re-sending rate means
slack traffic narrow waiting period range
optimal for traffic.
5Carrier Sense Multiple Access (CSMA)The
carrier signal (remember modulation lecture) is
monitored by all nodes when its absence is
sensed, channel is assumed to be free.A node
listens to the traffic on the channel and only
starts sending when it detects silence the
carrier transports the data and has standard
frequency easily detected by the
node.Collision although it is less likely than
in the ALOHA schemes, we can still get more than
one node starting to send as soon as they detect
silence. Re-sending after positive ACK absence
time-out is as before i.e. wait for a random
period before re-sending.
End of transmission is not a sharp line depends
on the distances
Start of transmission
Channel free
Instant when signal is received by other nodes
(break silence)
Propagation delay d Critical period when all
other nodes (except one just started sending)
think channel is free may start sending
Maximum wasted time t d, when node B starts
sending just before node A carrier reaches it.
6Solution to the collision problemAfter the
time-out period wait a random interval before
sensing again to re-send.
Node B starts sending
Critical period d
Node A starts sending
Time-out random waiting period 1
t
Time-out random waiting period 2
Time-out random waiting period 3
Wasted time
Sensing no carrier signal free to re-send
Encountered carrier signal continue waiting for
another random period of time
Typical Re-transmission Sequence after a
Collision caused by propagation delay.
7Satellite NetsA geo-stationery satellite (22000
miles above Earths surface) is used as a line of
sight relay station.All station (nodes) send to
satellite satellite sends back to all
nodes.Problem propagation delay ? ¼ sec. very
long in computer terms need special schemes to
minimise its effect on communication systems
efficiency.Solution a) Divide time into
Frames. b) Divide Frame into Reservation and
Data (packet) part c) Divide each part into
slots Reservation slots and packet slots.
Example reservation slot 1 contains Node
Identification number which is assigned to send
during packet slot 1.
8 d) During each reservation slot the
satellite sends out the node Identification
number for which the corresponding packet
number has been reserved. Each node then waits
for its packet slot number time to arrive
before sending out its packet (packet contains
destination address). e) Slots are re-allocated
to other nodes as they become vacant. Special
competition algorithms are used to allow
nodes to compete for empty slots.
Questions1. How do radio nets operate? What is
the major problem with radio nets?2. What is
pure ALOHA? Use diagram to explain how collision
is resolved.3. What is Slotted ALOHA? How does
it manage to reduce wasted time? How much time is
saved?4. How can Slotted ALOHA be improved?5.
What is Carrier Sense Multiple Access (CSMA)?6.
What is Collision? Use diagram to explain the
effect of propagation delay on collision and
comment on transmission wasted time.7. Use
diagram to explain how random waiting periods are
used to deal with collision.8. Why are
satellites used for computer communications? Use
diagram to explain the content of a typical time
frame.
9LOCAL AREA NETWORKS (LAN)Characteristics of
LANs a) Spread out over small areas (around 1
mile) between furthest points. b) usually run
and owned by a single organisation. c) Node is
special interface, not a general purpose
mini-processor lowest level protocol is built
(hardwired) in the interface. d) Suitable for
small applications using PCs, shared resources
such as printers and disk drives. Examples
Office Information Systems and Electronic
mail. e) Compared with Wide Area Networks they
involve smaller computers much cheaper have
simpler protocols lower error rates (1 in 106
packets) high bandwidth (1 10 MHz). f)
They are usually of 2 types Ring or Cable (Bus).
Cable (Bus) Nets a) It uses coaxial cable and
a broadcast technique similar to Radio Nets e.g.
Ethernet (invented buy Xerox) and may be used
with most transmission media twisted pair,
coaxial cable, optical fibre cable and radio.
Uses signal itself without modulation. b) It
uses a CSMA with Collision Detection technique a
node listens to the channel while sending its
packets if it detects other signals beside its
own it aborts immediately. Re-tries again
after random waiting period. This technique is
called CSMA-CD despite the absence of a carrier.
10 c) Very efficient uses some 95 of bandwidth
because it stops as soon as it detects
collisions, i.e. does not wait for positive ACK
time-out to realise collision has occurred.
However, still has time-out to re-send after
absence of positive ACK from destination.
Tap
Passive medium (wire)
Transceiver
Station
d) transceiver handles all access procedures (to
medium) Listen, Send, Collision-Detect,
random-wait period, (range according to traffic
load), re-try and generate check-sum. Receive,
checksum calculation and error detection are done
in hardware. e) Checksum mismatch causes
receiver to send negative ACK asking for re-send.
SYN
Destination Address
Source Address
Data
Checksum
8 bytes
8 bytes
4000 bytes (for example)
16 bits
11Ring Nets a) Cambridge ring was the first and
most well-known in UK. USA has many.
b) A repeater at each node receives data from
one side of the ring and sends it out on the
other side flow is one direction only. c)
Data is sent in a mini-packets
Start of packet
Destination Address
Source Address
Data
Status/Control bits (there is bit called
accepted here)
8 bits
8 bits
16 bits (for example)
Full bit (0 empty)
12 d) A station wishing to send examines Full bit
of packets passing by and uses a packet having
a 0 full bit it then sets the full bit,
destination and source addresses and data and
sends packet to next repeater. e) Mini-packets
propagate round the ring to all stations.
Repeater in each station compares Destination
address with its own address and if they match it
copies data into its own register and sets
accepted code in status/control bits. f)
Repeater also compares source address with its
own to detect arrival of a packet it has
previously sent. If it is the same, it checks
status code if accepted or switched off it
clears full bit and passes empty packet to next
repeater for use by other stations if busy
it re-sends the packet. g) A twisted pair of
wires is used between stations. Monitor station
uses another pair to power all repeaters.
interface PC can be switched off or removed
completely without interfering with the ring
operation.
COMPARISON between Broadcast and Ring Nets. a)
Broadcast net has low delay as signal does not
pass through repeaters. b) As traffic
increases, collision occurs in broadcast nets
thus causing delay. No collision is possible
with ring nets. c) Empty packets are allocated
in round robin way in the ring. Sudden increases
in traffic does not disrupt transmission too
much.
13Questions1. What are Local area Networks
(LAN)?2. What types of LAN are there?.3. One
type of LAN uses a collision detection method to
improve efficiency. Explain.4. What are
functions of the Transceiver?5. Use a diagram
to explain the contents of an Ethernet packet.
6. What is a Repeater?7. Use diagram to
explain the content of a ring LAN packet. Why
does the repeater examine the source address?8.
How does a full packet get emptied? Under what
circumstances does a packet go more than once
round the ring?9. Compare and contrast bus and
ring based LANs.
14PROTOCOL FUNDAMENTALSExample X25 Network
Access Protocol.
User A Top Layer User B Process A Process
BHost A Host B Node A Lower Layer Node
B Hierarchy of Communication Layers
15Layer Characteristics a) Each Layer has its
own protocol. b) Each layer serves the layer
above by using the layer below to transport
data. c) A layer connects two similar objects
e.g. process to process, node to node etc.Layer
ProtocolA protocol at each layer is needed to
regulate a) Flow control. - send/receive
data as fast as bandwidth allows - it tries to
use long messages to minimise overheads, BUT it
is limited by i) amount of storage memory in
each node ii) obligation to give other nodes
equal chance to send/receive their data at
high speed. b) Error Control. - send other
information beside data so the receiver can
discover errors, and if possible correct them
or ask for re-send.
16X25 ProtocolIt is an Access protocol -
Between Host and Node to enable host to access
the network. - Node is called Exchange or Data
Communication Equipment (DCE). - Host is called
Data termination Equipment (DTE).
Network
X25
X25
DCE
DCE
DTE
DTE
Level 1 The Physical Circuit a) It specifies
electrical signals, voltage, connectors (pin
functions) at the DTE and DCE ends. - The
standards are defined in CCITT X21
recommendations.
17Host/Node Boundary
Host
Node
Level 3
Level 3
Level 2
Level 2
Modem
Level 1 interface supplied by BT (PTT)
Level 1 interface bought with Host computer
b) Communications between levels 1 and 2 consist
of 2 parts - the bit stream to be sent (level
2 to 1) or received (level 1 to 2). - control
and status signals such as i) modem
on ii) link is ready to transport data.
Level 2 The Link Level a) Protocol used here
is the Higher Data link Protocol (HDLC) (called
Synchronous Data link Protocol by IBM). b)
Level 2 passes Frames of data to level 1. Each
frame contains - Protocol Information. -
Data from level 3 to be sent to level 3 in
destination host.
18 c) Frame types - Information each can be
either - Supervisory - Command or -
Un-numbered - Response d) Phases of
communication between source and destination
hosts at level 2 - Make connection with
destination level 2 (Link). - Send data
(passed down from level 3). - End the
connection. e) Frame format - Supervisory
or Un-numbered frames
Start flag
8 bits
Address Field
Command Field
Frame Check Sequence (FCS)
End flag
8 bits
8 bits
16 bits
8 bits
19 - Information frames
Start flag
8 bits
Address Field
Command Field
Data n-bits (Data packet from level 3)
FCS
End flag
8 bits
8 bits
16 bits
8 bits
Level 2 envelope to transport level 3 data packet
20Questions1. User, Process, Host and Node are
elements that make up each station in a network
discuss the hierarchical structure of computer
communication structure.2. Explain the terms
DCE, DTE and X25.3. What is the function of the
physical layer?4. What are HDLC and SDLC?5.
What are frames and how many types are there in a
typical layer 2 communication architecture?
Explain their content with respect to level,
protocol and data.
21Frame Fields a) Flag Field (8 bits)
Start flag 8 bits
End flag (8 bits)
- 8 bit Start and End flags 01111110, i.e. 6
ones in a row. - To make it identifiable as
a start/end flag no other bit sequence is
allowed to have 6 ones in a row. - Sender
puts 0 after every 5 ones (bit stuffing). -
Receiver i) Examines bit after 5 ones if
bit 1 this must be a start/end flag. If bit
0 discard. - Error checking If more than 6
ones, an error must have occurred, abort
frame. b) Address Field (8 bits)
Determines direction of flow 80H for flow
from Host to network (DTE to DCE)
C0H for flow from network to Host (DCE to DTE).
22 c) Information Field Contains data received
from level 3 for transmission. This field is not
present in Supervisory or Un-numbered frames
but in Info frames only. d) Frame Check
Sequence Field (16 bits) Contains the result
of the generating polynomial algorithm (216 212
25 1). e) Command Field (8 bits)
Contents depends on frame type -
Information Frames bit 1 0 usually this frame
is of the Command type (i.e. not Response type)
1 2 3 4 5
6 7 8
0
P/F
Number of received frames, n(r), (positive ACK
piggy-backed on frame going in the opposite
direction)
Sequence number of this frame (number of frames
sent so far, n(s)
Poll (Command Frames) Final (Response Frames)
23 - Supervisory Frames bit 1 and 2 set to 102.
1 2 3 4 5
6 7 8
1
0
P/F
Code for supervisory data 00 Receiver
ready, RR 10 Receiver Not ready, RNR
01 Reject, REJ
positive ACK for Info frames received, n(r)
- Un-numbered Frames bit 1 and 2 set to
112.Un-numbered as it holds no frame sequence
numbers (sent or received frame type may be
either Command or Response).
1 2 3 4 5
6 7 8
1
1
P/F
Codes for Un-numbered signals, e.g. -
un-numbered ACK, UA - Command reject, CMDR -
Disconnect