Sie sind auf Seite 1von 7

Describe the different classes of IP addresses [and subnetting].

Introduction to TCP/IP Addresses


In a TCP/IP environment, end stations communicate seamlessly with servers or other end
stations. This occurs because mode using the TCP/IP protocol suite has a unique 32-bit logical
address.
Often traffic is forwarded through the internetwork based on the name of an organisation, rather
than an individual person or host. If names are used instead of addresses, the names must be
translated to the numeric address before the traffic can be delivered. Location of the
organisation will dictate the path that the data follows through the internetwork.
Each company listed on the internetwork is seen as a single network that must be reached before
an individual host within that company can be contacted. Each company network address has an
address; the hosts that populate that network share bits, but each host is identified by the
uniqueness of the remaining bits.
IP Addressing

The IP address is 32 bits in length and has two parts:


Network
Host Number
The address format is known as dotted decimal notation.
Example address: 172.16.122.204
Each bit in the octet has a binary weight, such as (128,4, 2, 1).
The minimum value for an octet is 0; it contains all 0s.
The maximum value for an octet is 255; it contains all 1s.
The allocation of addresses is managed by a central authority.
IP Addresses Classes
Class A:

N.H.H.H

Class B:

N.N.H.H

Class C:

N.N.N.H

Class D:

for multicast

Class E:

for research

N = Network number assigned by NIC


H = Host number assigned by network administrator
When IP was first developed, there were no classes of addresses. Now, for ease of
administration, the IP addresses are broken up into classes.
There are only 126 Class A address spaces, but each one can contain approximately 16 million
hosts. There are 65,534 Class B address spaces with 65,534 hosts each. There are ore than 16
million Class C address spaces possible, but they only have 254 hosts each.
This scheme allows the administrative authority to assign addresses based on the size of the
network. The authority designed this system on the assumption that there would be many more
small networks than large networks in the networks in the world.
Note Class D and E addresses are also defined. Class D addresses start at 224.0.0.0 and are
used for multicast purposes. Class E addresses start at 240.0.0.0 and are used for experimental
purposes.
IP address Bit Patterns
The most significant bit pattern determines the class of the address, as well as how many bits
make up the network portion of the address.

Class A addresses include


Range of network numbers: 1.0.0.0 to 126.0.0.0
Number of hosts addresses: 16,777,214
Class B addresses include
Range of network numbers: 128.1.0.0 to 191.254.0.0
Number of host address: 65,534
Class C addresses include
Range of network numbers: 192.0.1.0 to 223.255.254.0
Number of host addresses: 254
Class D addresses include
Range of network numbers: 224.0.0.0 to 239.255.255.254

Recognising Classes in IP Addresses (First Octet Rule)

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

127.0.0.1 is reserved for loopback address.

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:

It enables the system to process the receipt and transmission of packets.


It specifies the devices local address
It specifies a range of addresses that share the cable with device.

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:

Binary 1 for the network bits


Binary 1 for the subnet bits
Binary 0 for the host bits

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

Subnets not in use the default

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

Network number extended by eight bits

With eight-bit subnetting, the extracted network (subnet) number is 172.16.2.0.


This sample shows more bits turned on, extending the network portion and creating a secondary
field extending from the end of the standard mask and using eight of the host bits. This
secondary field is the subnet field and is used to represent wires (or subnetworks) inside the
networks.

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

Subnet Address = 172.16.2.0


Host Address = 172.16.2.1-172.16.2.254
Broadcast Address = 172.16.2.255
Eight bits of subnetting

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

Class C Subnet Planning Example


IP Host Address: 192.168.5.121
Subnet Mask: 255.255.255.248
Network

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

Subnet Address = 192.168.5.120


Host Address = 192.168.5.121-192.168.5.126
Broadcast Address = 192.168.5.127
Five Bits of Subnetting

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

Das könnte Ihnen auch gefallen