Unit 4: Network protocols
Computer Networks-I notes · PTU syllabus (UGCC2517)
On this page
Unit summary
The internet runs on the TCP/IP protocol suite. This unit covers the main protocols, IPv4 and IPv6 addressing, subnetting and CIDR, ARP in detail including ARP spoofing, and VLANs.
After this unit you can
- Describe the main protocols of the TCP/IP suite
- Explain IPv4 classes and IPv6 addressing
- Subnet a network and use CIDR notation
- Explain ARP security risks and VLAN concepts and configuration
PTU syllabus topics
- TCP/IP protocol suite
- IPv4 and IPv6 addressing
- subnetting and CIDR notation
- ARP operation and table
- ARP spoofing and security
- VLAN concepts
- tagging
- configuration
- benefits and use cases
Address size
32 bits
128 bits
Notation
Dotted decimal: 192.168.1.1
Hexadecimal: 2001:db8::1
Address space
About 4.3 billion
Practically unlimited
Configuration
Manual or DHCP
Auto-configuration built in
Topic 1
The TCP/IP protocol suite
| Layer | Protocols |
|---|---|
| Application | HTTP/HTTPS, FTP, SMTP, POP3, IMAP, DNS, DHCP, Telnet, SSH |
| Transport | TCP (reliable, connection-oriented), UDP (fast, connectionless) |
| Internet | IP, ICMP (ping), ARP, IGMP |
| Network access | Ethernet, Wi-Fi |
Connection
Connection-oriented (3-way handshake)
Connectionless
Reliability
Guaranteed, ordered delivery
No guarantee
Speed
Slower
Faster
Use
Web, email, file transfer
Video streaming, gaming, DNS
Topic 2
IPv4 and IPv6 addressing
An IPv4 address is 32 bits written in dotted decimal (192.168.1.10).
| Class | First octet | Default mask | Use |
|---|---|---|---|
| A | 1–126 | 255.0.0.0 (/8) | Very large networks |
| B | 128–191 | 255.255.0.0 (/16) | Medium networks |
| C | 192–223 | 255.255.255.0 (/24) | Small networks |
| D | 224–239 | — | Multicast |
| E | 240–255 | — | Experimental |
Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. 127.x.x.x is loopback. An IPv6 address is 128 bits in hexadecimal groups (2001:0db8::1). IPv6 gives a vast address space, simpler headers, built-in security (IPsec) and auto-configuration.
Topic 3
Subnetting and CIDR
Subnetting divides one network into smaller sub-networks by borrowing host bits. CIDR writes the mask as a prefix length: 192.168.1.0/26.
Number of subnets
2ⁿ (n = borrowed bits)
Hosts per subnet
2ʰ − 2 (h = remaining host bits)
Block size
256 − last non-zero mask octet
Example
192.168.1.0/26: 2 bits borrowed → 4 subnets; 6 host bits → 62 hosts each; block size 64 → subnets .0, .64, .128, .192.
Topic 4
ARP operation and ARP spoofing
- 1Host needs the MAC for an IP
- 2Checks its ARP table
Cache
- 3Broadcasts an ARP request
"Who has 192.168.1.5?"
- 4Owner replies with its MAC
Unicast
- 5Sender stores it in the ARP table
ARP spoofing (poisoning): an attacker sends fake ARP replies so that traffic meant for another device (often the gateway) goes to the attacker — enabling man-in-the-middle attacks. Defences: static ARP entries, dynamic ARP inspection on switches, and encryption.
Topic 5
VLANs
A VLAN (Virtual LAN) logically divides one physical switch network into separate broadcast domains — for example separate VLANs for students, faculty and administration.
- Tagging (IEEE 802.1Q): a 4-byte tag with the VLAN ID is added to frames on trunk links between switches; access ports carry one VLAN untagged.
- Benefits: security (isolation), smaller broadcast domains (performance), flexible grouping regardless of location, and easier management.
- Communication between VLANs needs a router or a Layer 3 switch (inter-VLAN routing).
Key terms
- TCP
- Reliable, connection-oriented transport protocol
- UDP
- Fast, connectionless transport protocol
- Subnetting
- Dividing a network into smaller sub-networks
- CIDR
- Classless notation writing the mask as /prefix
- VLAN
- A logical LAN created on a switched network
Quick revision
- TCP reliable; UDP fast.
- IPv4 32-bit; IPv6 128-bit.
- Subnets = 2ⁿ; hosts = 2ʰ − 2.
- ARP spoofing enables man-in-the-middle attacks.
- VLAN tagging = 802.1Q on trunk ports.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.Differentiate between TCP and UDP.
- Q2.What is the range of a class B address?
- Q3.List the private IPv4 address ranges.
- Q4.What does /24 mean in CIDR?
- Q5.What is ARP spoofing?
- Q6.What is a VLAN?
Long-answer questions
- Q1.Explain IPv4 addressing classes and compare IPv4 with IPv6.
- Q2.Subnet the network 192.168.10.0/24 into 8 subnets and list the network address, host range and broadcast address of each.
- Q3.Explain the working of ARP and the security threat of ARP spoofing.
- Q4.Explain VLANs, tagging and their benefits.
Stuck on this unit?
Message SBS on WhatsApp for help with Computer Networks-I, or to ask about studying BCA at Synetic.
