---
title: "Short note: IP"
subject: "Computer Networks and Security"
chapter: 4
key: "semester_7/computer_networks_and_security:ip-note"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/ip-note
site: BCT Engineering
---

# Short note: IP

Computer Networks and Security · Chapter 4: Network Layer

- Asked in: 2071 Shrawan, 4 marks
- Video: [Basics of IP Addressing](https://www.youtube.com/watch?v=Kx6i9gwNS3w) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/ip-note
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-4

## Question

Write a short note on IP.

## Short answer

IP is the connectionless, unreliable, best-effort network-layer protocol that provides logical addressing, routing, and fragmentation. Its IPv4 header includes version, IHL, TTL, protocol, checksum, and source/destination addresses; TCP and UDP handle reliability.

## Answer

**IP (Internet Protocol)** is the network-layer protocol of TCP/IP that delivers packets (datagrams) from a source host to a destination host across interconnected networks. It is **connectionless, unreliable and best-effort**: it gives no guarantee of delivery, ordering or duplicate protection; higher layers (TCP) handle these.

#### Main functions
- Logical addressing (32-bit IPv4 address), routing, and fragmentation/reassembly.

#### IPv4 header (20 to 60 bytes)
| Field | Size | Purpose |
|---|---|---|
| Version | 4 bits | 4 |
| IHL | 4 bits | Header length in 32-bit words |
| Type of service | 8 bits | Priority / DSCP |
| Total length | 16 bits | Header + data (max 65,535 B) |
| Identification | 16 bits | Identifies fragments of a datagram |
| Flags (DF, MF) | 3 bits | Don't fragment, more fragments |
| Fragment offset | 13 bits | Position of fragment (units of 8 B) |
| TTL | 8 bits | Hop limit, decremented by each router |
| Protocol | 8 bits | 6 TCP, 17 UDP, 1 ICMP |
| Header checksum | 16 bits | Error check on the header only |
| Source / destination address | 32 bits each | IP addresses |
| Options + padding | variable | Optional features |

IP works with ICMP (errors), ARP (address mapping) and IGMP (multicast). IPv6 is its successor.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which describes the IP service?
   A. Connection-oriented and best-effort
   B. Connectionless and guaranteed in-order
   C. Connection-oriented and reliable
   D. Connectionless, unreliable, best-effort
   Answer: D. IP gives no guarantee of delivery, ordering or duplicate protection; TCP adds these. (Key point: IP service type)

2. What does the IPv4 header checksum cover?
   A. Header only
   B. Data only
   C. Source address only
   D. Header and data
   Answer: A. The checksum checks only the header, which is why routers recompute it after changing TTL. (Key point: Header checksum)

3. Which fields help reassemble fragments?
   A. Version and IHL
   B. Identification, flags (MF) and fragment offset
   C. Source port and destination port
   D. TTL and Protocol
   Answer: B. Identification groups fragments, MF marks more fragments, and offset gives position in 8-byte units. (Key point: Fragmentation fields)

4. What does the Protocol field in the IP header indicate?
   A. The upper-layer protocol such as TCP (6), UDP (17) or ICMP (1)
   B. The link-layer type
   C. The IP version
   D. The routing protocol in use
   Answer: A. It tells the receiver which upper-layer protocol should get the payload. (Key point: Protocol field)
