5: Link Layer and LAN Flashcards

1
Q

what is the role of the link layer? what services does it provide?

A

data-link layer has responsibility of
transferring datagram from one node
to physically adjacent node over a link

  • framing
  • reliable delivery
  • flow control
  • error detection
  • error correction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is a cyclic redundancy check?

A

treat the data as a binary number, perform a division operation. if there’s a non-zero remainder, an error is detected

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

what is the motivation behind a multiple access protocol?

A

we have a single shared broadcast channel, want to avoid simultaneous transmissions causing interference and collision

so we need a distributed algorithm that determines how nodes share the channel i.e when they can transmit

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

what classes of MAC protocl are there? (3)

A

channel partitioning, dividing the channel into smaller peices (time slots, frequencies). a node gets a piece for exclusive use

random acess
channel isn’t divided, allows collisions. we “recover” from them instead

“taking turns”
nodes take turns, but nodes with more to send

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

what is TDMA?

A

time division multiple access - a channel partitioning MAC protocol

access to channel in “rounds”
• each station gets fixed length slot (length = packet
transmission time) in each round
• unused slots go idle
• example: 6-station LAN, 1,3,4 have packets to send, slots
2,5,6 idle

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

what is FDMA?

A

a channel partitioning MAC protocol

FDMA: frequency division multiple access
• channel spectrum divided into frequency bands
• each station assigned fixed frequency band
• unused transmission time in frequency bands go idle
• example: 6-station LAN, 1,3,4 have packet to send,
frequency bands 2,5,6 idle

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

what is a random access MAC protcol? an example pls

A
when node has packet to send
• transmit at full channel data rate R.
• no a priori coordination among nodes
• two or more transmitting nodes ➜ “collision”
,
• random access MAC protocol specifies:
• how to detect collisions
• how to recover from collisions (e.g., via delayed retransmissions)
• examples of random access MAC protocols:
• slotted ALOHA
• ALOHA
• CSMA, CSMA/CD, CSMA/CA
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:
• collisions, wasting slots
• idle slots
• nodes may be able to
detect collision in less
than time to transmit
packet
• clock synchronisation

CSMA: listen before transmit:
if channel sensed idle: transmit entire frame
• if channel sensed busy, defer transmission
• human analogy: don’t interrupt others

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

describe the CSMA/CD algorithm

A
1. NIC receives datagram
from network layer,
creates frame
2. If NIC senses channel
idle, starts frame
transmission. If NIC
senses channel busy,
waits until channel idle,
then transmits.
3. If NIC transmits entire
frame without detecting
another transmission,
NIC is done with frame !
4. If NIC detects another
transmission while
transmitting, aborts and
sends jam signal
5. After aborting, NIC
enters binary
(exponential) backoff:
• after mth collision, NIC chooses
K at random from {0,1,2, …, 2m1}. NIC waits K·512 bit times,
returns to Step 2
• longer backoff interval with
more collisions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how do channel partitioning and random access MAC protocols compare? where does taking turns fit in this

A

channel partitioning MAC protocols:
 share channel efficiently and fairly at high load
 inefficient at low load: delay in channel access, 1/N bandwidth
allocated even if only 1 active node!
random access MAC protocols
 efficient at low load: single node can fully utilise channel
 high load: collision overhead
“taking turns” protocols
look for best of both worlds!

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

describe 2 optionsfor taking turns MAC protocols and their pitfalls

A
polling:
• master node “invites”
slave nodes to
transmit in turn
• typically used with
“dumb” slave devices
• concerns:
• polling overhead
• latency
• single point of failure
(master)
token passing:
 control token passed
from one node to next
sequentially.
 token message
 concerns:
 token overhead
 latency
 single point of failure
(token)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is ARP? how does it work within and out of a LAN?

A

address resolution protocol

how to determine
interface’s MAC address,
knowing its IP address?

ARP table: each IP node
(host, router) on LAN has
table
• IP/MAC address mappings for
some LAN nodes:
 < IP address; MAC address;
TTL>
• TTL (Time To Live): time after
which address mapping will be
forgotten (typically 20 min)
A wants to send datagram
to B
• B’s MAC address not in
A’s ARP table.
• A broadcasts ARP query
packet, containing B's IP
address
• destination MAC address =
FF-FF-FF-FF-FF-FF
• all nodes on LAN receive
ARP query
• B receives ARP packet,
replies to A with its (B's)
MAC address
• frame sent to A’s MAC
address (unicast)
A caches (saves) IP-toMAC address pair in its
ARP table until
information becomes old
(times out)
• soft state: information that
times out (goes away)
unless refreshed
• ARP is “plug-and-play”
\:
• nodes create their ARP
tables without intervention
from net administrator

to another LAN:
A creates IP datagram with IP source A, destination B
 A creates link-layer frame with R’s MAC address as destination
address, frame contains A-to-B IP datagram

 frame sent from A to R
 R forwards datagram with IP source A, destination B
 R creates link-layer frame with B’s MAC address as destination
address, frame contains A-to-B IP datagram

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

what was the ethernet topology of old and how has it changed? why?

A

• bus: popular through mid 90s
• all nodes in same collision domain (can collide with each other)
• star: prevails today
• active switch in center
• each “spoke” runs a (separate) Ethernet protocol (nodes do not collide
with each other)
• each link is its own collision domain

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

what is the purpose of the preamble in the ethernet frame?

A

• 7 bytes with pattern 10101010 followed by one byte with
pattern 10101011
• used to synchronise receiver, sender clock rates

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

is ethernet reliable? why?
is ethernet connectionless?
what MAC protocol does ethernet use?

A

connectionless: no handshaking between sending and receiving
NICs
• unreliable: receiving NIC doesn’t send acks or nacks to sending
NIC
• data in dropped frames recovered only if initial sender uses
higher layer rdt (e.g., TCP), otherwise dropped data lost
• Ethernet’s MAC protocol: unslotted CSMA/CD with binary backoff

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

what does transparency mean in terms of an ethernet switch?

A

• hosts are unaware of presence of switches

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

what does plug and play mean in terms of switches?

A

• switches do not need to be configured

17
Q

how does a switch know what devices are accessable through which interface? how does it get this info?

A
each switch has a switch table, 
each entry:
 (MAC address of host, interface
to reach host, time stamp)
 looks like a routing table!
switch learns which hosts
can be reached through
which interfaces
• when frame received, switch
“learns” location of sender:
incoming LAN segment
• records sender/location pair in
switch table
18
Q

what does a switch do if it does not know how to get to the destination?

A

flood

19
Q

how does a switch differ to a router? how are they similar?

A
both are store-and-forward:
 routers: network-layer
devices (examine
network-layer headers)
 switches: link-layer
devices (examine linklayer headers)
both have forwarding
tables:
 routers: compute tables
using routing algorithms,
IP addresses
 switches: learn forwarding
table using flooding,
learning, MAC addresses
20
Q

what is a VLAN? why?

A
switch(es) supporting
VLAN capabilities can
be configured to
define multiple virtual
LANS over single
physical LAN
infrastructure.

We like to have flexibility in a network to move clients and servers into different subnets depending on their role and security level; firewalls are one-such tool that can help us here, which we cover in the following lab. Consider the network shown below, which is representative of a university campus where students can have their own laptops on the network. In this network, there are different security classes of device: student wireless, student wired, staff wireless, staff wired, and business (corporate) devices as distinct from academic staff. We want each of these to have their own subnet so we can control traffic going between them.

21
Q

what is a trunk port?

A

carries frames between VLANS defined over

multiple physical switches