data link layer Flashcards

1
Q

what are some services that the datalink layer provides

A

framing
reliable delivery between adjacent nodes
flow control
error detection and correction
full and half duplex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

framing

A

encapsulating datagrams from the network layer into a frame and adding a header and trailer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

MAC address

A

added in the frame header
id the source and destination of each hop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how are mac addresses portable

A

when you change networks you dont need a new one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

ARQ; automatic repeat request

A

asks the previous hop to resend the packet if theres an error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

flow control

A

the pacing between adjacent sending and receiving hops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

half-duplex

A

both the sender and receiver cant transmit data at the same time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how is the link layer implemented

A

on a network interface card

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the NIC a combination of

A

firmware; software thats hardware specific
software; the kernel has modules for the link layer
hardware; the nic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ep roam

A

non volatile memory that stores firmware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what does the edc include

A

could be the entire frame including the header or just the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what does the node do if theres too much corruption compared to if theres only a little

A

too much; asks to resend
little; corrects and sends

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

parity bit

A

single bit that detects single errors
with even parity you set the bit so theres an even amount of 1s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how do we alter parity bit to correct errors and how does this work

A

use two-dimensional parity
theres a parity bit for each row and column
when an error is detected the intersection of the row and column shows which bit it is which can then be flipped to correct it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is an issue with 2-d parity

A

can only detect one error per row(odd number of errors )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are two issues with regular parity bit

A

only detect an odd number of errors
doesnt correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what effects do a larger edc have

A

better edc however decreases the efficiency of data throughput

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

cycle redundancy check(crc)

A

uses field theory to compute semi unique values for a given message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

why does crc only compute semi-unique values

A

depends on d and g and some values may have the same remainder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what type of errors does crc detect

A

single and duplicate
errors with odd bit numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what happens on the sender side of crc

A

add r 0s to the data bits
divide the new sequence by g using binary division and get the remainder
transmit the originial data followed by the computed remainder(crc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

what happens on the receiver side of crc

A

divide the transmitted sequence by g
if the remainder is 0 then there are no errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what is the generator value in crc

A

r + 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what are the 2 types of multiple access links

A

point-to-point
shared broadcast

25
multiple access protocol
a distributed algorithm that determined how nodes share a channel
26
collision
when two or more nodes transmit simultaneously and their signals interfere with each other
27
distributed algorithm
a protocol that determines how and when each node can transmit on a shared channel to avoid collisions
28
what are two mac protocols
channel partitioning random access
29
channel partitioning
dividing the channel into smaller pieces and allocating each one to a node
30
tdma; time division multiple access
each node gets a fixed time slot which is when the node can send data if its available
31
what is the issue with tdma
not efficient as unused slots go idle
32
fdma; frequency division multiple access
the channel is divided into different frequency bands and each node gets assigned one where they can transmit data at any time
33
what is the issue with fdma
lacks efficiency as a band is wasted if a device is not ready to transmit
34
what are the two channel partitioning protocols
tdma fdma
35
random access protocols
channels arent divided and allow collisions but can recover from them
36
what are some principles of sorted ALOHA
all frames are the same size and time slots are divided equally code is transmitted at the beginning of the time slot the nodes are synchronised and if 2 or more nodes transmit at the same time they detect the collision
37
in ALOHA how are nodes able to detect a collision
nodes can hear their own signal so if they hear one that isnt them then they know that theres a collision
38
how does ALOHA work
when a node gets a fresh frame it transmits in the next slot if theres no collision then it can send a new frame in the next slot if there is a collision then the node either backs off or re transmits until the frame goes through based on an algorithm
39
what is a negative of aloha
theres a lot of collision and wasted resources 37% max efficiency
40
simple csma; carrier sense multiple access
listens before transmission if channel is empty then transmits entire frame if busy then defer transmission
41
csma/cd; with collision detection
when a collision is detected then the node backs off for a certain amount of time if its repeated then the time to back off increases collisions are detected within a short amount of time which reduces the amount of time wasted on them
42
how does an nic detect a collision
comparing the signal theyre transmitting with the signal theyre receiving on the network
43
what does the nic do when it detects another transmission whilst sending
sends a jam
44
why do we need mac addresses
to avoid the os being interrupted by packets not intended for it which it would have to constantly drop
45
what is a mac address
like an id that is unique to each device and mobile 48bit address burned into the rom that allows you to send frames on the lan/subnet
46
what is address resolution protocol(arp)
determined the mac address of a given ip address each host has an arp for the subnet that its on with each mapping having a ttl
47
why do mappings in the arp table have a ttl
hosts are mobile and ip addresses can change
48
what happens during address resolution protocol
the host broadcasts the arp query containing the ip of the mac address it wants each host receives the broadcast and if its own ip is in the message then it replies directly to the query with its mac address the mapping is then added to the arp table
49
how do we route to another subnet when we need the mac address of the destination
a knows b ip, and the gateway router ip and mac via dchp and arp a creates a datagram with source a and destination b and encapsulates it in a link layer frame with the gateway router mac as the ip the router receives the frame and the datagram is removed and the ip layer uses the forwarding table to find out the interface that the packet should be passed out from based on the destination ip the router then creates a new frame with the source mac being itself and the destination being b mac with the ip datagram still unchanged within it when the frame reaches b it extracts the ip datagram and processes it
50
why are there no collisions when using ethernet
each link is running a different ethernet protocol
51
ethernet as connectionless
no handshake required
52
ethernet as unreliable
no acknowledgements are sent
53
ethernet switch as transparent
has no mac address so transparent to hosts
54
why do ethernet switches not need to be configured
they're self learning
55
what does an ethernet switch do when two hosts are transmitting simultaneously to the same destination
the switch puts them in order then sends them one at a time to avoid a collision
56
what is preamble in the ethernet header and how does it work
the first 8 bytes are used to sync the sender and receiver clocks the first 7 bytes are 10101010 and the last one is 10101011 when the receiver reads the last one then it knows that the next byte is actual data
57
type in ethernet header
indicates a higher level protocol usually ip used to demultiplex at the receiver end
58
crc in the ethernet header
used for error detection
59
how does the ethernet switch forward and filter frames
they are self learning so they learn which hosts can be reached through which interfaces via observing packets when a switch receives a frame it adds the source mac and the interface it came from to its forwarding table it then looks at the destination mac and check if its in the table if its there and the destination is on the same part as the frame then its dropped as its redundant to send it back otherwise its forwarded to the port if there's no entry then the switch floods the frame to all interfaces except the one it came from ensuring that the frame reaches the destination