Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP Handshake NW Analysis Class. What happens in 3-way handshake Client tells server it wants connection Server acknowledges the client’s connection Server.

Similar presentations


Presentation on theme: "TCP Handshake NW Analysis Class. What happens in 3-way handshake Client tells server it wants connection Server acknowledges the client’s connection Server."— Presentation transcript:

1 TCP Handshake NW Analysis Class

2 What happens in 3-way handshake Client tells server it wants connection Server acknowledges the client’s connection Server tells the client it wants connection Client acknowledges the servers connection Agree in initialize synchronization numbers Agree and initialize options to use

3 TCP Header Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | |C|E|U|A|P|R|S|F| | | Offset| Rsrvd |W|C|R|C|S|S|Y|I| Window | | | |R|E|G|K|H|T|N|N| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+...

4 SYN from Client 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7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 49322 | 80 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 4264380257 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 732659856 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 8 | 0 |0|0|0|1|0|0|0|0| 65535 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 12088 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1 | 1 | 8 | 10 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 869322726 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 2218346326 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

7 Port Numbers Service Ports Coordinated via IANA – IANA = Internet Assigned Numbers Authority – http://www.iana.org/assignments/port-numbers http://www.iana.org/assignments/port-numbers – Well Known: 0 to 1023 – Registered: 1024 to 49151 – Dynamic/Private: 49152 to 65535 Outgoing Ports … Ephemeral Ports – Some OS start at 102[45]-4999 or 49152-65535

8 Sequence Number Selection Depends on OS, used for OS detection even Most OS has changed for better randomization – Why? What are they used for? – Flow Control – Retransmissions – Length of Payload …well… everything TCP!

9 Maximum Segment Size (MSS) Defined in RFC793 (of course!) Option 2, 4b length, 0? – 65535 – How to decide what MSS should be? – MTU? Why important? – Path MTU Discovery, problems? Only Present in SYN What happens if not present in SYN

10 Window Scaling Defined in RFC1323 (performance!) Option 3, 3b, … – 0 = could do WS, but you seem not to – 1-14 = numbers of right-shift bits – 15? Reserved? No idea! 14=1GB max perhaps. Both sides have to support to use Affects (R)eceive and (S)end Windows Increases performance, how? Bad when?

11 Time Stamps Defined in RFC1323 (Performance!?!?) Option 8, 10b, 0-4294967295, 0-4294967295 Establishes Round Trip Time Measurement – Why? Packet loss? When to send an ACK? Protects against SEQ Wraps

12 Selective Acknowledgement (SACK) Defined in RFC2018 In SYN: Option 4, 2b Length In ACKs: Option 5, Nb Length, min 10b – Why 10b minimum? – What is the max Length? – Why 3 block (24b) max? – Where the other 16b of Options go?

13 TCP Seldom (to me) Seen Partial Order Connection 9, 10 CC - 11, 12, 13 TCP Alternate Checksum – 14, 15 ….. There are a bunch of them; MDF, Bubba? Skeeter? I’ve got no idea. If you see them in the wild, I’d love to hear about it!


Download ppt "TCP Handshake NW Analysis Class. What happens in 3-way handshake Client tells server it wants connection Server acknowledges the client’s connection Server."

Similar presentations


Ads by Google