19
TCP/IP Christopher Zacky

TCP/IP Christopher Zacky. lolwut Decimal Numbers

Embed Size (px)

Citation preview

Page 1: TCP/IP Christopher Zacky. lolwut Decimal Numbers

TCP/IP

Christopher Zacky

Page 2: TCP/IP Christopher Zacky. lolwut Decimal Numbers

lolwut

Page 3: TCP/IP Christopher Zacky. lolwut Decimal Numbers

Decimal Numbers

Page 4: TCP/IP Christopher Zacky. lolwut Decimal Numbers

Binary Numbers

Page 5: TCP/IP Christopher Zacky. lolwut Decimal Numbers

IP Addresses

IPv4 and IPv6 IPv4 is probably all you've ever seen IPv4 is a 32-bit address 192.168.1.2 11000000.10101000.00000001.00000010 4,294,967,296 different IPs for IPv4

Page 6: TCP/IP Christopher Zacky. lolwut Decimal Numbers

IPv6

128 bit address 2^128 =

340,282,367,000,000,000,000,000,000,000,000,000,000 different Ips

IPv6 address looks like this: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Page 7: TCP/IP Christopher Zacky. lolwut Decimal Numbers

A day in the life of a packet

Page 8: TCP/IP Christopher Zacky. lolwut Decimal Numbers

TCP

Transmission Control Protocol Guarantees reliable transmission of data Is a process-to-process communication service URG, ACK, PSH, RST, SYN, FIN How a connection is established: Computer1 sends a SYN Computer2 sends ACK and SYN Computer1 sends ACK

Page 9: TCP/IP Christopher Zacky. lolwut Decimal Numbers

Establishing a Connection (TCP 3-way handshake)

Page 10: TCP/IP Christopher Zacky. lolwut Decimal Numbers

An Established Connection

Page 11: TCP/IP Christopher Zacky. lolwut Decimal Numbers

TCP Header Breakdown

16 bits – Source Port 16 bits – Destination port 32 bits – Sequence Number 32 bits – Acknowledgment Number 4 bits – Data Offset 6 bits – Reserved 6 bits – Control Bits (URG, ACK, PSH, RST,

SYN, FIN)

Page 12: TCP/IP Christopher Zacky. lolwut Decimal Numbers

TCP Header Continued

16 bits – Window 16 bits – Checksum 16 bits – Urgent Pointer Then options

Page 13: TCP/IP Christopher Zacky. lolwut Decimal Numbers

TCB

Transmission Control Block Is created when the connection is created Is deleted when the connection is closed Contains the window of packets that are

expected Packets not in the window are discarded and a

RST packet may be sent

Page 14: TCP/IP Christopher Zacky. lolwut Decimal Numbers

ISN and Duplicate Packets

How do I know if I am receiving duplicate packets from a previous connection?

ISN is a 32-bit numbers that increments about every 4 microseconds.

ISN cycles every 4.55 hours MSL is 2 minutes A pair of sockets makes a TCP connection

unique

Page 15: TCP/IP Christopher Zacky. lolwut Decimal Numbers

What is TIME_WAIT???

Dat MSL (Maximum Segment Lifetime) I need to ACK your FIN man

Page 16: TCP/IP Christopher Zacky. lolwut Decimal Numbers

IP

Internet Protocol Does not guarantee reliable transmission of

data Doesn't have sequencing Designed to transmit a packet from a source to

a destination over an interconnected system of networks

Is called on by host-to-host protocols (like TCP)

Page 17: TCP/IP Christopher Zacky. lolwut Decimal Numbers

IP Header

4 bits – Version 4 bits – IHL (Internet Header Length) 8 bits – Type of Service 16 bits – Total Length 16 bits – Identification 3 bits – Fragment Flags 13 bits – Fragment Offset 8 bits – Time to Live

Page 18: TCP/IP Christopher Zacky. lolwut Decimal Numbers

IP Header Continued

8 bits – Protocol 16 bits – Header Checksum 32 bits – Source Address 32 bits – Destination Address Then options

Page 19: TCP/IP Christopher Zacky. lolwut Decimal Numbers

Look Familiar?