1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
ifconfig
Lists network interfaces
Network Reference Model
Application (HTTP, DNS, IMAP, SMTP)
Transport (TCP, UDP, MPTCP, QUIC)
Network (IP, DSR, AODV, DSDV)
Data Link (Ethernet, 802.11, Bluetooth)
Physical (Bits on wire)
Basic TCP Server
listen() - server
connect() - client
accept() - server
send() - server / client
recv() - client / server
close() - server / client
TCP
Reliable ordered delivery (with retransmission if necessary)
Congestion Avoidance and Control
ACK sent to sender as confirmation after data received by receiver
Issues: Often guesses wrong reason for packet loss in wireless (mobility and interference usually are the reason more than congestion)
sudo sysctl -a | grep tcp: to see tcp configs
Establish connection: Handshake 🙂 SYN (send open packet), SYN ACK (acknowledgement from dest), ACK (acknowledgement of dest ACK from src)
Closing connection: FIN (Close and receive remaining bytes), FIN ACK (acknowledgement), RST (Reset to close and NOT receive remaining packets)
ACKs is src’s sequence number + 1
Window Size
Amount of data sent per round trip time
Receiver’s advertised window (available buffer space)
Congestion window (determined by sender from network feedback)
Packet Loss
Detected by Retransmission Time Out (RTO) and DUPACKs
DUPACK: Fast Retransmission indicates packet loss if 3 DUPACKs received. Retransmit after.
RTO: If ACK not received before RTO timer fires, packet lost. RTO doubles for each time-out.
Congestion Avoidance & Control
Slow Start: Exponential cwnd
Congestion Avoidance: Linear cwnd
Slow Start Threshold (ssthresh) = max[min(min(cwnd, receiver’s adv. window / 2), 2 * Min Segment Size)]
Fast Recovery after Fast Retransmit (No Slow Start needed)
MPTCP
Multipath TCP increases throughput
Use sequence numbers to reassemble segments at the receiver
If failure occurs, fall back on TCP
Benefits: Higher throughput, failover from one path to another, seamless mobility
Challenges: Out of order packets (RTT differences), hard to retransmit packet on different subflow
Connection Established same way as TCP, except SYN ACK contains MP_CAPABLE
ADD_ADDR and REMOVE_ADDR used to add/remove IP addresses to MPTCP connection
MP_JOIN used to associate new subflow with existing MPTCP connection
All subflows should add up to one TCP flow
Picking a path depends. Least congested path has low loss, but high RTT, etc
Uses key during connection setup to verify authenticity of created subflows
Ex: Primary TCP Wifi connection, Backup TCP cellular connection
NAT
Network Address Translators
Change IP/Port numbers
TLS/SSL (OpenSSL)
Transport Layer Security and Secure Socket Layer
Standard for Internet Security
Uses shared secret keys between client and sever
Certificate Authorities (CA) verify public keys from websites
QUIC
UDP is connectionless, so less reliable but faster than TCP
Used for time-sensitive transmissions mostly
QUIC combines UDP speed with TCP reliability
Since it’s hard to make changes in TCP, its faster to implement new protocol on UDP
Lost packets only impact the individual resource
Encrypted
Helps with congestion control and loss recovery
Mobile AdHoc Networks
Mobility means route changes
Formed without needing infrastructure
Routes can contain multiple hops between nodes
Routing Protocols
Next-Hop Table Based: Each node maintains a routing table
Source Routing: Src node controls entire routing path
Easy to control loops
Src can choose between multiple routes