Bandwidth Utilization: Multiplexing

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 162

Chapter 5

Bandwidth Utilization:
Multiplexing

6.1
Note
Bandwidth utilization is the wise use of
available bandwidth to achieve
specific goals.

Efficiency can be achieved by multiplexing; i.e., sharing of the bandwidth


between multiple users.

6.2
MULTIPLEXING

Whenever the bandwidth of a medium linking two


devices is greater than the bandwidth needs of the
devices, the link can be shared. Multiplexing is the set
of techniques that allows the (simultaneous)
transmission of multiple signals across a single data
link. As data and telecommunications use increases, so
does traffic.

6.3
Dividing a link into channels

6.4
Categories of multiplexing

6.5
Frequency-division multiplexing (FDM)

6.6
FDM process

6.7
FDM demultiplexing example

6.8
Example

Assume that a voice channel occupies a bandwidth of 4


kHz. We need to combine three voice channels into a link
with a bandwidth of 12 kHz, from 20 to 32 kHz. Show the
configuration, using the frequency domain. Assume there
are no guard bands.
Solution
We shift (modulate) each of the three
voice channels to a different
bandwidth, as shown in Figure . We use
the 20- to 24-kHz bandwidth for the
first channel, the 24- to 28-kHz
bandwidth for the second channel, and 6.9

the 28- to 32-kHz bandwidth for the


Example

6.10
Wavelength-division multiplexing (WDM)

WDM is an analog multiplexing technique to combine optical signals.

6.11
Figure Prisms in wavelength-division multiplexing and demultiplexing

6.12
Time Division Multiplexing (TDM)

TDM is a digital multiplexing technique for combining several low-rate


digital channels into one high-rate one. 6.13
Synchronous time-division multiplexing

6.14
Interleaving

 The process of taking a group of bits from each input line for
multiplexing is called interleaving.
 We interleave bits (1 - n) from each input onto one output.

6.15
Interleaving

6.16
Synchronization
 To ensure that the receiver correctly reads the
incoming bits, i.e., knows the incoming bit
boundaries to interpret a “1” and a “0”, a
known bit pattern is used between the frames.
 The receiver looks for the anticipated bit and
starts counting bits till the end of the frame.
 Then it starts over again with the reception of
another known bit.
 These bits (or bit patterns) are called
synchronization bit(s).
 They are part of the overhead of transmission.

6.17
Framing bits

6.18
Inefficient use of Bandwidth

 Sometimes an input link may have no data to transmit.


 When that happens, one or more slots on the output link will go
unused.
 That is wasteful of bandwidth.

6.19
Empty slots

6.20
Figure 6.26 TDM slot comparison

6.21
Multiple Access

12.22
12.23
RANDOM ACCESS

In random access or contention methods, no station is superior to another


station and none is assigned the control over another. No station permits, or
does not permit, another station to send. At each instance, a station that has
data to send uses a procedure defined by the protocol to make a decision on
whether or not to send.

12.24
Frames in a pure ALOHA network

12.25
Procedure for pure ALOHA protocol

12.26
Example

The stations on a wireless ALOHA network are a maximum of 600 km apart. If we


assume that signals propagate at 3 × 108 m/s, we find
Tp = (600 × 105 ) / (3 × 108 ) = 2 ms.
Now we can find the value of TB for different values of
K.

a. For K = 1, the range is {0, 1}. The station needs to|


generate a random number with a value of 0 or 1. This
means that TB is either 0 ms (0 × 2) or 2 ms (1 × 2),
based on the outcome of the random variable.

12.27
Example (continued)

b. For K = 2, the range is {0, 1, 2, 3}. This means that T B


can be 0, 2, 4, or 6 ms, based on the outcome of the
random variable.

c. For K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. This


means that TB can be 0, 2, 4, . . . , 14 ms, based on the
outcome of the random variable.

d. We need to mention that if K > 10, it is normally set to


10.

12.28
Vulnerable time for pure ALOHA protocol

12.29
Example

A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps.
What is the requirement to make this frame collision-free?

Solution
Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms. The vulnerable
time is 2 × 1 ms = 2 ms. This means no station should send later than 1 ms before
this station starts transmission and no station should start sending during the one 1-
ms period that this station is sending.

12.30
Note

The throughput for pure ALOHA is


S = G × e −2G .
The maximum throughput
Smax = 0.184 when G= (1/2).

12.31
Example
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps.
What is the throughput if the system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.

Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−2 G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.

12.32
Example (continued)
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e −2G or S = 0.184 (18.4 percent). This
means that the throughput is 500 × 0.184 = 92 and that
only 92 frames out of 500 will probably survive. Note
that this is the maximum throughput case,
percentagewise.

c. If the system creates 250 frames per second, this is (1/4)


frame per millisecond. The load is (1/4). In this case
S = G × e −2G or S = 0.152 (15.2 percent). This means
that the throughput is 250 × 0.152 = 38. Only 38
frames out of 250 will probably survive.

12.33
Figure Frames in a slotted ALOHA network

12.34
Note

The throughput for slotted ALOHA is


S = G × e−G .
The maximum throughput
Smax = 0.368 when G = 1.

12.35
Vulnerable time for slotted ALOHA protocol

12.36
Example
A slotted ALOHA network transmits 200-bit frames on a shared channel of 200
kbps. What is the throughput if the system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.

Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−G or S = 0.368 (36.8 percent). This means
that the throughput is 1000 × 0.0368 = 368 frames.
Only 386 frames out of 1000 will probably survive.

12.37
Example (continued)
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e−G or S = 0.303 (30.3 percent). This
means that the throughput is 500 × 0.0303 = 151.
Only 151 frames out of 500 will probably survive.

c. If the system creates 250 frames per second, this is (1/4)


frame per millisecond. The load is (1/4). In this case
S = G × e −G or S = 0.195 (19.5 percent). This means
that the throughput is 250 × 0.195 = 49. Only 49
frames out of 250 will probably survive.

12.38
Figure Space/time model of the collision in CSMA

12.39
Figure Vulnerable time in CSMA

12.40
Figure Behavior of three persistence methods

12.41
Figure Flow diagram for three persistence methods

12.42
Figure Collision of the first bit in CSMA/CD

12.43
Figure Collision and abortion in CSMA/CD

12.44
Example
A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum
propagation time (including the delays in the devices and ignoring the time
needed to send a jamming signal, as we see later) is 25.6 μs, what is the minimum
size of the frame?

Solution
The frame transmission time is Tfr = 2 × Tp = 51.2 μs. This means, in the worst
case, a station needs to transmit for a period of 51.2 μs to detect the collision.
The minimum size of the frame is 10 Mbps × 51.2 μs = 512 bits or 64 bytes. This is
actually the minimum size of the frame for Standard Ethernet.

12.45
Figure Flow diagram for the CSMA/CD

12.46
Figure Energy level during transmission, idleness, or collision

12.47
Figure Timing in CSMA/CA

12.48
Note

In CSMA/CA, the IFS(Interframe space)


can also be used to define the priority of a
station or a frame.

12.49
Note

In CSMA/CA, if the station finds the


channel busy, it does not restart the timer
of the contention window;
it stops the timer and restarts it when the
channel becomes idle.

12.50
Figure Flow diagram for CSMA/CA

12.51
Error Detection and Correction
Basic concepts

Networks must be able to transfer data
from one device to another with
complete accuracy.
 Data can be corrupted during
transmission.
 For reliable communication, errors must
be detected and corrected.
 Error detection and correction are
implemented either at the data link layer
or the transport layer of the OSI model.
Types of Errors
Single-bit error
Single bit errors are the least likely type of errors
in serial data transmission because the noise must
have a very short duration which is very rare.
However this kind of errors can happen in parallel
transmission.
Example:
 If data is sent at 1Mbps then each bit lasts only
1/1,000,000 sec. or 1 μs.
 For a single-bit error to occur, the noise must have
a duration of only 1 μs, which is very rare.
Burst error
The term burst error means that two or
more bits in the data unit have changed
from 1 to 0 or from 0 to 1.

Burst errors does not necessarily mean


that the errors occur in consecutive bits,
the length of the burst is measured from the
first corrupted bit to the last corrupted bit.
Some bits in between may not have been
corrupted.
 Burst error is most likely to happen in serial transmission
since the duration of noise is normally longer than the duration
of a bit.
 The number of bits affected depends on the data rate and
duration of noise.
Example:
 If data is sent at rate = 1Kbps then a noise of 1/100 sec can
affect 10 bits.(1/100*1000)

 If same data is sent at rate = 1Mbps then a noise of 1/100 sec


can affect 10,000 bits.(1/100*106)
Error detection

Error detection means to decide whether the received


data is correct or not without having a copy of the original
message.

Error detection uses the concept of redundancy, which


means adding extra bits for detecting errors at the
destination.
Redundancy
Four types of redundancy checks are used
in data communications
Vertical Redundancy Check
VRC
Performance
 It can detect single bit error
 It can detect burst errors only if the total number of
errors is odd.
Longitudinal Redundancy Check
LRC
Performance

LCR increases the likelihood of detecting burst errors.


If two bits in one data units are damaged and two bits
in exactly the same positions in another data unit are
also damaged, the LRC checker will not detect an error.
VRC and LRC
Cyclic Redundancy Check
 Given a k-bit frame or message, the transmitter generates
an n-bit sequence, known as a frame check sequence
(FCS), so that the resulting frame, consisting of (k+n) bits,
is exactly divisible by some predetermined number.
 The receiver then divides the incoming frame by the same
number and, if there is no remainder, assumes that there
was no error.
Cyclic Redundancy Check
CRC
Cyclic Redundancy Check
Binary Division
CRC Example
Polynomial
Polynomial and Divisor
Standard Polynomials
Checksum
At the sender
 The unit is divided into k sections, each of n
bits.
 Allsections are added together using one’s
complement to get the sum.
 The sum is complemented and becomes the
checksum.
 The checksum is sent with the data
At the receiver
 The unit is divided into k sections, each of n
bits.
 Allsections are added together using one’s
complement to get the sum.
 The sum is complemented.
 Ifthe result is zero, the data are accepted:
otherwise, they are rejected.
Performance

 The checksum detects all errors involving an


odd number of bits.
 Itdetects most errors involving an even number
of bits.
 Ifone or more bits of a segment are damaged
and the corresponding bit or bits of opposite
value in a second segment are also damaged,
the sums of those columns will not change and
the receiver will not detect a problem.
Error Correction

It can be handled in two ways:


1) receiver can have the sender retransmit
the entire data unit.
2) The receiver can use an error-correcting
code, which automatically corrects
certain errors.
Single-bit error correction
To correct an error, the receiver reverses the value of
the altered bit. To do so, it must know which bit is in
error.
Number of redundancy bits needed
 Let data bits = m
 Redundancy bits = r
Total message sent = m+r
The value of r must satisfy the following relation:
2r ≥ m+r+1
Error Correction
Hamming Code
Hamming Code
Hamming Code
Example of Hamming Code
Single-bit error
Error
Detection
Switching Techniques

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
 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.
Message Switching

 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.
Message Switching
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.
Message Switching

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
• 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.
Packet Switching

• 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'').
Packet size

 The size of the packet can vary from 180 bits, the size for the
Datakit® virtual circuit switch designed by Bell Labs for
communications and business applications; to 1,024 or 2,048 bits for
the 1PSS® switch, also designed by Bell Labs for public data
networking; to 53 bytes for ATM switching, such as Lucent
Technologies' packet switches.
Packet switching
 In packet switching, the analog signal from your phone is converted
into a digital data stream. That series of digital bits is then divided
into relatively tiny clusters of bits, called packets. Each packet has
at its beginning the digital address -- a long number -- to which it is
being sent. The system blasts out all those tiny packets, as fast as
it can, and they travel across the nation's digital backbone systems
to their destination: the telephone, or rather the telephone
system, of the person you're calling.
 They do not necessarily travel together; they do not travel
sequentially. They don't even all travel via the same route. But
eventually they arrive at the right point -- that digital address
added to the front of each string of digital data -- and at their
destination are reassembled into the correct order, then converted
to analog form, so your friend can understand what you're saying.
Packet Switching: Datagram
• 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.
Packet Switching:Virtual Circuit
• 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.
Packet Switching:Virtual Circuit

• 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.
Packet Switching: 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.
Advantages of packet switching

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 of packet switching

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.
Link layer: introduction
terminology:
 hosts and routers: nodes
 communication channels that connect global ISP
adjacent nodes along communication
path: links
 wired links
 wireless links
 LANs
 layer-2 packet: frame, encapsulates
datagram

data-link layer has responsibility of


transferring datagram from one node
to physically adjacent node over a link
5-108
Data Link Layer
Link layer services
 framing, link access:
 encapsulate datagram into frame, adding header, trailer
 channel access if shared medium
 “MAC” addresses used in frame headers to identify source, dest
 different from IP address!
 reliable delivery between adjacent nodes
 we learned how to do this already
 seldom used on low bit-error link (fiber, some twisted pair)
 wireless links: high error rates

5-109
Data Link Layer
Link layer services (more)
 flow control:
 pacing between adjacent sending and receiving nodes
 error detection:
 errors caused by signal attenuation, noise.
 receiver detects presence of errors:
 signals sender for retransmission or drops frame
 error correction:
 receiver identifies and corrects bit error(s) without
resorting to retransmission
 half-duplex and full-duplex
 with half duplex, nodes at both ends of link can transmit,
but not at same time

5-110
Data Link Layer
Where is the link layer implemented?
 in each and every host
 link layer implemented in
“adaptor” (network
interface card NIC) application
transport
 Ethernet card, 802.11 card network cpu memory
link
 implements link, physical layer

 attaches into host’s host


bus
system buses link
controller (e.g., PCI)
physical
physical
 combination of hardware, transmission

software, firmware
network adapter
card

5-111
Data Link Layer
Adaptors communicating

datagram datagram

controller controller

sending host receiving host


datagram

frame

 sending side:  receiving side


 encapsulates datagram in frame  looks for errors, rdt, flow control,
etc
 adds error checking bits, flow
control, etc.  extracts datagram, passes to
upper layer at receiving side

5-112
Data Link Layer
Addressing: routing to another LAN
walkthrough: send datagram from A to B via R
focus on addressing - at both IP (datagram) and MAC layer (frame)
assume A knows B’s IP address
assume A knows IP address of first hop router, R (how?)
assume A knows R’s MAC address (how?)

A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B

111.111.111.112 111.111.111.110 222.222.222.221


CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 88-B2-2F-54-1A-0F

5-113
Data Link Layer
Addressing: routing to another LAN
 A creates IP datagram with IP source A, destination B
 A creates link-layer frame with R's MAC address as dest, frame
contains A-to-B IP datagram
MAC src: 74-29-9C-E8-FF-55
MAC dest: E6-E9-00-17-BB-4B
IP src: 111.111.111.111
IP dest: 222.222.222.222

IP
Eth
Phy

A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B

111.111.111.112 111.111.111.110 222.222.222.221


CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 88-B2-2F-54-1A-0F

5-114
Data Link Layer
Addressing: routing to another LAN
 frame sent from A to R
 frame received at R, datagram removed, passed up to IP

MAC src: 74-29-9C-E8-FF-55


MAC dest: E6-E9-00-17-BB-4B
IP src: 111.111.111.111
IP dest: 222.222.222.222
IP src: 111.111.111.111
IP dest: 222.222.222.222

IP IP
Eth Eth
Phy Ph
y
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B

111.111.111.112 111.111.111.110 222.222.222.221


CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 88-B2-2F-54-1A-0F

5-115
Data Link Layer
Addressing: routing to another LAN
 R forwards datagram with IP source A, destination B
 R creates link-layer frame with B's MAC address as dest, frame
contains A-to-B IP datagram

MAC src: 1A-23-F9-CD-06-9B


MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111
IP dest: 222.222.222.222
IP
IP Eth
Eth Phy
Ph
y
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B

111.111.111.112 111.111.111.110 222.222.222.221


CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 88-B2-2F-54-1A-0F

5-116
Data Link Layer
Addressing: routing to another LAN
 R forwards datagram with IP source A, destination B
 R creates link-layer frame with B's MAC address as dest, frame
contains A-to-B IP datagram

MAC src: 1A-23-F9-CD-06-9B


MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111
IP dest: 222.222.222.222
IP
IP Eth
Eth Phy
Ph
y
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B

111.111.111.112 111.111.111.110 222.222.222.221


CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 88-B2-2F-54-1A-0F

5-117
Data Link Layer
Addressing: routing to another LAN
 R forwards datagram with IP source A, destination B
 R creates link-layer frame with B's MAC address as dest, frame
contains A-to-B IP datagram
MAC src: 1A-23-F9-CD-06-9B
MAC dest: 49-BD-D2-C7-56-2A
IP src: 111.111.111.111
IP dest: 222.222.222.222

IP
Eth
Phy

A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B

111.111.111.112 111.111.111.110 222.222.222.221


CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 88-B2-2F-54-1A-0F

5-118
Data Link Layer
Ethernet
“dominant” wired LAN technology:
 cheap for NIC
 first widely used LAN technology
 Developed in the mid-1970s by researchers at the Xerox Palo Alto Research
Centers (PARC)
 simpler, cheaper than token LANs and ATM
 kept up with speed race: 10 Mbps – 10 Gbps

5-119
Data Link Layer
Ethernet frame structure
Sending adapter encapsulates IP datagram (or other network layer
protocol packet) in Ethernet frame

Preamble:
 7 bytes with pattern 10101010 followed by one byte with pattern
10101011
 used to synchronize receiver, sender clock rates

5-120
Data Link Layer
Ethernet frame structure (more)
 addresses: 6 bytes
 if adapter receives frame with matching destination
address, or with broadcast address (e.g. ARP packet), it
passes data in frame to network layer protocol
 otherwise, adapter discards frame
 type: indicates higher layer protocol (mostly IP but others
possible, e.g., Novell IPX, AppleTalk)
 CRC: checked at receiver, if error is detected, frame is
dropped
 Data: 46 to 1500 bytes (MTU: 1500B)

5-121
Data Link Layer
Ethernet switch
 link-layer device: takes an active role
 store, forward Ethernet frames
 examine incoming frame’s MAC address, selectively forward frame to one-
or-more outgoing links when frame is to be forwarded on segment, uses
CSMA/CD to access segment
 transparent
 hosts are unaware of presence of switches
 plug-and-play, self-learning
 switches do not need to be configured

5-122
Data Link Layer
Switch: multiple simultaneous transmissions

 hosts have dedicated, direct A


connection to switch
 switches buffer packets C’ B
 Ethernet protocol used on 6 1 2
each incoming link, but no
collisions; full duplex 5 4 3
 each link is its own collision domain
B’ C
 switching: A-to-A’ and B-to-
B’ simultaneously, without
collisions A’
switch with six interfaces
(1,2,3,4,5,6)

5-123
Data Link Layer
Switch table

how does switch know that A


A’ reachable via interface 4,
B’ reachable via interface 5? C’ B
each switch has a switch 6 1 2
table, each entry:
 (MAC address of host, interface to reach 5 4 3
host, time stamp)
looks like a routing table! B’ C
how are entries created,
maintained in switch table? A’
 something like a routing protocol?
switch with six interfaces
(1,2,3,4,5,6)

5-124
Data Link Layer
Switch: self-learning Source: A
Dest: A’

A A A’
 switch learns which hosts
can be reached through C’ B
which interfaces
 when frame received,
61 2
switch “learns” location of
sender: incoming LAN
5 4 3
segment B’ C
 records sender/location pair
in switch table
A’
MAC addr interface TTL
Switch table
A 1 60 (initially empty)

5-125
Data Link Layer
Switch: frame filtering/forwarding
When frame received:

1. record link associated with sending host


2. index switch table using MAC dest address
3. if entry found for destination
then {
if dest on segment from which frame arrived
then drop the frame
else forward the frame on interface indicated
}
else flood

forward on all but the interface


on which the frame arrived
5-126
Data Link Layer
Self-learning, forwarding: example Source: A
Dest: A’

 frame destination unknown: A A A’


flood C’ B
 destination A location
61 2
known: A A’
A A’
selective send 5 4 3
B’ C
A’ A

MAC addr interface TTL A’


A 1 60 Switch table
A’ 4 60 (initially empty)

5-127
Data Link Layer
Interconnecting switches

 switches can be connected together

S4
S1 S3
A S2
D F I
B C
E G H

sending from A to G - how does S1 know to forward frame


destined to F via S4 and S3?
self learning! (works exactly the same as in single-switch
case!)

5-128
Data Link Layer
Self-learning multi-switch example

Suppose C sends frame to I, I responds to C

S4
S1 S3
A S2
D F I
B C
E G H

show switch tables and packet forwarding in S1, S2, S3, S4

5-129
Data Link Layer
Switches vs. Routers
application
 both store-and-forward transport
datagram network
devices
frame link
 routers: network-layer physical
link frame
devices (examine physical
network-layer headers)
 switches are link-layer
devices (examine link-
switch
layer headers) network datagram
link frame
 routers maintain routing physical
tables, implement
routing algorithms application
 switches maintain transport
switch tables, network
link
implement filtering,
physical
learning algorithms
5-130
Data Link Layer
14-1 IEEE 802.11

IEEE has defined the specifications for a wireless LAN,


called IEEE 802.11, which covers the physical and data
link layers.

14.131
A BSS without an AP is called an ad hoc network;
a BSS with an AP is called an infrastructure network.

14.132
Figure Basic service sets (BSSs)

14.133
Figure Extended service sets (ESSs)

14.134
Figure MAC layers in IEEE 802.11 standard

14.135
Figure CSMA/CA flowchart

14.136
Figure 14.5 CSMA/CA and NAV

14.137
Figure Example of repetition interval

14.138
Figure Frame format

14.139
Table Subfields in FC field

14.140
Figure Control frames

14.141
Table Values of subfields in control frames

14.142
Figure Addressing mechanisms

14.143
Figure Hidden station problem

14.144
Note

The CTS frame in CSMA/CA handshake


can prevent collision from
a hidden station.

14.145
Figure Use of handshaking to prevent hidden station problem

14.146
Figure Exposed station problem

14.147
Figure Use of handshaking in exposed station problem

14.148
Table Physical layers

14.149
Figure Industrial, scientific, and medical (ISM) band

14.150
Figure Physical layer of IEEE 802.11 FHSS

14.151
Figure Physical layer of IEEE 802.11 DSSS

14.152
Figure Physical layer of IEEE 802.11 infrared

14.153
Figure Physical layer of IEEE 802.11b

14.154
BLUETOOTH

Bluetooth is a wireless LAN technology designed to


connect devices of different functions such as
telephones, notebooks, computers, cameras, printers,
coffee makers, and so on. A Bluetooth LAN is an ad hoc
network, which means that the network is formed
spontaneously.

14.155
Piconet

14.156
Figure Scatternet

14.157
Figure Bluetooth layers

14.158
Figure Single-secondary communication

14.159
Figure Multiple-secondary communication

14.160
Figure Frame format types

14.161
Figure L2CAP data packet format

14.162

You might also like