Redhat: Network IPs
Defining a Network
Three IP addresses are needed to define a network:
| Network Address | The first Address of the network |
| Broadcast Address | The last address of the network |
| Subnet Mask | Defines the difference between two address |
The range of IPs that can be used on a network are those between the network and broadcast addresses.
As an example a network defined with:
- Network Address = 192.168.122.0
- Subnet Mask = 255.255.255.0
The Broadcast Address is calculated as a logical or of the Network Address and Subnet:
Network = 11000000.10101000.01111010.00000000
Subnet = 11111111.11111111.11111111.00000000
~Subnet = 00000000.00000000.00000000.11111111
Logical or= 11000000.10101000.01111010.11111111
BroadCast = 192.168.122.255This is a 24 Bit network as the subnet has 24 bits represented by 1's. It is sometimes shown using a different notation:
192.168.122.0/24