Networks and Communications.
Lecturer - Eric Goodyer
Lecture notes prepared by Dr Amelia Platt
with minor revisions and additions by Eric Goodyer
Last Revision January 2000
Recommended Reading:-
Computer Networks
by A Tanenbaum, 3rd edition, Prentice Hall
Data Communications, Computer Networks and Open Systems
by Fred Halsall, 4th edition, Addison Wesley
Computer Networks: A First Course
by Jean Walrand, Aksen Associates
Data and Computer Communications
by W Stallings, 3rd edition, Macmillan
Packet Switching and X25 Networks
by Simon Poulton, Pitman
1 Introduction
1.1 Different types of Networks
Wide Area Networks (WANs)
Local Area Networks (LANs)
Metropolitan Area Networks (MANs)
1.2 Differences between WANs, LANs & MANs
Coverage Area
LANs cover a small area, typically a room or building
MANs cover a larger area, typically a city or county
WANs have no limit on size or area covered
Ownership
LANs are private - not owned by PTTs
MANs can be private or public
WANS can be private or public
Transmission Rates (Speed)
LANs typically have high data rates compared to WANs
MANs have higher rates than LANs
WANs have low data rates
Topologies
LANs and MANs typically have ring and bus topologies
WANs have mesh topologies
Type of Transmission
LAN and MAN broadcast by nature of topologies
WANs private (user to user)
Signalling
All represent 'bits' differently on transmission lines
However the above picture is changing rapidly and the distinction is becoming increasingly blurred
This course will consider these types of networks in terms of
Network access techniques
Protocols
2 Communication Architectures
2.1 Problems associated with communication
The task of a communication is very complex. To give an understanding of the complexity, below is a small sample of the type of problems which must be solved by the communications software:-
- How to connect two users together - communications channel.
- How to represent signals on a communications channel.
- How to detect and correct errors on channel to ensure error free transmission.
- How to allow users to gain access to the communications channel.
- How to route data to the correct user across a network.
- How to ensure the receiver interprets the data correctly - the receiving machine may differ from the sending machine.
- How to allow the user to run applications over the channel.
Now consider a number of communication situations :-
Two users at either end of
a piece of wire
a network
a set of interconnected networks
Clearly, connecting two users across a set of interconnected networks, is much more complex when compared to connecting the same users over a single piece of wire.
2.2 Communication Architectures
The solution is to break the overall problem down into a set of small, well defined tasks. The result is typically referred to as a communications architecture (or structure). There are a number of such architectures, and two of the most widely used are :-
ISO Open Systems Interconnection (OSI) 7 layer reference model.
TCP/IP reference model
2.3 OSI 7 Layer Reference Model
Each layer is intended to perform a specific task in the overall problem of communication. Each layer is independent of all the others. Communication with the layers immediately above and below is via a well defined interface. Layer N is said to request service from layer N-1 (below) and provide a service to the layer N+1 (above). Layer N in one protocol stack communications with the same layer in a remote protocol stack via the layers below. This is known as virtual or peer-to-peer communication.
In particular, the OSI 7 layer model defines 7 layers. At the end points, the 7 layer model can be viewed as the :-
Upper layers (5-7) (Application layers - (7)Application, (6)Presentation, (5)Session)
Transport layer (4) (Interface between subnet and application layers)
Lower layers (1-3) (Subnet - (3)Network, (2)Link, (1)Physical)
2.4 TCP/IP (Transmission Control Protocol/ Internet Protocol)
Another reference model which is very widely used is the TCP/IP Reference Model - it is used for example in the Internet.. TCP/IP defines only 4 layers -
Host-to-network layer
Allows host to connect to the network so that IP Datagrams can be sent
Internet layer
Allows host to inject packets onto the network and to route packets
Transport layer
Provides a peer-peer link between source & destination
Application layer
Higher level protocols, such as TELNET, FTP
It is discussed in more detail in section 11.5 below
3 Overview of Switching methods
There are 2 types of switching methods
Circuit switching
Packet switching
3.1 Circuit switching
Set up a dedicated end-to-end connection. Switching implies that the connection is switched through a number of intermediate exchanges. How could this be modelled?
E.g. Present telephone networks, mobile cellular networks
3.2 Packet switching
Information is broken into segments. These segments are called packets at layer 3 and frames at layer 2. More generally they are called Protocol Data Units (PDUs).
Packets are sent individually through the network.
What problems could this cause for voice traffic?
E.g. Internet, Superhighway, most data networks
N.B. There are a number of variants of packet switching, but the same principle applies. See Figure at the end.
Advantages and disadvantages of the two switching methods
Circuit switching?
Private, secure, not subject to congestion
But inefficient use of bandwidth, pay for time call is connected regardless of amount of data
Packet switching?
Shared use of high cost components, efficient use of bandwidth, only pay for data in transit
But not secure or private, subject to congestion
4 Delays associated with networks
4.1 Propagation Delay
Time taken for a signal to travel from the transmitter to the receiver
Speed of light is the fastest a signal will propagate
3 X 108 m/sec through space
2 X 108 m/sec through copper
4.2 Transmission Delay (Time)
Time taken to put the bits on the transmission media
Transmission speed of 2Mbps means
2 X 106 bits can be transmitted in 1 second
4.3 Processing Delay
Time taken to execute protocols
check for errors
send Acks etc.
4.4 Queuing Delay
Only in packet switched networks
Time spent waiting in buffer for transmission
Increases as load on network increases
4.5 Round Trip Delay
Round trip delay is defined as the time between the first bit of the message being put onto the
transmission medium, and the last bit the acknowledgement being received back by the
transmitter. It is the sum of the all the delays detailed above. The round trip delay is a critical factor in the performance of packet switched protocols and networks. Indeed, it has been stated that a good algorithm for estimating the round trip delay is at the heart of a good packet switch protocol.
5 Properties of Signals
5.1 Bandwidth
Bandwidth is a measurement of the width of a range of frequencies and is measured in hertz (Hz).
In data networks bandwidth is normally specified as bits per second (BPS)
Shannon-Hartley Theorem states that
Dmax = Blog2(1 + S/N)
where Dmax is the maximum bit rate
B is the bandwidth in Hz
and S/N is the signal to noise ratio
All transmission mediums are degraded by ‘noise’. If the average power of the signal is given by S, and the average power of the noise is given by N, then the signal to noise ratio is given by S/N. The greater the value of S/N then the greater is the theoretical transmission rate of that medium.
5.2 Square wave properties
Square wave is composed of sine waves with frequencies:-
Fundamental frequency F0+
Odd harmonics 3F0+, 5F0+, 7F0+, 9F0+... (the 3rd, 5th, 7th, and 9th harmonics)
Note, the fundamental frequency is equal to the basic repetition frequency of the wave form.
The amplitude of the harmonics are increasingly proportional to the harmonic number.
Amplitude of the 3rd harmonic is 1/3 of the amplitude of the fundamental frequency.
Amplitude of the 5th harmonic is 1/5 of the amplitude of the fundamental frequency.
Sine waves up to and including the 9th harmonic represent over 95% of the signal power.
- Implications.
Don't need to receive all of the harmonics to receive the signal.
Must receive at most (at least) up to the 9th harmonic.
Note : The more harmonics received, the flatter the peak or trough.
The graph below shows a square wave that consists of sine waves up to the 9th harmonic only.
5.3 Signal distortion
Attenuation
Decrease in the amplitude of the transmitted signal.
Attenuation increases with distance, repeaters must be used to restore signal to transmitted level.
Attenuation increases with frequency, repeaters must also take this into consideration.
Propagation delay
Propagation delay varies with frequency.
So various frequencies of a signal propagate at different rates.
Clearly they will incur different amounts of delay.
As bit rate increases, so does the probability of frequencies from one signal interfering with the next.
The longer the transmission media then the more is the ‘spread’ of the component frequencies of the original transmitted square wave.
Noise
There are different sorts of noise, which effect different media :-
Thermal noise. All electronic components generate ‘noise’ internally; the level of this noise is related to the temperature of the electronic components, thus the term ‘thermal noise’
Atmospheric noise. This is electrical interference induced into the electronics as a result of external electromagnetic radiation. This includes interference from nearby electrical equipment, such as computers, mains switches and CRTs, and also interference from radio waves. These sources of interference are also known as RFI, or Radio Frequency Interference, and EMC, or Electro-Magnetic Coupling.
RFI/EMC can be reduced by ‘good wiring practice’. This means ensuring that there are quality connections between cables, that good earth connections are made , and that protective shields are wrapped around transmission cables.
Ringing. If cables are incorrectly terminated, then some of the energy in the transmitted signal is reflected back down the cable from which it came. This results in an effect that is similar to an optical interference pattern, with a characteristic ‘ringing’ distortion of the received signal. It is a major cause of distortion in high speed networks that are not correctly terminated, or have used the wrong (typically cheaper) cables.
6 Physical Layer
These describe the electrical and mechanical interface necessary to establish a communications path.
Layer 1 protocols are concerned with the physical and electrical interfaces. It defines for example:-
Connection types and allocation of signals to pins
Electrical characteristics of signals which includes bit synchronisation and identifying a signal element as a 0 or 1
Put simply, layer 1 is responsible for transmitting and receiving the signals.
6.1 RS232/V.24
Signal voltage levels
-3V to -25V binary 1 for data, OFF for a control signal
+3V to +25V binary 0 for data, On for a control signal
25 Volts is the maximum rating for a line without a load. In practice RS232/V24 signals are set to typically be +-12V
Use of RS232/V.24 as DTE/DCE interface standard
Ground Signals
Pin 1 (SHG) Protective Ground / Shield Ground to reduce external interference
Pin 7 (SIG) Signal Ground - provides a reference for other signals
Transmit and Receive
Pin 2 (TxD) Transmit Data
Pin 3 (RxD) Receive Data
Maintaining a Connection / ‘Hardware Handshaking’
Pin 6 (DSR) Data Set Ready, Modem indicates to DTE that it is ready, i.e. connected to a telephone wire
Pin 20 (DTR) Data Terminal Ready, DTE uses this to prepare the modem to be connected to the telephone line. If it is placed in an OFF condition it causes the modem to drop any connection in progress. Thus the DTE ultimately controls the connection.
‘Hardware’ Flow Control
Pin 4 (RTS) Request to Send, Sent by DTE to modem to prepare it for transmission.
Pin 5 (CTS) Clear to Send, Modem indicates to DTE that it is ready to transmit.
Pin 8 (CD) Carrier Detect, Sent by modem to DTE, to inform it that a signal has been received from the other end of link.
Other
Pin 22 (RI) Ring Indicator, sent by modem to DTE to inform it that a ringing signal has been received from the other end of the link. Used by auto-answer modems to wake-up the attached terminal.
6.2 X.21 interface
X.21
Full duplex
Synchronous Interface
15 pin connector, but only 8 defined - these are explained below
Ground Signals
G - Ground Signal
Ga - DTE common return
Clocks
S - Signal element Timing (bits)
B - Byte Timing
DTE to DCE
T - transport
C - control
T carries bit stream
C indicates how it should be interpreted
Three inactive states are defined as follows:-
T = 1 C=OFF interpreted as DTE ready
T = 1 C=OFF interpreted as DTE not ready due to abnormal condition
T = 0101.. C=OFF interpreted as DTE operational but not ready. Used for flow control.
DCE to DTE
R - Receive
I - Indication
R carries bit stream
I indicates how it should be interpreted
Three inactive states are defined in a similar way as for DTE to DCE
7 DIGITAL AND ANALOGUE SIGNALS
There are two types of data :-
Digital
Analogue
There are two types of transmission :-
Digital
Analogue
This gives rise to 4 potential situations :-
Digital data - Analogue transmission
Digital data - Digital transmission
Analogue data - Analogue transmission
Analogue data - Digital transmission
What are examples of digital data?
What are examples of analogue data?
When the types of data and the transmission are not the same, data must be changed to suit the transmission media.
Analogue Signals
Analogue signals are continuous waveforms. The absolute level of the signal can be any value between full ON to full OFF. For example a pure sine wave has the following form -
Digital Signals
Digital signals can only have one of two values, full ON (or logic level 1) and full OFF (or logic level 0).
So how can we convert a continuous analogue signal into a digital signal?
7.1 Pulse Code Modulation
An analogue signal can be converted into a digital signal by a process known as Pulse Code Modulation. It is achieved by slicing up the analogue signal in time, at regular sampling intervals. On each sample instance the absolute level of the analogue signal is measured, and converted into a binary number. The resolution of the conversion is given by the number of bits allowed for each samples binary representation. So if we sample our original sine wave using only 3 bits we will achieve the following result -
Note that there are 8 discrete levels, as three binary bits gives a maximum number of quantisation levels of only 8. The more bits that we have, the better will be the digital representation of the analogue signal. So if we use 8 bits (i.e. 256 quantisation levels) we obtain the following representation of the signal -
Each individual sample can now be converted into a binary number. So is we used a 3 bit ADC, then each sample would consist of just three bits. A digital data link transmits the sample data as a digital bit stream. The receiver can reconstruct the original analogue signal by using a Digital to Analogue Converter (DAC).
This technique, of sampling an analogue signal, and generating a stream of digital data, is known as Pulse Code Modulation.
7.2 Sampling Rate
We can improve the representation of an analogue by increasing the number of quantisation levels. We can also improve the representation by increasing the sampling rate.
If we decrease the sampling rate we can reach a point where the representation is so poor the receiver can no longer reconstruct the original analogue signal. This limit is given by Nyquist’s Theorem, which states that in order to sample a signal with a frequency F then the minimum sampling rate is 2F.
7.3 Companding
Let us assume that we are using an 8 ADC. The quantisation level represents the minimum level of uncertainty that is always present in any sampled signal. This uncertainty degrades the Signal to Noise (S/N) ratio of the transmission link. As the uncertainty (or quantisation noise) is always a fixed level, the degradation of S/N is worse when the overall signals level are low.
One solution to this is the process known as companding. Instead of using an 8 bit ADC, we instead use a 6 bit ADC. The other two bits are used to represent a compression factor that is applied to the signal before the signal is presented to the ADC.
The full scale input level of the ADC is set to be 1/16 of maximum allowed input signal. So if a signal is low, it can still use the full range of the ADC, thereby minimising the quantisation noise. Higher level signals are reduced (or compressed) to fit the ADC range. The final digital representation consists of two bits that represent the compression factor, and 6 bits that represent the absolute value of the signal as seen by the ADC.
7.5 Modulation Techniques
The public switch telephone network (PSTN) was designed for carrying analogue (i.e. voice) signals, not digital data. It was not designed to carry digital signals, which would switch the voltage levels on the line between OFF and full scale ON. The bandwidth of voice telephone lines is little more then 3 kHz, which is far too small for today’s data communications demands; also old style PULSE DIALLING telephone exchange would attempt to interpret binary switched signals as ‘call progression tones’ (e.g. dialling, ringing line busy etc.).
So how can we transmit digital data over the PSTN?
The solution to this problem is to modulate the digital information onto an analogue carrier signal. This is achieved by one of three main techniques -
1) Amplitude Shift Keying (ASK)
2) Frequency Shift Keying (FSK)
3) Phase Shift Keying (PSK)
In order to connect a digital data source to a telephone line we use a piece of equipment known as a MODULATOR/DEMODULATOR or MODEM for short. The modulator part of a MODEM converts the digital data that is to be transmitted into a modulated analogue signal, the demodulator part accepts a modulated analogue signal off of the line and turns it back into digital data.