Unit 4 of 4 · BCA Sem 4

Unit 4: Network protocols

Computer Networks-I notes · PTU syllabus (UGCC2517)

3 min read5 topics10 exam questions
On this page
  1. Unit summary
  2. The TCP/IP protocol suite
  3. IPv4 and IPv6 addressing
  4. Subnetting and CIDR
  5. ARP operation and ARP spoofing
  6. VLANs
  7. Key terms
  8. Quick revision
  9. Important questions

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
ComparisonIPv4 vs IPv6
IPv4
IPv6

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

1

Topic 1

The TCP/IP protocol suite

LayerProtocols
ApplicationHTTP/HTTPS, FTP, SMTP, POP3, IMAP, DNS, DHCP, Telnet, SSH
TransportTCP (reliable, connection-oriented), UDP (fast, connectionless)
InternetIP, ICMP (ping), ARP, IGMP
Network accessEthernet, Wi-Fi
ComparisonTCP vs UDP
TCP
UDP

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

2

Topic 2

IPv4 and IPv6 addressing

An IPv4 address is 32 bits written in dotted decimal (192.168.1.10).

ClassFirst octetDefault maskUse
A1–126255.0.0.0 (/8)Very large networks
B128–191255.255.0.0 (/16)Medium networks
C192–223255.255.255.0 (/24)Small networks
D224–239—Multicast
E240–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.

3

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.

Key formulasSubnetting formulas
  • 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.

4

Topic 4

ARP operation and ARP spoofing

ProcessHow ARP works
  1. 1Host needs the MAC for an IP
  2. 2Checks its ARP table

    Cache

  3. 3Broadcasts an ARP request

    "Who has 192.168.1.5?"

  4. 4Owner replies with its MAC

    Unicast

  5. 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.

5

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

  1. Q1.Differentiate between TCP and UDP.
  2. Q2.What is the range of a class B address?
  3. Q3.List the private IPv4 address ranges.
  4. Q4.What does /24 mean in CIDR?
  5. Q5.What is ARP spoofing?
  6. Q6.What is a VLAN?

Long-answer questions

  1. Q1.Explain IPv4 addressing classes and compare IPv4 with IPv6.
  2. Q2.Subnet the network 192.168.10.0/24 into 8 subnets and list the network address, host range and broadcast address of each.
  3. Q3.Explain the working of ARP and the security threat of ARP spoofing.
  4. 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.

WhatsApp us