Está en la página 1de 4

TCP

UDP

-Reliable
Tracks
Acknowledges
Retrans any
unacknowledged
Data sent in order
Flow Control -- Data is
managed when congestion
happens
Ex: FTP,HTTP, Telnet

App/Service via PORT Number

TCP is STATEFUL (Keeps track of the conversation)

-Unreliable
Low overhead
Fast
Best Effort (No Ack)
Sent in any order
(Good luck
reassembling)
Transaction-based
(simply sends data
when ready)
Ex: DNS, DHCP, VoIP

UDP is stateless (doesn't give a fuck / fire & forget)

Knowing Cisco.. Study some of the fields here so you know what they're responsible for.

P.356

P.354
20 BYTES of overhead (TCP)

Only 8 BYTES of overhead (UDP)

The combination of the source IP address and source port number, or the destination IP address and
destination port number is known as a socket.
192.168.0.1:80
Together the power is yours! (Put together = a SOCKET)
IP
:PORT

Services & Applications


HTTP, Telnet, IMAP, SMTP etc

User Processes / Applications


(Shit you put on your computer)

DYNAMICALLY assigned to client applications

TCP Page 1

DYNAMICALLY assigned to client applications


--Most OFTEN used to identify the client application DURING
communication, whereas the client uses the well-known port
to identify and connect to the service being requested.

You're thinking, why the FUCK is this here and


do I need to remember all this?
No fuckin' clue.
But welcome to Cisco, I'd say take a look and
hope they're not? ;)

CANNOT have 2 (multiple) services assigned to the same port number within the same service.
CAN have multiple open ports to different applications.

NUMBER 1, The VERY first SEQ number is chosen at random, this is


known as a INITIAL SEQUENCE NUMBER (ISN).

TCP 3-way handshake


STARTS with SYN (#1)
Note: SEQ=100
How this side keeps track.
"Bro, you there?"

REPLIES with SYN, ACK (#2)

Note!!!!
ACK=101 is the SEQ from #1 incremented by 1.
SEQ=300 is THIS side's way of keeping track itself.
"Yeah bro, I'm here, lets continue this shit."

REPLIES with ACK (#3)


NOTE!!!!
SEQ=101 (This is the SEQ from #1, incremented by 1)
ACK=301 (This is the SEQ from #2, incremented by 1)
Why the fuck? I'm so lost? HALP MEH!
BOTH sides have to keep track of what they are sending, so they EACH keep their own numbers and when the other side receivesit, it adds 1 to
let it know that I got it.
"BRUH Lookin' Good! I agree let's continue this shit since you're all set!!"

Page 374 - Read about Expectational


Acknowledgment, I'm not writing that out or
shrinking it. It ties into the TCP 3-way handshake
though.

TCP Page 2

This is the POLITE way to shutdown TCP communication

2-way handshake

Well.. Then how are you rude?


USE RST! (RESET)

USE RST! (RESET)

though.

Why would they take different routes?


BECAUSE! Some of you use high speed cable and some of
you use boingo free, so stuff flies across the interweebs
at different speeds but ultimately still get there.

TCP header window size is 16 bits

MSS says I can only send THIS


amount at one time!

Know this.

Hosts today have an OPTIONAL feature called selective acknowledgments (SACK).

TCP Page 3

Hosts today have an OPTIONAL feature called selective acknowledgments (SACK).


If BOTH hosts support SACK then the destination can acknowledge discontinuous (out of order) segments of data and the host ONLY has to
retransmit the missing data instead of everything.

Note: Read P.378 - Congestion Avoidance .. Not transcribing that here. Understand how windows adjust when
they are bogged down, and understand how acknowledgements affect what is sent next.

Note the initial window size value of 3000 and when data is not ACK'd it shortens that window
down to 1500.
Note that even though it missed segment 3001 it sent out 4501 successfully, but because 3001
failed, it has to retransmit starting at 3001.

Dynamic increasing / decreasing of window size is continuous in TCP.

TCP - Reliability adds delay from overhead needed to track everything


UDP - Tolerate data loss with the benefit of no delay. UDP is Unidirectional

TCP Page 4

P.382

También podría gustarte