Network protocols are the rules that let devices exchange data, and port numbers are the addresses that tell a device which service should receive that data. For IBPS SO IT, RRB Scale II IT, and SEBI Grade A IT, questions on this topic come from several layers: application protocols like HTTP and DNS, transport protocols like TCP and UDP, and network layer protocols like ICMP and OSPF.
This guide organises the important protocols by OSI layer, so you can recall what each one does, which port it uses (if any), and whether it runs over TCP, UDP, or directly over IP.
Fast Memory Trick: Port = which service on the host · IP protocol number = which protocol is inside the IP packet · ICMP and OSPF = no ports at all
Quick Answer: Most Tested Ports
If you only have two minutes, learn this table first.
| Port | Protocol | Transport |
|---|---|---|
| 21 | FTP (control) | TCP |
| 22 | SSH / SFTP | TCP |
| 23 | Telnet | TCP |
| 25 | SMTP | TCP |
| 53 | DNS | UDP and TCP |
| 67 / 68 | DHCP server / client | UDP |
| 80 | HTTP | TCP |
| 110 | POP3 | TCP |
| 143 | IMAP | TCP |
| 161/162 | SNMP / SNMP Trap | UDP |
| 179 | BGP | TCP |
| 443 | HTTPS | TCP (UDP for HTTP/3) |
| 520 | RIP | UDP |
| 3389 | RDP | TCP |
Quick Revision
- Port numbers range from 0 to 65535: well-known (0 to 1023), registered (1024 to 49151), dynamic (49152 to 65535).
- These are defaults. Real systems can be configured to use other ports.
- Exam keyword: "default port of X" → think of the table above.
Important Protocols by OSI Layer
The OSI model is a seven-layer reference model that describes how data moves between devices. Knowing which layer a protocol belongs to helps you answer "at which layer does X work?" questions.
| OSI Layer | Main Function | Important Protocols and Examples |
|---|---|---|
| Application | Network services for applications | HTTP, HTTPS, DNS, DHCP, FTP, SMTP, POP3, IMAP, SSH, SNMP |
| Presentation | Data representation and encryption | Encoding, compression, TLS functions |
| Session | Manages communication sessions | Session setup, maintenance, and teardown |
| Transport | End-to-end delivery | TCP, UDP |
| Network | Logical addressing and routing | IP, ICMP, IGMP, OSPF |
| Data Link | Delivery over a local link | Ethernet, PPP |
| Physical | Raw bit transmission | Cables, radio signals |
ARP sits between the Data Link and Network layers. Many textbooks list it at the Network layer, others at Data Link. In an MCQ, follow the option the question expects, and do not assume every protocol fits neatly into one layer.
Quick Revision
- Application layer = HTTP, DNS, DHCP, SMTP, FTP, SSH.
- Transport layer = TCP and UDP.
- Network layer = IP, ICMP, IGMP, OSPF (and ARP in many textbooks).
IP Address vs Port Number vs IP Protocol Number
These three terms identify different things and are not interchangeable.
| Term | What It Identifies | Example |
|---|---|---|
| IP address | A network interface, used for routing | 192.168.1.10 |
| TCP/UDP port | An application endpoint at the transport layer | TCP port 443 |
| IP protocol number | The protocol carried inside an IP packet | TCP = 6, UDP = 17 |
Example: When you open an HTTPS website, the server listens on TCP port 443, and the IP header's protocol field says 6 (TCP). Both numbers appear in the same packet, but they mean different things.
Q: If a question asks for the port of HTTPS and the protocol number of TCP, are they the same kind of number? A: No. HTTPS uses port 443, which identifies a service. TCP is protocol number 6, which identifies what the IP packet carries.
Quick Revision
- Port = which service. Protocol number = which protocol inside IP.
- Exam keyword: "protocol field in the IP header" → think protocol number.
- Exam keyword: "default port" → think port number.
Application Layer Protocols and Port Numbers
Application layer protocols are the protocols that provide network services directly to users and applications. Most port-number questions come from this layer. The tables below list standard defaults. The IANA Service Name and Port Number Registry is the authoritative reference.
Web and Remote Access
| Protocol | Port | Transport | Function |
|---|---|---|---|
| HTTP | 80 | TCP | Web communication |
| HTTPS | 443 | TCP | Secure web communication |
| SSH | 22 | TCP | Secure remote login |
| Telnet | 23 | TCP | Remote terminal, no built-in encryption |
| RDP | 3389 | TCP and UDP | Remote desktop |
HTTP/3 runs over QUIC, which uses UDP port 443. So HTTPS is not always TCP.
File Transfer and Email
| Protocol | Port | Transport | Function |
|---|---|---|---|
| FTP (control) | 21 | TCP | Commands and control |
| FTP (data) | 20 | TCP | Data in active mode |
| SFTP | 22 | TCP | File transfer over SSH |
| TFTP | 69 | UDP | Simple file transfer, no authentication |
| SMTP | 25 | TCP | Mail transfer between servers |
| SMTP Submission | 587 | TCP | Mail submission from clients |
| SMTPS | 465 | TCP | SMTP over implicit TLS |
| POP3 | 110 | TCP | Mail retrieval |
| POP3S | 995 | TCP | POP3 over TLS |
| IMAP | 143 | TCP | Mail access and sync |
| IMAPS | 993 | TCP | IMAP over TLS |
Q: Which port does SFTP use? A: Port 22, because SFTP runs over SSH.
Q: What is the difference between SMTP, POP3, and IMAP? A: SMTP sends or relays email. POP3 and IMAP are used to retrieve or access email.
DNS and Network Configuration
| Protocol | Port | Transport | Function |
|---|---|---|---|
| DNS | 53 | UDP and TCP | Name resolution |
| DHCP server | 67 | UDP | IPv4 DHCP server |
| DHCP client | 68 | UDP | IPv4 DHCP client |
| NTP | 123 | UDP | Time synchronisation |
| SNMP | 161 | Usually UDP | Management queries |
| SNMP Trap | 162 | Usually UDP | Management notifications |
| Syslog | 514 | UDP | Log messages |
DNS is the system that translates domain names such as example.com into IP addresses. Ordinary queries usually use UDP 53. TCP 53 is used for zone transfers and for responses too large for UDP.
DHCP is the protocol that automatically gives clients an IP address, subnet mask, and default gateway. Memory trick: server = 67, client = 68.
SNMP is the protocol used to monitor and manage network devices. Requests use 161 and traps use 162.
Directory, Authentication, File Sharing, and Databases
| Service | Port | Transport | Function |
|---|---|---|---|
| LDAP | 389 | TCP/UDP | Directory services |
| LDAPS | 636 | TCP | LDAP over TLS |
| Kerberos | 88 | TCP/UDP | Network authentication |
| SMB | 445 | TCP | File and printer sharing |
| Microsoft SQL Server | 1433 | TCP | Database |
| MySQL | 3306 | TCP | Database |
| PostgreSQL | 5432 | TCP | Database |
Database ports are defaults and can be changed during installation.
Quick Revision
- FTP = 21 (control), 20 (data). SFTP = 22. TFTP = UDP 69.
- SMTP = 25, POP3 = 110, IMAP = 143. Secure versions: 465/587, 995, 993.
- DNS = 53 (UDP and TCP). DHCP = 67 server, 68 client. SNMP = 161, 162.
- Exam keyword: "secure remote login" → think SSH (22).

Transport Layer Protocols: TCP vs UDP
TCP is a connection-oriented transport protocol that provides reliable, ordered delivery. UDP is a connectionless transport protocol that sends datagrams without guaranteeing delivery or order. Ports exist because of these two protocols.
| Feature | TCP | UDP |
|---|---|---|
| Full form | Transmission Control Protocol | User Datagram Protocol |
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Reliable delivery | No delivery guarantee |
| Ordering | Ordered byte stream | No ordering guarantee |
| Acknowledgements | Yes | No |
| Retransmission | Yes | No |
| Header size | 20 bytes minimum | 8 bytes |
| IP protocol number | 6 | 17 |
| Typical uses | SSH, SMTP, databases, most web traffic | DNS queries, DHCP, NTP, streaming, VoIP |
Q: Which header is smaller, TCP or UDP? A: UDP, at 8 bytes, compared with TCP's minimum of 20 bytes.
Q: Is UDP always faster than TCP? A: Not always. UDP has lower overhead, but real performance depends on the application and the network.
Quick Revision
- TCP = reliable, ordered, connection-oriented, protocol number 6.
- UDP = connectionless, no guarantee, protocol number 17.
- HTTP/1.1 and HTTP/2 use TCP. HTTP/3 uses QUIC over UDP.
Network Layer Protocols
Network layer protocols handle addressing, routing, and diagnostics. Some closely related protocols, like ARP, are grouped here because exams often test them together.
IP (Internet Protocol)
IP is the protocol that provides logical addressing and forwards packets across networks.
- IPv4 addresses are 32 bits. IPv6 addresses are 128 bits.
- IP is connectionless and does not guarantee delivery or ordering.
- Routers use the destination IP address to forward packets.
Q: Which protocol handles logical addressing and routing of packets? A: IP (Internet Protocol).
ICMP (Internet Control Message Protocol)
ICMP is the protocol used for error reporting and diagnostics in IP networks.
- The
pingcommand uses ICMP Echo Request and Echo Reply. - ICMP for IPv4 is IP protocol number 1.
- ICMP does not use TCP or UDP ports.
The old Echo service used port 7, but ICMP Echo does not. ICMP uses message types and codes, not ports.
IGMP (Internet Group Management Protocol)
IGMP is the protocol that manages IPv4 multicast group membership between hosts and local routers. It is IP protocol number 2 and uses no TCP/UDP ports.
ARP (Address Resolution Protocol)
ARP is the protocol that maps a local IPv4 address to a MAC (link-layer) address.
- Used when a device wants to send data to another device on the same network.
- Does not use TCP/UDP ports.
- IPv6 uses NDP (Neighbor Discovery Protocol) instead of ARP.
Q: What is the difference between ARP and DNS? A: ARP maps an IPv4 address to a MAC address on the local network. DNS maps a domain name to an IP address.
Routing Protocols
Routing protocols are the protocols that let routers learn and share route information.
| Protocol | Full Form | Type | Metric | Transport / Port |
|---|---|---|---|---|
| RIP | Routing Information Protocol | Distance-vector | Hop count | UDP 520 |
| OSPF | Open Shortest Path First | Link-state | Cost | IP protocol 89 (no ports) |
| BGP | Border Gateway Protocol | Path-vector | Path attributes and policy | TCP 179 |
| EIGRP | Enhanced Interior Gateway Routing Protocol | Advanced distance-vector | Composite metric | IP protocol 88 (no ports) |
Quick Revision
- IP = addressing and routing. ICMP = errors and ping. IGMP = multicast. ARP = IP to MAC.
- RIP = hop count, UDP 520. OSPF = cost, protocol 89. BGP = between autonomous systems, TCP 179.
- Exam keyword: "ping" → think ICMP. "Hop count" → think RIP. "Cost" → think OSPF.
Protocols That Do Not Use TCP/UDP Ports
Some protocols are carried directly inside IP packets, so they have an IP protocol number but no TCP/UDP port. This is a favourite exam trap.
| Protocol | IP Protocol Number | Uses TCP/UDP Ports? | Function |
|---|---|---|---|
| ICMP (IPv4) | 1 | No | Errors and diagnostics |
| IGMP | 2 | No | IPv4 multicast management |
| TCP | 6 | Yes | Reliable transport |
| UDP | 17 | Yes | Connectionless transport |
| IPv6-in-IPv4 | 41 | No | IPv6 tunnelling over IPv4 |
| GRE | 47 | No | Tunnelling |
| ICMPv6 | 58 | No | IPv6 errors and diagnostics |
| EIGRP | 88 | No | Routing |
| OSPF | 89 | No | Link-state routing |
Memory Trick: 1 = ICMP · 2 = IGMP · 6 = TCP · 17 = UDP · 89 = OSPF
Q: If a question asks for the port of HTTPS and the protocol number of TCP, what are the answers? A: The port of HTTPS is 443, and the protocol number of TCP is 6.
Quick Revision
- No ports: ICMP, IGMP, OSPF, EIGRP, GRE.
- Has ports: TCP and UDP (they carry the ports).
- Exam keyword: "IP protocol field" → think protocol numbers.
Commonly Confused Protocols
| Pair | Key Difference |
|---|---|
| HTTP vs HTTPS | HTTPS protects HTTP using TLS |
| FTP vs SFTP | FTP is separate; SFTP runs over SSH |
| SMTP vs POP3 vs IMAP | SMTP sends; POP3 and IMAP retrieve |
| DNS vs DHCP | DNS resolves names; DHCP assigns configuration |
| ARP vs DNS | ARP maps IP to MAC; DNS maps name to IP |
| ICMP vs TCP | ICMP reports and diagnoses; TCP delivers data reliably |
| RIP vs OSPF | RIP uses hop count; OSPF uses cost |
| Port vs protocol number | Ports identify endpoints; protocol numbers identify the IP payload |
Five Common Exam Traps
- Assuming every protocol has a port. ICMP and OSPF do not.
- Treating DNS as UDP-only. DNS uses both UDP and TCP on port 53.
- Mixing up FTP and SFTP. FTP uses 21. SFTP uses 22.
- Assuming HTTPS is always TCP. HTTP/3 uses UDP 443.
- Mixing up routing protocols. RIP = hop count, OSPF = cost, BGP = between autonomous systems.
One-Minute Port Revision
| Port | Protocol | Remember |
|---|---|---|
| 20 | FTP data | Active-mode data |
| 21 | FTP | Control |
| 22 | SSH / SFTP | Secure access and transfer |
| 23 | Telnet | Unencrypted remote login |
| 25 | SMTP | Mail relay |
| 53 | DNS | Name resolution |
| 67 | DHCP server | UDP |
| 68 | DHCP client | UDP |
| 69 | TFTP | UDP |
| 80 | HTTP | Web |
| 110 | POP3 | Mail retrieval |
| 123 | NTP | Time sync |
| 143 | IMAP | Mail access |
| 161 | SNMP | Queries |
| 162 | SNMP Trap | Notifications |
| 179 | BGP | TCP |
| 389 | LDAP | Directory |
| 443 | HTTPS | Secure web |
| 445 | SMB | File sharing |
| 465 | SMTPS | Mail over TLS |
| 514 | Syslog | UDP |
| 520 | RIP | UDP |
| 587 | SMTP submission | Client mail submission |
| 636 | LDAPS | LDAP over TLS |
| 993 | IMAPS | Secure IMAP |
| 995 | POP3S | Secure POP3 |
| 1433 | SQL Server | Database |
| 3306 | MySQL | Database |
| 3389 | RDP | Remote desktop |
| 5432 | PostgreSQL | Database |
Practice MCQs
Try all 12 before checking the answers.
Which port is commonly used by HTTPS over TCP?
Which IP protocol number identifies ICMP for IPv4?
Which protocol uses hop count as its routing metric?
Which port is commonly used by SSH?
Which statement about DNS is correct?
Which protocol is primarily used to send or relay email?
Which statement about UDP is correct?
Which protocol resolves a local IPv4 address to a link-layer address?
Which protocol is identified by IP protocol number 17?
Which routing protocol uses cost as its metric?
Which pair gives the UDP ports used by IPv4 DHCP?
Which statement is correct?
Answers and Explanations
| Q | Answer | Explanation |
|---|---|---|
| 1 | D. 443 | HTTPS commonly uses TCP port 443. |
| 2 | A. 1 | ICMP for IPv4 is IP protocol number 1. |
| 3 | B. RIP | RIP selects routes by hop count. |
| 4 | B. 22 | SSH uses TCP port 22. |
| 5 | C. Both | UDP for normal queries, TCP for zone transfers and large responses. |
| 6 | C. SMTP | SMTP sends and relays email. |
| 7 | D. Neither | UDP is connectionless with no delivery or ordering guarantee. |
| 8 | B. ARP | ARP maps a local IPv4 address to a MAC address. |
| 9 | C. UDP | UDP is IP protocol number 17. |
| 10 | B. OSPF | OSPF uses cost as its metric. |
| 11 | A. 67 / 68 | Server uses UDP 67, client uses UDP 68. |
| 12 | D. Different purposes | Protocol numbers identify the IP payload. Ports identify endpoints. |
Quick Revision Cheat Sheet
One final scan before your mock test.
| Topic | Remember | Exam Keyword to Watch For |
|---|---|---|
| ICMP | Protocol 1, no ports, used by ping | "ping," "error reporting," "echo" |
| TCP | Protocol 6, reliable, ordered | "connection-oriented," "3-way handshake" |
| UDP | Protocol 17, no guarantee | "connectionless," "datagram" |
| OSPF | Protocol 89, cost, link-state | "link-state," "cost," "shortest path" |
| RIP | UDP 520, hop count, distance-vector | "hop count," "distance-vector" |
| BGP | TCP 179, between autonomous systems | "autonomous system," "path-vector" |
| DNS | Port 53, UDP and TCP | "name resolution," "zone transfer" |
| DHCP | UDP 67 server, 68 client | "automatic IP assignment" |
| ARP | IPv4 to MAC, no ports | "MAC address," "local network" |
Ready to Test Your IT Professional Knowledge?
Access subject-wise free mock tests for every IT domain topic — DBMS, Computer Networks, OS, Software Engineering, and DSA — with detailed explanations and AI-powered question generation.
What to Study Next
Continue your IT Officer revision with these related articles.
