Networking Engineering / TCP, UDP & CONNECTION LIFECYCLE / NET-006
TCP Handshake Capture
Explore concept graphPraktik dan verifikasi mandiri
Project — TCP Handshake Capture
Konsep 1 / 3
Read SYN, SYN-ACK and ACK sequence and acknowledgement fields from a real TCP connection trace.
Record a handshake for a *new* listener on a different ephemeral port, identify both ISNs and the ACK values, and explain how the two endpoint ports establish one 4-tuple.
Kasus yang berbeda dari contoh: A new port and separately captured connection, rather than repeating the numeric example.
Bukti yang bisa kamu periksa
- Real Wireshark/tcpdump trace showing SYN, SYN-ACK, ACK, endpoint addresses/ports and seq/ack fields.
Jika ingin lanjut
Inspect how TCP delivers bytes and detects missing acknowledged data.
Jika terputus: Find the initial client SYN first, then verify the response and client confirmation.
Konsep 2 / 3
Explain TCP stream ordering and distinguish retransmitted segments or transport timeouts from HTTP error responses.
In a disposable VM or namespace, collect a different capture containing one genuine TCP retransmission or document that none occurs in the controlled attempt; classify any observed loss using sequence/ACK evidence without manufacturing it.
Kasus yang berbeda dari contoh: Real packet-loss evidence or a truthful no-loss observation instead of repeating the worked capture interpretation.
Bukti yang bisa kamu periksa
- A timestamped packet trace or explicit no-retransmission observation; if retransmission occurs, show repeat sequence range and related ACKs.
- A paragraph distinguishing connection timeout or retransmission from HTTP error status.
Jika ingin lanjut
Observe how graceful close differs from a stopped listener or abort.
Jika terputus: First ask whether you are observing a TCP segment, a stream callback, or an HTTP response.
Konsep 3 / 3
Differentiate a normal TCP stream EOF, an abort/reset and connection refusal after a listener stops.
Capture an independent TCP connection close in a disposable VM and identify FIN, ACK or a reset where applicable; compare the trace with a fresh connection attempt after stopping its listener.
Kasus yang berbeda dari contoh: A different port and real close capture, unlike the local Node stream-level demonstration.
Bukti yang bisa kamu periksa
- Real SYN/SYN-ACK/ACK plus close packet trace with source/destination ports and plausible FIN/ACK or RST interpretation.
- Runnable Node local fixture output, clearly marked stream-level rather than packet-level.
Jika ingin lanjut
Relate the trace to server binding and HTTP request reachability without treating proposed related edges as hard prerequisites.
Jika terputus: Distinguish first: a connected stream ending versus an attempted connection never established.
Gunakan hanya VM lokal atau network namespace yang kamu miliki. Pada terminal pertama, jalankan listener berikut dan biarkan aktif:
node -e "require('node:net').createServer(s=>s.end('ack')).listen(4040,'127.0.0.1')"Pada terminal kedua, mulailah capture sebelum client connect (Linux, antarmuka loopback lo):
sudo tcpdump -i lo -nn -s 0 -w /tmp/tcp-handshake.pcap 'tcp port 4040'Pada terminal ketiga, buat koneksi singkat:
nc 127.0.0.1 4040Hentikan capture setelah koneksi berakhir, lalu analisis pcap di Wireshark atau baca ulang menggunakan tcpdump -nn -S -r /tmp/tcp-handshake.pcap. Jangan mengasumsikan retransmission ada pada loopback. Jika tidak terjadi, dokumentasikan bahwa capture tersebut tidak mengandung retransmission dan jelaskan satu skenario retransmission berdasarkan RFC 6298 secara terpisah. Modifikasi packet loss hanya pada VM atau namespace disposable, bukan jaringan production.
TCP Handshake Capture — SYN, ACK, retransmission, close
Hubungkan client ke listener localhost, identifikasi handshake SYN/SYN-ACK/ACK dan connection close dari packet capture nyata; jelaskan nomor sequence/ACK dan satu skenario retransmission. Bedakan trace dari Node stream fixture.
Latihan manual — jalankan sendiri di lingkunganmu. Kriteria di bawah adalah pemeriksaan mandiri, bukan penilaian otomatis.
Kriteria selesai
- Tunjukkan capture nyata berisi SYN, SYN+ACK, ACK untuk koneksi yang sama, lengkap dengan 4-tuple endpoint serta arah paket.
- Jelaskan progression ISN/ACK dan apakah Wireshark memakai relative sequence numbers.
- Identifikasi peristiwa FIN/ACK atau RST yang memang muncul pada capture; jangan merekayasa flag yang tidak diamati.
- Jelaskan satu skenario retransmission yang konsisten dengan RTO dan ACK; bila tidak terjadi pada capture, tulis bahwa itu skenario hipotetis, bukan bukti packet loss.
- Jalankan fixture Node lokal, catat empat baris output, dan bedakan stream EOF/ECONNREFUSED dari packet evidence.
- Jangan mengarang HTTP 5xx ketika capture hanya menunjukkan kegagalan atau penundaan transport.
Kriteria verifikasi mandiri
- Mampu membaca handshake dan menjelaskan nomor sequence/ACK dari capture nyata.
- Memahami stream bytes dan bahwa batas write tidak sama dengan batas TCP packet.
- Membedakan retransmission transport dan timeout dari respons HTTP.
- Membedakan FIN, RST, dan koneksi baru yang ditolak berdasarkan sumber bukti yang sesuai.