Data Link layer Flashcards
What device is in the data-link layer(layer 2)?
Switch
What are the function of a data-link layer?
The data-link layer controls access to the physical layer through the Media Access control.
It provides an interface for the network layer.
Helps to encode and decode between frames and signals
Implements error detection
can split data link layer into 2 Sublayer-
- logically controlled (LLC)- flow control , error control
- encoding decoding digital/analog , CRC .
What is an Ethernet?
Ethernet is a dominant LAN technology cable and is mostly UTP.
What is the mechanism used in Shared Ethernet?
With the mechanism that any device can transmit at any time, collision detection by carrier sensing and retransmit.
What is an ethernet MAC?
It uses the CSMA/CD algorithm(carrier sense multiple access/ collision detection).
Carrier sense- listen on bus, only transmit if no other signal is “sensed”.
Multiple Access (MA): several devices access the same medium
• Collision Detection (CD):
when signal other than own is detected:
• transmit jam signal (so all other devices detect collision)
• both wait random time before re-transmitting
Ethernet - topology- shared bus
multi-point
-Shared coaxial cable hence shared ethernet.
Ethernet star topology
point-to-point
Every signal received on one port of hub is sent out
on all other ports
-Modern technology replaces hub with switch and called hub-and-spoke topology.
Problems with shared ethernet? Solution?
- Half Duplex- only one device can send at a time either transmit or receive
e. g internet can send and receive - Broadcasting- when one frame is sent , all are sent.
- Limited Network Size- CSMA/CD limits size of collision domain
- Solution-
- logical star topology (switched internet)
- AP has switch.
- dedicated full duplex with no collision
- hub and switch look similar but are not
- switch is a layer 2 devices, while hub is a layer 1 device.
What is a switch , how is it different to a hub?
• looks like hub • 16 to 24 ports for UTP cables • but: circuit no longer shared! A switch is a layer 2 device • reads MAC address of frame • transmits only to destination port by switch forwarding table
Describe how forwarding tables work in Ethernet switches
- switching table to forward information from source to destination
- flood frames-
switch completes a table, and keeps in track the MAC address and port.
- now can have one-to-one connection
- can transmit and send data at same time because of full-duplex circuits by creating MAC address tables
no collisions.
-dont need CSMA/CD
-switched ethernet is at 95% capacity, no collision
compared to 50% for shared ethernet (and can decrease when more collisions)
Basic setup of WLAN?
WLAN NICs built in laptop. connects to APs using radio frequencies and APs are connected to wireless LANs
Latest WiFi IEEE 802.11 standard?
Latest: 802.11ac & ad
Advantages of WLAN?
WiFi- can eliminate UTP cables, heritage buildings, rented apartments
allow for more flexible network access
-ubiquitous computing, IoT, 4G,etc
WLAN radio frequencies?
Most WLAN use the 2.4 GHz and/or 5 GHz range
- high frequencies allow larger bandwidth
- higher frequencies higher attenuation
- greater coverage in 2.4 GHz
higher the bandwidth, higher the capacity
WLAN channel define?
Networks in the same area should not use the same
frequencies
• WLAN spectrum is divided into channels, each
network is set to a different channel
WiFi Channel characteristics
Channels
- 2.4 GhZ has 14 channels, 5 GHz has about 160 channels
- 1,6,11 is non overlapping
- 2,7,12 are non overlapping
- 3,8,13 are non overlapping
it can overlap 10-15%.
CSMA/CA ?
CSMA/CA MAC
All devices shares same medium, channels need to deal with collisions.
change the CSMA/CD algorithm to CSMA/CA
- collision avoidance
- devices actively avoiding collisions
Why is wlan different to ethernet in terms of collision detection?
Solution to it?
AP can detect signal from client, but also other client does so it backs off.
However, when there is weak signal for other client, there is a hidden node problem cant detect sending signal to AP. COLLISION.
- 11 using stop-and wait ARQ
- ARQ - detecting errors.
Automatic Repeat ReQuest.
AP sends ACK (acknowledgement) after receiving a frame. if did not receive frame, it will re-send transmission.
- 802.11 Either can send frames
- Device can send “Request to Send” (RTS)
- transmit frame only if AP send “Clear to Send” (CTS) - after acknowledgement to RTS they can send
- Hidden node problem- receiver needs to ACK every case.
CSMA/CD cant only be applied in bus topology not even switch topology.
What if cant sense carrier bc distance?
Solution is Exponential Back-Off
CSMA/CA with this
increasing wait time everytime you dont receive an ACK.
Avoids collisions
WLAN Topology→
BSS?
BSS- (Basic Service Set) No access point
communicate directly with each other
Adhoc network
Infrustructure BSS aka WLAN .
have an AP connected to a backbone router.
AP connects to LAN
1 AP is called BSS
ESS
BSS can establish ESS( Extended Service Set)- two or more ESS.
different can roam between different APs.
connected to the same router and distribution system
-mobility
Roaming between different ESSs
-not possible in 802.11 protocol
Planning depending on coverage?
3 non overlapping channels
a bit of overlap is ok 10-15%, due to different channels
If more users,more access points
Less users, less APs
Attenuation-
even distance is attenuation.
Attenuation diagram