Relationship between ip address and subnet mask

To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation. What is the difference between an IP address and a physical address? Today, these default subnet masks aren't much used except as a point of reference or. IP Addresses, Subnet Masks, and Default Gateways. Learn the basics The difference is that it consists of four segments called octets that are separated by a period. The numbers within each octet range between 0 and

Its first octet is 10, which is between 1 andinclusive. Class B networks use a default subnet mask of Its first octet iswhich is between andinclusive. Class C networks use a default subnet mask of In some scenarios, the default subnet mask values do not fit the needs of the organization, because of the physical topology of the network, or because the numbers of networks or hosts do not fit within the default subnet mask restrictions. The next section explains how networks can be divided using subnet masks.


This becomes necessary as you reconcile the logical address scheme of the Internet the abstract world of IP addresses and subnets with the physical networks in use by the real world. A system administrator who is allocated a block of IP addresses may be administering networks that are not organized in a way that easily fits these addresses.

Each of these three networks has 50 hosts.

what is subnet and subnet mask -Subnets और subnet mask क्या है ?

You are allocated the class C network For illustration, this address is actually from a range that is not allocated on the Internet. This means that you can use the addresses Two addresses that cannot be used in your example are The zero address is invalid because it is used to specify a network without specifying a host.

The address in binary notation, a host address of all ones is used to broadcast a message to every host on a network. Just remember that the first and last address in any network or subnet cannot be assigned to any individual host.

You should now be able to give IP addresses to hosts. This works fine if all computers are on a single network. However, your computers are on three separate physical networks. Instead of requesting more address blocks for each network, you divide your network into subnets that enable you to use one block of addresses on multiple physical networks.

In this case, you divide your network into four subnets by using a subnet mask that makes the network address larger and the possible range of host addresses smaller. In other words, you are 'borrowing' some of the bits usually used for the host address, and using them for the network portion of the address.

The subnet mask This works because in binary notation, An IPv4 address consists of 32 bits, for readability written in a form consisting of four decimal octets separated by dots, called dot-decimal notation. An IPv6 address consists of bits written in a hexadecimal notation and groupings of 16 bits, called hextetsseparated by colons.

An IP address is divided into two logical parts, the network prefix and the host identifier. All hosts on a subnetwork have the same network prefix. This prefix occupies the most-significant bits of the address.

Welcome to official blog of LAN / WAN Professional.: How Are IP Addresses and Subnet Masks Related?

The number of bits allocated within a network to the prefix may vary between subnets, depending on the network architecture. The host identifier is a unique local identification and is either a host number on the local network or an interface identifier. This addressing structure permits the selective routing of IP packets across multiple networks via special gateway computers, called routersto a destination host if the network prefixes of origination and destination hosts differ, or sent directly to a target host on the local network if they are the same.

Routers constitute logical or physical borders between the subnets, and manage traffic between them.

relationship between ip address and subnet mask

Remember that all this is done in binary. If you are curious as to what happens behind the scenes, here it goes. We will consider a class C network being subneted. First of all you have to decide how many subnets you want to have.

This can be along functional lines like different subnets for accounts, sales, and marketing etc.

IP Addresses And Subnet Masks

You also need to know the number of hosts that the largest subnet is to support. And remember to keep future needs in mind. Assume that the network address chosen for your intranet is Since you are dealing with binary numbers, subnets can be created only in blocks of powers of two.

relationship between ip address and subnet mask

That is you can have two subnets, four, eight, 16, and so on. In this case you choose eight subnets, which will also give you one free subnet for future use. Your IP address is a bit binary number. Out of this the first 24 bits 8 x 3 have already gone for the network address.