Introduction to working with IP Addresses
Probably
work with decimal numbers much easier than with the binary numbers needed by
the computer. Working with binary numbers is time-consuming & error-prone.
The
32-bit IP address is broken up into 4 octets, which are arranged into a
dotted-decimal notation scheme. An octet is a set of 8 bits.
The
binary system uses only 2 values “0 & 1” to represent numbers in positions
representing increasing powers of 2.We all are accustomed to thinking &
working in the decimal system, which is based on the number 10.
What
then do you suppose is the largest decimal number that can be expressed in an
octet?
11111111 (Eight 1’s)
Ø Converting to decimal
The
largest decimal number that can be stored in an IP address octet is 255.
Ø IP Address Classes
figure
IP
addresses are divided into 5
classes, each of which is designated with the alphabetic letters A to E. Class D addresses are used
for multicasting. Class E addresses
are reserved for testing & some mysterious future use.
Using
the ranges, you can determine the class of an address from its 1st octet
value. An address beginning with 120 is a Class A address, 155 is a Class B
address & 220 is a Class C address.
Each
Network is assigned a network address & every device or interface (such as
a router port) on the network is assigned a host address. There are only 2
specific rules that govern the value of the address.
A host address cannot be designated by
all zeros or all ones. These are special addresses that are reserved for
special purposes.
Ø Class A Addresses
v Class
A IP addresses use the 1st8 bits (1st Octet) to designate the
Network ID.
v The
1stbit which is always a 0, is used to indicate the address as a Class A
address & the remaining 7 bits are used to designate the Network.
v The
other 3 octets contain the Host ID.
v There
are 128 Class A Network
Addresses, but because addresses with all zeros aren’t used & address 127
is a special purpose address, 126 Class A Networks are available.
v There
are 16,777,214 Host
addresses available in a Class A address.
v The following formula to compute the number of
hosts available in any of the class addresses, where “n” represents the number
of bits in the host portion.
Half
of all IP addresses are Class A addresses. You can use the same formula to
determine the number of Networks in an address class.
Class
A address uses 7 bits to designate the network, so (27– 2) = 126 or there can
be 126Class A Networks.
Ø Class B IP Addresses
v Class
B addresses use the 1st16 bits (two octets) for the Network ID.
v The
last 2 octets are used for the Host ID.
v The
1st2 bit, which are always 10, designate the address as a Class B address &
14 bits are used to designate the Network. This leaves 16 bits (two octets) to
designate the Hosts.
v There
can be 16,382 Class B Networks & each
Network can have 65,534Hosts.
Ø Class C IP Addresses
v Class
C addresses use the 1st 24 bits (three octets) for the Network ID
& only the last octet for Host ID.
v The
1st 3 bits of all class C addresses are set to 110, leaving 21 bits
for the Network ID, which means there can be 2,097,150Class C Networks, but
only 254 Hosts per Network.
Special Addresses
v A
few addresses are set aside for specific purposes.
v Network
addresses that are all binary zeros, all binary ones & Network addresses
beginning with 127 are special Network addresses.
No comments:
Post a Comment