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
Q

multiple access protocol

A

a distributed algorithm that determined how nodes share a channel

26
Q

collision

A

when two or more nodes transmit simultaneously and their signals interfere with each other

27
Q

distributed algorithm

A

a protocol that determines how and when each node can transmit on a shared channel to avoid collisions

28
Q

what are two mac protocols

A

channel partitioning
random access

29
Q

channel partitioning

A

dividing the channel into smaller pieces and allocating each one to a node

30
Q

tdma; time division multiple access

A

each node gets a fixed time slot which is when the node can send data if its available

31
Q

what is the issue with tdma

A

not efficient as unused slots go idle

32
Q

fdma; frequency division multiple access

A

the channel is divided into different frequency bands and each node gets assigned one where they can transmit data at any time

33
Q

what is the issue with fdma

A

lacks efficiency as a band is wasted if a device is not ready to transmit

34
Q

what are the two channel partitioning protocols

A

tdma
fdma

35
Q

random access protocols

A

channels arent divided and allow collisions but can recover from them

36
Q

what are some principles of sorted ALOHA

A

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
Q

in ALOHA how are nodes able to detect a collision

A

nodes can hear their own signal so if they hear one that isnt them then they know that theres a collision

38
Q

how does ALOHA work

A

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
Q

what is a negative of aloha

A

theres a lot of collision and wasted resources
37% max efficiency

40
Q

simple csma; carrier sense multiple access

A

listens before transmission
if channel is empty then transmits entire frame
if busy then defer transmission

41
Q

csma/cd; with collision detection

A

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
Q

how does an nic detect a collision

A

comparing the signal theyre transmitting with the signal theyre receiving on the network

43
Q

what does the nic do when it detects another transmission whilst sending

A

sends a jam

44
Q

why do we need mac addresses

A

to avoid the os being interrupted by packets not intended for it which it would have to constantly drop

45
Q

what is a mac address

A

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
Q

what is address resolution protocol(arp)

A

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
Q

why do mappings in the arp table have a ttl

A

hosts are mobile and ip addresses can change

48
Q

what happens during address resolution protocol

A

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
Q

how do we route to another subnet when we need the mac address of the destination

A

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
Q

why are there no collisions when using ethernet

A

each link is running a different ethernet protocol

51
Q

ethernet as connectionless

A

no handshake required

52
Q

ethernet as unreliable

A

no acknowledgements are sent

53
Q

ethernet switch as transparent

A

has no mac address so transparent to hosts

54
Q

why do ethernet switches not need to be configured

A

they’re self learning

55
Q

what does an ethernet switch do when two hosts are transmitting simultaneously to the same destination

A

the switch puts them in order then sends them one at a time to avoid a collision

56
Q

what is preamble in the ethernet header and how does it work

A

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
Q

type in ethernet header

A

indicates a higher level protocol usually ip
used to demultiplex at the receiver end

58
Q

crc in the ethernet header

A

used for error detection

59
Q

how does the ethernet switch forward and filter frames

A

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