You are on page 1of 3

TCP Transmission Control Protocol

1. This is connection oriented protocol means first it create virtual path sender to receiver.
2. It is use Error detection via Sequence and acknowledgement number and Windowing for flow control of
connection orientation.
3. Before segment has sent three-way hand shake will happen.
4. Sender sends SYN with its sequence no. 1 means ON.
5. Then receiver sends SNY/ACK bit set.
6. Then sender sends SYN.
7. There is error detection and error recovery feature in it, if any segment sends by a sender and drop by any
reason then receiver not sends not ACK that segment by send a ACK which sequence NO. Is missing for Ex.
------------------segment with seq.no. 1-------------------------->

SENDER ------------------ segment with seq.no. 2--------------------------> x RECEIVER


------------------ segment with seq.no. 3------------------------->
------------------ segment with seq.no. 4-------------------------->
Error detection<---------------- segment with ACK no.2 -----------------------Error recovery ---------------- segment with ACK no.2 ------------------------>
8. Windowing is for flow control is decide by recipient not sender, if there is no error in any segment then it
dynamically increase the size of windows.
9. In TCP header Source Port, Destination Port, Sequence No., ACK No. and Check Sum and DATA etc.
Bits 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Source Port

Destination Port
Sequence Number
Acknowledgement Number

HLEN

Reserved

A
C
K

P
S
H

R
S
T

S
Y
N

F
I
N

Check SUM

Windows

Urgent Pointer
Options(if any)

Padding
Data

UDP
1. In UDP there is only Source No., Destination No., and Check Sum and DATA.
0

15 16

31

16-bit source port

16-bit destination port

16-bit UDP length

16-bit Check sum


Data if any

2. UDP header is smaller than TCP header thats y UDP still in use.

Why We Use Port Numbers?


Here 10.1.1.1 is sending different kind of info to 10.1.1.2:
1.
2.
3.

Transferring a file via trivial file transfer protocol (TFTP)


Email via simple mail transfer protocol (SMTP)
Opening a remote connection via Telnet
One PC is sending three different types of information to the other and the MAC and IP source and
destination addresses for all these transmissions is going to be the same. How can the receiving host know
that what sending host wants? What should I do with these incoming data flows?

-----------------------------------SMTP--------------------------------------->

10.1.1.1 -----------------------------------TFTP-------------------------------------->10.1.1.2
-----------------------------------Telnet------------------------------------->
4. This is TCP or UDP Prot numbers tells the receiving host what to do with incoming data flows.

10.1.1.1---------------------------------------------------------------------------------------->10.1.1.2
SMTP TCP Port 25-Telnet TCP Port 23- SMTP TCP Port 25- TFTP UDP Port 69- Telnet TCP Port 23

5. This is called port numbers multiplexing.


6. A socket is combination of IP address and port number. 10.1.1.2 For port 69 is 10.1.1.2:69. That socket can
also be expressed with this format, (IP address, transport protocol, port number)
That would make the TFTP socket on that PC (10.1.1.2,UDP,69)
7. All ports numbers below 1024 are reserve for well known port numbers.

Some Well Known Port Numbers: Some Common TCP Port Numbers: FTP File Transfer Protocol Uses TCP ports 20 and 21.
SSH Secure Shell Uses TCP port 22.
Telnet uses TCP port 23.
SMTP Simple Mail Transfer Protocol Uses TCP port 25.
HTTP Hyper Text Transfer Protocol Uses TCP port 80.
POP 3 Post Office Protocol 3 Uses TCP port 110.
SSL Secure Socket Layer Uses TCP Port 443.
Some Common UDP Port Numbers: DHCP Dynamic Host Control Protocol Uses UDP port 67 and 68.
TFTP Trivial File Transfer Protocol Uses port 69.
SNMP Simple Network Management Protocol Uses UDP Port 161.
Protocols Using Both TCP And UDP Ports: DNS Domain Name Services Uses UDP and TCP port 53.
The port number 24 is reserve in both UDP and TCP for private mail Systems.