Networking II: SSS 3 Lesson Note
NETWORKING II: IP ADDRESSING, IPV4, SUBNETTING AND NETWORK PROTOCOLS
Subject: Digital Technologies
Class: SSS 3
Term: First Term
Week: 6
Topic: Networking II
Duration: 80 Minutes (Double Period)
1. Introduction
Computer networking allows computers and other digital devices to communicate and share information. For devices to exchange data successfully, they need ways to identify one another and rules that govern how information is transmitted. In a computer network, an IP address helps identify a device or network interface for communication using the Internet Protocol. Network protocols define how devices exchange information, while subnetting allows a larger IP network to be divided into smaller networks. This lesson examines IP addressing, IPv4, subnetting and common network protocols.
Definition: IP addressing is the system of assigning Internet Protocol addresses to network interfaces so that devices can be identified and communicate across IP networks.
2. Meaning of an IP Address
An IP address is a numerical address assigned to a network interface. It helps network devices identify the source and destination of data packets. For example, a computer connected to a school network may have an IPv4 address such as192.168.1.10.
When the computer communicates with another device, IP addressing helps the network deliver packets towards the intended destination.
Functions of an IP Address
- Identification: It identifies a network interface within the relevant addressing system.
- Routing: It helps routers determine where IP packets should be forwarded.
- Communication: It enables devices to send and receive IP packets across networks.
- Network organisation: IP addresses and subnet masks help distinguish network portions from host portions of an address.
Important: An IP address does not necessarily identify a person or a physical computer permanently. Addresses may change, and one device can have multiple network interfaces or addresses.
3. Types of IP Addresses
The two major versions of Internet Protocol addressing are IPv4 and IPv6.3.1 Internet Protocol Version 4 (IPv4)
IPv4 is the fourth version of the Internet Protocol. It uses a 32-bit address, commonly written as four decimal numbers separated by dots. Each decimal number is called an octet because it represents eight bits. Each octet ranges from 0 to 255. Example:192.168.1.10
The four octets can be represented in binary as follows:
Decimal: 192 168 1 10
Binary: 11000000 10101000 00000001 00001010
An IPv4 address contains 32 bits in total.
The total number of possible IPv4 address patterns is:
2^32 = 4,294,967,296
Some addresses and address ranges are reserved for special purposes, so this total is not the number of ordinary public addresses available for general assignment.
3.2 Internet Protocol Version 6 (IPv6)
IPv6 was developed partly to address the limitations of IPv4 address availability. It uses 128-bit addresses written in hexadecimal groups separated by colons. Example:2001:db8::1
IPv6 provides a vastly larger address space than IPv4 and includes other improvements to IP addressing and network operation.
Differences Between IPv4 and IPv6
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Notation | Decimal numbers separated by dots | Hexadecimal groups separated by colons |
| Example | 192.168.1.10 |
2001:db8::1 |
| Address space | Approximately 4.3 billion possible patterns | Approximately 3.4 × 1038 possible patterns |
| Broadcasting | Supports broadcast addressing | Does not use broadcast; it supports multicast and anycast instead |
4. Public and Private IPv4 Addresses
IPv4 addresses can be classified according to how they are used.4.1 Public IP Addresses
A public IP address is globally unique within the public addressing system and is used for communication across the internet. Public addresses are allocated through internet address registries and service providers. Example: A public-facing web server may have a public IP address that internet users can reach.4.2 Private IP Addresses
Private IPv4 addresses are reserved for use within private networks, such as homes, schools and offices. They are not routed directly across the public internet. The three private IPv4 ranges are:| Private Range | Subnet Mask at the Range Boundary | Common Use |
|---|---|---|
10.0.0.0 – 10.255.255.255 |
255.0.0.0 (/8) |
Large private networks |
172.16.0.0 – 172.31.255.255 |
255.240.0.0 (/12) |
Medium or large private networks |
192.168.0.0 – 192.168.255.255 |
255.255.0.0 (/16) |
Home, school and small office networks |
Note: The subnet masks shown above describe the boundaries of the reserved private ranges. A network administrator may divide these ranges into smaller subnets with different subnet masks.
A router commonly allows devices using private addresses to access the internet through Network Address Translation (NAT), often using a public address.
4.3 Static and Dynamic IP Addresses
Static IP address: An address configured to remain fixed unless an administrator or network configuration changes it. Dynamic IP address: An address assigned automatically, commonly through the Dynamic Host Configuration Protocol (DHCP). It may change when the lease is renewed or the device reconnects.5. Subnet Masks and CIDR Notation
A subnet mask helps determine which bits of an IPv4 address represent the network portion and which bits represent the host portion. For example:IP address: 192.168.1.10
Subnet mask: 255.255.255.0
CIDR: /24
The subnet mask 255.255.255.0 corresponds to /24 because the first 24 bits are network bits.
The remaining 8 bits are available for host addressing within that subnet.
Understanding CIDR Notation
CIDR stands for Classless Inter-Domain Routing. It expresses the length of the network prefix using a slash followed by a number. Examples:/8means the first 8 bits form the network prefix./16means the first 16 bits form the network prefix./24means the first 24 bits form the network prefix./26means the first 26 bits form the network prefix.
Common IPv4 Subnet Masks
| CIDR Prefix | Subnet Mask | Total Addresses | Usable Host Addresses in a Typical Subnet |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
6. Meaning and Importance of Subnetting
Definition: Subnetting is the process of dividing a larger IP network into smaller logical networks called subnets.
Subnetting allows an organisation to organise its devices into separate networks instead of placing every device on one large network.
Importance of Subnetting
- Better organisation: Devices can be grouped by department, classroom, office or function.
- Efficient address allocation: IP addresses can be assigned according to the number of devices required in each subnet.
- Reduced broadcast domains: Routers separate broadcast domains, helping limit broadcast traffic within each subnet.
- Improved security management: Different subnets can be controlled through routing rules and access-control policies.
- Easier troubleshooting: Network administrators can isolate and diagnose problems within smaller network segments.
- Improved network management: Separating departments or services makes network administration more organised.
7. Basic Subnetting Calculation
Consider the network:192.168.1.0/24
A /24 network contains 32 − 24 = 8 host bits.
The total number of addresses is:
2^8 = 256 addresses
In a typical IPv4 subnet, two addresses are reserved: one for the network address and one for the broadcast address.
Therefore:
Usable host addresses = 256 − 2
= 254
Example: Dividing a /24 Network into Two /25 Subnets
Suppose a school has the network192.168.1.0/24 and wants to divide it into two equal subnets.
Moving from /24 to /25 uses one additional bit for the network prefix. The network is divided into two equal groups, each containing 128 addresses.
| Feature | Subnet 1 | Subnet 2 |
|---|---|---|
| Network address | 192.168.1.0/25 |
192.168.1.128/25 |
| First usable address | 192.168.1.1 |
192.168.1.129 |
| Last usable address | 192.168.1.126 |
192.168.1.254 |
| Broadcast address | 192.168.1.127 |
192.168.1.255 |
| Total addresses | 128 | 128 |
| Usable host addresses | 126 | 126 |
Key formula:
Total addresses in a conventional IPv4 subnet = 2host bits.
Usable host addresses are generally total addresses minus 2.
Total addresses in a conventional IPv4 subnet = 2host bits.
Usable host addresses are generally total addresses minus 2.
Another Example: A /26 Subnet
A/26 prefix leaves 32 − 26 = 6 host bits.
Total addresses = 2^6 = 64
Usable hosts = 64 − 2 = 62
For the subnet 192.168.1.0/26:
- Network address:
192.168.1.0 - First usable address:
192.168.1.1 - Last usable address:
192.168.1.62 - Broadcast address:
192.168.1.63 - Subnet mask:
255.255.255.192
192.168.1.64.
8. Meaning of Network Protocols
Definition: A network protocol is a set of rules that governs how devices communicate and exchange data over a network.
Protocols help devices understand how data should be formatted, addressed, transmitted, received and interpreted.
Different protocols perform different tasks. Some support reliable data delivery, others translate domain names into IP addresses, and others support web browsing, email or automatic network configuration.
9. Common Network Protocols and Their Functions
| Protocol | Full Meaning | Function |
|---|---|---|
| IP | Internet Protocol | Addresses and routes packets between networks. |
| TCP | Transmission Control Protocol | Provides reliable, ordered delivery of data between applications. |
| UDP | User Datagram Protocol | Provides a lightweight, connectionless method of sending datagrams without TCP's delivery guarantees. |
| HTTP | Hypertext Transfer Protocol | Transfers web resources between clients and servers. |
| HTTPS | Hypertext Transfer Protocol Secure | Protects HTTP communication using TLS encryption and authentication. |
| FTP | File Transfer Protocol | Supports file transfers between computers. Traditional FTP does not encrypt traffic. |
| SMTP | Simple Mail Transfer Protocol | Used to send email and relay messages between mail servers. |
| POP3 | Post Office Protocol Version 3 | Allows an email client to retrieve messages from a mail server. |
| IMAP | Internet Message Access Protocol | Allows users to access and manage email stored on a mail server. |
| DNS | Domain Name System | Translates domain names, such as example.com, into IP addresses and provides other DNS records. |
| DHCP | Dynamic Host Configuration Protocol | Automatically supplies network configuration, commonly including an IP address, subnet mask, gateway and DNS servers. |
9.1 TCP and UDP
TCP and UDP are transport-layer protocols, but they work differently. TCP establishes a connection and provides mechanisms for reliable, ordered data delivery. It is commonly used for web traffic, email and file transfers. UDP sends datagrams without establishing a TCP-style connection or guaranteeing delivery and order. It is useful in applications such as real-time voice, video and some online games, where low delay may be important.9.2 HTTP and HTTPS
HTTP is commonly used for communication between web browsers and web servers. HTTPS is HTTP protected by TLS, which helps provide confidentiality, integrity and server authentication.
Safety tip: HTTPS helps protect the connection, but it does not automatically mean that a website is trustworthy. Users should still check the website address and be careful with personal information.
9.3 DNS and DHCP
DNS helps devices find services using domain names rather than requiring users to remember IP addresses. DHCP automatically assigns network configuration to devices, reducing the need to configure every device manually. For example, when a student connects a laptop to the school network, DHCP may assign an IP address, while DNS helps the laptop locate a website by its domain name.10. Relationship Between IP Addressing, Subnetting and Protocols
IP addressing, subnetting and protocols work together in network communication.- A device receives an IP address and other network settings, possibly through DHCP.
- The subnet mask or prefix helps the device determine whether a destination is on its local subnet.
- If the destination is outside the local subnet, the device normally sends the packet to its configured default gateway.
- IP helps route the packet towards its destination.
- Transport protocols such as TCP or UDP support communication between applications.
- Application protocols such as HTTP, DNS and SMTP provide services used by network applications.
11. Class Activity
Activity A: Identify IP Addresses Students should identify which of the following are written in IPv4 notation:192.168.1.1010.0.0.52001:db8::1172.16.4.20
192.168.2.0/24.
Students should calculate:
- The number of host bits.
- The total number of addresses.
- The number of usable host addresses in a conventional /24 subnet.
- The subnet mask.
- Automatically assigning IP settings.
- Translating domain names into IP addresses.
- Sending email between mail servers.
- Transferring web pages securely.
- Providing reliable, ordered transport.
12. Summary
An IP address identifies a network interface for communication using the Internet Protocol. IPv4 uses 32-bit addresses written as four decimal octets, while IPv6 uses 128-bit addresses written in hexadecimal notation. Private IPv4 addresses are commonly used within homes, schools and offices. A subnet mask or CIDR prefix identifies the network portion of an address. Subnetting divides a larger network into smaller logical networks, helping with address management and network organisation. Network protocols govern communication. IP supports addressing and routing, TCP provides reliable ordered transport, UDP supports connectionless datagram delivery, DNS resolves domain names, DHCP assigns network settings, and protocols such as HTTP, HTTPS and SMTP support web and email services.13. Evaluation Questions
Answer the following questions in your notebook.- Define an IP address and state three functions of IP addressing.
- Explain the difference between IPv4 and IPv6.
- What is the difference between a public IP address and a private IP address?
- Explain the meaning of a subnet mask and CIDR notation.
- Define subnetting and state four advantages of subnetting.
- Calculate the total number of addresses and usable host addresses in a conventional
/26IPv4 subnet. - State the functions of TCP, UDP, DNS and DHCP.
- Differentiate between HTTP and HTTPS.
- What are SMTP, POP3 and IMAP used for?
- Explain how IP addressing, subnetting and network protocols work together during communication.
14. Assignment
- Explain the differences between static and dynamic IP addresses.
- List the three private IPv4 address ranges and give one example of a private address.
- A network uses
192.168.5.0/24. Calculate the total number of addresses and usable host addresses. - For the subnet
192.168.5.0/26, state the subnet mask, network address, first usable address, last usable address and broadcast address. - Write the full meanings and functions of HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS and DHCP.
- Explain why subnetting can be useful in a school computer network.
15. Interactive Online Quiz
Choose the correct option for each question and click Submit Quiz to see your score.
Quiz Answer Guide
Click to reveal the correct answers
- B — 32 bits.
- C — DHCP.
- A — Dividing a larger IP network into smaller networks.
- D — DNS.
- B — 62 usable host addresses.
Comments
Post a Comment