Computer Networks final exam notes

You will be given these pages of notes on the exam.

Datagram forwarding: each switch extracts the destination address from the packet, looks that address up in its <dest,next_hop> forwarding table, and then forwards the packet to the matching next_hop neighbor.

Virtual-circuit forwarding: each switch notes the arrival interface (port), and then looks up the <VCIin, portin> in its connections table, retrieving <VCIout, portout>. The VCI field is then rewritten to VCIout, and the packet is forwarded via portout.

Knee congestion: queue has started to build. Cliff congestion: packets are dropped.

Switched Ethernet: a switch learns the port by which to reach destination A when a packet from A arrives.

IP addresses: The length of the network prefix is often denoted with a slash, eg 147.126.0.0/16. The slash notation works also with subnets, and corresponds to the subnet mask.

Subnets involve moving the net/host division point further right. This allows hierarchical routing within an organization, while at the same time allowing use of a single network prefix to reach the organization.

Bandwidth delay = packet_size * bandwidth. Propagation delay = time for one bit to travel from source to destination.

Store-and-forward delay: if a packet passes through a router/switch R, then R must read the entire packet before beginning to retransmit it. This adds one more bandwidth delay.

The bottleneck link is the link with the smallest bandwidth.

Sliding windows formulas:

If host A knows B's IP address, has determined it is on the same LAN, and wants to find B's physical address, it broadcasts an ARP query. B receives this, and responds directly to A. The pair <BIP,Bphys> is then entered into A's ARP cache.

Routers using distance-vector algorithms exchange tables of <dest,cost> pairs. If router A receives <D,cD> from neighbor N at distance cN, A updates its table as follows:

  1. D is a previously unknown destination: A adds ⟨D,N,cD+cN
  2. D is a known destination with entry ⟨D,M,c⟩, but c > cD+cN: A updates the entry for D to ⟨D,N,cD+cN⟩.
  3. A has a previous entry ⟨D,N,c⟩, but c < cD+cN: A updates the entry for D to ⟨D,N,cD+cN⟩.

Split horizon: N does not report a destination to D if N uses D as its next_hop for that destination

Triggered updates: If N discovers a problem, it sends out a new report immediately

Canonical transport issues:

TFTP:

TCP only allows data transmission after a connection has been established. Connection establishment: three-way handshake (3WHS):

    --->  SYN  -->
    <--SYN+ACK
    --->  ACK  -->

Each side includes its Initial Sequence Number, or ISN, in its SYN.

FIN closes the connection. When one side sends a FIN, it in effect promises not to send more data, though the other side may still send data.

CIDR: Forwarding tables contain entries of the form

    network_addr / length

An address matches if its first length bits match the first length bits of network_addr. If there are multiple matches for a given address, the match with the largest length wins.

This allows hierarchical and provider-based routing.

BGP destinations always come with an AS-path attribute.
BGP routers make three kinds of decisions:

TCP Reno: On packet loss, cwnd is cut in half. If there was no loss during the previous RTT, cwnd is updated according to the following rules:

slow start, no loss:          cwnd += 1 per packet, cwnd *= 2 per RTT
linear-increase, no loss: cwnd += 1/cwnd, per packet; cwnd += 1 per RTT

A slight generalization of the above is AIMD(𝛼,𝛽): for RTTs with no loss, cwnd += 𝛼 per RTT. For RTTs with loss, RTT = (1-𝛽)*RTT. TCP Reno is AIMD(1.0, 0.5).

TCP Tahoe: uses Fast Retransmit: a packet is retransmitted when the third dupACK is received

TCP Reno adds Fast Recovery: the sender uses the returning dupACKs to begin transmission of new data. During recovery, the sender uses Est Flightsize (EFS) instead of cwnd.

SACK TCP: TCP with Selective ACKs: ACK packets contain the highest cumulative ACK, and also the three most recent blocks of contiguous packets received.

RED TCP routing: the router drops occasional TCP packets when its queue is about half full, as a way of signaling TCP senders that they should reduce their window size. Dropping only occasional packets (randomly) reduces the probability of multiple drops per window.

ECN TCP: the router marks TCP packets when its queue is about half full. The sending TCP responds to this marking as if the packet were lost: it divides cwnd in half. However, no packet is actually lost.

DECBit: an earlier packet marking scheme.

TCP fairness: assuming synchronized losses, two TCP connections that share a bottleneck link and which have RTTs in proportion 1:𝜆 will receive bandwidth in proportion 𝜆2:1 (the shorter path will receive more bandwidth).

If p is the TCP Reno loss rate, then cwnd ≃ 1.225/√p. This allows non-TCP senders to calculate the window size TCP Reno would use, and to thus achieve TCP Friendliness.

TCP Vegas monitors the actual RTT and the bandwidth, and uses these to calculate an estimate of the connection's queue utilization. It then tries to keep the queue utilization between two small numbers 𝛼 and 𝛽, typically 2 and 4.

TCP Westwood also monitors the actual RTT and the bandwidth. This allows it to keep track of the current transit_capacity. On loss, cwnd drops to max(cwnd/2, transit_capacity). If cwnd < transit_capacity, cwnd is not changed.