Asus ITX-220: 13 IP Addresses, Network Masks, and Subnets

13 IP Addresses, Network Masks, and Subnets: Asus ITX-220

Chapter 13

iPBX30 User Manual

13 IP Addresses, Network Masks, and Subnets

13.1 IP Addresses

Note: This section pertains only to IP addresses

for IPv4 (version 4 of the Internet Protocol). IPv6

addresses are not covered.

This section assumes basic knowledge of binary numbers, bits, and

bytes.

IP addresses, the Internet’s version of telephone numbers, are used

to identify individual nodes (computers or devices) on the Internet.

Every IP address contains four numbers, each from 0 to 255 and

separated by dots (periods), e.g. 20.56.0.211. These numbers are

called, from left to right, eld1, eld2, eld3, and eld4.

This style of writing IP addresses as decimal numbers separated by

dots is called dotted decimal notation. The IP address 20.56.0.211

is read “twenty dot fty-six dot zero dot two-eleven.”

13.1.1 Structure of an IP address

IP addresses have a hierarchical design similar to that of telephone

numbers. For example, a 7-digit telephone number starts with a

3-digit prex that identies a group of thousands of telephone lines,

and ends with four digits that identify one specic line in that group.

Similarly, IP addresses contain two kinds of information.

• Network ID

Identies a particular network within the Internet or Intranet

• Host ID

Identies a particular computer or device on the network

The rst part of every IP address contains the network ID, and the

rest of the address contains the host ID. The length of the network

ID depends on the network’s class (see following section). The

table below shows the structure of an IP address.

134

iPBX30 User Manual

Chapter 13

Table 13.1. IP Address Structure

Field 1 Field 2 Field 3 Field 4

Class A

Network ID Host ID

Class B

Network ID Host ID

Class C

Network ID Host ID

Here are some examples of valid IP addresses:

Class A: 10.30.6.125 (network = 10, host = 30.6.125)

Class B: 129.88.16.49 (network = 129.88, host = 16.49)

Class C: 192.60.201.11 (network = 192.60.201, host = 11)

13.2 Network classes

The three commonly used network classes are A, B, and C. (There

is also a class D but it has a special use beyond the scope of this

discussion.) These classes have different uses and characteristics.

Class A networks are the Internet’s largest networks, each with

room for over 16 million hosts. Up to 126 of these huge networks

can exist, for a total of over 2 billion hosts. Because of their huge

size, these networks are used for WANs and by organizations at

the infrastructure level of the Internet, such as your ISP.

Class B networks are smaller but still quite large, each able to hold

over 65,000 hosts. There can be up to 16,384 class B networks

in existence. A class B network might be appropriate for a large

organization such as a business or government agency.

Class C networks are the smallest, only able to hold 254 hosts at

most, but the total possible number of class C networks exceeds 2

million (2,097,152 to be exact). LANs connected to the Internet are

usually class C networks.

Some important notes regarding IP addresses:

The class can be determined easily from eld1:

eld1 = 1-126: Class A

eld1 = 128-191: Class B

eld1 = 192-223: Class C

(eld1 values not shown are reserved for special uses)

135

Chapter 13

iPBX30 User Manual

A host ID can have any value except all fields set to 0 or all

elds set to 255, as those values are reserved for special uses.

13.3 Subnet masks

Definition: mask: A mask looks like a regular IP

address, but contains a pattern of bits that tells what

parts of an IP address are the network ID and what

parts are the host ID: bits set to 1 mean “this bit is

part of the network ID” and bits set to 0 mean “this bit

is part of the host ID.”

Subnet masks

are used to define subnets (what you get after

dividing a network into smaller pieces). A subnet’s network ID is

created by “borrowing” one or more bits from the host ID portion of

the address. The subnet mask identies these host ID bits.

For example, consider a class C network 192.168.1. To split this

into two subnets, you would use the subnet mask:

255.255.255.128

It’s easier to see what’s happening if we write this in binary:

11111111. 11111111. 11111111.10000000

As with any class C address, all of the bits in eld1 through eld 3

are part of the network ID, but note how the mask species that the

rst bit in eld 4 is also included. Since this extra bit has only two

values (0 and 1), this means there are two subnets. Each subnet

uses the remaining 7 bits in eld4 for its host IDs, which range from

0 to 127 (instead of the usual 0 to 255 for a class C address).

Similarly, to split a class C network into four subnets, the mask is:

255.255.255.192 or 11111111. 11111111. 11111111.11000000

The two extra bits in eld4 can have four values (00, 01, 10, 11), so

there are four subnets. Each subnet uses the remaining six bits in

eld4 for its host IDs, ranging from 0 to 63.

Sometimes a subnet mask does not specify any

additional network ID bits, and thus no subnets. Such

a mask is called a default subnet mask. These masks

are:

136

iPBX30 User Manual

Chapter 13

Class A: 255.0.0.0

Class B: 255.255.0.0

Class C: 255.255.255.0

These are called default because they are used when a network is

initially congured, at which time it has no subnets.

137