Ptepared by..
Braj Bihari
[Link](IT)
LPU
Internet Protocol
Numbering scheme
Largest network of computers
AmericanRegistry of Internetwork
Numbers (ARIN)
What is an IP address
A way to identify machines on a network
A unique identifier
IP Addressing
(Internet Protocol)
IP Addresses
IP addresses are:
Unique
Global and Standardised
Essential
IP usage
Used to connect to another computer
Allows transfers of files and e-mail
An IP address is 32 bit address.
IP structure
IP addresses consist of four sections
Each section is 8 bits long
Each section can range from 0 to 255
Written, for example, [Link]
IP structure
These four sections represent the machine
itself and the network it is on
The network portion is assigned.
Thehost section is determined by the
network administrator
What is an IP address?
IP (Internet Protocol) address
– device used by routers, to select best path from
source to destination, across networks and
internetworks
– network layer address, consisting of NETWORK
portion, and HOST portion
– logical address , assigned in software by network
administrator
– part of a hierarchical ‘numbering scheme’ - unique,
for reliable routing.
IP structure
5 Classes of IP address A B C D and E
Class A reserved for governments
Class B reserved for medium companies
Class C reserved for small companies
IP structure
Class D are reserved for multicasting
Class E are reserved for future use
Finding the class in binary notation
Finding the address class
IP structure
Class A begins 0 to 127
Class B begins 128 to 191
Class C begins 192 to 223
Class D begins 224 to 239
Class E begins 240 to 255
Finding the class in decimal notation
Class A
1st octet = network address, octets 2-4
= host address
1st bits of 1st octet set to 0
Next 7 bits of 1st octet for network
address.
00000000 is minimum address and
11111111 is maximum address.
2^7 -2=126 total number of network
addresses (127)
Class A
2^24 -2 total number of hosts under
each network address in class A.
Network address 0 is reserved to
designate the default route for the
packets.
Addresses beginning 127 are reserved
for internal testing
Class A range has address range from
[Link] to [Link].
Class A
For Example:- [Link]
[Link] is the network address.
[Link] is the broadcast Address
of network address 172.
Class A IP address
[Link]
01111100 11100000 11100000 01100100
Class B IP address
1st 2 octets = network address, octets
3-4 = host address
1st bit of 1st octet always set to 1.
2nd bit of 1st octet always set to 0.
Up to (2^14 – 2) Total Network
Addresses.
up to (2^16 - 2) host addresses (65534)
Class B IP address
[Link]
10000001 11100000 11100000 01100100
Class C IP address
1st 3 octets = network address, octet 4
= host address
1st 3 bits of 1st octet set to 110
Up to ( 2^21-2) Total no. Of network
addresses.
up to (2^8 - 2) host addresses.
Class C IP address
[Link]
11000001 11100000 11100000 01100100
Netid and hostid
Subnet
A network to be split into several parts for
internal use but still act like a single
network to the outside world. In the
internet literature, these parts are called
“subnet”.
To outside the network, the subnetting is
not visible, so allocating a new subnet
does not require contacting NIC or
changing any external databases.
Subnet Mask
• Purpose:
– Apply the Mask to the IP Address to determine:
• Network bits
• Host bits
• Subnet ID, Broadcast ID & Unicast range
• Format:
– 4 octets, dotted decimal notation (same as IP address)
– Contiguous binary 1’s starting from the left
• Examples:
– [Link] (typical for LAN)
– [Link] (typical for WAN)
– [Link] (incorrect)
Subnet Mask in Binary
• [Link]
•
11111111.11111111.11111111.00000000
• [Link]
•
11111111.11111111.11111111.11111100
• [Link] - incorrect
•
11111111.11111111.11111111.00000001
Subnet Calculation
• Step 1 – Convert:
– decimal address & mask format to binary address & mask
format
• Step 2 – Apply:
– binary subnet mask to the binary IP address using the
“and” function
• Step 3 – Calculate:
– Subnet ID
– Broadcast ID
– Unicast range (usable subnet addresses)
How to Calculate Subnet ID
(Binary of subnet Mask) * (Binary of IP
address)= Subnet ID
Useable IP Address Calculations
1) 32 bits in address
2) 32 - network bits = host bits
3) 2 to the power of host bits = addresses on
subnet
4) addresses - 2 (Broadcast and Subnet ID)
= usable addresses on subnet
For Example:-
32-24=8 host bit
2^8=256 (Addresses on subnet)
256-2=254(usable addresses on subnet)
(broad cast id & subnet id)
Class D
Class D addresses
are used for multicasting;
there is only
one block in this class.
IP Address Class D and
Multicast
The IPv4 networking standard defines Class D addresses
as reserved for multicast. Multicast is a mechanism for
defining groups of nodes and sending IP messages to that
group rather than to every node on the LAN (broadcast) or
just one other node (unicast). Multicast is mainly used on
research networks. As with Class E, Class D addresses
should not be used by ordinary nodes on the Internet.
IP Address Class E and Limited Broadcast
The IPv4 networking standard defines Class E addresses as reserved,
meaning that they should not be used on IP networks. Some research
organizations use Class E addresses for experimental purposes.
However, nodes that try to use these addresses on the Internet will be
unable to communicate properly. A special type of IP address is the
limited broadcast address [Link]. A broadcast involves
delivering a message from one sender to many recipients. Senders
direct an IP broadcast to [Link] to indicate all other nodes on
the local network (LAN) should pick up that message. This broadcast
is 'limited' in that it does not reach every node on the Internet, only
nodes on the LAN.