1.3 TCP IP Protocol Stack
1.3 TCP IP Protocol Stack
DHCP
Ref: http://www.steves-internet-guide.com/internet-protocol-suite-explained/
Source: https://www.w3.org/People/Frystyk/thesis/TcpIp.html
IP transport datagram packets (Packet switching
using Datagram approach)
It transport datagram from source to destination
Define IP packets and how to route network
packets to destination address
IPv4 – 32 bit address & IPv6 – 128 bit address
Unreliable connectionless service
Packets may loss
Out of Order
Duplicate Packets
No error control 32 Bit (IPv4)
8 Bytes
Source Destination
Checksum Length
Port Port
http://www.steves-internet-guide.com/tcpip-ports-sockets/
https://www.ques10.com/p/8724/explain-ipv4-header-format-in-
detail-if-value-at-h/
https://www.lifewire.com/tcp-headers-and-udp-headers-explained-
817970
https://en.wikibooks.org/wiki/Communication_Networks/TCP_and_UDP_Proto
cols
TCP UDP
Transmission Control Protocol User Datagram Protocol
TCP is a connection-oriented UDP is a connectionless protocol
protocol
TCP is suited for applications that UDP is suitable for applications
require high reliability, and that need fast, efficient
transmission time is relatively transmission, such as games.
less critical UDP's stateless nature is also
useful for servers that answer
small queries from huge numbers
of clients
Protocols :HTTP, HTTPs, FTP, SMTP, Protocols :DNS, DHCP, TFTP, SNMP,
Telnet VOIP
TCP rearranges data packets in UDP has no inherent order as all
the order specified packets are independent of each
other.
TCP UDP
The speed for TCP is slower than UDP is faster because error
UDP recovery is not attempted. It is a
"best effort" protocol
There is absolute guarantee that There is no guarantee that the
the data transferred remains messages or packets sent would
intact and arrives in the same reach at all
order in which it was sent
TCP header size is 20 bytes UDP Header size is 8 bytes
TCP is heavy-weight. TCP UDP is lightweight. There is no
requires three packets to set up a ordering of messages, no
socket connection, before any tracking connections, etc. It is a
user data can be sent. TCP small transport layer designed on
handles reliability and congestion top of IP
control
https://www.diffen.com/difference/TCP_vs_UDP
TCP UDP
TCP does error checking and UDP does error checking but
error recovery. Erroneous simply discards erroneous
packets are retransmitted from packets. Error recovery is not
the source to the destination. attempted.
In case more TCP requests arrive at In case more UDP requests arrive at
server at the same time, a separate server at the same time, it
virtual connection is established at completes serving one UDP request
same time. Server can process many at a time, other request remain in
request at the same time. queue
https://www.diffen.com/difference/TCP_vs_UDP