Understand and troubleshoot HTTP/2 and TLS protocols end-to-end¶
π§© Stage 1 β Foundations: Internet, TCP/IP, and HTTPS Concepts¶
π― Objectives¶
- Review the fundamentals HTTP builds upon.
- Understand the layers beneath TLS (TCP/IP).
- Learn how HTTPS fits in the overall communication stack.
π Topics¶
- TCP 3-way handshake, retransmissions, congestion control
- DNS resolution
- HTTP vs HTTPS
- Ports 80 and 443
- Role of TLS in securing HTTP
π§ͺ Lab Exercises¶
- Use
curl -v http://example.comandcurl -v https://example.comto compare. - Capture packets with
tcpdumpor Wireshark during both sessions. - Identify TCP handshakes, TLS negotiation, and data exchange.
π Stage 2 β Understanding TLS (Transport Layer Security)¶
π― Objectives¶
- Learn what TLS does (encryption, authentication, integrity).
- Understand the TLS handshake step by step.
- Differentiate between TLS 1.2 and TLS 1.3.
- Explore certificates, CA chains, and ciphersuites.
π Topics¶
- Public Key Infrastructure (Root, Intermediate, Server certs)
- Certificate signing and verification
- TLS handshake message flow
- Cipher suites: key exchange, authentication, encryption, MAC
- Session resumption and 0-RTT in TLS 1.3
π§ͺ Labs¶
- Generate certificates with OpenSSL:
Then issue an intermediate and server cert.
- Run a local HTTPS web server using your certs (e.g., nginx or Python http.server --ssl).
- Capture and analyze TLS handshake with Wireshark or openssl s_client -connect.
- Compare TLS versions:
π Stage 3 β Understanding HTTP/1.1¶
π― Objectives¶
- Learn how HTTP works before jumping into HTTP/2.
- Understand headers, methods, cookies, and persistent connections.
π Topics¶
- Request/Response model
- HTTP methods (GET, POST, PUT, DELETE)
- Headers and status codes
- Keep-Alive and pipelining
π§ͺ Labs¶
- Use
curl -v -H "Connection: close"vsConnection: keep-alive - Capture with Wireshark to see multiple HTTP requests on the same TCP connection.
βοΈ Stage 4 β Deep Dive into HTTP/2¶
π― Objectives¶
- Understand what changed from HTTP/1.1.
- Learn about binary framing, multiplexing, and header compression.
- Recognize the interaction between HTTP/2 and TLS (ALPN).
π Topics¶
- HTTP/2 binary framing layer
- Streams, frames, and flow control
- HPACK header compression
- Server push
- ALPN (Application-Layer Protocol Negotiation)
π§ͺ Labs¶
- Inspect HTTP/2 negotiation:
β Compare ALPN negotiation and headers.
-
Capture HTTP/2 traffic with Wireshark (filter: tcp.port==443 && http2).
-
Use nghttp (HTTP/2 client) to view frame-level behavior:
π§° Stage 5 β Troubleshooting and Advanced Topics¶
π― Objectives¶
- Learn how to identify TLS/HTTP/2 issues in the field.
- Understand performance bottlenecks, misconfigurations, and certificate issues.
π Topics¶
- Common TLS errors (expired certs, SNI issues, mismatched domains, cipher mismatches)
- HTTP/2 issues (stream resets, priority, flow control)
- Performance tuning (TLS session resumption, ALPN delays)
π§ͺ Labs¶
- Simulate a broken certificate chain and test browser/curl behavior.
- Use ssllabs.com/ssltest/ on your test site.
- Capture failed TLS sessions and analyze where the handshake fails.
- Enable HTTP/3 on a test server and see negotiation fallback.
π Stage 6 β Explain and Document¶
π― Objectives¶
- Be able to explain HTTP/2 + TLS to others.
- Document the packet-level flow of a TLS handshake and an HTTP/2 exchange.
π Tasks¶
- Write a step-by-step document:
- βWhat happens when you type https://example.com in a browser.β
-
Include DNS β TCP β TLS β HTTP/2 β response.
-
Prepare troubleshooting checklists for:
- TLS handshake failure
- HTTP/2 negotiation issue
- Performance degradation
π§© Recommended Tools¶
- Wireshark (packet analysis)
- curl (
--http1.1,--http2,--verbose,--insecure,--trace-ascii) - openssl (
s_client,x509,req) - nghttp / nghttpd (HTTP/2 client/server)
- nginx or Apache (for HTTP/2 and TLS testing)
- ssllabs.com and testssl.sh (for TLS configuration testing)
π Suggested Resources¶
- Books:
- "HTTP/2 in Action" by Barry Pollard
-
"Bulletproof SSL and TLS" by Ivan RistiΔ
-
Online:
- Mozilla TLS Configuration Guide
- Cloudflare blog: βA detailed look at HTTP/2β
- HTTP/2 RFC 9113
- TLS 1.3 RFC 8446