Chapter 6: The Link Layer Flashcards

1
Q

Where is the link layer implemented?

A

On chips known as network adapters or as network interface controllers (NICs)

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

What is a 1D parity check, and how does it detect bit errors?

A

The parity bit is the number of 1s in the data bits mod 2.
[When added, there should be an even number of 1s]

If afterwards, there is an odd number of bits, there has been an error.

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

What is a 2D parity check and how does it detect and correct errors?

A

The D bits are aligned into a rectangle, and a parity bit assigned for each column and row to make a larger rectangle.

If a single-bit is flipped, the parity bits for that row and column are wrong and so it can be identified.

It can also detect any 2 bit flips, but not correct.

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

What is a checksum and how does it detect bit errors?

A

The d bits of data is split into k-bit integers and added together. The 1s complement forms a checksum.

If the sum of the data bits and checksum is not 0, there has been an error.

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

What is CRC and how does it detect and correct bit errors?

A

The sender and receiver agree on a r + 1 bit pattern known as a generator, which we call G. The left-most bit needs to be a 1.

For a given piece of data, the sender chooses r additional bits and appends them to D, so the resulting d + r bit pattern is exactly divisible by G in mod2.

If the remainder is non-zero, the recipient knows an error has occurred.

The CRC standard can detect burst errors (consecutive) of r bits or fewer.
[And any size of odd bit errors]

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

How are addition and subtraction done in CRC?

A

Bit-wise XOR with no carries.

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

How are division and multiplication done in CRC?

A

Shift left by k-places for a multiplication of 2^k.

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

In CRC, we need to find an R such that D || R = n * G.

How is this R found?

A

D * 2^r XOR R = nG
D * 2^r = nG XOR R

Thus, R = remainder(D * 2^r/G)

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

What are the two types of network link?

A

Point-to-point and broadcast.

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

Give features of a multiple access protocol for a broadcast channel of rate R bits per second.

A
  1. When only one node has data to send, it has a throughput of R bps.
  2. When M node have data send, each has an average transmission R/M over some suitably defined interval of time.
  3. The protocol is decentralized (no single point of failure)
  4. The protocol is simple.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CDMA?

A

Code Division Multiple Access (CDMA) is a channel partitioning protocol where each node is given a different code.

Each node encodes its bits by that code, so that receivers can correctly receive a sender’s encoded data bits.

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

What is slotted ALOHA?

A

A random access protocol. When a node has a fresh frame to send, it waits until the next slot and transmits the entire frame in the slot.

If there isn’t a collision, the node has successfully transmitted its frame and thus need not consider retransmitting.

If there is a collision, the frame is transmitted in the next slot with probability p.

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

What are some pros and cons of slotted ALOHA?

A

Pros:
- single active node can continuously transmit at full rate of channel
- highly decentralised (only slots in nodes need to be in sync)
- simple

Cons:
- Wasted slots (collisions, iding)
- Detection of collision is faster than transmission time
- Clock sync is hard.

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

What is the maximum efficiency of slotted ALOHA?

A

Assume every one of the N nodes always has a frame to send in each slot with probability p.

The probability of success for 1 slot is p * (N-1)^(1-p).

The probability that any slot is successful is Np * (N-1)^(1-p).

As N -> inf, probability -> 1/e. [About 0.37]

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

What is the maximum efficiency of unslotted ALOHA?

A

If a node begins transmission at t0,
the probability that no other nodes begin a transmission in [t0 - 1, t0] of time is (1-p)^(N-1).
The probability no other nodes begin a transmission in [t0, t0 + 1] is (1-p)^(N-1).

Then, the maximum probability as N->inf is 1/(2e) [approx 0.19].

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

What is CSMA?

A

A random access protocol based on two principles:
- If some other node’s frame is being transmitted, then don’t transmit.
- Stop transmitting if another node begins transmitting.

These are detected by signal energy appearing at the node.

17
Q

What is the binary exponential backoff algorithm?

A

When a frame has already experienced n collisions, a node chooses a random K from {0, 1, 2, …, 2^n - 1} and waits K * 512 bit times. Ethernet caps n as 10.

18
Q

What is the efficiency of CSMA?

A

Efficiency = 1/(1 + 5*d_prop/d_trans)

19
Q

How does the polling protocol work?

A

A taking-turns protocol where a master node tells nodes in a round-robin that they can transmit F frames.

20
Q

What is the token-passing protocol?

A

A token is exchanged among the nodes in some order. Each node sends up to a maximum number of frames and then passes on the node.

21
Q

What is the DOCSIS protocol for cable access?

A

Downstream is easy: there is only one sender.

Upstream is more challenging:
the CMTS sends a control message known as a MAP message to specify which modem can send in each mini slot.
It knows which modems need slots as the modems sends mini-slot request frames upstream. If the modem gets no response, it is assumed to have collided. Binary exponential backoff is then used to retransmit.

22
Q

How many possible MAC addresses are there?

A

2^48.

23
Q

How is it ensured that no MAC address is reused?

A

IEEE manages the address space and companies purchase from them. Each device’s MAC never changes.

24
Q

Why are MAC addresses needed alongside IP addresses?

A

To handle other network-level protocols.

25
Q

How does a sending host determine the MAC address for a host with a given IP address on the same subnet?

A

The host broadcasts an ARP request to the subnet with the IP address.
The correct IP sends an ARP reply backwards.
The host fills its ARP table with the IP <-> MAC conversion and a TTL.

26
Q

How does a sending host determine the MAC address for a host with a given IP address on a different subnet?

A

It uses ARP to get the MAC address of the router.
It creates a frame with the IP address, but the MAC of the router.
The router’s forwarding table passes it to its adapter and sends a new frame into subnet 2.
[Assuming the router has already ARPed the MAC address of the required IP.]

27
Q

What does an Ethernet frame header contain?

A

8 bytes: Preamble (used to synch clocks)
6 bytes: Destination address
6 bytes: Source address
2 bytes: Type
4 bytes: CRC

28
Q

Is there a need for a MAC Ethernet protocol? Why or why not?

A

No. Most uses of Ethernet is a switch-based star topology.

29
Q

What are the fields in a link-layer switch table?

A

MAC address.
Switch interface to that MAC address.
The time the entry was added.

30
Q

What does a switch do if a frame’s destination MAC is:
a) Not in the table
b) Corresponding to the interface it was received on.
c) Other

A

a) It broadcasts the frame, adding the record to a table.
b) It drops the frame
c) It forwards the frame

31
Q

What are some benefits of switches over hubs?

A

Elimination of collisions
Heterogeneous links
Easier management

32
Q

What are the advantages and disadvantages of switches over routers?

A

Advantages:
- plug-and-play
- high filtering/forwarding rates

Disadvantages:
- Structure must be a tree.
- Large networks would require large ARP tables.
- Susceptible to broadcast storms.