Link layer and LANs Flashcards
What is the Link Layer?
Communication channels that connect adjacent nodes along paths.
What is the name give to a level-2 packet?
Frame, encapsulates a datagram
What is the data-link layer responsible for?
The transferring of a datagram from one node to a physically adjacent node over a link
Do datagrams travel in the same way on every link?
No, they can be transferred by different link protocols on different links. IE: Ethernet, 802.11 etc..
Each link protocol provides different services.
What services does the Link Layer provide?
Framing and link access
Reliable delivery between adjacent nodes
Flow control
Error detection
Error correction
Half-duplex and full duplex
What is framing and link access?
Encapsulate datagrams into a frame and add header
Channel access if shared medium.
MAC addresses used in frame headers to identify source and destination.
Why does link layer do reliable delivery?
Wireless links has high error rates, so we can do link-layer retransmits to implement this.
Why is error detection required?
Errors caused by signal attenuation, noise.
Receiver detects presence of errors and signals sender for retransmission or drops teh packet.
Where is the link layer implemented?
NIC or chip level. Attaches onto host’s system bus.
What does a NIC do when sending?
Encapsulates datagram in frame and adds error checking bits, rdt, flow control etc.
What does a NIC do when receiving?
Looks for errors, rdt, flow control etc.
Extracts the datagrams, passing it to the upper layer at the receiving side.
How is data redundancy implemented in frames?
EDC: Error Detection and Correction bits
add error detection bit to the datagram for the receiver to do a parity check.
Even number of 1’s: add 1, else add 0
How is a single bit parity done?
Check parity bit and then compare to if it should be even or odd.
What are the drawbacks of single bit parity?
If the corruption flips a 1 and a 1, making data contain same number of odds and evens then it doesn’t work.
How does two-dimensional bit parity work?
Check row and column parity, in matrice.
What is the cyclic redundancy check?
View data bits, D, as binary number.
Choose r+1 bit pattern (generator) G
Choose r CRC bits, R, such that:
% 2
Receiver knows G divides by G.
if non-zero remainder, error.
Can a device have multiple access links?
Point-to-point:
PPP for dial-up access, ethernet switch.
Broadcast (shared wire or medium)
Old-fashioned Ethernet
What happens when two or more devices try and transmit on a shared channel?
Collision occurs, if node receives two or more signals at the same time.
What does the multiple access protocol do?
Determines how nodes share a channel, determining when a node can transmit.
Communication about channel sharing must use the channel
What are the classes of MAC protocols?
Channel partitioning
Random Access
Taking turns
How does channel partitioning work at the link-layer level?
Divide channel into smaller pieces. Can split by:
time slots, frequency
code etc..
How do random access protocols work at the link-layer level?
When node has packet to send, transmit it at the full channel rate.
Protocol knows how to detect and recover from collisions.
Send and pray.