Upload
lavanya-joe
View
216
Download
0
Embed Size (px)
Citation preview
8/2/2019 Data Link Layer Issues 1
1/129
Data Link Layer IssuesDealing with Different Types of Networks
8/2/2019 Data Link Layer Issues 1
2/129
Types of Networks Network hardware can be categorized into:
Circuit-switched (e.g. telephone)
Prior to communication, the hardware establishes a dedicated
end-to-end connection Since there is a dedicated connection, a continuous stream of bytes
can be sent
Frequency or time-division multiplexing can be used to sharelinks in such a network
Packet-switched (e.g. Ethernet, ATM) Data is divided into packets of limited size, and each is
forwarded through the network to the destination
This can be done by routers or switches
8/2/2019 Data Link Layer Issues 1
3/129
Types of Networks Disadvantages
Circuit-switched
A dedicated connection that has no transmission means wasted
bandwidth
A connection is time consuming if short, infrequent, or sporadic
communication is to occur
Packet-switched
Forwarding each packet means that each router must decide thenext hop for every packet (even for the same destination)
Routers are typically network slowdowns due to the amount of
processing, as well as input/output buffering
8/2/2019 Data Link Layer Issues 1
4/129
Types of Networks Circuit-switching is used in a telephone conversation
A connection to the receiver is established by the sender (the caller)
The telephone company reserves a certain bandwidth (64 Kbps for voicecommunication) for this call
If the bandwidth is not used by the callers, it is wasted
Packet-switching is similar to the postal service Each message (envelope) is addressed to the recipient individually,
and the postal service delivers each message to the recipient
The postal service may deliver these envelopes through different cities
and methods of transport (airplane, truck, ) It can be said that these messages can be delivered using different routes
8/2/2019 Data Link Layer Issues 1
5/129
Circuit-Switching
A BTelephone Company
Switching System
Call: B
Disconnect
TalkTalk
8/2/2019 Data Link Layer Issues 1
6/129
Circuit-Switching
A BTelephone Company
Switching System
8/2/2019 Data Link Layer Issues 1
7/129
Packet-Switching
A B
Postal Network
Buffalo, NYWindsor, ON
London, ONKitchener, ON
Toronto, ON
Ottawa, ON
Montreal, QC
Quebec, QC
Niagara Falls, ON
8/2/2019 Data Link Layer Issues 1
8/129
Types of Packet-Switching Virtual circuit-switching
A virtual circuit is created between source and
destination This VC is used for all subsequent sending of
packets
Datagram
Each packet is routed individually
8/2/2019 Data Link Layer Issues 1
9/129
Virtual Circuit Packet-SwitchingAdvantages After the first message, routing is faster
A route must only be determined once, for the first message
Once the route has been determined, the path used by the router isreused for all messages
As a result, routing tables are much smaller (and can be searchedmore quickly)
Because a connection is created, the connection identifier can
be used (alone) to address packets Typically, such as with ATM cells, this can reduce the size of a
cell/packets header
Messages do not arrive out of order As a result, receivers do not need to reorder the cells
8/2/2019 Data Link Layer Issues 1
10/129
Virtual Circuit Packet-SwitchingDisadvantages Connections take some time to create
Routers/switches must intercommunicate in order to create theconnection
Infrequent messaging is not suitable for connection-basedmessaging The connection may be lost after a timeout, and will have to be
recreated again and again
The time delay for creating the connection may outweigh the speedbenefits of using connection-based transport
Routing tables will be dynamic, and routing algorithms aremore complex
8/2/2019 Data Link Layer Issues 1
11/129
Datagram Packet-SwitchingAdvantages
Connections need not be created
Infrequent messaging is perfect for connectionless messaging
Connectionless messaging can be resumed after any amount of delay,any number of times, without any delays due to the resumption ofcommunication
Routing each message separately allows for load balancing Some messages may be sent through one route, but when that route
becomes saturated, messages may then be sent through a differentroute in order to achieve the most optimal communication possible
8/2/2019 Data Link Layer Issues 1
12/129
Datagram Packet-Switching
Disadvantages
Each message takes a certain amount of time to transmit
(including transmission, routing, reception, etc.)
Nodes communicating large amounts of information in a short timewill:
Use a lot of bandwidth for things such as header information
Waste a lot of time routing messages to the same destination
Messages may arrive out of order
Messages must be reordered by the recipient
8/2/2019 Data Link Layer Issues 1
13/129
Multiple Access StrategiesSchemes for Sharing a CommunicationMedium
8/2/2019 Data Link Layer Issues 1
14/129
Multiple Access
Most networks are shared medium
This means that a single medium (e.g. radio frequency) is
shared by all of a networks hosts
We need a scheme to allow the hosts to share the
medium, without collisions
Collisions occur when two (or more) messages are
transmitted at the same time The result is constructive and destructive interference in
the carrier wave
This causes the messages to be combined and scrambled
8/2/2019 Data Link Layer Issues 1
15/129
Contention
In contention networks, any node that has a
packet to send, merely sends the packet
It is clear that this type of network frequentlyexperiences collisions
The more nodes trying to communicate, the
higher the chance of collisions Thus, contention networks are severely limited in
the number of hosts possible
8/2/2019 Data Link Layer Issues 1
16/129
Contention
Transmit
8/2/2019 Data Link Layer Issues 1
17/129
Contention
8/2/2019 Data Link Layer Issues 1
18/129
Contention
Transmit
8/2/2019 Data Link Layer Issues 1
19/129
Contention
8/2/2019 Data Link Layer Issues 1
20/129
Contention: Collisions
Transmit
Transmit
8/2/2019 Data Link Layer Issues 1
21/129
Contention: CollisionsScrambled
Signal
8/2/2019 Data Link Layer Issues 1
22/129
Contention
No collision avoidance is present
Messages are just sent
When collisions occur, the messages are simplyresent after some random (or pseudo-random)
amount of time
Collisions can occur anytime
8/2/2019 Data Link Layer Issues 1
23/129
Carrier Sensing
Test the medium
for a signal
8/2/2019 Data Link Layer Issues 1
24/129
Carrier Sensing
Test the medium for a signal: Available
Transmit
8/2/2019 Data Link Layer Issues 1
25/129
Carrier Sensing
Test the medium
for a signal
8/2/2019 Data Link Layer Issues 1
26/129
Carrier Sensing
Test the medium
for a signal: In use
8/2/2019 Data Link Layer Issues 1
27/129
Carrier Sensing
Transmission
Complete
8/2/2019 Data Link Layer Issues 1
28/129
Carrier Sensing
Test the medium
for a signal
8/2/2019 Data Link Layer Issues 1
29/129
Carrier Sensing
Test the medium
for a signal: Available
8/2/2019 Data Link Layer Issues 1
30/129
Carrier Sensing: Collisions
Test the medium
for a signal: Available
Test the medium
for a signal: Available
8/2/2019 Data Link Layer Issues 1
31/129
Carrier Sensing: Collisions
Transmit
Transmit
8/2/2019 Data Link Layer Issues 1
32/129
Carrier Sensing: Collisions
Scrambled data
8/2/2019 Data Link Layer Issues 1
33/129
Carrier Sensing: Collisions
Detect collision
Detect collisionTransmit
Transmit
8/2/2019 Data Link Layer Issues 1
34/129
Carrier Sensing (CSMA)
To reduce the number of collisions, the medium istested for a signal before each transmission
If a signal exists, the node waits
Signal testing can be anything from detection of anelectrical signal, to testing for photons
Collisions can still occur (although less often)
If a node tests for a signal before a transmission from
another node, and transmits after, a collision occurs
8/2/2019 Data Link Layer Issues 1
35/129
Carrier Sensing Hardware
Signal
Detector
Transmitter ReceiverIf the message is
broadcast or the
address is this
stations address,
the message is
forwarded to the
receiver
When a signal is
detected,
transmissions are
blocked by the
signal detector
8/2/2019 Data Link Layer Issues 1
36/129
CSMA/CA
CSMA/CA networks (such as wireless 802.11g) also
use carrier sensing and collision detect
However, detecting collisions in wireless networks is
significantly more complicated
Also, after detecting carrier and determining there is
no signal, a CSMA/CA network transmits a Do not
broadcast message If this message is sent without a collision, the host can
assume it is safe to transmit
8/2/2019 Data Link Layer Issues 1
37/129
Carrier Sensing Networks
Advantages
No tokens
Simple hardware
No need for token transmission
Disadvantages
Collisions
Wasted bandwidth for re-transmits
Require complicated re-collision avoidance schemes
8/2/2019 Data Link Layer Issues 1
38/129
Token Passing
T
TransmitTransmitTransmitTransmit
8/2/2019 Data Link Layer Issues 1
39/129
Token Passing
T
Transfer
Token
8/2/2019 Data Link Layer Issues 1
40/129
Token Passing
T
8/2/2019 Data Link Layer Issues 1
41/129
Token Passing
T
Transmit
8/2/2019 Data Link Layer Issues 1
42/129
Token Passing
A small packet (the token) is passed fromnode to node
When a node has the token, it has sole use of thenetwork medium
There are no collisions
The nodes must have the token in order to
transmit The network hardware ensures that there is only
one token at any given time
8/2/2019 Data Link Layer Issues 1
43/129
Token-Based Networks
Advantages
No collisions, so no bandwidth is wasted bycollisions and re-transmits
No need for re-collision avoidance schemes
Disadvantages
Token transmission uses bandwidth
More complicated hardware Hardware must be built to use tokens, dynamically
determine token sequence, etc.
8/2/2019 Data Link Layer Issues 1
44/129
Local Area Networks
Networks which span a small geographic area
They typically represent high bandwidth,short delays, few errors
They commonly support features such asbroadcasting, multicasting
They are typically limited to hundreds of
network nodes (maximum)
8/2/2019 Data Link Layer Issues 1
45/129
Typical Local Area Networks
A collection of computers in the same room
e.g. The basement of the computer centre
All computers within an office building e.g. The computers in the offices of the professors
and staff in Lambton tower
8/2/2019 Data Link Layer Issues 1
46/129
Local Area Network
TopologiesStructures of LANs
8/2/2019 Data Link Layer Issues 1
47/129
Token Bus Networks
The token is passed in a specific sequence
Nodes must know the address if the next node in thesequence
The token sequence is not necessarily in the same order asthe physical order of nodes on the communicationmedium
When a node has completed transmission, itforwards the token, addressed to the next node in thetoken sequence
The token sequence forms a logical ring
8/2/2019 Data Link Layer Issues 1
48/129
Common Token Bus Networks
IEEE 802.4 networks
Nodes are share a communication medium
similar to that of Ethernet (IEEE 802.3)
Coaxial cable connection
8/2/2019 Data Link Layer Issues 1
49/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Transmit
8/2/2019 Data Link Layer Issues 1
50/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Transmit
Token
8/2/2019 Data Link Layer Issues 1
51/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Receive
Token
8/2/2019 Data Link Layer Issues 1
52/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Transmit
8/2/2019 Data Link Layer Issues 1
53/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Transmit
Token
8/2/2019 Data Link Layer Issues 1
54/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Receive
Token
8/2/2019 Data Link Layer Issues 1
55/129
Token Bus Operation
A
B
C
D
Token sequence: C,A,D,B
Transmit
8/2/2019 Data Link Layer Issues 1
56/129
Token Ring Networks
The token is passed to each node, in the
physical order on the network
The physical medium must be a closed loop tomeet this network category
So the token can keep going around the network
8/2/2019 Data Link Layer Issues 1
57/129
Common Token Ring Networks
IEEE 802.5 networks
Nodes are share a coaxial communication medium similarto that of Ethernet (IEEE 802.3)
FDDI networks (fibre distributed data interface) Nodes use 2 fibre optic rings as the communication
medium
CDDI networks (copper dist. data interface)
Based on FDDI technology, but uses copper wiringsimilar to 802.4
However, CDDI uses 2 rings like FDDI
8/2/2019 Data Link Layer Issues 1
58/129
Token Ring Operation
D
C
B
A
Transmit
8/2/2019 Data Link Layer Issues 1
59/129
Token Ring Operation
D
C
B
A
Transmit
Token
8/2/2019 Data Link Layer Issues 1
60/129
Token Ring Operation
D
C
B
A
Receive
Token
8/2/2019 Data Link Layer Issues 1
61/129
Token Ring Operation
D
C
B
A
Transmit
8/2/2019 Data Link Layer Issues 1
62/129
Token Ring Operation
D
C
B
A
Transmit
Token
8/2/2019 Data Link Layer Issues 1
63/129
Token Ring Operation
D
C
B
A
ReceiveToken
8/2/2019 Data Link Layer Issues 1
64/129
Token Ring Operation
D
C
B
A
Transmit
8/2/2019 Data Link Layer Issues 1
65/129
Bus and Ring Networks
Advantages
Less wiring is necessary
Disadvantages Node failure can mean partial (or complete)
LAN failure
This can mean locating network problems is alsomore difficult
8/2/2019 Data Link Layer Issues 1
66/129
Star Topology
Star networks send all messages through a
central hub
Each node on the network is wired separatelyto the hub
Star networks are not a shared bus
technology, but a private bus technology However, nodes still share the hub
8/2/2019 Data Link Layer Issues 1
67/129
Common Star Networks
Twister pair Ethernet (logical star):
All nodes connect to a central hub (an Ethernethub) via Cat5 cables
The hub forwards messages to all wires, and thedestination node keeps the message
Other nodes ignore the message
An Ethernet switch (similar to an ATM switch)forwards only in the one correct direction (or not,if appropriate)
8/2/2019 Data Link Layer Issues 1
68/129
Star Network Operation
A B
C D
Hub
Transmit
8/2/2019 Data Link Layer Issues 1
69/129
Star Network Operation
A B
C D
Hub
Receive
8/2/2019 Data Link Layer Issues 1
70/129
Star Network Operation
A B
C D
Hub
Transmit
8/2/2019 Data Link Layer Issues 1
71/129
Star Network Operation
A B
C D
Hub
Receive
8/2/2019 Data Link Layer Issues 1
72/129
Twisted Pair Ethernet
Physically, all Ethernet types are bus
networks
However, the actual layout of the cables intwisted pair Ethernet forms a star topology
Twisted pair is called a logical star topology,
while still a physical bus topology
8/2/2019 Data Link Layer Issues 1
73/129
Twisted Pair Ethernet as a Bus
Hub
B C
F G
A D
E H
Long Private Lines
Short Shared Bus
8/2/2019 Data Link Layer Issues 1
74/129
Traditional Ethernet as a Bus
B C
F G
A D
E H
Long Shared Bus
Short Private Lines
8/2/2019 Data Link Layer Issues 1
75/129
Star TopologyAdvantages
Simple installation and wiring
Node failures do not affect the rest of the system
Disadvantages All traffic passes through same hub, so network bandwidth is
limited by hub speed This can be reduced with buffers inside hubs which store messages
that come in when the hub is busy
Hub failure = LAN failure More wiring
Duplication of messages
8/2/2019 Data Link Layer Issues 1
76/129
LAN Service Models
In general, most LANs implement (in some sense)the OSI reference model
The IEEE committee on LAN technology (IEEE
802) chose to subdivide the Data Link Layer into 2sub-layers:
1. MAC (Medium Access Control): Deals with issuesspecific to each type of LAN Such as token passing, collision detection, error detection, etc.
2. LLC (Logical Link Control): Deals with issues commonto all LAN types Such as data transmission, etc.
8/2/2019 Data Link Layer Issues 1
77/129
Data Link Addressing
The data link layer is represents the network
e.g. Ethernet
Addressing, then, is specific to the network hardware
MAC addresses are typically used for this purpose
These addresses are not used in routing
They are only used on a single network
Thus, they are used for hop to hop delivery End-to-end delivery is the domain of the Network layer
8/2/2019 Data Link Layer Issues 1
78/129
MAC Addresses
Officially the IEEE 802 committee standardizedaddresses to be 16bit, 48bit, and even 60bit
48bit addresses (in use by most LANs covered by the 802
committee) allow for globally unique identifiers (GUIDs)to be assigned to each network card by the manufacturer
As a result, each NIC can be uniquely identified on any network
These are called MAC addresses, due to the DataLink sub-layer that deals with them
e.g. 8D-F0-A6-75-9C-13
8/2/2019 Data Link Layer Issues 1
79/129
Data Link Flow Control
Flow control is limiting the packet rate so that
both the source or destination can keep up
At the data link layer, source and destinationare on the same LAN
Thus, limiting the packet rate is relatively easy
8/2/2019 Data Link Layer Issues 1
80/129
Data Link Reliability Reliability:
Best effort: The network takes no steps to ensure packetsarrive The majority of packets should be received without problems
Reliable: The network uses acknowledgements to ensurepackets arrive When packets are lost (for whatever reason), they are handled
appropriately
Error handling: Corrupt packets should be re-sent
Reliability at the Data Link layer is usuallyunnecessary, since the Transport layer will typicallybe able to do it more efficiently
8/2/2019 Data Link Layer Issues 1
81/129
Error Control
Error control is achieved using one of thefollowing methods:
Checksum: An n-bit sum is taken of thebinary stream
In other words, a checksum counts the ones
What if one 0 became a 1 and a 1 became a 0??
Cyclical redundancy check: Should generate different CRC values, despite the
same number of 0s and 1s
8/2/2019 Data Link Layer Issues 1
82/129
EthernetAn Early Incarnation of LANs
8/2/2019 Data Link Layer Issues 1
83/129
What Started It All
Robert Metcalfe (from Xerox PARC)
http://www.ots.utexas.edu/ethernet/metcalfe-drawing.html8/2/2019 Data Link Layer Issues 1
84/129
Ethernet History
In 1973, Xerox PARC developed a packet-switchedLAN, called Ethernet
In 1978, IEEE created a standard (802.3) based on
the research of Xerox, Intel, and DEC IEEE: Institute of Electrical and Electronics Engineers
802.3 Ethernet uses a coaxial cable to connect nodes(called 10Base5 or ThickNet)
Since then, several new forms of Ethernet haveevolved
8/2/2019 Data Link Layer Issues 1
85/129
ThickNet (10Base5)
Outer Insulating Jacket
Braided
Metal
Shield
(Ground)
Inner
Insulating
Layer
Transmission
Wire
Inch Diameter
10Base5
5 => 0.5
8/2/2019 Data Link Layer Issues 1
86/129
ThickNet (10Base5)
Transceiver
Each network node uses
a transceiverA transceiver taps into
the wire through holes
Maximum throughput is
10 million bits per second
(10 Mbps)
10Base5
10 => 10 Mbps
8/2/2019 Data Link Layer Issues 1
87/129
ThinNet (10Base2)
Create as an inexpensive alternative to ThickNet (or
10Base2)
Called thin-wire Ethernet, because it uses a thin
cable with less shielding
Less shielding means more interference, so cable
placement is important
10Base2 does not use transceivers, which areexpensive, which further reduces cost
8/2/2019 Data Link Layer Issues 1
88/129
ThinNet (10Base2)
Node A Node DNode B Node C
The signal passes through each node
The network interface card (NIC) retransmitsthe signal, so transceivers are not required
Maximum throughput is 10 million bits per
second (10 Mbps)
10Base2
2 => 0.2
10Base2
10 => 10 Mbps
8/2/2019 Data Link Layer Issues 1
89/129
Twisted Pair Ethernet (10BaseT)
Uses 4 pairs of twisted wires inside an
unshielded cable
The twisting of the wires reduces interference The absence of shielding makes the cable
flexible and inexpensive
The cable is capable of 10Mbps
8/2/2019 Data Link Layer Issues 1
90/129
Twisted Pair Ethernet
Connectors on twisted pair Ethernet (RJ45) looksimilar to telephone wire connectors (RJ11)
This kind of Ethernet uses unshielded twisted pair
(UTP) UTP cable has various categories:
Cat3: Can only be used for 10BaseT
Cat5: Can be used for 10BaseT, 100BaseT
Cat5e, Cat6: Can be used for up to 1000BaseT
8/2/2019 Data Link Layer Issues 1
91/129
ThinNet Ethernet
011100110011100110
8/2/2019 Data Link Layer Issues 1
92/129
Twisted Pair Ethernet
acceptmessage
ignoreignore
ignore
011100110
http://www.circuitcity.com/ccd/%20%20/ssm/Netgear-5-Port-Copper-Ethernet-Switch-GS105NA-/sem/rpsm/oid/97241/rpem/ccd/productDetail.do8/2/2019 Data Link Layer Issues 1
93/129
10 Mbps Ethernet Overview
10Base2 and 10Base5 both used coaxial cable
which joined each node in a line
10BaseT uses UTP cabling, where each nodeis directly connected with the hub
The hub receives messages and forwards them to
all nodes
The one that is connected to the recipient node
8/2/2019 Data Link Layer Issues 1
94/129
Fast Ethernet
Using the same Cat5 cabling used for 10BaseT, an
Ethernet-based LAN that operates at 100 Mbps
(100BaseT) is possible
Standard: IEEE 802.3u
While using the same cable, network hubs and
network interface cards (NICs) must be upgraded to
transmit messages at 100 Mbps
8/2/2019 Data Link Layer Issues 1
95/129
Fast Ethernet
While very few computers can handle 100 Mbpsthroughput (bus speeds of computers are oftenslower than this), multiple computers can share this
bandwidth 10/100 Ethernet (or 10/100 switched Ethernet)
allows you to use the same NICs and hubs for both10BaseT and 100BaseT
If a NIC and hub can both handle 100BaseT, that speed isused, otherwise 10BaseT is used
10/100 Ethernet allows you to slowly upgrade yournetwork with minimal downtime
Gi bi E h
8/2/2019 Data Link Layer Issues 1
96/129
Gigabit Ethernet
Gigabit Ethernet allows for 1000 Mbps throughput
Gigabit Ethernet (Gig-E) can use Cat5 cabling(1000BaseT) or shielded Cat5E cabling (1000BaseTX) Standard: IEEE 802.3ab
Gig-E pushes the limits of the speed capable with Cat5cabling, due to interference with the electrical signal,Cat5E cabling results in better performance
Gigabit Ethernet is so fast, that it is sometimes used as
a backbone for a Wide Area Network (WAN) insteadof more expensive optical networks e.g. One of the backbones of the network here at the U
8/2/2019 Data Link Layer Issues 1
97/129
Ethernet Future
Another form of Gigabit Ethernet which uses fibre
optic cabling has been proposed (802.3z)
Using multimode (multiple channel1000BaseSX), orsingle mode (1000BaseLH, 1000BaseZX)
Research groups are in the process of developing
10 Gigabit Ethernet (802.3ae)
This research is managed by the 10 GigabitEthernet Alliance
http://www.10gea.org
8/2/2019 Data Link Layer Issues 1
98/129
LAN Service Models
LLC (Logical Link Control), for LANs, canbe one of two types:
Type 1: A straight datagram scheme
The packet is delivered using best-effort service
No acknowledgements are used to ensure packetarrival
Type 2: A reliable scheme Packets are numbered
Packets are acknowledged as they are received
8/2/2019 Data Link Layer Issues 1
99/129
IEEE 802 Committees
Five 802 committees were developed to researchvarious technologies associated with LANs:
802.1: Issues common to all LANs e.g. addressing, management, bridges
802.2: Issues related to the LLC sub-layer e.g. reliability schemes, packet transmission
802.3: Issues related to CSMA/CD category LANs e.g. Ethernet
802.4: Issues related to token bus category LANs
802.5: Issues related to token ring category LANs
8/2/2019 Data Link Layer Issues 1
100/129
LAN Addresses
The 48 bit addresses (often called MAC
addresses) are the ones used by Ethernet
LANs
e.g. 02-60-8C-08-E1-0C
All Ethernet cards contain a globally unique
MAC address
8/2/2019 Data Link Layer Issues 1
101/129
Ethernet Overview
Ethernet is not a reliable service
There are no acknowledgements for packet receipt
Ethernet uses best-effort delivery
Most Ethernet networks use broadcasting to achievemessaging
Each message is received by each node
Ethernet is one network in a category of networks
known as shared bus networks Each node shares a single communication medium
8/2/2019 Data Link Layer Issues 1
102/129
Ethernet Overview
Ethernet is a carrier-sensing network
Carrier-sensing networks use distributed accesscontrol methods
Each station determines whether it can access thecommunication medium
Each station senses whether or not thetransmission medium (wire) is charged
If not, an attempt at transmission is made If so, the node will wait and sense again
8/2/2019 Data Link Layer Issues 1
103/129
Ethernet Overview
Sometimes, more than one station will attempt totransmit at roughly the same time
This is called a collision
Due to the finite speed of electrons traversing a wire 70% of the speed of light
Or due to the finite speed of photons moving throughglass The speed of light
The two (or more) messages collide or interfere with oneanother, creating scrambled data packets
8/2/2019 Data Link Layer Issues 1
104/129
Collision Detection in Ethernet
When scrambled messages are read by thetransmitting stations, it is determined to be acollision
Both (or all) of the stations involved will detectthe collision
This type of network is known as CSMA/CD
Carrier-sensing, multiple access with collision
detection
Each station must retransmit their packets
8/2/2019 Data Link Layer Issues 1
105/129
Collision Avoidance in Ethernet
After a collision occurs, if both stations tried
to transmit after the same period of time,
another collision would occur
To combat this, Ethernet uses a binary
exponential back-off policy
Each subsequent collision would cause the station
to wait double the amount of time before
reattempting transmission
8/2/2019 Data Link Layer Issues 1
106/129
Ethernet Packets (Frames)
Size: 64 octets1518 octets
An octet is another term for an 8-bit byte
The frame contains more than just data The source and destination addresses
An identifier, signifying that the frame is in fact
an Ethernet frame
A Cyclical Redundancy Check (CRC) to ensure
data integrity upon arrival
8/2/2019 Data Link Layer Issues 1
107/129
Ethernet Frames
Preamble
Dest Address
Source Address
Frame Type
DataCRC
Sequence of 01010101 used tosynchronize the receiving station
The MAC address of thedestination node
The MAC address of the sendernode
The identifier used to identify theframe as an Ethernet frame
The data to be sent to thedestination
A cyclical redundancy check (CRC)used to determine if data hasbeen corrupted
8 octets
6 octets
6 octets
2 octets
46-1500
4 octets
8/2/2019 Data Link Layer Issues 1
108/129
Ethernet Distance Limitations
Coaxial Ethernet cables have a maximum length
Due to signal deterioration
This length could be extended using repeaters
Machines that read signals through a port and recreatethem (at full strength) out another port
The use of more than 2 repeaters between any 2 stationswould interfere with times used in CSMA/CD schemes As a result, a maximum of 2 repeaters can be placed between any
2 nodes
8/2/2019 Data Link Layer Issues 1
109/129
Ethernet Distance Limitations
Ethernet LAN sizes could also be increased by using
Bridges to connect separate LANs into a single LAN
Bridges filter out erroneous frames, as well as line noise
Some bridges (adaptive bridges) are even intelligentenough to know when a frame must be forwarded or not
e.g. If the destination node is not on the other side of a Bridge,
the frame need not be forwarded
8/2/2019 Data Link Layer Issues 1
110/129
FDDI
Fiber Distributed Data Interconnect
8/2/2019 Data Link Layer Issues 1
111/129
FDDI
Use optical fibre cabling as a shared communicationmedium
Optical fibre cables are made of glass
Because they are so thin, they are fairly flexible Capable of 100 Mbps
Light is used to transmit data
Light is not susceptible to electrical interference
Optical cabling can span longer distances Optical cabling does not need to be shielded near devices which
generate electromagnetic interference
Light waves (photons) travel faster than electrons
8/2/2019 Data Link Layer Issues 1
112/129
FDDI
Is a token-ring category network
A token is passed from station to station
When a station receives the token, it may transmit data
If a station has no data, it allows the token to pass to the next
station
FDDI uses 2 rings of cabling, moving in oppositedirections
The second ring is used to allow twice the flow of data
The purpose of the second ring is to allow data to reach itsdestination, even when one station has failed (and cannotforward messages)
8/2/2019 Data Link Layer Issues 1
113/129
FDDI Ring Technology
8/2/2019 Data Link Layer Issues 1
114/129
FDDI With Node Failure
8/2/2019 Data Link Layer Issues 1
115/129
FDDI Token Passing
11
12
10 9 8 7
6
5
1 2 3 4
T
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
S:12D:07
8/2/2019 Data Link Layer Issues 1
116/129
FDDI Token Passing
11
12
10 9 8 7
6
5
1 2 3 4T
T
8/2/2019 Data Link Layer Issues 1
117/129
FDDI Frames
Preamble
Start Delimiter
Frame Control
Dest AddressSource Address
Routing Info
Data
FCSEnd Delimiter
Frame Status
Data Used to Synchronize Stations
Indicates Start of Frame
Identifies the Type of Frame
Address of the Destination NodeAddress of the Source Node
Routing Information
Frame Data
Frame Check SequenceIndicates End of Frame
Status of Frame
octets: 2+
1
1
2 or 62 or 6
0-30
0-4500
40.5
1.5+
8/2/2019 Data Link Layer Issues 1
118/129
Wireless Networks
Radio-Based LANs
8/2/2019 Data Link Layer Issues 1
119/129
Wireless LANs
Contrary to ones initial guess, wireless LANs
are very similar to wired LANs
Wireless LANs are a shared media network,
just like Ethernet
However, in a wireless LAN, the shared medium
is not the air, but something called a base station
or wireless access point
8/2/2019 Data Link Layer Issues 1
120/129
Wireless LANs (WLANs)
The wireless access point, which is similar to a hub,is the shared medium
Despite the fact that radio waves using the samefrequency will cause mutual interference, the air is not
generally considered a shared medium
Technically speaking, twisted pair Ethernet is similarto WLANs
The cables themselves are just point-to-point connectors
and are not shared
The hub/switch, however, is shared
8/2/2019 Data Link Layer Issues 1
121/129
Wireless LANs (WLAN) Wireless Access Point (WAP): A base station that
coordinates transmission between one or more wireless hosts Analogous to a cell tower in a mobile phone network
Wireless hosts must be a certain distance away from a WAP to
participate on a WLAN The communicable area of all of the WAPs in a WLAN, define the
coverage area for the WLAN
Some WLANs do without a WAP, but pass messages directlyto one another
These are typically small (2-3 hosts) networks, and are called ad hocnetworks
8/2/2019 Data Link Layer Issues 1
122/129
802.11 Operation 802.11 networks (such as 802.11g) use CSMA/CA multiple
access scheme Hosts try to detect carrier before sending (CS)
This is not adequate, since there could be hidden hosts
These are hosts out of range of this host, but in range of the same basestation:
8/2/2019 Data Link Layer Issues 1
123/129
802.11 Operation
To avoid collisions with hidden hosts:
The host will send a request to send (RTS) frame beforetransmitting
The base station will respond with a clear to send (CTS)frame if the channel is clear Once a base station sends a CTS, it will reject any further RTS
requests until the data is received by the host who sent the firstRTS
This is called collision avoidance (CA)
Frames are acknowledged at the data link layer in802.11 networks
8/2/2019 Data Link Layer Issues 1
124/129
802.11 Frame Format
Flags
MAC Address of sending host
MAC Address of receiving host
MAC Address of sender base stationFragment number, sequence number
MAC Address of receiver base station
Frame data
CRC for frame header and data
Frame Control (2 octets)
Source Address (6)
Destination Address (6)
Receiving Station Address (6)
Transmitting Station Address (6)
Sequence Control (2)
Data (0-2312)
Frame Check Sequence (2)
8/2/2019 Data Link Layer Issues 1
125/129
802.11 Frame Header: Frame Control
Flags
Management, control or data frame
Type of management or control frame
Sent to an access point?Sent by an access point?
Protocol Version (2 bits)
Type (2)
Subtype (4)
To AP (1)
More Fragments (1)
From AP (1)
Order (1)
Retry (1)
Power Management (1)
More Data (1)
WEP (1)
Are there more fragments from this frame?
Is this a retransmission of a previous frame?
Power state of sender after transmissionIs there more data to come?
Has WEP encryption been applied to frame?
Are the packets strictly ordered?
8/2/2019 Data Link Layer Issues 1
126/129
Wireless Access Points
WAP1
WAP2
WAP3
8/2/2019 Data Link Layer Issues 1
127/129
Ad Hoc Networks
In ad hoc networks, stations directly transmit
to one another
Hosts are responsible for routing, addressing,
name translation, security, etc.
Two ad hoc networks using the same
frequency, within range of one another will
cause conflicts Thus, different frequencies should be used
8/2/2019 Data Link Layer Issues 1
128/129
Handoffs in WAPs
For WLANs with WAPs, roaming hosts must beconsidered
If a host moves into the range of another WAP, then outof range of their current WAP, a handoff takes place
A handoff is when one WAP gives the responsibility for aparticular host to one of its neighbouring WAPs The two WAPs must communicate for this to happen, and thus
neighbouring WAPs must be within each others transmissionrange
8/2/2019 Data Link Layer Issues 1
129/129
Wireless LAN Standards
Some of the main standardized WLANs:
802.11a, 802.11g: 54Mbps, comparable with 100BaseT
Ethernet, under 100M range
802.11b: 11Mbps, comparable to 10BaseT Ethernet,under 100M range
These technologies are intended for LANs within the same small
to medium-sized building
BlueTooth/802.15: 721 kbps, under 10M range
This technology is intended for communicate within one room or
vehicle