SlideShare a Scribd company logo
RMK College of Engineering and Technology
IP v 4
Department
of
Electronics and Communication Engineering
Internet Protocol Version 4
@
(IPv4)
Prepared by
Jai Ganesh S
Asst.Professor - ECE
Training Contents
• What is an IP?
• Need for an IP?
• Representation of an IP
• Classes of an IP Address
• Sub netting and its types
Introduction to IP Address
• An IP address is a 32-bit address that identifies a connection to the
Internet.
• The IP addresses are universally unique.
• The address space of IPv4 is 2^32 or 4,294,967,296.
Need for IP Address
Without IP Address..??
How IP ‘s are used for Identification?
Network
Host
Process
Network
Host
Process
www.google.com
INDIA CALIFORNIA
Few Organized Numbering Systems
+91 - 9790410977
COUNTRY
CODE
ACCESS
CODE
SERVICE
PROVIDER
CODE
SUBSCRIBER
NUMBER
1116 – 15 – 106 – 003
111615106003
Representation of IP Address
Binary Representation
Dotted Decimal Representation
IP Address Space
• Initially 8 bits were allotted for Network ID and remaining 24 bits were
allotted for Host ID
• 8 bits  28 Networks  256 Networks
• 24 bits  224 Hosts Per Network  16Million hosts per network
• NOT SCALABLE
Class Full Addressing
1X 11X 111XX
1
1
.
.
.
0
0
.
.
. 231
231
232 address 231 address
10
10
.
.
.
11
11
.
.
.
230
230
230 address 229 address
110
110
.
.
.
111
111
.
.
.
229
229
1110
1110
.
.
.
1111
1111
.
.
.
228
228
CA CB CC CD
CE
00000000 0
01111111 127
10000000 128
10111111 191
11000000 192
11011111 223
11100000 224
11101111 239
11110000 240
11111111 255
Finding Class of a Given IP
NID and HID Organization
Ok.. Now it’s your Time
• How many Network ID’s and Host ID’s are present in each classes ???
Summary of all classes
Blocks in Class A
Blocks in Class B
Blocks in Class C
Simple Exercise
Given the network address 17.0.0.0, find the class, the block, and the range of the
addresses.
• Solution:
• Class A because first byte lies between 0 – 127
• Net ID is 17.0.0.0 so address block ranges from (17.0.0.0 to 17.255.255.255)
Simple Exercise
• Given the network address 132.21.0.0, find the class, the block, and the range of the addresses.
• Solution:
• The class is B because the first byte is between 128 and 191.
• The addresses range from 132.21.0.0 to 132.21.255.255
Simple Exercise
• Given the network address 220.34.76.0, find the class, the block, and the range of the
addresses.
• Solution:
• The class is C because the first byte is between 192 and 223
• The addresses range from 220.34.76.0 to 220.34.76.255.
Not all IP Address are usable…
• Network ID or Net ID – First IP of address block
• Broad cast Address – Last IP of address block
• Types of broadcast
• Limited Broadcast
• Directed Broadcast
11.0.0.0
LBA: 255.255.255.255
11.0.0.0
20.0.0.0
DBA: 20.255.255.255
Try to fill the Table
IP Address Network ID Directed Broadcast ID Limited Broadcast ID
1.2.3.4 1.0.0.0 1.255.255.255 255.255.255.255
10.15.20.60 10.0.0.0 10.255.255.255 255.255.255.255
130.1.2.3 130.1.0.0 130.1.255.255 255.255.255.255
150.0.150.150 150.0.0.0 150.0.255.255 255.255.255.255
200.1.10.100 200.1.10.0 200.1.10.255 255.255.255.255
220.15.1.10 220.15.1.0 220.15.1.255 255.255.255.255
250.0.1.2 NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE
300.1.2.3 INCORRECT IP ADDRESS
Subnets and Subnet Mask
• What are subnets?
• Dividing the large address space into smaller blocks of IP Address
• Why do we go for subnets?
• If the blocks of IP address are used as such millions of IP address are wasted.
• Managing the Large block of IP Address is also difficult
• What are the types of subnets?
• Fixed Length Subnetting
• Variable Length Subnetting
• Subnet Mask
• Will be discussed few slides later
Fixed Length Subnetting
• Lets consider an Organization and the entire organization has different
departments / Sections
I
II III
IVECE
EEE
CSE
MECH
Fixed Length – Example 1
• Divide the address block 200.1.2.0 into 2 subnets
Given address block is Class C  24 bits for NID and 8 bits for HID
200.1.2.00000000
200.1.2.11111111
200.1.2.0
200.1.2.255 200.1.2.X0000000
X = 0 X = 1
Network ID : 200.1.2.0
Broadcast ID: 200.1.2.255
1 bit is required
to make 2 parts
Get Back
200.1.2.X0000000
X = 0 X = 1
200.1.2.0_ _ _ _ _ _ _
Runs from
200.1.2.00000000
200.1.2.00000001
200.1.2.00000010
200.1.2.00000011
.
.
200.1.2.01111111
200.1.2.1_ _ _ _ _ _ _
Runs from
200.1.2.10000000
200.1.2.10000001
200.1.2.10000010
200.1.2.10000011
.
.
200.1.2.11111111
200.1.2.0
200.1.2.127
200.1.2.128
200.1.2.255
Network ID : 200.1.2.0
Broadcast ID: 200.1.2.127
Network ID : 200.1.2.128
Broadcast ID: 200.1.2.255
27 = 128
Address in Each Subnet
Get Back
Fixed Length – Example 2
• Divide the address block 200.1.2.0 into 4 subnets
Given address block is Class C  24 bits for NID and 8 bits for HID
200.1.2.00000000
200.1.2.11111111
200.1.2.0
200.1.2.255 200.1.2.XX000000
XX = 00
Network ID : 200.1.2.0
Broadcast ID: 200.1.2.255
XX = 01 XX = 10
XX = 11
2 bits are required
to make 4 parts
200.1.2.XX000000
XX = 00
XX = 01 XX = 10
XX = 11
200.1.2.00 _ _ _ _ _ _
Runs from
200.1.2.00000000
to
200.1.2.00111111
200.1.2.01 _ _ _ _ _ _
Runs from
200.1.2.01000000
to
200.1.2.01111111
200.1.2.11 _ _ _ _ _ _
Runs from
200.1.2.11000000
to
200.1.2.11111111
200.1.2.10 _ _ _ _ _ _
Runs from
200.1.2.10000000
to
200.1.2.10111111
200.1.2.0  Network ID
200.1.2.63  Broadcast ID
200.1.2.128  Network ID
200.1.2.191  Broadcast ID
200.1.2.192  Network ID
200.1.2.255  Broadcast ID
200.1.2.64  Network ID
200.1.2.127  Broadcast ID
26 = 64
Address in Each Subnet
Fixed Length – Exercise 1
Divide the address block 192.168.9.0 into 5 networks
Given address block is Class C  24 bits for NID and 8 bits for HID
192.168.9.00000000
192.168.9.11111111
192.168.9.0
192.168.9.255 192.168.9.XXX00000
Network ID : 192.168.9.0
Broadcast ID: 192.168.9.255
3 bits are required
to make 8 parts
000
001
010
011 100
101
110
111
NET 1
192.168.9.00000000 192.168.9.0
192.168.9.00011111 192.168.9.31
NET 2
192.168.9.00100000 192.168.9.32
192.168.9.00111111 192.168.9.63
NET 3
192.168.9.01000000 192.168.9.64
192.168.9.01011111 192.168.9.95
NET 4
192.168.9.01100000 192.168.9.96
192.168.9.01111111 192.168.9.127
NET 5
192.168.9.10000000 192.168.9.128
192.168.9.10011111 192.168.9.159
NET 6
192.168.9.10100000 192.168.9.160
192.168.9.10111111 192.168.9.191
NET 7
192.168.9.11000000 192.168.9.192
192.168.9.11011111 192.168.9.223
NET 8
192.168.9.11100000 192.168.9.224
192.168.9.11111111 192.168.9.255
Fixed Length – Exercise 2
Divide the address space 172.16.0.0 into 3 networks
Given address block is Class B  16 bits for NID and 16 bits for HID
172.16.00000000.00000000
To
172.16.11111111.11111111
172.16.XX000000.00000000
XX = 00
Network ID : 172.16.0.0
Broadcast ID: 172.16.255.255
XX = 01 XX = 10
XX = 11
2 bits are required
to make 4 parts
NET 1
172.16.00000000.00000000 172.16.0.0
172.16.00111111.11111111 172.16.63.255
NET 2
172.16.01000000.00000000 172.16.64.0
172.16.01111111.11111111 172.16.127.255
NET 3
172.16.10000000.00000000 172.16.128.0
172.16.10111111.11111111 172.16.191.255
NET 4
172.16.11000000.00000000 172.16.192.0
172.16.11111111.11111111 172.16.255.255
Fixed Length – Exercise 3
• Divide the address space 192.168.9.0 into suitable number of networks so
that each network can handle at least 10 hosts
In each subnet 2 address are not usable
so total no of address required is 12
2? Gives 12 address  This is not possible
24 Gives 16 address  This is the nearest possible value
192.168.9.XXXX_ _ _ _
Subnet Mask
Subnet Mask
• A Subnet mask is a 32-bit number that masks an IP address, and divides
the IP address into network address and host address.
• Subnet Mask is made by setting
• network bits to all "1"s
• host bits to all "0"s.
Wipro telecom training   i pv4 concepts
Representation of Subnet Mask
• There are 3 types of representation
• Binary Representation
• Dotted Decimal Representation
• /n Representation or CIDR Representation
(n Defines #. Of bits allotted for Network)
Default Subnet Mask
Class NID - HID Binary
Class A NID – HID – HID – HID 11111111.00000000.00000000.00000000
Class B NID – NID – HID – HID 11111111.11111111.00000000.00000000
Class C NID – NID – NID – HID 11111111.11111111.11111111.00000000
Class Dotted Decimal /n
Class A 255.0.0.0 /8
Class B 255.255.0.0 /16
Class C 255.255.255.0 /24
Need for Subnet Mask
1. Given any IP Address, Subnet mask can be used to identify the network
ID
Need for Subnet Mask
2. To inform the router that subnetting is performed
Lets go back to the Example problem
200.1.2.0
200.1.2.127
200.1.2.0 /25
200.1.2.127 /25
11111111.11111111.11111111.10000000
255 . 255 . 255 . 128
Subnetting Master Table
Variable Length Subnetting
• There are certain drawbacks in fixed length methods
• All subnets will have equal number of IP Address
64 64
6464
64
64
128
This scenario is called VLSM
(Variable Length Subnet Masking)
Variable Length – Example 1
• Divide the given address space 172.16.0.0 / 16 into 7 networks whose requirement is given below
• Net 1  500 hosts
• Net 2  200 hosts
• Net 3  100 hosts
• Net 4  60 hosts
• Net 5  20 hosts
• Net 6  2 hosts
• Net 7  2 hosts
500
200
100
60
20
2
2
1. Arrange the required No. of hosts in Ascending Order
2. Allocate the No of bits required for Hosts in powers of 2
29 = 512
28 = 256
27 = 128
26 = 64
25 = 32
22 = 4
22 = 4
3. Write the given address space with required no of Host Bits
172.16.00000000.00000000
4. Count for required no of bits from right side ( ) and find the first and last address
172.16.00000001.11111111
5. Write the starting and ending address with subnet mask
172.16.0.0 / 23
172.16.1.255 / 23
6. Write the immediate next ip address for next subnet
172.16.00000010.00000000
7. Count the number of bits required for 2nd subnet
172.16.00000010.00000000
172.16.00000010.11111111
Write the first and last ip address with subnet mask
172.16.2.0 / 24
172.16.2.255 / 24
Repeat the procedure until last subnet
172.16.00000011.00000000
172.16.00000011.01111111
172.16.3.0 / 25
172.16.3.127 / 25
172.16.00000011.10000000
172.16.00000011.10111111
172.16.3.128 / 26
172.16.3.191 / 26
172.16.00000011.11000000
172.16.00000011.11011111
172.16.3.192 / 27
172.16.3.223 / 27
172.16.00000011.11100000
172.16.00000011.11100011
172.16.3.224 / 30
172.16.3.227 / 30
172.16.00000011.11100100
172.16.00000011.11100111
172.16.3.228 / 30
172.16.3.231 / 30
Variable Length – Example 2
Divide the address space 172.16.0.0 / 16 for 3 LANS as mentioned below
Lan 1 should have 50 address
Lan 2 should have 217 address
Lan 3 should have 300 address
Solution
NET #
No of Bits
Required
Address space
Address with subnet
mask
LAN 3  300 29 = 512
172.16.00000000.00000000 172.16.0.0 /23
172.16.00000001.11111111 172.16.1.255 /23
LAN 2  217 28 = 256
172.16.00000010.00000000 172.16.2.0 /24
172.16.00000010.11111111 172.16.2.255 /24
LAN 1  50 26 = 64
172.16.00000011.00000000 172.16.3.0 /26
172.16.00000011.00111111 172.16.3.63 /26
Mastering the Subnets Problem
Divide the address space 172.16.0.0 / 16 for 3 LANS as mentioned below
• Lan 1 should have 50 address
• Lan 1.1  25 address
• Lan 1.2  12 address
• Lan 1.3  5 address
• Lan 1.4  5 address
• Lan 2 should have 217 address
• Lan 2.1  70 address
• Lan 2.2  30 address
• Lan 2.3  16 address
• Lan 2.4  10 address
• Lan 3 should have 300 address
• Lan 3.1  80 address
• Lan 3.2  42 address
• Lan 3.3  25 address
• Lan 3.4  15 address
• Lan 3.5  all remaining address
Solution
net # Required Address no of bits Starting Address Ending Address
net 3 300 address 2^9 = 512 172.16.0.0 /23 172.16.1.255 /23
3.1 80 address 2^7 = 128 172.16.0.0 /25 172.16.0.127 /25
3.2 42 address 2^6 = 64 172.16.0.128 / 26 172.16.0.191 /26
3.3 25 address 2^5 = 32 172.16.0.192 /27 172.16.0.223 /27
3.4 15 address 2^5 = 32 172.16.0.224 /27 172.16.0.255/27
3.5 remaining 172.16.1.0 172.16.1.255
net 2 217 address 2^8 = 256 172.16.2.0 /24 172.16.2.255 /24
2.1 70 address 2^7 = 128 172.16.2.0 /25 172.16.2.127 /25
2.2 30 address 2^5 = 32 172.16.2.128 / 27 172.16.2.159 / 27
2.3 16 address 2^5 = 32 172.16.2.160 /27 172.16.2.191 /27
2.4 10 address 2^4 = 16 172.16.2.192 /28 172.16.2.207 /28
remaining 172.16.2.208 172.16.2.255
net 1 50 address 2^6 = 64 172.16.3.0 /26 172.16.3.63 /26
1.1 25 address 2^5 = 32 172.16.3.0 /27 172.16.3.31 /27
1.2 12 address 2^4 = 16 172.16.3.32 /28 172.16.3.47 /28
1.3 5 address 2^3 = 8 172.16.3.48 /29 172.16.3.55 /29
1.4 5 address 2^3 = 8 172.16.3.56 /29 172.16.3.63 /29
Classless Inter Domain Routing (CIDR)
CA
CB
CC
CD
CE
10
1110
110
1111
There are certain Drawbacks in class full addressing
The least number of host Address that you can get is (2^8) 256 in
class C.
Rules for CIDR Blocks
• All IP address should be Contiguous
• The size of the requested IP should be in power of 2
• Meaning – you cannot ask for 500 IP address. You can get only 512 IP Address
as a block
Taking this further will have their applications in Operating Systems
So, I will leave it to your exercise
Thank You
Any Questions?..

More Related Content

PDF
Subnetting A Network
PPTX
Subnetting
PPTX
IP Address dan Subnetting
PPTX
Subnetting made simple
PPTX
CCNP v6 Route: Implementing IP Routing Chapter 3
PDF
IP Addressing and Subnetting
PPT
IP Addressing and subnetting
PPT
Internet Protocol Version 6 By Suvo 2002
Subnetting A Network
Subnetting
IP Address dan Subnetting
Subnetting made simple
CCNP v6 Route: Implementing IP Routing Chapter 3
IP Addressing and Subnetting
IP Addressing and subnetting
Internet Protocol Version 6 By Suvo 2002

What's hot (16)

PPT
Article 8 Sec 13 16
PPT
PPT
CCNA Discovery 4 - Chapter 1
PPTX
Philippine Constitution - Article VI - Legislative Power
PDF
Proposal with sdlc
PDF
Subnetting
PPTX
Routing information protocol
PPTX
Article 6 legislative Department
PDF
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
PPTX
Ipv4 and Ipv6
PPTX
Article 8 Section 8 12
PPS
Lesson 2: Subnetting basics
PDF
Assignment subnetting part1 - solutions
PPTX
Classes of adressing
PPTX
IPv6 address
PDF
Exercicio Subrede
Article 8 Sec 13 16
CCNA Discovery 4 - Chapter 1
Philippine Constitution - Article VI - Legislative Power
Proposal with sdlc
Subnetting
Routing information protocol
Article 6 legislative Department
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
Ipv4 and Ipv6
Article 8 Section 8 12
Lesson 2: Subnetting basics
Assignment subnetting part1 - solutions
Classes of adressing
IPv6 address
Exercicio Subrede
Ad

Similar to Wipro telecom training i pv4 concepts (20)

PPT
How IP address works
PPT
IP NETWORKING AND IP SUBNET MASKING
PDF
2.10a network layer services i pv4 - fixed length subnetting
PPT
Ipaddress presentationdemoclass
PPTX
IPv4 Addressing Architecture
PPTX
1703_anusua_basuclassful addressing_IP_Addressing
PPTX
chapter 4.pptx
PPT
Ipaddressing
PPT
Network devices use IP addresses and subnets to identify the source and desti...
PPT
ipaddressing-An IP address, or Internet Protocol address.ppt
PPTX
Network Layer
PPT
ip_addressing_subnetting aaaaaaaaaaa.ppt
PDF
Ip -subnetting
PPT
Ip addressing
PPT
IP Addressing
PPTX
Subnetting(computer networking lecture).pptx
PPT
PDF
IP_Addressing_and Subnetting.pdf
DOCX
IP classes and subnetting.
PPTX
Week11 lec1
How IP address works
IP NETWORKING AND IP SUBNET MASKING
2.10a network layer services i pv4 - fixed length subnetting
Ipaddress presentationdemoclass
IPv4 Addressing Architecture
1703_anusua_basuclassful addressing_IP_Addressing
chapter 4.pptx
Ipaddressing
Network devices use IP addresses and subnets to identify the source and desti...
ipaddressing-An IP address, or Internet Protocol address.ppt
Network Layer
ip_addressing_subnetting aaaaaaaaaaa.ppt
Ip -subnetting
Ip addressing
IP Addressing
Subnetting(computer networking lecture).pptx
IP_Addressing_and Subnetting.pdf
IP classes and subnetting.
Week11 lec1
Ad

More from JAIGANESH SEKAR (20)

PDF
Ec8551 communication networks mcq question bank
PDF
2.3b access control random access methods - part 3 - csma ca
PDF
2.10b network layer services i pv4 - variable length subnetting
PDF
2.10 network layer services i pv4
PDF
2.9 network layer services packet switching
PDF
2.8 bluetooth ieee 802.15
PDF
2.7 wlan ieee 802.11
PDF
2.6 ethernet ieee 802.3
PDF
2.5 access control channelization methods
PDF
2.4 access control controlled access methods
PDF
2.3a access control random access methods - part 2 - csma cd
PDF
2.3 access control random access methods - part 1
PDF
2.2 flow control
PDF
2.1 framing
PDF
9. data link layer error correction codes - hamming code
PDF
8. data link layer error detection and correction codes - crc
PDF
7. data link layer error detection and correction codes - parity and checksum
PDF
6. data link layer physical addressing
PDF
5. protocol layering
PDF
2. overview of data communication part 1
Ec8551 communication networks mcq question bank
2.3b access control random access methods - part 3 - csma ca
2.10b network layer services i pv4 - variable length subnetting
2.10 network layer services i pv4
2.9 network layer services packet switching
2.8 bluetooth ieee 802.15
2.7 wlan ieee 802.11
2.6 ethernet ieee 802.3
2.5 access control channelization methods
2.4 access control controlled access methods
2.3a access control random access methods - part 2 - csma cd
2.3 access control random access methods - part 1
2.2 flow control
2.1 framing
9. data link layer error correction codes - hamming code
8. data link layer error detection and correction codes - crc
7. data link layer error detection and correction codes - parity and checksum
6. data link layer physical addressing
5. protocol layering
2. overview of data communication part 1

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Pre independence Education in Inndia.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Business Ethics Teaching Materials for college
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
Anesthesia in Laparoscopic Surgery in India
Pre independence Education in Inndia.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Microbial disease of the cardiovascular and lymphatic systems
Abdominal Access Techniques with Prof. Dr. R K Mishra
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
2.FourierTransform-ShortQuestionswithAnswers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPH.pptx obstetrics and gynecology in nursing
Business Ethics Teaching Materials for college
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Supply Chain Operations Speaking Notes -ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
01-Introduction-to-Information-Management.pdf
Cell Types and Its function , kingdom of life
VCE English Exam - Section C Student Revision Booklet
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Week 4 Term 3 Study Techniques revisited.pptx

Wipro telecom training i pv4 concepts

  • 1. RMK College of Engineering and Technology IP v 4 Department of Electronics and Communication Engineering
  • 2. Internet Protocol Version 4 @ (IPv4) Prepared by Jai Ganesh S Asst.Professor - ECE
  • 3. Training Contents • What is an IP? • Need for an IP? • Representation of an IP • Classes of an IP Address • Sub netting and its types
  • 4. Introduction to IP Address • An IP address is a 32-bit address that identifies a connection to the Internet. • The IP addresses are universally unique. • The address space of IPv4 is 2^32 or 4,294,967,296.
  • 5. Need for IP Address
  • 7. How IP ‘s are used for Identification? Network Host Process Network Host Process www.google.com INDIA CALIFORNIA
  • 8. Few Organized Numbering Systems +91 - 9790410977 COUNTRY CODE ACCESS CODE SERVICE PROVIDER CODE SUBSCRIBER NUMBER 1116 – 15 – 106 – 003 111615106003
  • 9. Representation of IP Address Binary Representation Dotted Decimal Representation
  • 10. IP Address Space • Initially 8 bits were allotted for Network ID and remaining 24 bits were allotted for Host ID • 8 bits  28 Networks  256 Networks • 24 bits  224 Hosts Per Network  16Million hosts per network • NOT SCALABLE
  • 11. Class Full Addressing 1X 11X 111XX 1 1 . . . 0 0 . . . 231 231 232 address 231 address 10 10 . . . 11 11 . . . 230 230 230 address 229 address 110 110 . . . 111 111 . . . 229 229 1110 1110 . . . 1111 1111 . . . 228 228 CA CB CC CD CE 00000000 0 01111111 127 10000000 128 10111111 191 11000000 192 11011111 223 11100000 224 11101111 239 11110000 240 11111111 255
  • 12. Finding Class of a Given IP
  • 13. NID and HID Organization
  • 14. Ok.. Now it’s your Time • How many Network ID’s and Host ID’s are present in each classes ???
  • 15. Summary of all classes
  • 19. Simple Exercise Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. • Solution: • Class A because first byte lies between 0 – 127 • Net ID is 17.0.0.0 so address block ranges from (17.0.0.0 to 17.255.255.255)
  • 20. Simple Exercise • Given the network address 132.21.0.0, find the class, the block, and the range of the addresses. • Solution: • The class is B because the first byte is between 128 and 191. • The addresses range from 132.21.0.0 to 132.21.255.255
  • 21. Simple Exercise • Given the network address 220.34.76.0, find the class, the block, and the range of the addresses. • Solution: • The class is C because the first byte is between 192 and 223 • The addresses range from 220.34.76.0 to 220.34.76.255.
  • 22. Not all IP Address are usable… • Network ID or Net ID – First IP of address block • Broad cast Address – Last IP of address block • Types of broadcast • Limited Broadcast • Directed Broadcast 11.0.0.0 LBA: 255.255.255.255 11.0.0.0 20.0.0.0 DBA: 20.255.255.255
  • 23. Try to fill the Table IP Address Network ID Directed Broadcast ID Limited Broadcast ID 1.2.3.4 1.0.0.0 1.255.255.255 255.255.255.255 10.15.20.60 10.0.0.0 10.255.255.255 255.255.255.255 130.1.2.3 130.1.0.0 130.1.255.255 255.255.255.255 150.0.150.150 150.0.0.0 150.0.255.255 255.255.255.255 200.1.10.100 200.1.10.0 200.1.10.255 255.255.255.255 220.15.1.10 220.15.1.0 220.15.1.255 255.255.255.255 250.0.1.2 NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE 300.1.2.3 INCORRECT IP ADDRESS
  • 24. Subnets and Subnet Mask • What are subnets? • Dividing the large address space into smaller blocks of IP Address • Why do we go for subnets? • If the blocks of IP address are used as such millions of IP address are wasted. • Managing the Large block of IP Address is also difficult • What are the types of subnets? • Fixed Length Subnetting • Variable Length Subnetting • Subnet Mask • Will be discussed few slides later
  • 25. Fixed Length Subnetting • Lets consider an Organization and the entire organization has different departments / Sections I II III IVECE EEE CSE MECH
  • 26. Fixed Length – Example 1 • Divide the address block 200.1.2.0 into 2 subnets Given address block is Class C  24 bits for NID and 8 bits for HID 200.1.2.00000000 200.1.2.11111111 200.1.2.0 200.1.2.255 200.1.2.X0000000 X = 0 X = 1 Network ID : 200.1.2.0 Broadcast ID: 200.1.2.255 1 bit is required to make 2 parts Get Back
  • 27. 200.1.2.X0000000 X = 0 X = 1 200.1.2.0_ _ _ _ _ _ _ Runs from 200.1.2.00000000 200.1.2.00000001 200.1.2.00000010 200.1.2.00000011 . . 200.1.2.01111111 200.1.2.1_ _ _ _ _ _ _ Runs from 200.1.2.10000000 200.1.2.10000001 200.1.2.10000010 200.1.2.10000011 . . 200.1.2.11111111 200.1.2.0 200.1.2.127 200.1.2.128 200.1.2.255 Network ID : 200.1.2.0 Broadcast ID: 200.1.2.127 Network ID : 200.1.2.128 Broadcast ID: 200.1.2.255 27 = 128 Address in Each Subnet Get Back
  • 28. Fixed Length – Example 2 • Divide the address block 200.1.2.0 into 4 subnets Given address block is Class C  24 bits for NID and 8 bits for HID 200.1.2.00000000 200.1.2.11111111 200.1.2.0 200.1.2.255 200.1.2.XX000000 XX = 00 Network ID : 200.1.2.0 Broadcast ID: 200.1.2.255 XX = 01 XX = 10 XX = 11 2 bits are required to make 4 parts
  • 29. 200.1.2.XX000000 XX = 00 XX = 01 XX = 10 XX = 11 200.1.2.00 _ _ _ _ _ _ Runs from 200.1.2.00000000 to 200.1.2.00111111 200.1.2.01 _ _ _ _ _ _ Runs from 200.1.2.01000000 to 200.1.2.01111111 200.1.2.11 _ _ _ _ _ _ Runs from 200.1.2.11000000 to 200.1.2.11111111 200.1.2.10 _ _ _ _ _ _ Runs from 200.1.2.10000000 to 200.1.2.10111111 200.1.2.0  Network ID 200.1.2.63  Broadcast ID 200.1.2.128  Network ID 200.1.2.191  Broadcast ID 200.1.2.192  Network ID 200.1.2.255  Broadcast ID 200.1.2.64  Network ID 200.1.2.127  Broadcast ID 26 = 64 Address in Each Subnet
  • 30. Fixed Length – Exercise 1 Divide the address block 192.168.9.0 into 5 networks Given address block is Class C  24 bits for NID and 8 bits for HID 192.168.9.00000000 192.168.9.11111111 192.168.9.0 192.168.9.255 192.168.9.XXX00000 Network ID : 192.168.9.0 Broadcast ID: 192.168.9.255 3 bits are required to make 8 parts 000 001 010 011 100 101 110 111
  • 31. NET 1 192.168.9.00000000 192.168.9.0 192.168.9.00011111 192.168.9.31 NET 2 192.168.9.00100000 192.168.9.32 192.168.9.00111111 192.168.9.63 NET 3 192.168.9.01000000 192.168.9.64 192.168.9.01011111 192.168.9.95 NET 4 192.168.9.01100000 192.168.9.96 192.168.9.01111111 192.168.9.127 NET 5 192.168.9.10000000 192.168.9.128 192.168.9.10011111 192.168.9.159 NET 6 192.168.9.10100000 192.168.9.160 192.168.9.10111111 192.168.9.191 NET 7 192.168.9.11000000 192.168.9.192 192.168.9.11011111 192.168.9.223 NET 8 192.168.9.11100000 192.168.9.224 192.168.9.11111111 192.168.9.255
  • 32. Fixed Length – Exercise 2 Divide the address space 172.16.0.0 into 3 networks Given address block is Class B  16 bits for NID and 16 bits for HID 172.16.00000000.00000000 To 172.16.11111111.11111111 172.16.XX000000.00000000 XX = 00 Network ID : 172.16.0.0 Broadcast ID: 172.16.255.255 XX = 01 XX = 10 XX = 11 2 bits are required to make 4 parts
  • 33. NET 1 172.16.00000000.00000000 172.16.0.0 172.16.00111111.11111111 172.16.63.255 NET 2 172.16.01000000.00000000 172.16.64.0 172.16.01111111.11111111 172.16.127.255 NET 3 172.16.10000000.00000000 172.16.128.0 172.16.10111111.11111111 172.16.191.255 NET 4 172.16.11000000.00000000 172.16.192.0 172.16.11111111.11111111 172.16.255.255
  • 34. Fixed Length – Exercise 3 • Divide the address space 192.168.9.0 into suitable number of networks so that each network can handle at least 10 hosts In each subnet 2 address are not usable so total no of address required is 12 2? Gives 12 address  This is not possible 24 Gives 16 address  This is the nearest possible value 192.168.9.XXXX_ _ _ _
  • 36. Subnet Mask • A Subnet mask is a 32-bit number that masks an IP address, and divides the IP address into network address and host address. • Subnet Mask is made by setting • network bits to all "1"s • host bits to all "0"s.
  • 38. Representation of Subnet Mask • There are 3 types of representation • Binary Representation • Dotted Decimal Representation • /n Representation or CIDR Representation (n Defines #. Of bits allotted for Network)
  • 39. Default Subnet Mask Class NID - HID Binary Class A NID – HID – HID – HID 11111111.00000000.00000000.00000000 Class B NID – NID – HID – HID 11111111.11111111.00000000.00000000 Class C NID – NID – NID – HID 11111111.11111111.11111111.00000000 Class Dotted Decimal /n Class A 255.0.0.0 /8 Class B 255.255.0.0 /16 Class C 255.255.255.0 /24
  • 40. Need for Subnet Mask 1. Given any IP Address, Subnet mask can be used to identify the network ID
  • 41. Need for Subnet Mask 2. To inform the router that subnetting is performed Lets go back to the Example problem 200.1.2.0 200.1.2.127 200.1.2.0 /25 200.1.2.127 /25 11111111.11111111.11111111.10000000 255 . 255 . 255 . 128
  • 43. Variable Length Subnetting • There are certain drawbacks in fixed length methods • All subnets will have equal number of IP Address 64 64 6464 64 64 128 This scenario is called VLSM (Variable Length Subnet Masking)
  • 44. Variable Length – Example 1 • Divide the given address space 172.16.0.0 / 16 into 7 networks whose requirement is given below • Net 1  500 hosts • Net 2  200 hosts • Net 3  100 hosts • Net 4  60 hosts • Net 5  20 hosts • Net 6  2 hosts • Net 7  2 hosts
  • 45. 500 200 100 60 20 2 2 1. Arrange the required No. of hosts in Ascending Order 2. Allocate the No of bits required for Hosts in powers of 2 29 = 512 28 = 256 27 = 128 26 = 64 25 = 32 22 = 4 22 = 4 3. Write the given address space with required no of Host Bits 172.16.00000000.00000000 4. Count for required no of bits from right side ( ) and find the first and last address 172.16.00000001.11111111 5. Write the starting and ending address with subnet mask 172.16.0.0 / 23 172.16.1.255 / 23 6. Write the immediate next ip address for next subnet 172.16.00000010.00000000 7. Count the number of bits required for 2nd subnet 172.16.00000010.00000000 172.16.00000010.11111111 Write the first and last ip address with subnet mask 172.16.2.0 / 24 172.16.2.255 / 24 Repeat the procedure until last subnet 172.16.00000011.00000000 172.16.00000011.01111111 172.16.3.0 / 25 172.16.3.127 / 25 172.16.00000011.10000000 172.16.00000011.10111111 172.16.3.128 / 26 172.16.3.191 / 26 172.16.00000011.11000000 172.16.00000011.11011111 172.16.3.192 / 27 172.16.3.223 / 27 172.16.00000011.11100000 172.16.00000011.11100011 172.16.3.224 / 30 172.16.3.227 / 30 172.16.00000011.11100100 172.16.00000011.11100111 172.16.3.228 / 30 172.16.3.231 / 30
  • 46. Variable Length – Example 2 Divide the address space 172.16.0.0 / 16 for 3 LANS as mentioned below Lan 1 should have 50 address Lan 2 should have 217 address Lan 3 should have 300 address
  • 47. Solution NET # No of Bits Required Address space Address with subnet mask LAN 3  300 29 = 512 172.16.00000000.00000000 172.16.0.0 /23 172.16.00000001.11111111 172.16.1.255 /23 LAN 2  217 28 = 256 172.16.00000010.00000000 172.16.2.0 /24 172.16.00000010.11111111 172.16.2.255 /24 LAN 1  50 26 = 64 172.16.00000011.00000000 172.16.3.0 /26 172.16.00000011.00111111 172.16.3.63 /26
  • 48. Mastering the Subnets Problem Divide the address space 172.16.0.0 / 16 for 3 LANS as mentioned below • Lan 1 should have 50 address • Lan 1.1  25 address • Lan 1.2  12 address • Lan 1.3  5 address • Lan 1.4  5 address • Lan 2 should have 217 address • Lan 2.1  70 address • Lan 2.2  30 address • Lan 2.3  16 address • Lan 2.4  10 address • Lan 3 should have 300 address • Lan 3.1  80 address • Lan 3.2  42 address • Lan 3.3  25 address • Lan 3.4  15 address • Lan 3.5  all remaining address
  • 49. Solution net # Required Address no of bits Starting Address Ending Address net 3 300 address 2^9 = 512 172.16.0.0 /23 172.16.1.255 /23 3.1 80 address 2^7 = 128 172.16.0.0 /25 172.16.0.127 /25 3.2 42 address 2^6 = 64 172.16.0.128 / 26 172.16.0.191 /26 3.3 25 address 2^5 = 32 172.16.0.192 /27 172.16.0.223 /27 3.4 15 address 2^5 = 32 172.16.0.224 /27 172.16.0.255/27 3.5 remaining 172.16.1.0 172.16.1.255 net 2 217 address 2^8 = 256 172.16.2.0 /24 172.16.2.255 /24 2.1 70 address 2^7 = 128 172.16.2.0 /25 172.16.2.127 /25 2.2 30 address 2^5 = 32 172.16.2.128 / 27 172.16.2.159 / 27 2.3 16 address 2^5 = 32 172.16.2.160 /27 172.16.2.191 /27 2.4 10 address 2^4 = 16 172.16.2.192 /28 172.16.2.207 /28 remaining 172.16.2.208 172.16.2.255 net 1 50 address 2^6 = 64 172.16.3.0 /26 172.16.3.63 /26 1.1 25 address 2^5 = 32 172.16.3.0 /27 172.16.3.31 /27 1.2 12 address 2^4 = 16 172.16.3.32 /28 172.16.3.47 /28 1.3 5 address 2^3 = 8 172.16.3.48 /29 172.16.3.55 /29 1.4 5 address 2^3 = 8 172.16.3.56 /29 172.16.3.63 /29
  • 50. Classless Inter Domain Routing (CIDR) CA CB CC CD CE 10 1110 110 1111 There are certain Drawbacks in class full addressing The least number of host Address that you can get is (2^8) 256 in class C.
  • 51. Rules for CIDR Blocks • All IP address should be Contiguous • The size of the requested IP should be in power of 2 • Meaning – you cannot ask for 500 IP address. You can get only 512 IP Address as a block Taking this further will have their applications in Operating Systems So, I will leave it to your exercise