Gelbe Linie

TCP/IP ADDRESSING


BACKGROUND:

Every IP address can be broken down into 2 parts, the Network ID (netid) and the Host ID (hostid). All hosts on the same network must have the same netid. Each of these hosts must have a hostid that is unique in relation to the netid. IP addresses are divided into 8 octets with each having a maximum value of 255. We view IP addresses in decimal notation such as 124.35.62.181, but it is actually utilized as binary data so one must be able to convert addresses back and forth.

CONVERTING IP ADDRESSES:

DECIMAL

BINARY

When converting binary data to decimal, a "0" is equal to 0. "1" is equal to the number that corresponds to the field it is in. For example, the number 213 would be 11010101 in binary notation. This is calculated as follows:
128+64+0+16+0+4+0+1=213.

Remember that this only represents 1 octet of 8 bits, while a full IP address is 32 bits made up of 4 octets. This being true, the IP address 213.128.68.130 would look like 11010101 10000000 01000100 10000010. If you understand this then you are a geek and all of your friends will laugh at you. Believe me - I know!

128

10000000

64

01000000

32

00100000

16

00010000

8

00001000

4

00000100

2

00000010

1

00000001

CLASSES:

CLASS

RANGE

IP addresses can be class A, B or C. Class A addresses are for networks with a large number of hosts. The first octet is the netid and the 3 remaining octets are the hostid. Class B addresses are used in medium to large networks with the first 2 octets making up the netid and the remaining 2 are the hostid. A class C is for smaller networks with the first 3 octets making up the netid and the last octet comprising the hostid.

A

10000000

B

01000000

C

00100000