What is a subnet?
A subnet is a logically separated part of an IP network, created using a subnet mask, that defines its own range of IP addresses.
Short and clear: a subnet is a "part of a network" that has its own network address, range of hosts, and broadcast address.
What "dividing a network into subnets" means
Initially there is one network. Using a mask, it can be split into several smaller networks: subnets.
Each subnet has:
- a network address
- host addresses
- a broadcast address
- its own mask (or prefix)
Example (IPv4)
There is a network:
192.168.1.0/24
If you split it into /26 subnets, you get:
192.168.1.0/26192.168.1.64/26192.168.1.128/26192.168.1.192/26
Each of them is:
- a separate subnet
- a separate broadcast domain
- a separate range of IP addresses
Why subnets are needed
Subnets are used for:
1. Reducing broadcast traffic
- broadcast is limited to the subnet
- the network works more stably and faster
2. Logically dividing the network
- different departments
- different network segments
- different access levels
3. Convenient routing
Routers operate:
- not on individual IPs
- but on subnets (network addresses + mask)
4. Saving IP addresses
- addresses are allocated more rationally
- there are no "empty" ranges
Important points for an interview
- a subnet is defined by an IP address + mask
- different subnets:
- do not exchange data directly
- require a router
- each subnet is a separate broadcast domain
In short, for an interview
A subnet is a logically separated part of an IP network, defined by a network address and a subnet mask, which has its own range of IP addresses and is used to divide a network and simplify routing.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.