(F) Chapter 5 Link Layer Flashcards
Link Layer Service Model and Multiple Access Protocols:
The link layer provides several critical networking services, including framing, link access, and error detection. It deals with network interface cards (NICs) and drivers that handle the physical aspect of sending and receiving data on the network medium, ensuring that the data arrives intact and is properly understood by the receiving device.
———————————–
Link Layer Addressing - MAC Address:
Link layer addressing is realized through MAC (Media Access Control) addresses, which are unique identifiers assigned to network interfaces for communications at the data link layer. The MAC address ensures that frames on the local network segment are delivered to the correct endpoint.
———————————–
ARP in Action:
Address Resolution Protocol (ARP) is used to map an IP address to a machine’s MAC address. This protocol is necessary because, although IP addresses are used to identify devices on the network layer, MAC addresses are required for the actual data frame delivery on the local network segment.
———————————–
Multiple Access Protocols:
These protocols determine how multiple nodes share the communication channel. For example, in Ethernet, Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is used to manage how devices on the same network segment take turns sending data to prevent collisions.
—————————————
Ethernet CSMA/CD:
Ethernet networks commonly use CSMA/CD for controlling access to the network medium. A device listens to the carrier frequency to detect if the medium is in use and waits before sending its data. If a collision is detected, devices stop transmitting and retry after a random backoff period.
Link layer services
flow control:
* pacing between adjacent sending and
receiving nodes
▪ error detection:
* errors caused by signal attenuation, noise.
* receiver detects errors, signals
retransmission, or drops frame
▪ error correction:
* receiver identifies and corrects bit error(s)
without retransmission
▪ half-duplex and full-duplex:
* with half duplex, nodes at both ends of
link can transmit, but not at same time
——————————————
where is the link layer implemented? ( link layer implemented in network interface card (NIC) or on a chip
* Ethernet, WiFi card or chip
* implements link, physical layer)
——————————————–
two types of “links”
-point to point
-broadcast(shared wire or medium)
Multiple access protocols
▪ distributed algorithm that determines how nodes share channel,i.e., determine when node can transmit
▪ communication about channel sharing must use channel itself!
* no out-of-band channel for coordination
——————————————–
MAC protocols: taxonomy
three broad classes:
#channel partitioning: (divide channel into smaller “pieces” (time slots, frequency, code) ,(* allocate piece to node for exclusive use)**
▪#random access (channel not divided, allow collisions), (* “recover” from collisions)*
#“taking turns” (* nodes take turns, but nodes with more to send can take longer turns)**
channel partitioning MAC protocols: TDMA & FDMA
TDMA: time division multiple access
▪ 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
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
Random access protocols
Link Layer: 6-23
▪ 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:
* ALOHA, slotted ALOHA
* CSMA, CSMA/CD, CSMA/CA
——————————————–
Slotted ALOHA
Link Layer: 6-24
assumptions:
▪ all frames same size
▪ time divided into equal size
slots (time to transmit 1 frame)
▪ nodes start to transmit only
slot beginning
▪ nodes are synchronized
▪ if 2 or more nodes transmit in
slot, all nodes detect collision
operation:
▪ when node obtains fresh
frame, transmits in next slot
* if no collision: node can send
new frame in next slot
* if collision: node retransmits
frame in each subsequent
slot with probability p until
success
Pros:
▪ single active node can
continuously transmit at full rate
of channel
▪ highly decentralized: 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 synchronization
—————————————-
Pure ALOHA
Link Layer: 6-27
▪ unslotted Aloha: simpler, no synchronization
* when frame first arrives: transmit immediately
▪ collision probability increases with no synchronization:
* frame sent at t0 collides with other frames sent in [t0-1,t0+1]
CSMA (carrier sense multiple access)
Link Layer: 6-28
simple CSMA: listen before transmit:
* if channel sensed idle: transmit entire frame
* if channel sensed busy: defer transmission
▪ human analogy: don’t interrupt others!
CSMA/CD: CSMA with collision detection
* collisions detected within short time
* colliding transmissions aborted, reducing channel wastage
* collision detection easy in wired, difficult with wireless
▪ human analogy: the polite conversationalist
CSMA: collisions
Link Layer: 6-29
▪ collisions can still occur with
carrier sensing:
* propagation delay means two nodes
may not hear each other’s just-
started transmission
▪ collision: entire packet
transmission time wasted
* distance & propagation delay play
role in in determining collision
probability
======================
MAC addresses
Link Layer: 6-40
▪ 32-bit IPv4 address:
* network-layer address for interface
* used for layer 3 (network layer) forwarding
* e.g.: 128.119.40.136
▪ MAC (or LAN or physical or Ethernet) address:
* function: used “locally” to get frame from one interface to another
physically-connected interface (same subnet, in IP-addressing sense)
* 48-bit MAC address (for most LANs) burned in NIC ROM, also
sometimes software settable
hexadecimal (base 16) notation
(each “numeral” represents 4 bits)
* e.g.: 1A-2F-BB-76-09-AD
each interface on LAN
▪ has unique 48-bit MAC address
▪ has a locally unique 32-bit IP address (as we’ve seen)
MAC address allocation administered by IEEE
▪ manufacturer buys portion of MAC address space (to
assure uniqueness)
▪ analogy:
* MAC address: like Social Security Number
* IP address: like postal address
▪ MAC flat address: portability
* can move interface from one LAN to another
* recall IP address not portable: depends on IP subnet to which
node is attached
————————
ARP: address resolution protocol
ARP table: each IP node (host, router) on LAN has table
questions: link layer
Consider the following multiple access protocols that we’ve studied: (1) TDMA, and FDMA (2) CSMA (3) Aloha, and (4) polling. For which of these protocols is there a maximum amount of time that a node knows that it will have to wait until it can successfully gain access to the channel? [TDMA and FDMA, Polling]
===========
We’ve now learned about both IPv4 addresses and MAC addresses. Consider the address properties below, and use the pulldown menu to indicate which of these properties is only a property of MAC addresses (and therefore is not a property of IPv4 addresses [This is a 48-bit address.,This address remains the same as a host moves from one network to another.this is a link-layer address.]
===========
We’ve now learned about both IPv4 addresses and MAC addresses. Consider the address properties below, and use the pulldown menu to indicate which of these properties is only a property of IPv4 addresses (and therefore is not a property of MAC addresses - [This address is allocated by DHCP., This is a 32-bit address, This is a network-layer address]
===========
We’ve now learned about both IPv4 addresses and MAC addresses. Consider the address properties below, and use the pulldown menu to indicate which of these properties is a property of both IPv4 addresses and MAC addresses. [this address must be unique among all hosts in a subnet]
===============
Which of the following statements are true about MAC (link-layer) addresses?[Generally stays unchanged as a device moves from one network to another, Generally does not change, and is associated with a device when it is manufactured/created, Has 48 bits.]
===================
match the name of the field with the function/purpose of a field within an Ethernet frame.
Data (payload) field: [The contents of this field is typically (bit not always) a network-layer IP datagram.]
Cyclic redundancy check (CRC) field: [Used to detect and possibly correct bit-level errors in the frame.]
Sequence number field: [This field does not exist in the Ethernet frame]
Type field: [Used to demultiplex the payload up to a higher level protocol at the receiver.]
Source address field: [48-bit MAC address of the sending node.]
chapter4&5
Open Shortest Path First (OSPF). Check the one or more of the following statements about the OSPF protocol that are true.
[Moving an arriving datagram from a router’s input port to output port, Looking up address bits in an arriving datagram header in the forwarding table, Dropping a datagram due to a congested (full) output buffer]
===============
Where does destination address lookup happen? Where in a router is the destination IP address looked up in a forwarding table to determine the appropriate output port to which the datagram should be directed?
&&
Where does “match+action” happen? Where in a router does “match plus action” happen to determine the appropriate output port to which the arriving datagram should be directed?
[At the input port where a packet arrives.]
=====================
Suppose a datagram is switched through the switching fabric and arrives to its appropriate output to find that there are no free buffers [The packet will either be dropped or another packet will be removed (lost) from the buffer to make room for this packet, depending on policy. But the packet will definitely not be be sent back to the input port.]
====================
What are the principal components of the IPv4 protocol [Packet handling conventions at routers (e.g., segmentation/reassembly, IPv4 addressing conventions, IPv4 datagram format.]
==============
What is the definition of a “good” path for a routing protocol? [Routing algorithms typically work with abstract link weights that could represent any of, or combinations of, all of the other answers. ]
==============
What type of routing? Match the name of a general approach to routing with characteristics of that approach.
Dynamic routing: [Routing changes quickly over time.]
Centralized, global routing: [All routers have complete topology, and link cost information]
Static routing: [Routes change slowly over time.]
==================
Open Shortest Path First (OSPF). Check the one or more of the following statements about the OSPF protocol that are true.
[OSPF implements hierarchical routing, OSPF is an intra-domain routing protocol, OSFP uses a Dijkstra-like algorithm to implement least cost path routing.]
=====================
Routing within networks? Among the following protocols, terminology or considerations, indicate those that are associated with “routing within a single network (typically owned and operated by one organization).”
[OSPF, intra-AS routing, intra-domain routing, Driven more by performance than by routing policy]
Chapter 1
What is a protocol? Which of the following human scenarios involve a protocol (recall: “Protocols define the format, order of messages sent and received among network entities, and actions taken on message transmission, receipt”)?
[One person asking, and getting, the time to/from another person, Two people introducing themselves to each other, A student raising her/his hand]
===================
Choose one the following two definitions that makes the correct distinction between routing versus forwarding. [Forwarding is the local action of moving arriving packets from router’s input link to appropriate router output link, while routing is the global action of determining the source-destination paths taken by packets.]
======================
Which of the characteristics below are associated with the technique of packet switching?
[Resources are used on demand, not reserved in advance, Data may be queued before being transmitted due to other user’s data that’s also queueing for transmission, This technique is used in the Internet.]
====================
Which of the characteristics below are associated with the technique of circuit switching?
[Reserves resources needed for a call from source to destination, Frequency Division Multiplexing (FDM) and Time Division Multiplexing (TDM) are two approaches for implementing this technique, This technique was the basis for the telephone call switching during the 20th century and into the beginning of this current century]
==================
What is the Internet? Which of the following descriptions below correspond to a “nuts-and-bolts” view of the Internet?
[A collection of billions of computing devices, and packet switches interconnected by links, A “network of networks”, “A collection of hardware and software components executing protocols that define the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event”]
chapter2 (not needed i think)
The client-server vs peer-2-peer paradigm. Match the given characteristics with the corresponding approach to structuring network applications.
[There is a server that is always on. (client-server paradigm)]
[A process requests service from those it contacts and will provide service to processes that contact it. (peer-2-peer paradigm)]
[There is a server with a well-known server IP address and port. (client-server paradigm)]
[Arbitrary end systems directly communicate with each other (Peer-2-peer paradigm)]
===========================
UDP vs TCP
[Secure transmission of data (Not provided by transport layer protocols)]
[Flow Control. The provided service will ensure that the sender does not send so fast as to overflow receiver buffers.(TCP)]
[Loss-free data transfer. The service will reliably transfer all data to the receiver, recovering from packets dropped in the network due to router buffer overflow.(TCP)]
[Congestion control. The service will control senders so that the senders do not collectively send more data than links in the network can handle.(TCP)]
[Real-time delivery. The service will guarantee that data will be delivered to the receiver within a specified time bound.(Not provided by transport layer protocols.)]
[Best effort service. The service will make a best effort to deliver data to the destination but makes no guarantees that any particular segment of data will actually get there.(UDP)]
[Throughput guarantee. The socket can be configured to provide a minimum throughput guarantee between sender and receiver.(Not provided by transport layer protocols.)]
=======================
HTTP Protocol: descriptions with the corresponding HTTP protocol version or an HTTP protocol property.
[HTTP 1.1 and later versions allow for the client to send multiple requests without waiting for the reply.(HTTP pipelining)]
[HTTP 1.1 and later versions allow for using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair(Persistent HTTP)]
[In HTTP 1.1 and HTTP 2, browsers have the incentive to open multiple parallel TCP connections to reduce stalling, and increase overall throughput. (HTTP over multiple parallel TCP connections)]
[HTTP 1.1 allows for multiple requests over a single TCP connection, where the server responds in-order to GET requests, and a small object may have to wait for transmission behind large objects.(Head-of-line blocking (HOL))]
[HTTP over UDP(This is true only for HTTP version 3.)]
[An HTTP server does not remember anything about what happened during earlier steps in interacting with an HTTP client (assuming cookies are not used).(HTTP is stateless)]
=====================
Conditional HTTP GET. What is the purpose of the conditional HTTP GET request message?
[To allow a server to only send the requested object to the client if this object has changed since the server last sent this object to the client.]
===============
E-mail protocols. Which of the following describes the functionality of the IMAP email protocol?
[Pulls email to a mail client from a mail server.]
—————–
E-mail protocols. Which of the following describes the functionality of the SMTP email protocol?
[Pushes email from a mail client to a mail server.]
===================
Comparing and contrasting HTTP and SMTP. Match each property with the corresponding protocol.
[Uses CRLF.CRLF to indicate end of message.(SMTP)]
[Uses server port 80( HTTP )]
[Operates mostly as a “client pull” protocol.(HTTP)]
[Uses a blank line (CRLF) to indicate end of request header.(HTTP)]
[Uses the peer-2-peer approach for structuring the network application processes.(Does not match the given protocols)]
[Operates mostly as a “client push” protocol.(SMTP)]
[Uses server port 25.(SMTP)]