Lesson 1 IP Addressing
Lesson 1 IP Addressing
• Example: 137.207.192.003 or 89 CF C0 03
• An IP address contains a network part and a host
part.
• The number of address bits used to identify the
network, and
the number to identify the host, vary according to
the class of
the address.
• Routers or gateways have one or more addresses
(depending on the no. of links they have) The three
main
address classes are class A, class B, and class C.
• By examining the first few bits of an address, IP
software can
quickly determine the address class, and therefore its
structure.
• IPv4 addresses written as four octets (8 bits)
separated by periods. 134.129.67.235
•0
•1
IP address format
IP address
For example:
The address (binary) - 10000000 00000111
00001111 00000001
has the DECIMAL DOT NOTATION:
128.7.15.1
It belongs to Class B addresses.
Its Network-id is: 128.7
Its Host-id is: 15.1
IP Addresses assignment example
Class A
• If the first bit of an IP address is 0, it is the address of a class A
network.
• The first bit of a class A address identifies the address class.
• The next seven bits identify the network, and
• the last 24 bits identify the host.
• There are fewer than 128 class A network numbers, but each class A
network can have millions of hosts.
Class A
|_| first one bit is used to determine the class to which an address belongs to for
Class A address.
|_______| 7 bits are used for Network address.Therefore, the number of class A
networks can be 2 7 = 128. Number 0 is not used, and number 127 is used for
testing loopback for each host. There are 126 potential Class A network numbers,
which have a first dotted decimal number in the range 1 to 126.
|________________________| 24 bits are used for host address. Therefore, each
Class A network can have 2 24 = 16,777,216 hosts.
Class A is not available to the general public, and it is restricted to special uses.
|_|_______| |________________________|
7 bits 24 bits
Network Host
Part Part
Class A
Summary:
|__|______|________| |________________|
14 bits Network part 16 bits Host part
Summary:
|___| first three bits are used to determine the class to which
an address belongs to for class C address.
Summary: