Link layer and LANs Flashcards

1
Q

What is the Link Layer?

A

Communication channels that connect adjacent nodes along paths.

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

What is the name give to a level-2 packet?

A

Frame, encapsulates a datagram

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

What is the data-link layer responsible for?

A

The transferring of a datagram from one node to a physically adjacent node over a link

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

Do datagrams travel in the same way on every link?

A

No, they can be transferred by different link protocols on different links. IE: Ethernet, 802.11 etc..

Each link protocol provides different services.

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

What services does the Link Layer provide?

A

Framing and link access

Reliable delivery between adjacent nodes

Flow control

Error detection

Error correction

Half-duplex and full duplex

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

What is framing and link access?

A

Encapsulate datagrams into a frame and add header

Channel access if shared medium.

MAC addresses used in frame headers to identify source and destination.

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

Why does link layer do reliable delivery?

A

Wireless links has high error rates, so we can do link-layer retransmits to implement this.

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

Why is error detection required?

A

Errors caused by signal attenuation, noise.

Receiver detects presence of errors and signals sender for retransmission or drops teh packet.

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

Where is the link layer implemented?

A

NIC or chip level. Attaches onto host’s system bus.

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

What does a NIC do when sending?

A

Encapsulates datagram in frame and adds error checking bits, rdt, flow control etc.

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

What does a NIC do when receiving?

A

Looks for errors, rdt, flow control etc.

Extracts the datagrams, passing it to the upper layer at the receiving side.

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

How is data redundancy implemented in frames?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How is a single bit parity done?

A

Check parity bit and then compare to if it should be even or odd.

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

What are the drawbacks of single bit parity?

A

If the corruption flips a 1 and a 1, making data contain same number of odds and evens then it doesn’t work.

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

How does two-dimensional bit parity work?

A

Check row and column parity, in matrice.

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

What is the cyclic redundancy check?

A

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.

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

Can a device have multiple access links?

A

Point-to-point:
PPP for dial-up access, ethernet switch.

Broadcast (shared wire or medium)
Old-fashioned Ethernet

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

What happens when two or more devices try and transmit on a shared channel?

A

Collision occurs, if node receives two or more signals at the same time.

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

What does the multiple access protocol do?

A

Determines how nodes share a channel, determining when a node can transmit.

Communication about channel sharing must use the channel

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

What are the classes of MAC protocols?

A

Channel partitioning
Random Access
Taking turns

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

How does channel partitioning work at the link-layer level?

A

Divide channel into smaller pieces. Can split by:
time slots, frequency
code etc..

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

How do random access protocols work at the link-layer level?

A

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.

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

What assumptions does slotted ALOHA make?

A

Frames same size

Time divided into equal time slots

Nodes start to transmit only slot beginning

Nodes are synchronised

2> nodes transmit in slot, all nodes detect it.

24
Q

How does Slotted ALOHA operate?

A

When node obtains fresh frame, transmits in the next slot.

If there’s no collision, node can send new frame in next slot.

If there’s collision, node retransmits frame in each subsequent

25
Q

What are the benefits of slotted ALOHA?

A

Single active node can continuously transmit at full rate of channel

Highly decentralised as no need for sync: only slots in nodes need to be in sync

Simple

26
Q

What are the cons of slotted ALOHA?

A

Collisions, wasting slots.

Idle slots

Nodes may be able to detect collision in less than time to transmit packet.

Clock synchronisation

27
Q

Is slotted ALOHA efficient?

A

Channel isn’t used for useful transmissions all tthe time.

28
Q

What is unslotted ALOHA?

A

Simpler and no synchronisation that Slotted has.

When frame first arrives, transmit immediately.

29
Q

What is the danger or transmitting the frame immediately with unslotted ALOHA?

A

Frames can collide with frames that are almost finished transmitting, or frames that are sent just as it is finishing transmission.

30
Q

What is CSMA?

A

Carrier sense multiple access

If channel sensed is idle, transmit entire frame. Otherwise, defer transmission.

31
Q

Can collision happen in CSMA?

A

Yes, propagation delay means two nodes may not hear each other’s transmission. On collision, entire packet transmission time wasted.

32
Q

What does CSMA/CD do on collision detection?

A

collisions detected within short time, colliding transmissions aborted, reducing channel wastage.

33
Q

Is it easier or harder to detect collisions in Wireless LANS than Wired LANS?

A

Harder because received signal strength is overwhelmed by local transmission strength

34
Q

What is the algorithm used by Ethernet CSMA/CD?

A

Receive datagram, create frame.

Idle channel? Transmit. Else, wait.

If no collision during transmission, fine. Else: abort sending a sends jam signal.

After aborting, sleep for a random number of secs.

35
Q

What taking turns MAC protocols are there?

A

Polling

Token passing

36
Q

How does polling work?

A

Master node “invites” slave nodes to transmit in turn.

Concerns:
Polling overhead
Latency
Single point of failure

37
Q

How does token passing work?

A

Control token passed from one node to next sequentially

Token message

Concerns:
Token overhead
latency
Single point of failure in the token.

38
Q

How many bits is a MAC address?

A

48 bits, hexadecimal

MAC set at manufacturing point.

Media Access Control

39
Q

What is ARP?

A

Address Resolution Protocol

ARP table: each IP node (host, router) on LAN has table.

40
Q

How does ARP map IP to MAC address?

A

If MAC address isn’t in the ARP table, broadcast an ARP query containing the IP address being looked for.

If someone responds, cache MAC in arp table and send packet.

41
Q

How are frames handle during routing?

A

Each router removes the frame to check the IP. If they don’t know it they re-encapuslate and forward. If the router recognises the address then it sent to the host.

42
Q

What is Ethernet?

A

Dominant wired LAN technology.
10Mbps - 10 Gbps

Ethernet topology
Bus: All nodes in same collision domain

Star: Active switch in center, each ‘spoke’ runs a seperate ethernet protocol (don’t collide)

43
Q

What is the structure of an ethernet FRAME?

A

Preamble | dest. addr | src addr | type | payload | CRC

type: Indicates higher layer protocol

CRC: Cyclic redundancy check at receiver.

44
Q

What is the preamble in an Ethernet frame?

A

preamble is 7 bytes with pattern 10101010 by followed by one bytes with pattern 10101011 - used to sync receiver and sender clock rates.

45
Q

What are the address fields in an ethernet frame?

A

6 byte source, destination MAC addresses.

If adapter receives frame with matching destination address, or with broadcast address, it passes data in frame to network layer protocol.

46
Q

What are the issues related with Ethernet?

A

Connectionless: No handshaking

Unreliable: receiving NIC doesn’t send acks or nacks to sending NIC.

47
Q

What is a switch?

A

Link-layer device

stores and forwards ethernet frames

Examine incoming frame’s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forward on segment, uses CSMA/CD to access segment.

Transparent in topology

Self-learning

48
Q

How do switches handle multiple simultaneous transmissions?

A

Hosts have dedicated, direct connection to switch. Switches buffer packets.

Ethernet protocol used on each incoming link, but no collisions: Full duplex

49
Q

How does a switch know what to switch packets to?

A

Has a switch table, which contains:

MAC address of host, interface to reach host, time stamp.

Switch self-learns what hosts can breached through what interface.

50
Q

How does a switch know what frame to filter or forward?

A

If we know where the packet is meant to go, send it out that interface. If we don’t, flood.

51
Q

What are the differences between switches and routers?

A

Both are store and forward.

Both have forwarding tables.

Routers examine network-layer headers, whereas switches do link-layer

52
Q

What is a VLAN?

A

Switches supporting VLAN capabilities can be configured to define multiple Virtual LANS over single physical LAN architecture.

53
Q

How does a port-based VLAN work?

A

Switch ports grouped so that single physical switch operates as multiple virtual switches using switch management software.

54
Q

What’s the point in using a VLAN?

A

Isolates parts of the network, can simulate multiple LANS on a single switch

55
Q

What are the benefits of using a port-based VLAN?

A

Traffic isolation: Frames to/from ports 1-8 can only reach ports 1-8

Dynamic membership: Ports can be dynamically assigned among VLANs

Forwarding between VLANS: Done via routing, just as with seperate switches.

56
Q

How can VLANS spanning multiple physcial switches be connected?

A

Trunk port: Carries frames between VLANS defined over multiple physical switches.

Frames have to have VLAN ID info.

Port mirroring: Everything on this switch port is outputted on another port.

57
Q

what is the 802.1Q VLAN frame? What’s it used for?

A

Added header fields for use in VLANS.

2-byte tag protocol identifier

Tag Control inofrmation (12 bit VLAN ID field, 3 bit priority field)