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

Lesson - 02 - IPv4 Addressing

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

Lesson - 02 - IPv4 Addressing

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

IPv4 ADDRESSING

Objectives:
 IPV4 Addressing Overview.
 IPv4 Address Classes.
 Subnet Mask
 Subnetting
IPv4 Addressing Overview
• An IP address is a unique 32-bit long number that identifies a
device/node on a TCP/IP network.
• It is usually written in W.X.Y.Z format (i.e. Four Decimal numbers
separated by dots/periods).
• Each of the four decimal numbers is known as an octet (Group of 8
bits).
• An IP address contains two parts which include the network part and
the host part.
• For example in IP 192.168.1.1, 192.168.1Network Portion while .1 is
the Host Portion.
IP Address Classes
 There are five classes of IP addresses namely A,B,C,D and E.

 Classes A,B and C are the most widely used addresses.

 Classes define which bits are used for the network ID and
those for the host IS.

 They also define possible number of networks and the number

of hosts per network.


CLASS A
 Address representation is N.H.H.H.
 The first bit in the first Octet is always set to 0.
 No. of Networks is 27=128 (Formula 2n = No. Of Networks)
 No. of Hosts =224-2=16777214 (Formula 2h -2 = No. Of Hosts)
 IP Range is from 1.0.0.0-126.255.255.255
 Where 10.0.0.0-10.255.255.255Private Block
 Used in Networks with very large number of Hosts.
CLASS B
 Address representation is N.N.H.H.
 First two bits in the first octet are always set to 10.
 No. of Networks is 214
 No. of Hosts =216-2=65534
 IP Range is from 128.0.0.0-191.255.255.255
 Where 172.16.0.0-172.31.255.254Private Block
 Used in Medium sized Networks
CLASS C
 Address representation is N.N.N.H.
 First Three bits in the first octet are always set to 110.
 No. of Networks is 221=2097152
 No. of Hosts =28-2=254
 IP Range is from 192.0.0.0-223.255.255.255
 Where 192.168.0.0-192.168.255.254Private Block
 Used in Small Networks.
OTHER CLASSES
Class D/Multicast

 First FOUR Bits in the first Octet always set to 1110

 Range: 224.0.0.0-239.255.255.255

 Used to send packets to specific set of ports

Class E:Research and Experimental Activities

 First FOUR Bits in the first Octet always set to 1111

 Range: 240.0.0.0-255.255.255.255

 Used for scientific purposes


IP CLASSES SUMMARY
IPv4 ADDRESS RULES
 Network ID and Host ID bits cannot be all 1’s OR all 0’s.

 Host ID must be unique to the local network ID.


Points to Note
 IP 127.0.0.1 is reserved for loopback tests (allows a node to
send a test packet to itself without generating network traffic)

 IP 255.255.255.255 is the all networks address used to


broadcast to all nodes on the current network.

 IP 0.0.0.0 Used by Cisco routers to designate the default route


SUBNET MASK
 It’s a 32 bit Number which used by hosts/Nodes to identify the
Network they belong to.

 A subnet mask helps a Host to determine whether the destination


host IP Address is located on a local Network or remote Network
when sending a Packet. (ANDing operation is Used).

 Hosts on the same network MUST have the same subnet mask.

 Subnet Mask can be default or Custom.


DEFAULT SUBNET MASKS
ANDing

 The Network ID Portion of an IP Address is revealed by ANDing the


subnet Mask to the IP address.

ANDing Rules
1 AND 1 =1
0 AND 1 =0
0 AND 0 =0
ANDing Process
 Source and destination IP Addresses are converted into Binary Format.

 Source Mask is Converted into binary.

 Binary Versions of Source and destination IP Addresses are ANDed with


the Binary version of Source Mask.

 Compare the Products (If same Hosts are on the same network
otherwise the Destination is in a remote Network and Packets will be
sent to the default gateway).
SUBNETTING
What it is?
 It is the process of dividing a Large Network Address
into Smaller Network Addresses referred to as Subnets.

 In IP addressing a SUBNET is a Segment in a TCP/IP


environment that uses IP addresses derived from a
single network ID.
What are its benefits?
 It provides for security and organization of resources..

In larger companies subnetting allows each of the departments to have


its own secure network independent from the other networks.

 Simplified Management:

It is easier to identify and isolate network problems in a group of small


networks than within one gigantic network.

 It speeds up the network/optimize a network.

It reduces the broadcast domains therefore reducing network traffic thus


allowing data to reach its destination much faster.
Subnetting guidelines!!
1. Write the subnet mask (Host Part) of the given IP in binary.
2. Identify the bits to be borrowed from the host portion and turn them ON.

Number of bits to borrow is determined by the formula: 2n >=No


.of Networks Required where n represents the number of
bits needed.
3. Write the New/Custom subnet mask in decimal.
4. Determine the block size (Subnets Incremental value) by calculating the
Decimal Equivalent of the last bit borrowed.
5. Generate the table below:.
Subnets details
Subnet ID First Valid IP Last Valid IP Broadcast IP

S0

S1

……..

Sn

Sn+1
How do I fill the Table?

The first subnet_ID (S0) is always similar to the address subnetted.


Sn+1= Sn + Blocksize( Affected Octet).
First_Valid IP=Subnet_ID+1(Last Octet) Regardless of the class of IP.
Broadcast_IP=Next Subnet ID (Sn+1)-Binary1(Last Octet).
Last_Valid IP=Broadcast_IP-Binary 1 (Last Octet).

NOTE: Number of hosts per subnet is given by the formula (2h-2) where h

is the number of host bits in this case.


Subnetting Example 1!!!
Given the IP Address192.168.1.0 and a
the Mask255.255.255.0 , create 4 Subnets.
Last octet binary
Subnet mask 255.255.255.0 255.255.255.00000000

Borrow 2 bits from host part and turn them on since 2n=>4 it
implies that n=2.
Result =255.255.255.11000000
Which translates to: 255.255.255.192 (New/Custom Mask)
Block Size = 64(Fourth Octet)
Subnets Summary
Subnet ID First Valid IP Last Valid IP Broadcast IP

S0 192.168.1.0 192.168.1.1 192.168.1.62 192.168.1.63

S1 192.168.1.64 192.168.1.65 192.168.1.126 192.168.1.127


S2 192.168.1.128 192.168.1.129 192.168.1.190 192.168.1.191

S3 192.168.1.192 192.168.1.193 192.168.1.254 192.168.1.255

192.168.1.256

The Number of Valid Host IP Addresses per subnet is 26-2=62

The New/Custom subnet Mask will be 255.255.255.192


for all the Hosts.
Summary
In this lesson you have learnt:

 What an IP address is

 IPv4 Address Structure

 IPv4 Address Classes

 The Subnet mask

 Subnetting
Thank you

You might also like