Which octet determines ip address class




















Primarily, class A, B, and C are used by the majority of devices on the Internet. Class D and class E are for special uses. The list below shows the five available IP classes, along with the number of networks each can support and the maximum number of hosts devices that can be on each of those networks.

The four octets that make up an IP address are conventionally represented by a. Additionally, information is also provided on private addresses and loop address used for network troubleshooting. Class A addresses are for networks with large number of total hosts. Class A allows for networks by using the first octet for the network ID.

The first bit in this octet, is always zero. The remaining seven bits in this octet complete the network ID. The 24 bits in the remaining three octets represent the hosts ID and allows for approximately 17 million hosts per network. Class A network number values begin at 1 and end at Class B addresses are for medium to large sized networks.

Class B allows for 16, networks by using the first two octets for the network ID. The first two bits in the first octet are always 1 0.

Each address class has a default Subnet Mask that is not explicitly specified, as shown in the following table. The meaning of the subnet mask is explained here. In the Default Subnet Mask column are indicated different notations to represent the same number. The IP addresses that use default subnet masks are called classful. In these addresses the subnet can only be one of the types included in the previous table:. The following image explains how the 32 bits of the IP address are partitioned depending on the class:.

There is one fixed bit in Class A 0xxxxxxx , two fixed bits in Class B 10xxxxxx and three fixed bits in Class C xxxxx. The mechanisms of Classful IP addresses was designed along with the IP Protocol, when the number of existing computers was still very limited. The basic idea was allocating Class A addresses to large companies where a significant number of internal hosts needed to be connected.

The Class B was planned for medium-size enterprises while the Class C for small businesses. Class D was reserved for Multicast , a streaming technology to use with applications such as real time video. Examples of long time allocation of IP addresses are: block of addresses 9. For an exhaustive list please refer to this page. With the growing demand of IP addresses, it became clear that having just three classes of IP was causing a large wasting of addressing space.

In order to have a more efficient use of the addressing space, the IP Classless mechanism was designed. A new field called Subnet was introduced in the IP address. The concept is pretty easy to explain using a picture, where we can see that the subnet part has variable length while the host part needs to shrink accordingly:. For example the following IP address is perfectly valid using the classless mechanism:.

This is a Class A address being the first octet in the range , so the network part occupies 8 bits. The remaining 24 bits will be partitioned between the subnet part using 18 bits and the host part using 6 bits. Here is the math to find these values:.

Also the default subnet masks can be used in the classless notation:. As shown in the table, the subnet mask notation is similar to the IP address one, but the meaning is very different.

To understand how to use the subnet mask, we need to convert it in binary:. Class B networks use a default subnet mask of Its first octet is , which is between and , inclusive. Class C networks use a default subnet mask of In some scenarios, the default subnet mask values don't fit the organization needs for one of the following reasons:. It 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 aren't organized in a way that easily fits these addresses.

Each of these three networks has 50 hosts. You are allocated the class C network For illustration, this address is actually from a range that isn't allocated on the Internet. It means that you can use the addresses Two addresses that can't be used in your example are The zero address is invalid because it's 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 can't be assigned to any individual host. You should now be able to give IP addresses to hosts. It 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 used for the host address, and using them for the network portion of the address. The subnet mask It works because in binary notation, The first two digits of the last octet become network addresses, so you get the additional networks 0 , 64 , and Some administrators will only use two of the subnetworks using For more information on this topic, see RFC In these four networks, the last six binary digits can be used for host addresses.

Using a subnet mask of These four networks would have as valid host addresses:. Remember, again, that binary host addresses with all ones or all zeros are invalid, so you can't use addresses with the last octet of 0, 63, 64, , , , , or You can see how it works by looking at two host addresses, If you used the default Class C subnet mask of However, if you use the subnet mask of The result of this comparison tells the computer whether the destination is a local host or a remote host.

If the result of this process determines the destination to be a local host, then the computer will send the packet on the local subnet. It's then the responsibility of the router to forward the packet to the correct subnet.

Incorrect Subnet Mask: If a network uses a subnet mask other than the default mask for its address class, and a client is still configured with the default subnet mask for the address class, communication will fail to some nearby networks but not to distant ones.

As an example, if you create four subnets such as in the subnetting example but use the incorrect subnet mask of In this situation, packets destined for hosts on different physical networks that are part of the same Class C address won't be sent to a default gateway for delivery.

A common symptom of this issue is when a computer can communicate with hosts that are on its local network and can talk to all remote networks except those networks that are nearby and have the same class A, B, or C address.

Incorrect IP Address: If you put computers with IP addresses that should be on separate subnets on a local network with each other, they won't be able to communicate. They'll try to send packets to each other through a router that can't forward them correctly.



0コメント

  • 1000 / 1000