We can find N/W Address and B/C Address from any below information available.
How to find Network Address and Broadcast Address from prefix / Subnet Mask / Wilcard Mask?
We will find Network Address and Broadcast Address for IP address 192.168.0.0 and prefix /23.
For prefix /23, Subnet Mask is 255.255.254.0 and Wildcard Mask is 0.0.1.255
Network Address:
NW = IP AND SM
BC = IP OR ~SM or BC = IP OR WMTo find Network Address, do Bitwise AND operation between IP address and Subnet Mask.
IP address | 11000000101010000000000000000000 | 192.168.0.0 |
---|---|---|
Subnet Mask | 11111111111111111111111000000000 | 255.255.254.0 |
BITWISE AND | ||
Network Address | 11000000101010000000000000000000 | 192.168.0.0 |
Broadcast Address:
To find we need to do Bitwise OR between IP Address and Wildcard Mask. Wildcard Mask is inverted Subnet Mask.
IP address | 11000000101010000000000000000000 | 192.168.0.0 |
---|---|---|
Wildcard Mask | 00000000000000000000000111111111 | 0.0.1.255 |
BITWISE OR | ||
Broadcast Address | 11000000101010000000000111111111 | 192.168.1.255 |
Hence, Network Address is 192.168.0.0 and Broadcast Address is 192.168.1.255