1/59
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Local DNS
near end hosts who are configured with local server Root: 13 servers globally TLD, Authoritative DNS
Iterative DNS Query
Ask server who to ask next
DNS Cache
records have TTL, can negatively cache names which don't work. Replicate for reliability / load balance. Queries may return additional records which open up cache poisoning vulnerabilities
HTML
Hypertext Markup Language, references objects, formats text, embed hyperlinks
URL Syntax
protocol://hostname[:port]/directorypath/resource
HTTP
Hypertext Transfer Protocol, request-response, needs global namespace, resource metadata, stateless, ASCII
HTTP Request
client initiates TCP connection - SYN, SYNACK, ACK (+request), server responds, client receives, termination exchange HTTP Metadata: info about a resource, separate entity
Cookies
Provide state, stored by client and sent to server with requests, can provide authentication
HTTP Performance
Stop & Wait, Concurrent request in multiple channels may not preserve order
Pipelined
batch request/response, 1 connection, -
Forward Proxy
cache close to clients, reduce network load and latency, ISP or corporate LANs
Content Distribution Networks
forward & reverse, PULL result of clients requests, PUSH except high access rate
Persistent Connections
maintain across multiple requests, reduce overhead, allow TCP to learn RTT & grow window
Hosting
Multiple sites per machine, separate process per site or take full host name in get request. Multiple machines per site, replicate popular sites to reduce load, locate content closer to client.
SIP
Session Initialisation Protocol, gives location, availability, capabilities, session setup, session management
File Distribution
Client Server: dcs = max{NF/us , F/min(di)} P2P: dP2P = max{F/us , F/min(di) , NF/(us + ∑ui) }
BitTorrent
tracker: server tracks peers participating in torrent. torrent: groups of peers exchanging chunks of file. 256KB chunks, register with tracker, get list of peers, connect to subset, upload simultaneously, peers come and go, peers ask each other for list of chunks they have, then send requests for missing chunks, rarest first, send chunks to top 4 highest senders to you, re-evaluate every 10s, every 30s randomly select new peer to start sending chunks to
Distributed Hash Table
distributed P2P database with (k,v) pairs, peers can query and insert into database
Skype
pairs communicate, clients grouped under supernodes, index maps usernames to IPs, separate login server. If both peers behind NATs, outsider peer cannot make call to insider, each peer initiates session with relay & use this
Transport
provide logical communication between app processes on different hosts, run in end systems, break messages into segments pass to network layer, reassemble messages and pass to app layer
Demultiplexing
delivering received segments to correct socket, use IP addresses & port numbers from datagram Multiplexing: gather data from sockets and enveloping data with header
Connectionless Demux
Sockets with port#, UDP Socket: dest IP & port#, datagrams with diff source IP/port directed to same socket Connection-oriented Demux: TCP Socket: source & dest IP, source & dest port#, use all four values to direct socket, support simultaneous sockets identified by 4-tuple, web servers have different socket per client
UDP
'best effort' may be lost/out of order, 'connectionless' no handshaking, segments handled independently. Can be used for streaming media (loss tolerant, rate sensitive), rate not throttled by congestion control; DNS, SNMP, reliability can be added at app layer
Advantages & Disadvantages of UDP
UDP Header
source & dest port#, length, checksum
UDP Checksum
segments as 16 bit ints, addition (1's complement sum) Eg. add 2 ints, add carryout to result, flip bits
Rdt1.0
reliable transfer over reliable channel
Rdt2.0
channel with bit errors, need error detection (checksum), error recovery ACK &/ NAK - receiver feedback
Rdt2.1
ACK/NAK may corrupt, retransmit, seq# to avoid duplicates
Rdt2.2
NAK-free, ACK for last packet received including seq#, duplicate ACK acts like NAK - retransmit current pkt
Rdt3.0
channel with packet loss, sender times-out if no ACK received, retransmit. Could get duplicate but use seq#
Utilisation
(Stop & Wait) Usender = (L/R) / (RTT + (L/R))
Pipelined
multiple 'in flight' unACKed packets, need more seq#s, buffering at sender/receiver, better utilisation
Selective Repeat
sender has upto N unACKed packets, receiver ACKs individual packets, sender has timer per packet, only retransmit that packet on timeout, buffers out of order packets, reorder later.
Window size
must be ≤ (seq# range / 2), otherwise can't distinguish retransmit on lost ACK from out-of-order
Go-Back-N
sender has upto N unACKed packets, receiver sends cumulative ACKs, sender has timer for oldest unACKed packet, retransmit all on timeout, discard out-of-order packet
Automatic Repeat ReQuest (ARQ)
error-control method for data transmission that uses ACKs & timeouts to achieve reliable data transmission over an unreliable service. Eg Stop & Wait, Go-Back-N, Selective Repeat
TCP
point to point, reliable, inorder byte stream, pipelined, congestion & flow control, pipelined, buffers, connection oriented (handshaking), bi-directional data flow in same connection, maximum segment size (MSS). Doesn't specify how to handle out-of-order segments, this may leave TCP open to out-of-order attack
TCP Segment
source & dest port#, seq#, ack#, receive window, checksum, options, flags and application data
Sample RTT
by measuring time between transmission & ACK receipt, average over several, ignore retransmits
TCP Estimated RTT
(1-α)EstRTT + αSampleRTT, exponentially weighted moving average, 0 ≤ α ≤ 1, eg 0.125
TCP DevRTT
(1-β)DevRTT + β(SampleRTT-EstRTT) Timeout (RTO) = EstRTT + 4*DevRTT, typically β = 0.25
TCP Send
create segment with seq# = # of 1st data byte in segment, start timer for oldest unACKed segment
TCP Receive
If in-order then delay ACK by ½s unless ∃ ACK pending, else send duplicate ACK, if closing gap then ACK
Fast Retransmit
if sender receives 3 ACKs for same data, assumes next segment lost & retransmits before timeout
Silly Window Syndrome
small MSS values may persistent if send immediately, try to fill segment b4 send (timeout)
Flow Control
preventing senders from overrunning the capacity of the receivers
Congestion Control
preventing too much data being injected into network and overloading switches or links
TCP Flow Control
receiver includes rcvWindow in segments = buffer free space, sender unACKed data ≤ rcvWindow
TCP Connection Management (open connection)
Establish: clients sends TCP SYN to server, specifies initial seq#, server replies with SYNACK, allocates buffers, specifies server initial seq#, client replies with ACK which may contain data
Close TCP connection
client sends TCP FIN control segment to server, server replies with ACK, prepares to closes connection, sends FIN. Client replies with ACK, enters timed wait, server receives ACK, connection closed
Causes of congestion
router reaches max achievable throughput, router buffer overflows & drops packets, retransmission worsens problem, wasted upstream capacity for dropped packet
Congestion Control challenges
single flow - bottleneck B, single flow - variable B, multiple flows sharing Bandwidth
End-end congestion control
no feedback from network, inferred by end system by loss, delay
Network-assisted congestion control
routers provide feedback to end systems, flag for congestion or specify rate
TCP Congestion Control
(AIMD) additive increase: CongWin += 1MSS every RTT, on 3 dup ACKs, multiplicative decrease: halve CongWin, Sender limits transmission, # unACKed packets ≤ CongWin, rate ≈ CongWin/RTT
TCP Slow Start
CongWin = 1MSS, double CongWin every RTT (ACK) until loss, if timeout -halve threshold, SS then AI
TCP Throughput
throughput is W/RTT, after loss drops to W/2RTT, average ¾ W/RTT = (MSS/RTT) √(3/2p)
Caching
request(ifmodifiedsince), response(expiry/no cache)
Reverse Proxy
cache close to server, decrease server load, content providers with static content