In an IP address, the network portion identifies the specific network to which a device belongs, while the host portion identifies the individual device within that network. This structure allows for efficient routing of data across the internet by segregating the address into parts that signify the network and the specific device. The division between the network and host portions is determined by the subnet mask, which specifies how many bits are allocated to each portion. For example, in the IP address 192.168.1.10 with a subnet mask of 255.255.255.0, "192.168.1" represents the network portion, and "10" represents the host portion.
Network Portion Host 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 specifies the particular network interface's address. The network portion specifies the network address.
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
In the IP address 121.234.52.65, the host portion depends on the subnet mask used. If we assume a common subnet mask of 255.255.255.0 (or /24), the host portion would be the last octet, which is 65. This means that the network portion is 121.234.52, while 65 identifies the specific device within that network.
A subnet mask can be divided into two sections called the network portion and the host portion. The network portion identifies the specific network to which an IP address belongs, while the host portion identifies the individual device within that network. Together, these sections help determine how IP addresses are allocated and routed within a network.
In a class A network, the first 8 bits specify the network, the remaining 24 bits specify the host.
Since a subnet mask is used to separate the network id from the host id, any 1 bits indicate the network portion and the 0 bits indicate host portion. As an example, in the subnet mask: 255.255.0.0 This indicates the first two octets are used for the network, and the last two octets (ipV4) are used for host portion of an address.
Subnet mask
subnet masks
An IP address must be unique within a LAN; the combination of the network and host portion must present a number that is not duplicated anywhere else in the network. Outside of a LAN the IP addresses do not have to be unique, except that the network id portion can only be used by the organization that owns the IP network address. The host portion does not need to be unique across all LANs within an enterprise network.
Seeing as the IP address of 128.107.10.11 is a class B network, the host portion is 10.11