0% found this document useful (0 votes)
17 views

Lesson 1 IP Addressing

Uploaded by

dizonrichan14
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lesson 1 IP Addressing

Uploaded by

dizonrichan14
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

IP Addressing

An IP address is 32-bit long


• It is usually written as four decimal numbers
separated by dots (periods) (dotted decimal notation)

• In hex, each of the four hexadecimal numbers is


called an octet.

• 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

• IPv6 address written as eight 4-digit (16-bit)


hexadecimal numbers separated by colons.
1080:0:0:0:0:800:0:417A
IP Addressing
Note:
For Class A: Have a first dotted decimal number in the range 1-126
For Class B: Have a first dotted decimal number in the range 128-191
For Class C: Have a first dotted decimal number in the range 192-223
IP Addressing
• There are five forms of IP addresses:
Class A :126 networks, each can have up to (16M-2)
nodes.
(1.0.0.0 - 126.0.0.0)
Class B: (16K-2) networks, each can have up to (64K-2)
nodes
(127.0.0.0 - 191.255.0.0)
Class C: (2M-2) networks, each can have up to 254
nodes.
(192.0.0.0 - 223.255.255.0)
Class D: a multicast address.
(224.0.0.0 - 240.0.0.0)
Class E: reserved for future use.
(241.0.0.0 - 248.0.0.0)
Binary

•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.

Class A final format:

|_|_______| |________________________|

7 bits 24 bits
Network Host
Part Part
Class A
Summary:

• If the the first decimal number in IP address is 1 to


126, then it is a class A address.
• The first byte is for the network number, and the next three
bytes are for the host addresses.
Class B

• If the first two bits of the address are 1and 0, it is a class B


network address.
• The first two bits identify class; the next fourteen
bits identify the network, and the last sixteen bits
identify the host.
• There are thousands of class B network numbers.
• Each class B network can have thousands of hosts.
Class B

|__| first two bits are used to determine the class to


which an address belongs to for class B address.

|______________| 14 (6 + 8) bits are used for network


address. Therefore, the number of class B networks
can be 2 14 = 16,384. There are 16,384 potential Class B
network numbers, which have a first dotted decimal
number in the range 128 to 191.

|________________| 16 bits are used for host address.


Therefore, each Class B network can have 2 16 = 65,536
hosts.
Class B

Class B final format

|__|______|________| |________________|
14 bits Network part 16 bits Host part
Summary:

• If the the first decimal number in IP address is 128 to


191, then it is a class B address.
• The first two bytes identify the network.
• The last two bytes identify the host.
Class C

• If the first three bits of the address are 1 1 0, it is a


class C network address.
• The first three bits are class identifiers.
• The next 21 bits are for the network address.
• The last eight bits identify the host.
• There are millions of class C network numbers.
• However, each class C network can have 254 hosts.
Class C

|___| first three bits are used to determine the class to which
an address belongs to for class C address.

|_____|________|________| 21 (5 + 16) bits are used for


network address. Therefore, the number of class C networks
can be 2 21 = 2, 097,152. There are 2,097,152 potential Class C
network numbers, which have a first dotted decimal number
in the range 192 to 223.

|________| 8 bits are used for host address. Therefore, each


Class C network can have 2 8 = 256 hosts.
Class C

Class C final format

|___|_____| |________| |________| |________|


21 bits Network part 8 bits host part

Summary:

• If the the first decimal number in IP address is 192 to


223, then it is a class C address.
• The first three bytes are for the network address.
• The last byte is for the host number.
Summary

• Class A:Few networks, each with many hosts.


• Class B: Medium number of networks, each with a
medium number of hosts
• Class C: Many networks, each with a few hosts.
ttps://jamboard.google.com/d/1Kig7Y7SLAl8d0Z6z8LdS8XS93BQ9ixCH-
7TrzGGLXxI/edit?usp=sharing
Why subnetting?

• Preservation of address space


• Control network traffic, avoid collisions
• Reduce the routing complexity
• Improve network performance
• Security
Subnetting

Subnetting is a method for getting the most out of the limited


32-bit IP addressing space. With any address class, subnetting
provides a mean of allocating a part of the host address space to
network addresses, which will let you have more networks. The
part of the host address space allocated to new network
addresses is known as the subnet number.

The InterNIC assigned the University of Windsor one class B


Network address, which is 137.207.0.0 with network number part
137.207. The Host number part is left to be assigned by the local
management - The Computing Services)
Subnetting
IP Subnetting

• Subnetting is a technique used to allow a single IP


network address to span multiple physical networks.
IP hosts should support subnetting.
• Subnetting is done by using some of the bits of the
host-id part of the IP address as a physical network
identifier.
• The subnet mask is used to determine the bits of the
network identifier.
• All hosts on the same network should have the same
subnet mask.

You might also like