Jaideep M. More

software engineer


cheatsheet

Application Layer:

TypeNameValue
AhostnameIPv4 Address
AAAAhostnameIPv6 Address
NSDomainhostname of Authoritative DNS Server
CNAMEalias hostnameCanonical hostname
PTRIP Addresshostname

Transport Layer:

  • UDP header:

    1. Port number\texttt{Port number} allow multiplexing and demultiplexing.
    2. length\texttt{length} field specifies the number of bytes in the UDP segment (header + data)
    3. Checksum\texttt{Checksum} is used to check whether errors have been introduced in the segment.
  • TCP Header:

    1. Source Port#\texttt{Source Port\#}, Destination Port#\texttt{Destination Port\#}: for multiplexing and demultiplexing
    2. SEQ#\texttt{SEQ\#}, ACK#\texttt{ACK\#}: for implementing RDT\texttt{RDT}
    3. Header length 4b\texttt{Header length 4b}: specifies the length of the TCP header in 32b\texttt{32b} words. Header length can be variable due to the Options\texttt{Options} field.
    4. The flag\texttt{flag} field contains 6b\texttt{6b}.
      1. ACK\texttt{ACK} the segment contains an ACK
      2. RST\texttt{RST}, SYN\texttt{SYN} and FIN\texttt{FIN} are used for connection setup and teardown
      3. PSH\texttt{PSH} indicates the receiver should pass the data to the upper layer immediately.
      4. URG\texttt{URG} is used to indicate there is data in the segment that the sending side upper layer has marked as urgent.
    5. Receive Window 16b\texttt{Receive Window 16b} is used for flow control. indicates the number of bytes the receiver is willing to accept.
  • Timeout:

    • EstimatedRTT=(1−α)∗EstimatedRTT+α∗SampleRTT\texttt{EstimatedRTT} = (1-\alpha) * \texttt{EstimatedRTT} + \alpha * \texttt{SampleRTT}
    • DevRTT=(1−β)∗DevRTT+β∗∣SampleRTT−EstimatedRTT∣\texttt{DevRTT} = (1-\beta) * \texttt{DevRTT} + \beta * \mid \texttt{SampleRTT}-\texttt{EstimatedRTT} \mid
    • Timeout=EstimatedRTT+4∗DevRTT\texttt{Timeout} = \texttt{EstimatedRTT} + 4 * \texttt{DevRTT}
  • Congestion control tcp_congestion_control

Network Layer

  • Classful Addressing:
CLASS#bits NID#bits HID#IP ADDr1st Octet Range #N/W#N/Ws#HOSTS per N/W
A8242^310 - 1272^72^24 - 2
B16162^30128 - 1912^142^16 - 2
C2482^29192 - 2232^212^8 - 2
D2482^28224 - 239XX
E2482^28240 - 255XX « RESERVED FOR SPECIAL PURPOSE
  • Private IP Address Range:

    1. 10.0.0.0\texttt{10.0.0.0} to 10.255.255.255\texttt{10.255.255.255}
    2. 172.16.0.0\texttt{172.16.0.0} to 172.31.255.255\texttt{172.31.255.255}
    3. 192.168.0.0\texttt{192.168.0.0} to 192.168.255.255\texttt{192.168.255.255}
  • IPv4 Segment:

    1. Version#\texttt{Version\#} - 4b\texttt{4b} specify the IP Protocol version
    2. Header Length\texttt{Header Length} - 4b\texttt{4b} Header length in Bytes\texttt{Bytes} is variable due to Options\texttt{Options}
    3. Type of Service\texttt{Type of Service} - 4b\texttt{4b} allows different types of IP datagrams (requiring low delay, high throughput) to be distinguished from each other
    4. Datagram Length\texttt{Datagram Length} - 16b\texttt{16b} is the total length of the IP Datagram (header + data\texttt{header + data}). Imposes an upper bound to the datagram length (65535B\texttt{65535B}).
    5. Identifier, FLG, Fragmentation Offset\texttt{Identifier, FLG, Fragmentation Offset} - These fields are related to IP Fragmentation
    6. TTL\texttt{TTL} - 8b\texttt{8b} used to ensure that datagrams do not circulate forever in the network. The field is decremented by each router. If TTL == 0\texttt{TTL == 0} then drop then datagram.
    7. Upper Layer Protocol\texttt{Upper Layer Protocol} - Value indicates the specific transport layer protocol the data should be passed
    8. Header Checksum\texttt{Header Checksum} - Helps in detecting error bits in a received IP datagram Router computes the header checksum for each received IP dataframe and detects an error condition. Drop the datagram for which error is detected Checksum must be recomputed and stored again at each router, as TTL\texttt{TTL} field and Options\texttt{Options} may change
    9. SRC and DEST Address\texttt{SRC and DEST Address}
    10. Options\texttt{Options} - Allows IP header to be extended
    11. DATA\texttt{DATA}
  • IPv6 Segment:

    1. Version\texttt{Version}: 4b\texttt{4b} field identifies the IP\texttt{IP} version.
    2. Traffic Class\texttt{Traffic Class}: 8b\texttt{8b} field is similar in spirit to the TOS\texttt{TOS}
    3. Flow Label\texttt{Flow Label}: 20b\texttt{20b} field is used to identify the flow of the datagram
    4. Payload Length\texttt{Payload Length}: 16b\texttt{16b} value is treated as unsigned integer giving the number of bytes in the IPv6\texttt{IPv6} datagram following the fixed 40B\texttt{40B} header.
    5. Next Header\texttt{Next Header}: field is similar in spirit to the Protocol\texttt{Protocol} field
    6. Hop Limit\texttt{Hop Limit}: Similar to TTL\texttt{TTL} field
    7. SRC and DEST Address\texttt{SRC and DEST Address}: various formats of IPv6\texttt{IPv6} address
    8. Data\texttt{Data}
  • DHCP

    1. DHCP\texttt{DHCP} server discovery: Done using DHCP discover message\texttt{DHCP discover message}, broadcasted (255.255.255.255\texttt{255.255.255.255}) by the client.
    2. DHCP\texttt{DHCP} server offer(s): A DHCP\texttt{DHCP} server responds to the client with a DHCP offer message\texttt{DHCP offer message}, which is also broadcasted on the subnet.
    3. DHCP\texttt{DHCP} Request: client responds a selected offer with a DHCP request message\texttt{DHCP request message}, echoing back the configuration parameters
    4. DHCP ACK\texttt{DHCP ACK}: The server responds with a DHCP ACK\texttt{DHCP ACK}, confirming the parameters.

Steps in adding an outside-AS destination in a router’s for- warding table, Pg410 Add flowchart for determining the best path for BGP BGP Route Selection

Own routesCustomers routesSiblings routesProviders RoutesPeers routes
Exporting to ProviderYYYNN
Exporting to CustomerYYYYY
Exporting to PeerYYYNN
  • Multiple Access Protocols:

    • ALOHA: 0.18×B0.18 \times B
    • Slotted ALOHA: 0.37×B0.37 \times B
    • CSMA/CD: 11+5tprop/ttrans\frac{1}{1 + 5t_{prop} / t_{trans}}
  • Ethernet Frame Structure:

    1. Data (46-1500B)\texttt{Data (46-1500B)} : MTU\texttt{MTU} - Maximum Transmission Unit for ethernet is 1500B\texttt{1500B}
    2. Destination Address (6B)\texttt{Destination Address (6B)}: Contains the MAC address of the destination adapter
    3. Source Address (6B)\texttt{Source Address (6B)}: Contains the MAC address of the adapter that transmits the frame into the LAN
    4. Type (2B)\texttt{Type (2B)}: The type field permits ethernet to multiplex the network layer protocols.
    5. CRC\texttt{CRC}: Cyclic Redundancy Check is used for error detection
    6. Preamble (8B)\texttt{Preamble (8B)}: The ethernet frame begins with an 8B\texttt{8B} preamble field.

Multimedia Networking

  • DASH Working:

    • The client first requests the manifest file and learns about the various versions.
    • The client then selects one chunk at a time by specifying a URL and a byte range in an HTTP GET request message for each chunk.
    • While downloading chunks, the client also measures the received bandwidth and runs a rate determination algorithm to select the chunk to request next.
  • VOIP - Removing Jitter:

    • pp - playtime, tt - time of generating, qq - fixed delay usually 400ms400ms
    • Fixed Playout Delay: p=t+qp = t + q
    • Adaptive Playout Delay: For each talk spurt: pi=ti+di+Kvip_i = t_i +d_i +Kv_i

Datacenter Networking

  • Bisection Bandwidth
  • Full Bisection Bandwidth
  • Over subscription Ratio