SlideShare a Scribd company logo
1 of 12
Subnetting
Breaking one single IP segment to chunks
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Subnetting
• Obviously a company wouldn’t put all 16,777,214 hosts into a single logical network, this would be
terrible for performance and security. – For Class A
• They would split their /8 address allocation into smaller subnets and allocate these to different offices
and types of hosts
• For example if they received 12.0.0.0/8, they could allocate the subnet 12.0.1.0/24 to sales
computers in New York, 12.0.2.0/24 to accounting PCs and 12.0.9.0/24 to sales computers in Boston.
Subnetted Apple
Supernet Apple
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
CIDR – Classless Inter Domain Routing
• A problem with classful addresses was that if a company had more than 254 hosts they would need to
be assigned a Class B network
• They would have much less than the 65,534 (2^16 - 2) hosts allocated, so this wasted a huge amount
of the global address space
• Classless Inter-Domain Routing (CIDR) was introduced in 1993 to alleviate this problem
• CIDR removed the fixed /8, /16 and /24 requirements for the address classes
• For example 175.10.10.0/20 --------- Class B instead of writing /16
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Class C /31 Subnet
• Let’s say we’ve been allocated Class C 192.168.1.0/24.
• If we move the line all the way to the right we’re now using /31 (or 255.255.255.254)
• This leaves one bit for the host address, with a possible value of 0 or 1 It borrows 7 bits for
the network address
• This gives us 128 subnets (27) which accommodate 2 hosts each
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Key Topic : Network and Broadcast address
• Every IP segment should have Network address and Broadcast address.
• How to find it ??
Its actually a simple match to find a Network ID or Network address put all “0” in the host portion.
To find out Broadcast address put all “1” in host portion.
Lets try …
192.168.1.1/24
First 24 bit is Network portion and Next 8 bit is host portion.
If I apply the formula the I will get
Network ID or Network address : 192.168.1.0/24
Broadcast address : 192.168.1.255/24
Quiz :
172.1.2.3/16
192.0.0.1/16
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Class C subnet /31
• Let’s say we’ve been allocated Class C 192.168.1.0/24.
• We subnet using /31. Valid host addresses:
• ‒192.168.1.0 to 192.168.1.1
• ‒192.168.1.2 to 192.168.1.3
• ‒Etc., to:
• ‒192.168.1.254 to 192.168.1.255
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
But Wait !!
• Let’s say we’ve been allocated Class C 192.168.1.0/24
• What about the network and broadcast address?!
• /31 breaks the standard rules of IP addressing.
• /31 subnets are supported on Cisco routers for point to point links (which have no need for a network or
broadcast address.)
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Class C /30 Subnets
• Let’s say we’ve been allocated Class C 192.168.1.0/24
• Let’s move the line back a place. We’re now using /30 (or 255.255.255.252) This leaves 2 bits for the host
address, 22 = 4, minus 2 for the network and broadcast address = 2 possible hosts
• It borrows 6 bits for the network address
• This gives us 64 subnets (26) which accommodate 2 hosts each
• Valid host addresses:
• ‒ 200.15.10.1 to 200.15.10.2 (network .0, broadcast .3)
• ‒ 200.15.10.5 to 200.15.10.6 (network .4, broadcast .7)
• ‒ Etc., to:
• ‒ 200.15.10.253 to 200.15.10.254 (network .252, broadcast .255)
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Variable Length Subnet Mask
• Early routing protocols only supported Fixed Length Subnet Masking (FLSM) where all subnets had to be
the same size. Youcouldn’t have a subnet with 14 hosts and another subnet with 64 hosts in the same
network.
Before taking a good meal on Subnettig lets discuss about Private and Public IP
addresses
• Private address are the IP address which cannot go to the internet.
• Public address are routable to the internet.
• Why Private and Public :
• Its simple because what if we exhaust our 4 million IP address.
• Private address can be repeated by multiple enterprise as they will be used to route within the LAN only.
• If a private IP address configured device want to talk to the internet we need NAT – Network Address
Translation. (We will study in future slides)
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Subnetting question.
Q) Lets assume your Manager gave you an ip 192.168.1.0/24 and told you that he want 30 hosts instead
of wasting 2^8 – 2 hosts.
Step 1 : Find the Network ID and Broadcast ID
Network ID : 192.168.1.0
Broadcast ID : 192.168.1.254
Step 2 : Write the given IP address in binary format and mark the Network and host portion.
Now we have 8 bits which are host portion and 24 bits for network portion.
However, we need only 32 host, hence lets increase network portion by borrowing some bits from host
portion.
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
Borrowing bits from host portion
Borrowed Bits New Network Bits = n New Host Bits = h How Many Hosts I can get
2^h - 2
0 24 8 254
1 25 7 126
2 26 6 62
3 27 5 30
4 28 4 14
5 29 3 6
6 30 2 2
7 31 1 0
8 32 0 0
Now we got New Subnet Mask it 255.255.255.224 or Prefix /27
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
New Subnetted IP’s
• We borrowed 3 bits hence number of networks is 2^3 = 8 (before it was only one network)
Network # Network ID First IP Last IP Broadcast IP
Network 1 192.168.1.0/27 192.168.1.1/27 192.168.1.30/27 192.168.1.31/27
Network 2 192.168.1.0/27 192.168.1.32/27 192.168.1.62/27 192.168.1.63/27
Network 3 192.168.1.0/27 192.168.1.64/27 192.168.1.94/27 192.168.1.95/27
Network 4 192.168.1.0/27 192.168.1.96/27 192.168.1.126/27 192.168.1.127/27
Network 5 192.168.1.0/27 192.168.1.128/27 192.168.1.158/27 192.168.1.159/27
Network 6 192.168.1.0/27 192.168.1.16027 192.168.1.190/27 192.168.1.191/27
Network 7 192.168.1.0/27 192.168.1.192/27 192.168.1.222/27 192.168.1.223/27
Network 8 192.168.1.0/27 192.168.1.224/27 192.168.1.254/27 192.168.1.255/27
WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210

More Related Content

What's hot

What's hot (20)

Subnetting Made Easy
Subnetting Made EasySubnetting Made Easy
Subnetting Made Easy
 
Subnetting
SubnettingSubnetting
Subnetting
 
Subnetting
SubnettingSubnetting
Subnetting
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
Vlsm
VlsmVlsm
Vlsm
 
CCNA part 3 subnetting
CCNA part 3 subnettingCCNA part 3 subnetting
CCNA part 3 subnetting
 
How to IP Subnetting IPV4
How to IP Subnetting IPV4How to IP Subnetting IPV4
How to IP Subnetting IPV4
 
Easy IP Addressing and Subnetting Manual for Starters
Easy IP Addressing and Subnetting Manual for StartersEasy IP Addressing and Subnetting Manual for Starters
Easy IP Addressing and Subnetting Manual for Starters
 
Subneting
SubnetingSubneting
Subneting
 
Subentting, Supernetting and VLSM presentation
Subentting, Supernetting and VLSM presentationSubentting, Supernetting and VLSM presentation
Subentting, Supernetting and VLSM presentation
 
Splitting A Class C Network Into 4 Subnets
Splitting A Class C Network Into 4 SubnetsSplitting A Class C Network Into 4 Subnets
Splitting A Class C Network Into 4 Subnets
 
Subnetting a class_c_address
Subnetting a class_c_addressSubnetting a class_c_address
Subnetting a class_c_address
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basics
 
Very Simple way of subnetting for Class C.
Very Simple way of  subnetting for Class C.Very Simple way of  subnetting for Class C.
Very Simple way of subnetting for Class C.
 
IP Addressing and Subnetting Basics
IP Addressing and Subnetting BasicsIP Addressing and Subnetting Basics
IP Addressing and Subnetting Basics
 
Subnetting
SubnettingSubnetting
Subnetting
 
Subnet Mask
Subnet MaskSubnet Mask
Subnet Mask
 
C I D R
C I D RC I D R
C I D R
 
Subnetting ked
Subnetting kedSubnetting ked
Subnetting ked
 
Subnetting made simple
Subnetting made simpleSubnetting made simple
Subnetting made simple
 

More from Vishnu Vardhan

Chapter 25. implementing i pv6 routing
Chapter 25. implementing i pv6 routingChapter 25. implementing i pv6 routing
Chapter 25. implementing i pv6 routingVishnu Vardhan
 
5. configuring multiple switch with files
5. configuring multiple switch with files5. configuring multiple switch with files
5. configuring multiple switch with filesVishnu Vardhan
 
Chapter 4. using the command line interface
Chapter 4. using the command line interfaceChapter 4. using the command line interface
Chapter 4. using the command line interfaceVishnu Vardhan
 
Chapter 3. fundamentals of wan and ip routing
Chapter 3. fundamentals of wan and ip routingChapter 3. fundamentals of wan and ip routing
Chapter 3. fundamentals of wan and ip routingVishnu Vardhan
 
Chapter 2. fundamentals of ethernet la ns
Chapter 2. fundamentals of ethernet la nsChapter 2. fundamentals of ethernet la ns
Chapter 2. fundamentals of ethernet la nsVishnu Vardhan
 
Chapter 1. introduction to tcpip networking
Chapter 1. introduction to tcpip networkingChapter 1. introduction to tcpip networking
Chapter 1. introduction to tcpip networkingVishnu Vardhan
 

More from Vishnu Vardhan (11)

3. basics of python
3. basics of python3. basics of python
3. basics of python
 
2. basics of python
2. basics of python2. basics of python
2. basics of python
 
Chapter 25. implementing i pv6 routing
Chapter 25. implementing i pv6 routingChapter 25. implementing i pv6 routing
Chapter 25. implementing i pv6 routing
 
5. configuring multiple switch with files
5. configuring multiple switch with files5. configuring multiple switch with files
5. configuring multiple switch with files
 
1. basics of python
1. basics of python1. basics of python
1. basics of python
 
Ospf
OspfOspf
Ospf
 
Chapter 4. using the command line interface
Chapter 4. using the command line interfaceChapter 4. using the command line interface
Chapter 4. using the command line interface
 
Chapter 3. fundamentals of wan and ip routing
Chapter 3. fundamentals of wan and ip routingChapter 3. fundamentals of wan and ip routing
Chapter 3. fundamentals of wan and ip routing
 
Chapter 2. fundamentals of ethernet la ns
Chapter 2. fundamentals of ethernet la nsChapter 2. fundamentals of ethernet la ns
Chapter 2. fundamentals of ethernet la ns
 
Chapter 1.2 osi layer
Chapter 1.2 osi layerChapter 1.2 osi layer
Chapter 1.2 osi layer
 
Chapter 1. introduction to tcpip networking
Chapter 1. introduction to tcpip networkingChapter 1. introduction to tcpip networking
Chapter 1. introduction to tcpip networking
 

Chapter 3.1 subnetting

  • 1. Subnetting Breaking one single IP segment to chunks WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 2. Subnetting • Obviously a company wouldn’t put all 16,777,214 hosts into a single logical network, this would be terrible for performance and security. – For Class A • They would split their /8 address allocation into smaller subnets and allocate these to different offices and types of hosts • For example if they received 12.0.0.0/8, they could allocate the subnet 12.0.1.0/24 to sales computers in New York, 12.0.2.0/24 to accounting PCs and 12.0.9.0/24 to sales computers in Boston. Subnetted Apple Supernet Apple WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 3. CIDR – Classless Inter Domain Routing • A problem with classful addresses was that if a company had more than 254 hosts they would need to be assigned a Class B network • They would have much less than the 65,534 (2^16 - 2) hosts allocated, so this wasted a huge amount of the global address space • Classless Inter-Domain Routing (CIDR) was introduced in 1993 to alleviate this problem • CIDR removed the fixed /8, /16 and /24 requirements for the address classes • For example 175.10.10.0/20 --------- Class B instead of writing /16 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 4. Class C /31 Subnet • Let’s say we’ve been allocated Class C 192.168.1.0/24. • If we move the line all the way to the right we’re now using /31 (or 255.255.255.254) • This leaves one bit for the host address, with a possible value of 0 or 1 It borrows 7 bits for the network address • This gives us 128 subnets (27) which accommodate 2 hosts each 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 5. Key Topic : Network and Broadcast address • Every IP segment should have Network address and Broadcast address. • How to find it ?? Its actually a simple match to find a Network ID or Network address put all “0” in the host portion. To find out Broadcast address put all “1” in host portion. Lets try … 192.168.1.1/24 First 24 bit is Network portion and Next 8 bit is host portion. If I apply the formula the I will get Network ID or Network address : 192.168.1.0/24 Broadcast address : 192.168.1.255/24 Quiz : 172.1.2.3/16 192.0.0.1/16 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 6. Class C subnet /31 • Let’s say we’ve been allocated Class C 192.168.1.0/24. • We subnet using /31. Valid host addresses: • ‒192.168.1.0 to 192.168.1.1 • ‒192.168.1.2 to 192.168.1.3 • ‒Etc., to: • ‒192.168.1.254 to 192.168.1.255 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 7. But Wait !! • Let’s say we’ve been allocated Class C 192.168.1.0/24 • What about the network and broadcast address?! • /31 breaks the standard rules of IP addressing. • /31 subnets are supported on Cisco routers for point to point links (which have no need for a network or broadcast address.) WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 8. Class C /30 Subnets • Let’s say we’ve been allocated Class C 192.168.1.0/24 • Let’s move the line back a place. We’re now using /30 (or 255.255.255.252) This leaves 2 bits for the host address, 22 = 4, minus 2 for the network and broadcast address = 2 possible hosts • It borrows 6 bits for the network address • This gives us 64 subnets (26) which accommodate 2 hosts each • Valid host addresses: • ‒ 200.15.10.1 to 200.15.10.2 (network .0, broadcast .3) • ‒ 200.15.10.5 to 200.15.10.6 (network .4, broadcast .7) • ‒ Etc., to: • ‒ 200.15.10.253 to 200.15.10.254 (network .252, broadcast .255) 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 9. Variable Length Subnet Mask • Early routing protocols only supported Fixed Length Subnet Masking (FLSM) where all subnets had to be the same size. Youcouldn’t have a subnet with 14 hosts and another subnet with 64 hosts in the same network. Before taking a good meal on Subnettig lets discuss about Private and Public IP addresses • Private address are the IP address which cannot go to the internet. • Public address are routable to the internet. • Why Private and Public : • Its simple because what if we exhaust our 4 million IP address. • Private address can be repeated by multiple enterprise as they will be used to route within the LAN only. • If a private IP address configured device want to talk to the internet we need NAT – Network Address Translation. (We will study in future slides) WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 10. Subnetting question. Q) Lets assume your Manager gave you an ip 192.168.1.0/24 and told you that he want 30 hosts instead of wasting 2^8 – 2 hosts. Step 1 : Find the Network ID and Broadcast ID Network ID : 192.168.1.0 Broadcast ID : 192.168.1.254 Step 2 : Write the given IP address in binary format and mark the Network and host portion. Now we have 8 bits which are host portion and 24 bits for network portion. However, we need only 32 host, hence lets increase network portion by borrowing some bits from host portion. 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 11. Borrowing bits from host portion Borrowed Bits New Network Bits = n New Host Bits = h How Many Hosts I can get 2^h - 2 0 24 8 254 1 25 7 126 2 26 6 62 3 27 5 30 4 28 4 14 5 29 3 6 6 30 2 2 7 31 1 0 8 32 0 0 Now we got New Subnet Mask it 255.255.255.224 or Prefix /27 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210
  • 12. New Subnetted IP’s • We borrowed 3 bits hence number of networks is 2^3 = 8 (before it was only one network) Network # Network ID First IP Last IP Broadcast IP Network 1 192.168.1.0/27 192.168.1.1/27 192.168.1.30/27 192.168.1.31/27 Network 2 192.168.1.0/27 192.168.1.32/27 192.168.1.62/27 192.168.1.63/27 Network 3 192.168.1.0/27 192.168.1.64/27 192.168.1.94/27 192.168.1.95/27 Network 4 192.168.1.0/27 192.168.1.96/27 192.168.1.126/27 192.168.1.127/27 Network 5 192.168.1.0/27 192.168.1.128/27 192.168.1.158/27 192.168.1.159/27 Network 6 192.168.1.0/27 192.168.1.16027 192.168.1.190/27 192.168.1.191/27 Network 7 192.168.1.0/27 192.168.1.192/27 192.168.1.222/27 192.168.1.223/27 Network 8 192.168.1.0/27 192.168.1.224/27 192.168.1.254/27 192.168.1.255/27 WWW.NETWORKRHINOS.COM | VISHNU - +91-9790901210