Transmission Control Protocol
Comparison with Hypertext Transfer Protocol
TCP Header

16 Bit Port = 65536
32 Bit SEQ, ACK
4 Bit DO (Offset)
3 Bit RSV
9 Bit Flags
16 Bit Window,Checksum and URG Pointer
IP header

[IP Header]
└─ Source IP: 192.168.1.10
└─ Destination IP: 192.168.1.20
[TCP Header]
└─ Source Port: 443
└─ Destination Port: 51515
TCP Flags
- URG
- The URG Flag indicates that the data being sent is urgent and should be prioritized
- FIN
- The FIN flag is used to gracefully terminate a TCP connection
- RST
- The RST flag is used to immediately terminate a connection
3 Way Handshake
- SYN
- SYN+ACK
- ACK
Termination
- FIN
- ACK+FIN
- ACK
TCP Based Protocols
| Protocol | Acronym | Port | Description |
|---|---|---|---|
| Telnet | Telnet | 23 | Remote login service |
| SSH | SSH | 22 | Secure remote login service |
| Simple Network Management Protocol | SNMP | 161-162 | Manage network devices |
| Hypertext Transfer Protocol | HTTP | 80 | Used to transfer webpages |
| Hyper Text Transfer Protocol Secure | HTTPS | 443 | Used to transfer secure webpages |
| Domain/Name/System | DNS | 53 | Lookup domain names |
| File Transfer Protocol | FTP | 20-21 | Used to transfer files |
| Trivial File Transfer Protocol | TFTP | 69 | Used to transfer files |
| Network Time Protocol | NTP | 123 | Synchronize computer clocks |
| Simple Mail Transfer Protocol | SMTP | 25 | Used for email transfer |
| Post Office Protocol | POP3 | 110 | Used to retrieve emails |
| Internet Message Access Protocol | IMAP | 143 | Used to access emails |
| Server Message Block | SMB | 445 | Used to transfer files |
| Network File System | NFS | 111, 2049 | Used to mount remote systems |
| Bootstrap Protocol | BOOTP | 67, 68 | Used to bootstrap computers |
| Kerberos | Kerberos | 88 | Used for authentication and authorization |
| Lightweight Directory Access Protocol | LDAP | 389 | Used for directory services |
| Remote Authentication Dial-In User Service | RADIUS | 1812, 1813 | Used for authentication and authorization |
| DHCP | DHCP | 67, 68 | Used to configure IP addresses |
| Remote Desktop Protocol | RDP | 3389 | Used for remote desktop access |
| Network News Transfer Protocol | NNTP | 119 | Used to access newsgroups |
| Remote Procedure Call | RPC | 135, 137-139 | Used to call remote procedures |
| Identification Protocol | Ident | 113 | Used to identify user processes |
| Internet Control Message Protocol | ICMP | 0-255 | Used to troubleshoot network issues |
| Internet Group Management Protocol | IGMP | 0-255 | Used for multicasting |
| Oracle DB (Default/Alternative) Listener | oracle-tns | 1521/1526 | The Oracle database default/alternative listener is a service that runs on the database host and receives requests from Oracle clients. |
| Ingres Lock | ingreslock | 1524 | Ingres database is commonly used for large commercial applications and as a backdoor that can execute commands remotely via RPC. |
| Squid Web Proxy | http-proxy | 3128 | Squid web proxy is a caching and forwarding HTTP web proxy used to speed up a web server by caching repeated requests. |
| Secure Copy Protocol | SCP | 22 | Securely copy files between systems |
| Session Initiation Protocol | SIP | 5060 | Used for VoIP sessions |
| Simple Object Access Protocol | SOAP | 80, 443 | Used for web services |
| Secure Socket Layer | SSL | 443 | Securely transfer files |
| TCP Wrappers | TCPW | 113 | Used for access control |
| Internet Security Association and Key Management Protocol | ISAKMP | 500 | Used for VPN connections |
| Microsoft SQL Server | ms-sql-s | 1433 | Used for client connections to the Microsoft SQL Server. |
| Kerberized Internet Negotiation of Keys | KINK | 892 | Used for authentication and authorization |
| Open Shortest Path First | OSPF | 89 | Used for routing |
| Point-to-Point Tunneling Protocol | PPTP | 1723 | Is used to create VPNs |
| Remote Execution | REXEC | 512 | This protocol is used to execute commands on remote computers and send the output of commands back to the local computer. |
| Remote Login | RLOGIN | 513 | This protocol starts an interactive shell session on a remote computer. |
| X Window System | X11 | 6000 | It is a computer software system and network protocol that provides a graphical user interface (GUI) for networked computers. |
| Relational Database Management System | DB2 | 50000 | RDBMS is designed to store, retrieve and manage data in a structured format for enterprise applications such as financial systems, customer relationship management (CRM) systems. |
Tasks of TCP/IP
| Task | Protocol | Description |
|---|---|---|
Logical Addressing | IP | Due to many hosts in different networks, there is a need to structure the network topology and logical addressing. Within TCP/IP, IP takes over the logical addressing of networks and nodes. Data packets only reach the network where they are supposed to be. The methods to do so are network classes, subnetting, and CIDR. |
Routing | IP | For each data packet, the next node is determined in each node on the way from the sender to the receiver. This way, a data packet is routed to its receiver, even if its location is unknown to the sender. |
Error & Control Flow | TCP | The sender and receiver are frequently in touch with each other via a virtual connection. Therefore control messages are sent continuously to check if the connection is still established. |
Application Support | TCP | TCP and UDP ports form a software abstraction to distinguish specific applications and their communication links. |
Name Resolution | DNS | DNS provides name resolution through Fully Qualified Domain Names (FQDN) in IP addresses, enabling us to reach the desired host with the specified name on the internet. |
