Unit II – overview of wireless Network Wireless transmission: Electromagnetic spectrum, Radio...
-
Upload
matthew-malone -
Category
Documents
-
view
218 -
download
0
Transcript of Unit II – overview of wireless Network Wireless transmission: Electromagnetic spectrum, Radio...
Unit II – overview of wireless Network Wireless transmission: Electromagnetic
spectrum, Radio microwaves, Infrared, Lightweight Spread Spectrum system.
Model switching techniques: circuit switching, packet switching, and message switching,
Data link layer design issues: Services, Framing, Error and flow control, stop-and-wait protocol, sliding window protocol.
Multiple Access control sub layer, Aloha, CSMA, CSMA/CD , CA.
The Electromagnetic Spectrum
The Electromagnetic SpectrumThe EM spectrum is the ENTIRE range of EM waves in order of increasing frequency and decreasing wavelength.
As you go from left right, the wavelengths get smaller and the frequencies get higher. This is an inverse relationship between wave size and frequency. (As one goes up, the other goes down.) This is because the speed of ALL EM waves is the speed of light (300,000 km/s).
Things to RememberThings to RememberThe higher the frequency, the more energy The higher the frequency, the more energy the wave has.the wave has.
EM waves EM waves do not require media do not require media in which to in which to travel or move.travel or move.
EM waves are considered to be EM waves are considered to be transverse transverse waves waves because they are made of vibrating because they are made of vibrating electric and magnetic fields at right angles electric and magnetic fields at right angles to each other, and to the direction the to each other, and to the direction the waves are traveling.waves are traveling.Inverse relationship between wave size and frequency: as wavelengths get smaller, frequencies get higher.
Radio wavesRadio waves: Have the longest wavelengths : Have the longest wavelengths and the lowest frequencies; wavelengths and the lowest frequencies; wavelengths range from 1000s of meters to .001 mrange from 1000s of meters to .001 m
Used in: RADAR, satellite Used in: RADAR, satellite transmissionstransmissions
The Waves (in order…)The Waves (in order…)
Infrared waves Infrared waves (heat): Have a shorter (heat): Have a shorter wavelength, from .001 m to 700 nm, and wavelength, from .001 m to 700 nm, and therefore, a higher frequency.therefore, a higher frequency.
Used for finding people in the dark and in Used for finding people in the dark and in TV remote control devicesTV remote control devices
Visible lightVisible light: Wavelengths range from 700 nm : Wavelengths range from 700 nm (red light) to 30 nm (violet light) with (red light) to 30 nm (violet light) with frequencies higher than infrared waves.frequencies higher than infrared waves.
These are the waves in the These are the waves in the EM spectrum that humansEM spectrum that humanscan see.can see.
Visible light waves are a very Visible light waves are a very small part of the EM spectrum!small part of the EM spectrum!
ROY G. BVROY G. BV
redred
orangeorange
yellowyellow
greengreen
blueblue
violetviolet
Visible LightVisible Light
Remembering the OrderRemembering the Order
Ultraviolet LightUltraviolet Light: Wavelengths: Wavelengths range from 400 nm to 10 nm; the frequency (and therefore the energy) is high enough with UV rays to penetrate living cells and cause them damage.
Although we cannot see UV light, bees, bats, butterflies, some small rodents and birds can.
UV on our skin produces vitamin D in our bodies. Too much UV can lead to sunburn and skin cancer. UV rays are easily blocked by clothing.
Used for sterilization because they kill bacteria.
X-RaysX-Rays: Wavelengths from 10 nm to .001 : Wavelengths from 10 nm to .001 nm. These rays have enough energy to nm. These rays have enough energy to penetrate deep into tissues and cause penetrate deep into tissues and cause damage to cells; are stopped by dense damage to cells; are stopped by dense materials, such as bone.materials, such as bone.
Used to look at solid structures, such as Used to look at solid structures, such as bones and bridges (for cracks), and for bones and bridges (for cracks), and for treatment of cancer.treatment of cancer.
Gamma RaysGamma Rays: Carry the most energy and : Carry the most energy and have the shortest wavelengths, less than have the shortest wavelengths, less than one trillionth of a meter (10one trillionth of a meter (10-12-12). ).
Gamma rays have enough energy to go through Gamma rays have enough energy to go through most materials easily; you would need a 3-4 ft thick most materials easily; you would need a 3-4 ft thick concrete wall to stop them!concrete wall to stop them!
Gamma rays are Gamma rays are released by nuclear released by nuclear reactions in nuclear reactions in nuclear power plants, by power plants, by nuclear bombs, and by nuclear bombs, and by naturally occurring naturally occurring elements on Earth.elements on Earth.
Sometimes used in the Sometimes used in the treatment of cancers.treatment of cancers.
Gamma RaysGamma Rays
This picture is a This picture is a “scintigram” “scintigram” It shows an It shows an asthmatic person’s asthmatic person’s lungs.lungs.
The patient was given a slightly radioactive The patient was given a slightly radioactive gas to breath, and the picture was taken gas to breath, and the picture was taken using a gamma camera to detect the using a gamma camera to detect the radiation. radiation.
The colors show the air flow in the lungs.The colors show the air flow in the lungs.
SPREAD SPECTRUMSPREAD SPECTRUM
In spread spectrum (SS), we combine signals from In spread spectrum (SS), we combine signals from different sources to fit into a larger bandwidth, but our different sources to fit into a larger bandwidth, but our goals are to prevent eavesdropping and jamming. To goals are to prevent eavesdropping and jamming. To achieve these goals, spread spectrum techniques add achieve these goals, spread spectrum techniques add redundancy.redundancy.
Frequency Hopping Spread Spectrum (FHSS)Direct Sequence Spread Spectrum Synchronous (DSSS)
Spread spectrum
Frequency hopping spread spectrum (FHSS)
Frequency selection in FHSS
FHSS cycles
Bandwidth sharing
DSSS
DSSS example
SwitchingCircuit SwitchingPacket SwitchingMessage Switching
Switched Network
Circuit-Switched Network
Switch
Folded Switch
Crossbar Switch
l
Multistage Switch
Switching Path
Switching Path
TDM without TSI
TDM with TSI
Time-Slot Interchange
l
TST Switch
Datagram Approach
Datagram Approach, Multiple Channels
Switched Virtual Circuit
Switched Virtual Circuit
Switched Virtual Circuit
Message Switching
In large networks there might be multiple paths linking sender and receiver. Information may be switched as it travels through various communication channels. There are three typical switching techniques available for digital traffic.
● Circuit Switching ● Message Switching ● Packet Switching
●Circuit switching is a technique that directly connects the sender and the receiver in an unbroken path.
●Telephone switching equipment, for example, establishes a path that connects the caller's telephone to the receiver's telephone by making a physical connection.
●With this type of switching technique, once a connection is established, a dedicated path exists between both ends until the connection is terminated.
●Routing decisions must be made when the circuit is first established, but there are no decisions made after that time.
Circuit Switching
●Circuit switching in a network operates almost the same way as the telephone system works.●A complete end-to-end path must exist before communication can take place.●The computer initiating the data transfer must ask for a connection to the destination.●Once the connection has been initiated and completed to the destination device, the destination device must acknowledge that it is ready and willing to carry on a transfer.
Circuit Switching
Advantages: ● The communication channel (once established) is dedicated.
Disadvantages: ● Possible long wait to establish a connection, (10 seconds, more on long- distance or international calls.) during which no data can be transmitted. ● More expensive than any other switching techniques, because a dedicated path is required for each connection. ● Inefficient use of the communication channel, because the channel is not used when the connected systems are not using it.
●With message switching there is no need to establish a dedicated path between two stations.●When a station sends a message, the destination address is appended to the message.●The message is then transmitted through the network, in its entirety, from node to node.●Each node receives the entire message, stores it in its entirety on disk, and then transmits the message to the next node.●This type of network is called a store-and-forward network.
Message Switching
A message-switching node is typically a general-purpose computer. The device needs sufficient secondary-storage capacity to store the incoming messages, which could be long. A time delay is introduced using this type of scheme due to store- and-forward time, plus the time required to find the next node in the transmission path.
Advantages: ● Channel efficiency can be greater compared to circuit- switched systems, because more devices are sharing the channel. ● Traffic congestion can be reduced, because messages may be temporarily stored in route. ● Message priorities can be established due to store-and-forward technique. ● Message broadcasting can be achieved with the use of broadcast address appended in the message.
Disadvantages ● Message switching is not compatible with interactive applications. ● Store-and-forward devices are expensive, because they must have large disks to hold potentially long messages.
● Packet switching can be seen as a solution that tries to combine the advantages of message and circuit switching and to minimize the disadvantages of both. ● There are two methods of packet switching: Datagram and virtual circuit.
● In both packet switching methods, a message is broken into small parts, called packets. ● Each packet is tagged with appropriate source and destination addresses. ● Since packets have a strictly defined maximum length, they can be stored in main memory instead of disk, therefore access delay and cost are minimized.● Also the transmission speeds, between nodes, are optimized.● With current technology, packets are generally accepted onto the network on a first-come, first-served basis. If the network becomes overloaded, packets are delayed or discarded (``dropped'').
● Datagram packet switching is similar to message switching in that each packet is a self-contained unit with complete addressing information attached. ● This fact allows packets to take a variety of possible paths through the network. ● So the packets, each with the same destination address, do not follow the same route, and they may arrive out of sequence at the exit point node (or the destination). ● Reordering is done at the destination point based on the sequence number of the packets. ● It is possible for a packet to be destroyed if one of the nodes on its way is crashed momentarily. Thus all its queued packets may be lost.
In the virtual circuit approach, a preplanned route is established before any data packets are sent. • A logical connection is established when ● a sender send a "call request packet" to the receiver and ● the receiver send back an acknowledge packet "call accepted packet" to the sender if the receiver agrees on conversational parameters.The conversational parameters can be maximum packet sizes, path to be taken, and other variables necessary to establish and maintain the conversation. Virtual circuits imply acknowledgements, flow control, and error control, so virtual circuits are reliable.● That is, they have the capability to inform upper-protocol layers if a transmission problem occurs.
● In virtual circuit, the route between stations does not mean that this is a dedicated path, as in circuit switching. ● A packet is still buffered at each node and queued for output over a line. ● The difference between virtual circuit and datagram approaches:
● With virtual circuit, the node does not need to make a routing decision for each packet.● It is made only once for all packets using that virtual circuit.
VC's offer guarantees that ●the packets sent arrive in the order sent ●with no duplicates or omissions ●with no errors (with high probability) regardless of how they are implemented internally.
Packet Switching: Virtual Circuit
Advantages: ● Packet switching is cost effective, because switching devices do not need massive amount of secondary storage. ● Packet switching offers improved delay characteristics, because there are no long messages in the queue (maximum packet size is fixed). ● Packet can be rerouted if there is any problem, such as, busy or disabled links. ● The advantage of packet switching is that many network users can share the same channel at the same time. Packet switching can maximize link efficiency by making optimal use of link bandwidth.
Disadvantages: ● Protocols for packet switching are typically more complex. ● It can add some initial costs in implementation. ● If packet is lost, sender needs to retransmit the data.● Another disadvantage is that packet-switched systems still can’t deliver the same quality as dedicated circuits in applications requiring very little delay - like voice conversations or moving images.
OSI Model
The modelFunctions of the layers
OSI Model
OSI Layers
An Exchange Using the OSI Model
Physical Layer
Data Link Layer
l
Data Link Layer Example
Network Layer
Data Link Layer Design Issues• Services Provided to the Network Layer• Framing• Error Control• Flow Control
66
Data Link Layer Issues• Functions of the Data Link Layer
Provide service interface to the network layerDealing with transmission errorsRegulating data flow: Slow receivers not
swamped by fast senders
• To accomplish these goals, the data link layer encapsulates the packets into frames.
67
Functions of the Data Link Layer
Relationship between packets and frames.
68
Services Provided to Network Layer
(a) Virtual communication (model used).(b) Actual communication.
69
Services to the Network Layer• Three possible services offered by the data link
layer:Unacknowledged connectionless service:
appropriate for channel with low error rate, real-time traffic, LAN
Acknowledged connectionless service: useful over unreliable channel such as wireless systems
Acknowledged connection-oriented service: used in routing
70
Services Provided to Network Layer
Placement of the data link protocol.
71
Framing• To detect or correct errors in the raw bit
stream from the physical layer, the data link layer breaks the bit stream up into discrete frames and computes the checksum for each frame.
• Four methods can be used to mark the start and end of each frame:Character countFlag bytes with byte stuffingStarting and ending flags, with bit stuffingPhysical layer coding violations
72
Framing
73
A character stream. (a) Without errors. (b) With one error
• Disadvantage: The count may be garbled. Rarely used.
Framing• Flag bytes with byte/character stuffing
Each frame start and end with special bytes – flag byte
If the flag byte occurs in the frame, stuff an extra escape byte (ESC).
Used in PPP (Point to Point Protocol)• Starting and ending flags, with bit stuffing
Each frame begins and ends with a special bit pattern 01111110 whenever the sender sees 5 consecutive 1s, it stuffs a 0.
• Physical layer coding violationsOnly applicable to networks in which the encoding
on the physical medium contains some redundancy. For example, a 1 bit is a high-low pair and a 0 bit is
a low-high pair. High-high and low-low are used for delimiter. 74
Framing
(a) A frame delimited by flag bytes.(b) Four examples of byte sequences before and after stuffing.
75
Framing
Bit stuffing(a) The original data.(b) The data as they appear on the line.(c) The data as they are stored in receiver’s memory
after destuffing.76
Error and Flow Control• Error Control
Detect and/or correct errorsEnsure that all frame are eventually delivered in
order use acknowledgement, timer, and sequence number
• Flow ControlSlow down the sender when the data is coming
too fast for the receiverTwo approaches:
Feedback-based flow control – the receiver sends back permission to the sender.
Rate-based flow control – built-in mechanism that limits senders’ rate. Rarely used in the data link layer.
77
Error Detectionand Correction
Types of ErrorsDetectionCorrection
Single-bit error
Multiple-bit error
Burst error
Redundancy
VRC
LRC
VRC and LRC
CRC
Binary Division
Polynomial
Polynomial and Divisor
Standard Polynomials
Checksum
Data Unit and Checksum
Error Correction
ill
Hamming Code
Hamming Code
Hamming Code
Example of Hamming Code
Single-bit error
Error Detection
Error Detection and Correction• Error-correcting codes/forward error
correction include enough redundant information to enable
the receiver to deduce the correct transmitted data.
Used in unreliable channel such as wireless links
• Error-detecting codes include only enough redundancy to allow the
receiver to request a retransmission.Used in reliable channel such as fiber
102
Data Link Control
Line DisciplineFlow ControlError Control
Data Link Layer
ENQ/ACK
l
ENQ/ACK
Multipoint Discipline
Select
Poll
Stop and Wait
Sliding Window
Sender Sliding Window
Receiver Sliding Window
Sliding Window Example
Sender
Receiver
Damaged Frame
Lost Frame
Lost ACK
Damaged Frame
Lost Frame
Lost ACK
Selective Reject
The Medium Access ControlSublayer
• Network Classification 1.Use point-to-point connections - most WANs,
except satellite. 2.Use broadcast channels - most LANs.
• This chapter deals with broadcast networks and their protocol.
• The objective is to allocate the channel to: maximize channel utilization, and minimize channel access delay.
128
Channel Allocation• Static Channel Allocation in LANs and MANs• Dynamic Channel Allocation in LANs and
MANs
129
Static Channel Allocation • In static channel allocation, a subchannel is
statically assigned to each station (computer or terminal).
• For example, in FDM, a frequency band is assigned to each station.
• This is inherently inefficient (w.r.t. channel utilization) for bursty traffic.
• Note, however, the channel access delay is minimal.
130
Static Channel Allocation • We use the queueing system to analyze the above
scheme. • Single station case: Let C = channel capacity (in bps)
T = mean time delay to send one frame (in sec.) λ = arrival rate (in frames/sec.) 1/μ = mean frame size (in bits/frame)
From queueing theory, we obtain: T = 1 / (μ C - λ)
For example, if 1/ μ = 10,000 bits/frame, C = 100 Mbps, and λ = 5000 frames/sec, then T = 1 / ((1/104)(108) - 5000) = 1 / 5000 = 200 μsec. per frame.
131
Static Channel Allocation • N station case:
Divide the channel up into N subchannels, each with capacity C/N.
Let: λ /N = arrival rate at each station (divide the load).
Then, TFDM = 1 / (μ(C/N) - λ/N) = N / (μC - λ) = N T.
So, the N station case is N times worse than the 1 station case.
For example, as above, N = 10 TFDM = 2 msec. per frame.
132
Dynamic Channel Allocation• Assumptions:
1.Station Model – N independent stations generate frames.
2.Single Channel – A single channel is available for all communication.
3.Collision – Frames that overlap in time destroy each other; this is called a COLLISION. All stations can detect collisions. The only errors are those caused by collisions.
133
Dynamic Channel Allocation• Assumptions:
4.Continuous Time means that transmission of frames can begin at any time.
Slotted Time means that time is divided into discrete intervals, and frame transmission always begins at the start of a slot.
5.Carrier Sense means that stations can tell if the channel is in use by listening to the channel.
No Carrier Sense means that stations cannot tell if the channel is in use by listening to the channel.
134
Pure ALOHA• In the Pure Aloha Protocol (by Abramson in
1970s), a station transmits the data whenever there is data to be sent. Then, the station listens to the channel to see if a collision occurred. If the frame was destroyed, the station waits for a random length of time and tries again.
• Systems in which multiple users share a common channel in a way that can lead to conflicts are widely known as contention systems.
135
Pure ALOHAIn pure ALOHA, frames are transmitted at
completely arbitrary times.
136
Pure ALOHA - Analysis• Let FRAME TIME be the time required to
transmit a standard, fixed-length frame; that is, (1/μC).
• Assume there is an infinite population of stations that transmit frames according to a Poisson process with a mean of N frames transmitted per frame time.
• Note, if N>1, the channel will not be able to handle the load. So, we expect 0<N<1. The offered load, G, is the total number of frames sent on the channel per frame time; that is, G = N + (number of retransmissions per frame time).
137
Pure ALOHA
Vulnerable period for the shaded frame.
138
Slotted ALOHA• In slotted Aloha (by Roberts in 1972) A
computer is not permitted to send whenever a carriage return is typed but wait for a time slot.
• Time is divided into fixed slots of one frame time each. A station waits until the start of the next slot before transmitting a frame. Thus, P0 = e-G (the vulnerable period is only one time slot). S = G e-G Note that as G increases, the number of collisions increases exponentially.
• Note, the maximum occurs when G = 1. S = 0.368.
• Slotted Aloha can be used to allocate a shared cable channel.
139
Pure ALOHAThroughput versus offered traffic for ALOHA
systems.
140
Carrier Sense Multiple Access (CSMA) • Protocols in which stations listen for a carrier
(i.e. transmission) and act accordingly are called carrier sense protocols.
1. 1-persistent CSMA Channel Busy Continue sensing until free and
then grab. Channel Idle Transmit with probability 1. Collision Wait for a random length of time and
try again. 2. nonpersistent CSMA: Channel Busy Does not continually sense the
channel. Wait for a random length of time and try again.
Channel Idle Transmit. Collision Wait for a random length of time and
try again. 141
Carrier Sense Multiple Access (CSMA) 3. p-persistent CSMA: Channel Busy Continue sensing until free (same as
idle). Channel Idle Transmit with probability p, and defer
transmitting until the next slot with probability q = 1-p. Collision Wait for a random length of time and try
again. • The nonpersistent CSMA has better channel utilization
but longer delays than 1-persistent CSMA.• CSMA are an improvement over ALOHA because they
ensure that no station begins to transmit when it senses the channel busy.
• Another improvement is for stations to abort their transmissions as soon as they detect a collision. Quickly terminating damaged frames saves time and bandwidth. This protocol is called CSMA/CD (CSMA with Collision Detection).
142
CSMA with Collision Detection
CSMA/CD can be in one of three states: contention, transmission, or idle.
143
CSMA with Collision Detection• Stations detect collisions using analog
hardware and abort transmissions immediately.• Let τ be the propagation delay (the time for a
signal to propagate between the two farthest stations be τ). The contention interval is modeled as a slotted Aloha system with slot width 2τ.
• Then, 2τ is the time required for a station to detect collision with certainty.
For example, on a 1-km long coaxial cable, τ = 5 μsec. 2τ = 10 μsec to detect a collision.
144