Beruflich Dokumente
Kultur Dokumente
N.H.H.H
Class B:
N.N.H.H
Class C:
N.N.N.H
Class D:
for multicast
Class E:
for research
The first octet rule states that the class of an address can be determined by the numerical value
of the first octet.
Once the first octet is applied, the router identifies how many bits it must match to interpret the
network portion of the address (based on the standard address class). If there is no further
identification of additional bits to use as part of the network address, the router can make a
routing decision using this address.
Note
Host address
Each device or interface must have a non-zero host number.
A host address of all ones is reserved for an IP into that network.
A value of zero means this network or the wire itself (for example, 172.16.0.0). It was also
used for IP broadcasts in some early TCP/IP implementations, it usually it is rarely found now.
The routing table contains entries for network or wire addresses; it usually does not contain any
information about hosts.
An IP address and subnet address on an interface achieves three purposes:
Subnet Addressing
From the addressing standpoint, subnets are an extension of the network number. Network
administrators decide the size of subnets based on organisation and growth needs.
Network devices use subnet masks to identify which part of the address is considered network
and which remaining part to leave for host addressing.
Subnet Mask
An IP address is 32 bits in size, written as four octets. The subnet mask is 32 bits in size, written
as four octets. The layout of the subnet mask field is as follows:
Subnet masks indicate which of the bits in the host field are used to specify different parts
(subnets) of a particular network.
Decimal Equivalent of Bits Patterns
Subnet bits come from the high-order bits of the host field. To determine a subnet mask for an
address, add up the decimal values of each position that has a 1 in it. For example,
224 = 128 + 64 + 32.
Because the subnet mask is not defined by the octet boundary, but by bits, we need to convert
dotted decimal addresses to binary and back into dotted decimal so they can work with these
addresses.
Subnet Mask without Subnets
172.16.2.160
10101100
00010000
00000010
10100000
255.255.0.0
11111111
11111111
00000000
00000000
10101100
00010000
00000000
00000000
172
16
The router extracts the IP destination address from the packet and retrieves the internal subnet
mask.
The router performs a logical AND operation to obtain the network number. During the logical
AND operation, the host portion of the destination address is removed.
Routing decisions are then based on network number only.
In this example, with no subnetting, the network number extracted is 172.16.0.0.
Subnet Mask with Subnets
172.16.2.160
10101100
00010000
00000010
10100000
255.255.0.0
11111111
11111111
11111111
00000000
10101100
00010000
00000010
00000000
172
16
Subnet Planning
Class B Subnet Planning Example
IP Host Address: 172.16.2.120
Subnet Mask: 255.255.255.0
Network
Subnet
Host
172.16.2.120:
255.255.255.0/8:
10101100
11111111
00010000
11111111
00000010
11111111
01111001
00000000
Subnet:
10101100
172
00010000
16
00000010
2
00000000
0
This network has eight that provide up to 254 subnets and 254 host addresses.
No. Bits
2
3
4
5
6
7
8
9
10
11
12
13
14
Subnet Mask
255.255.192.0
255.255.224.0
255.255.240.0
255.255.248.0
255.255.252.0
255.255.254.0
255.255.255.0
255.255.255.128
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252
No. Subnets
2
6
14
30
62
126
254
510
1022
2046
4094
8190
16,382
No. Hosts
16,382
8190
4094
2046
1022
510
254
126
62
30
14
6
2
Subnet
Host
192.168.5.121:
255.255.255.248/5:
11000000
11111111
10101000
11111111
00000101
11111111
01111
11111
001
000
Subnet:
11001001
11011110
00000101
01111
000
No. Bits
2
3
4
5
6
Subnet Mask
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252
No. Subnets
2
6
14
30
62
No. Hosts
62
30
14
6
2