To seprate an ip address from the network address we use subnet mask that can seprate the ip address from the network address
The subnet mask is used for this purpose. It indicates how much of the address is for network, and the remaining part is for the hosts.
The host portion specifies the particular network interface's address. The network portion specifies the network address.
A submask is designed to separate the network id portion of an IP address from the host or client portion. This helps a router determine whether the packet needs to be forwarded to another network.
Network Portion Host Portion
It represents the network portion
When we express an IPv4 network address, we add a prefix length to the network address. The prefix length is the number of bits in the address that gives us the network portion. For example, in 172.16.4.0 /24, the /24 is the prefix length - it tells us that the first 24 bits are the network address. This leaves the remaining 8 bits, the last octet, as the host portion.
The host portion of an IP address of all zeros indicates that you are referring to 'this network'. For example, the address 145.5.0.0 means the network 145.5
When you set up a sub network you decide upon the subnet mask and this determines the network address (all zeros in the subnet portion of the address) and the broadcast address (all ones in the subnet portion of the address). When you assign the host addresses in your subnet, then you use the addresses between the network address and the broadcast address.
This is a class C address. The network portion is the first three octets, so it would be 209.240.80.0.
Hosts with the same network portion of their IPv4 address.
no
Because this is the way you can easily and quickly isolate the network portion from the host portion of the address to just get the network id, which would be using for routing purposes.