CS2105 Reference
CS2105 Reference
Computer Networks Mapping between hostname and IP address (and others) TCP/UDP must read transport header to decide which
socket to deliver the message to (de-multiplexing); when
Receiver individually ACKs all correctly received packets;
buffers out-of-order packets as needed
are stored as resource records (RR)
sending messages from application layer, TCP/UDP must
RR format: (name, value, type, ttl)
Sender maintains timer for each unACKed packet; if timer
Basics combine packets from different messages into the same expires, retransmit only that unACKed packet
network interface (multiplexing)
Circuit switching: type name value
- UDP connectionless de-multiplexing: decide TCP Reliability
TCP sequence number: “byte number” of first byte of
Call setup required A hostname IP address
Circuit-link (guaranteed) performance NS domain hostname of au- using destination port only
Circuit segment idle if not used by call (no sharing) (nus.edu.sg) thoritative NS - TCP connection-oriented de-multiplexing: data in a segment
Packet switching: CNAME alias name canonical name decide using TCP acknowledgement number: sequence number of
Share network resources 13 root servers globally that answer NS queries for TLDs (src IP addr, src port, dest IP addr, dest port) next byte expected (“cumulative ACK”)
Resources used on demand
Excessive congestion is possible Local DNS server caches mapping and acts as proxy Maximum segment size: maximum number of data bytes
Maximum packet size: includes header bytes
TCP delayed ACK: Wait up to 500ms for second
Sender breaks message into pkts; receiver reassembles them
Processing delay: Check bit errors; determine output link Dynamic Host Configuration Protocol
© CS2105 Lecture 6 - 11
segment; use one ACK for two segments only
Queuing delay: Waiting in queue for transmission Arriving DHCP server
Dynamic TCP timeout:
Transmission delay: Time taken to push bits onto link special IP
client 223.1.2.5
SampleRT T := RTT of new packet
Propagation delay: Time for bits to travel in link EstRT T ← (1 − α) × EstRT T + α × SampleRT T
(typically α = 0.125)
End-to-end packet delay: Time for packet to travel from broadcast
address DevRT T ← (1−β)×DevRT T +β ×|SampleRT T−EstRT T |
source to destination (typically β = 0.25)
Throughput: Bits transmittable per unit time for Your IP T imeoutInterval ← EstRT T + 4 × DevRT T
end-to-end communication
address
TCP fast retransmission: If 3 duplicate ACKs (i.e. 4 in
Application message Transport segment total) are received, next segment is treated as lost and thus
Network datagram Link frame Reliable Data Transfer retransmitted immediately
rdt 1.0: Perfectly reliable Maintains single timer and resends oldest unACKed packet
on timeout; timer started only when prev. ACK is received
Application Layer rdt 2.0: May corrupt packets
Stop-and-wait protocol; receiver sends ACK or NAK back Network Security
Common Protocols Fatal flaw if ACK is corrupted, because sender will resend
App. Protocol Tpt. Protocol Port KS : session key
May also provide other network information:
packet and receiver will treat it as new packet + −
rdt 2.1: To fix rdt 2.0, add 1-bit sequence number to each Integrity / Authenticity: Bob can verify Alice is sender
HTTP TCP 80 (default) KA : public key KA : private key 2 keys per user
HTTPS TCP 443 (default) - first-hop router, local DNS server, subnet mask
DNS UDP 53 packet; receiver can now detect and discard duplicate
Message authentication code: Send H(m + KS ) ⊕ m
SMTP TCP 25 packet (but must still send ACK for the duplicate packet) −
Digital signature: Send KA (m) ⊕ m
DHCP
RIP
UDP
UDP
67 (svr) 68 (client)
520
Transport Layer
rdt 2.2: Same functionality as rdt 2.1, but is NAK-free; Digital sign.: Bob can prove to third party Alice is sender
−
receiver ACKs sequence number of last received packet Signed message digest as digital sign: Send KA (H(m)) ⊕ m
TCP vs UDP
Hypertext Transfer Protocol Transmission Control Protocol: rdt 3.0: May corrupt packets, may lose packets, may incur Confidentiality: Send K (<everything from above>)
+
B
HTTP 1.0 closes connection after transmitting single object Reliable transport arbitrary long packet delay
Sender waits “reasonable” amount of time for ACK, and
Hybrid: Send K (K ) ⊕ K (m ⊕ K (H(m)))
+
B S S
−
A
identifier
IP datagram length
IP header data
(typically a TCP or UDP segment)
Categories: of IP address to MAC address (and TTL) of other nodes in
the same subnet Manchester coding inverts the signal in the
20 bytes Channel partitioning: divide channel into smaller “pieces”
middle of a bit.
IP datagram length includes IP header (some fields are not shown)
(e.g. time slots, frequency); each node exclusively allowed
to transmit in given piece (unused pieces go idle)
If the next hop node is not yet in the ARP table, an ARP A −𝑣𝑣𝑣𝑣 to +𝑣𝑣𝑣𝑣 transition represents 1. A +𝑣𝑣𝑣𝑣 to −𝑣𝑣𝑣𝑣
query packet (with required IP address) is broadcasted to
Header checksum only for header bytes; Taking turns: nodes take turns to transmit (but can
cooperatively forfeit turn if there is nothing to transmit)
subnet; node with correct IP address will respond with its transition represents 0.
Manchester: Invert signal in the middle of a bit
16-bit 1’s complement sum (just like TCP) MAC address, sent back to source MAC address
© CS2105 Lecture 10 - 22