1. What is an IP Address?
A house number for a device in a network.
It helps devices find and talk to each other.
Two versions: IPv4 and IPv6
2. IPv4 (Older Version)
- 32-bit number
- Written as 4 numbers with dots → 192. 168. 1. 1
- Range → 0.0.0.0 to 255.255.255.255
IPv4 Classes
| Class | Range | Used For | Count |
|---|---|---|---|
| A | 1–126 | Big networks | 126 |
| B | 128–191 | Medium networks | 63 |
| C | 192–223 | Small networks | 31 |
| D | 224–239 | Multicast | 15 |
| E | 240–255 | Research | 15 |
Total IPv4 addresses: ~4.3 billion
3. IPv6 (New Version)
- 128-bit number
- Written in hexadecimal → 2001:db8::1
- Can shorten using :: for zeros
- Address count: Almost unlimited
Made to fix IPv4 shortage.
4. IPv4 vs IPv6
| Feature | IPv4 | IPv6 |
|---|---|---|
| Size | 32-bit | 128-bit |
| Format | 192.0.2.1 | 2001::1 |
| Total Addresses | 4.3 billion | Unlimited |
| Security | No built-in | Built-in IPsec |
| Config | Manual/DHCP | Auto-config |
| Broadcast | Yes | No (Only multicast) |
| Speed | Slower | Faster routing |
5. Important Concepts
A. Subnetting
Dividing a big network into small networks.
Example: 192.168.1.0/24
B. NAT (Network Address Translation)
- Used only in IPv4 (because addresses are limited)
- Not needed in IPv6.
C. Dual-Stack
Device runs both IPv4 and IPv6 together.
D. Link-Local Address
Auto-generated address on a device.
- IPv4 → 169.254.x.x
- IPv6 → fe80::/10
E. Multicast
- IPv4 → Class D (224.0.0.0 – 239.255.255.255)
- IPv6 → Starts with ff00::/8
F. Loopback
Used to test your own device.
- IPv4 → 127.0.0.1
- IPv6 → ::1
G. Reserved / Private Addresses
IPv4 Private Ranges:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
IPv6:
- Local → fc00::/7
- Global → 2000::/3
6. Why IPv6 is Better?
- Addresses will never run out
- Auto-setup (no manual work)
- Faster routing
- Built-in security
7. Protocols That Work With IP
- TCP – Reliable communication
- UDP – Fast communication
- ICMP – Error & test messages (e.g., ping)
8. How We Move from IPv4 to IPv6
- Dual-Stack → Use both
- Tunneling → Put IPv6 inside IPv4
- Translation (NAT64) → Convert IPv6 ↔ IPv4
MCQ
📌 Section A – Basics of IP, IPv4 & IPv6
Q1. An IP address is used for which purpose?
a) To log in to email
b) To identify a device on a network
c) To store files
d) To format a disk
b
Q2. How many bits are there in an IPv4 address?
a) 16
b) 32
c) 64
d) 128
b
Q3. How many bits are there in an IPv6 address?
a) 64
b) 32
c) 128
d) 256
c
Q4. IPv4 addresses are usually written in:
a) Hexadecimal format with colons
b) Decimal format with dots
c) Binary format with commas
d) Hexadecimal format with dots
b
Q5. IPv6 addresses are usually written in:
a) Dotted decimal
b) Hexadecimal with colons
c) Octal with colons
d) Binary with dots
b
Q6. Which of the following is not a valid IPv4 address?
a) 192.168.10.5
b) 10.0.0.256
c) 172.16.0.1
d) 8.8.8.8
d – An IPv4 address is composed of four numbers (called octets) separated by periods. Each number must be between $0$ and $255$.
Q7. The total number of addresses available in IPv4 is approximately:
a) 4.3 million
b) 4.3 billion
c) 43 billion
d) 4.3 trillion
b
Q8. IPv6 was introduced mainly to:
a) Increase security only
b) Increase speed only
c) Overcome IPv4 address exhaustion
d) Remove routers from the Internet
c
📌 Section B – IPv4 Addressing, Classes & Special Ranges
Q9. An IPv4 address is divided into:
a) Network ID and Port ID
b) Host ID and MAC ID
c) Network ID and Host ID
d) Source ID and Destination ID
c
Q10. How many octets are there in an IPv4 address?
a) 2
b) 4
c) 6
d) 8
b
Q11. Class A IPv4 addresses have the first octet in the range:
a) 0–63
b) 1–126
c) 128–191
d) 192–223
b
Q12. Class B IPv4 addresses have the first octet in the range:
a) 1–126
b) 128–191
c) 192–223
d) 224–239
b
Q13. Class C IPv4 addresses have the first octet in the range:
a) 1–126
b) 128–191
c) 192–223
d) 224–239
c
Q14. Which class is used for multicast in IPv4?
a) Class A
b) Class B
c) Class C
d) Class D
d
Q15. Which class is reserved for experimental use in IPv4?
a) Class A
b) Class C
c) Class D
d) Class E
d
Q16. Which of the following is a Class A address?
a) 10.1.2.3
b) 130.10.1.1
c) 200.1.1.1
d) 230.1.1.1
a
Q17. Which of the following is a Class C address?
a) 15.0.0.1
b) 172.20.1.1
c) 192.168.1.1
d) 224.10.10.10
c
Q18. The loopback address in IPv4 generally used for testing is:
a) 0.0.0.0
b) 127.0.0.1
c) 255.255.255.255
d) 169.254.0.1
Q19. The range 127.0.0.0 – 127.255.255.255 in IPv4 is reserved for: larus.net+1
a) Private addressing
b) Broadcasting
c) Loopback/testing
d) Multicasting
Q20. The IPv4 address 0.0.0.0 represents:
a) Default route
b) Current network / “this host”
c) Loopback
d) Broadcast
Q21. The IPv4 address 255.255.255.255 is used for: Wikipedia
a) Limited broadcast
b) Loopback
c) Private network
d) Multicast
Q22. Automatic Private IP Addressing (APIPA) range in IPv4 is: Wikipedia
a) 10.0.0.0 – 10.255.255.255
b) 169.254.0.0 – 169.254.255.255
c) 172.16.0.0 – 172.31.255.255
d) 192.168.0.0 – 192.168.255.255
Q23. Which of the following is NOT a private IPv4 range (as per RFC 1918)? Wikipedia
a) 10.0.0.0/8
b) 172.16.0.0/12
c) 192.168.0.0/16
d) 11.0.0.0/8
Q24. 192.168.1.0/24 belongs to which IPv4 class (by first octet)?
a) Class A
b) Class B
c) Class C
d) Class D
Q25. Which is the correct default subnet mask for a Class C network?
a) 255.0.0.0
b) 255.255.0.0
c) 255.255.255.0
d) 255.255.255.255
Q26. Which of these subnet masks corresponds to /26 in IPv4? Testbook
a) 255.255.255.0
b) 255.255.255.128
c) 255.255.255.192
d) 255.255.255.224
Q27. In a /24 IPv4 network, how many usable host addresses are available?
a) 254
b) 256
c) 252
d) 128
Total addresses = 2(32−24)=28=2562^{(32-24)} = 2^8 = 2562(32−24)=28=256
Minus:
- 1 network address
- 1 broadcast address
So, usable = 256 − 2 = 254
📌 Section C – IPv6 Addressing & Types
Q28. How many hexadecimal groups are there in a full IPv6 address?
a) 4 groups
b) 6 groups
c) 8 groups
d) 16 groups
Q29. The “::” symbol in IPv6 is used to:
a) Show loopback address
b) Compress one sequence of consecutive zeros
c) Indicate subnet ID
d) Indicate broadcast
Q30. Which of the following is a valid compressed IPv6 address?
a) 2001:::1
b) 2001:0db8::1
c) 2001::0db8::1
d) 2001:db8:0:0:0:0:0:0:1
Q31. The IPv6 loopback address is: Wikipedia
a) ::
b) ::1
c) fe80::1
d) ::ffff
Q32. Which prefix represents IPv6 link-local addresses? Wikipedia+1
a) fc00::/7
b) 2000::/3
c) fe80::/10
d) ff00::/8
Q33. Which prefix represents IPv6 global unicast addresses? AWS Documentation
a) 2000::/3
b) fe80::/10
c) ff00::/8
d) fc00::/7
Q34. Which prefix is used for IPv6 unique local addresses (similar to IPv4 private)? IPCisco+1
a) 2000::/3
b) fc00::/7
c) fe80::/10
d) ff00::/8
Q35. IPv6 multicast addresses start with: Network Academy+1
a) 2000::/3
b) fe80::/10
c) ff00::/8
d) fc00::/7
Q36. In IPv6, which of the following is true?
a) Broadcast addressing is used
b) Broadcast is replaced by multicast
c) IPv6 has only private addresses
d) IPv6 uses 32-bit addresses
Q37. Which type of address in IPv6 is delivered to one of many possible devices (nearest one)?
a) Unicast
b) Anycast
c) Multicast
d) Broadcast
Q38. In a standard IPv6 unicast address, the interface ID (host part) is typically: Wikipedia
a) 16 bits
b) 32 bits
c) 48 bits
d) 64 bits
📌 Section D – IPv4 vs IPv6, Transition
Q39. Compared to IPv4, IPv6 uses how many times more bits for addressing? IncludeHelp+1
a) 2 times
b) 4 times
c) 6 times
d) 8 times
Q40. Which statement is correct about IPv4 & IPv6? Filo+1
a) IPv4 has more bits than IPv6
b) IPv4 and IPv6 both use 32 bits
c) IPv4 uses fewer bits than IPv6
d) IPv4 uses 64 bits, IPv6 uses 128 bits
Q41. Which of the following is true about IPv6 vs IPv4?
a) IPv6 supports built-in IPsec; IPv4 does not by default
b) IPv6 uses NAT widely; IPv4 does not
c) IPv6 has fewer addresses than IPv4
d) IPv6 still uses broadcast
Q42. Which technology allows a device to run both IPv4 and IPv6 at the same time? Sanfoundry+1
a) NAT64
b) Dual-stack
c) Tunneling
d) Subnetting
Q43. Sending IPv6 packets inside IPv4 packets to cross an IPv4 network is called: Sanfoundry
a) Dual-stack
b) Tunneling
c) Translation
d) Encapsulation not allowed
Q44. Translating traffic between IPv6-only and IPv4-only networks (e.g., using NAT64) is called: Wikipedia
a) Dual-stack
b) Tunneling
c) Translation
d) Fragmentation
Q45. Which of the following is NOT a difference between IPv4 and IPv6?
a) Address length
b) Notation format
c) Existence of broadcast
d) Use of TCP as a transport protocol
📌 Section E – Subnetting & Practical Questions
Q46. In IPv4, the notation “/24” in 192.168.10.0/24 indicates: Wikipedia+1
a) 24 host bits
b) 24 network bits
c) 24 bytes
d) 24 subnets
Q47. Which of the following is the network address of the host 192.168.5.130/24?
a) 192.168.5.0
b) 192.168.5.128
c) 192.168.5.255
d) 192.168.0.0
Q48. In IPv4, how many host addresses are available in a /30 network (excluding network & broadcast)?
a) 2
b) 4
c) 6
d) 8
Q49. Which of the following IPv6 addresses looks like a link-local address assigned automatically to an interface? Wikipedia+1
a) 2001:db8::1
b) fe80::1a2b:3c4d:0001
c) fc00::1
d) ff02::1
Q50. Which of the following IPv6 addresses is most likely a multicast address? Network Academy+1
a) 2001:db8::1
b) fe80::2
c) fc00::abcd
d) ff02::1
