SlideShare a Scribd company logo
Subnetting & NAT
Names ID’s
Maria Ahmed 14005065-083
Saad Tanvir 14005065-045
Talha Imdad 14005065-084
Hina Ilyas 14005065-068
Group Members
SE332 – Computer Networking
Presentation no. 1
Presented to: Sir Mustahsan Hammad Naqvi
Subnetting is a process of dividing large network into the smaller
networks .
OR
Subnetting means we borrow some bits from the Host part to add to
the Network part.
Every computer on network has an IP address that represent its
location on network.
Subnetting
• The version of IP address used is IPv4(Internet Protocol version
4).
• Each number of an IP address is made from eight individual bits
known as octet.
• Each octet can create number value from 0 to 255.
• An IP address would be 32 bits long in binary divided into
the two components, network component and host
component.
Subnetting – Classful Networks
• IP addresses are broken into the two components:
• Network component :- Defines network segment of device.
• Host component :- Defines the specific device on a particular
network segment.
IP Classes in decimal notation
Subnetting – Classful Network
Class A addresses range from 1-126
Class B addresses range from 128-191
Class C addresses range from 192-223
Class D addresses range from 224-239
Class E addresses range from 240-254
• 0 [Zero] is reserved and represents all IP addresses.
• 127 is a reserved address and is used for testing, like a loop back
on an interface.
• 255 is a reserved address and is used for broadcasting purposes.
 Subnet Mask
Subnet mask is always used with IP address. Subnet mask has only
one purpose, to identify which part of an IP address is network
address and which part is host address.
Subnetting – Classful Network
• In decimal notation subnet mask value 1 to 255 represent network
address and value 0 [Zero] represent host address.
• In binary notation subnet mask ON bit [1] represent network
address while OFF bit[0] represent host address.
• Example: IP address is: 192.168.1.10 and subnet mask is
255.255.255.0
Subnetting – Classful Network
192 168 1 10
255 255 255 0
IP Address
Subnet Mask
Network Address Host Address
Subnetting – Classful Network
Class name Default
subnet mask
Networks
bits
Host bits CIDR
Class A 255.0.0.0 First 8 bits Last 24 bits /8
Class B 255.255.0.0 First 16 bits Last 16 bits /16
Class C 255.255.255.0 First 24 bits Last 8 bits /24
Subnetting – Classful Network
 Notations
There are two notations to represent IP address and Subnet Mask.
• Decimal notation.
• Binary notation.
Each octet has eight individual bits which has following pattern:
192 168 1 10
255 255 255 0
IP Address
Subnet Mask
Subnetting – Classful Network
A network has following things to be calculated:
Followings are calculated using IP address and Subnet Mask
Network ID of each network
Host ID of each network
Broadcast ID of each network
Hosts per Network
Subnetting – Classful Network
A network has following things to be calculated:
Followings are calculated using IP address and Subnet Mask
First valid IP address of each network
Last valid IP address of each network
Total Subnet
Subnetting – Classful Network
Total Subnets/Number of the networks
Calculation Methodology: In order to calculate the total subnet of a network,
we need the subnet masks of the IP address class. As we know that the
classful networks uses default subnet mask according to the IP address class.
General Formula: 2^N where
N= Number of the host bits added to the network bits of a given subnet mask
as compared to the default subnet mask of given IP address class.
Considerable things while calculating total Subnets:
• Default subnet mask of the given IP address class.
• Given subnet mask.
Subnetting – Classful Network
Total Subnets/Number of the networks
Example: Given: IP address: 192.168.1.20 and we have to calculate
total subnet available.
Solution:
Step 1:
Analyze the IP address class as it is Class C (ranges 192-223). So its
default subnet mask is 255.255.255.0 and convert the default subnet
mask into doted binary notation.
. . .
As the no number of network bits added to the host bits as compared to the default
subnet mask of the IP address class. So here N will be zero . (Because no other subnet
mask is given and we uses the default subnet Mask). So Total Subnet = 2^0 = 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
Subnetting – Classful Network
Network ID of each network
Calculation Methodology: we need the subnet masks of given IP address
class and IP address.
General Formula: Change the host bits of the IP address to 0’s while
keeping the network bits unchanged . The subnet mask successive 1’s will
tell the no. of networks bits.
Considerable things while calculating:
• Default subnet mask of the given IP address class.
• IP address.
Subnetting – Classful Network
Network ID of each network
Example: Given: IP address: 192.168.1.20 and we have to calculate
Network ID.
Solution: Step 1:
Analyze the IP address class as it is Class C (ranges 192-223). So its
default subnet mask is 255.255.255.0 and convert the IP address &
default subnet mask into doted binary notation.
. . .
. . .
Here the number of 1’s in the subnet mask tells the network bits in the IP address is 24 bits
and remaining 8 bits is host bits.
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 1 0 1 0 0
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
IP Address
Subnet Mask
Subnetting – Classful Network
Network ID of each network
Step 2: Now by changing the host bits of the IP address to 0’s we will get the
Network ID.
. . .
. . .
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 1 0 1 0 0IP Address
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 0Network ID
Decimal Network ID 192.168.1.0 /24
No. of network bits
Subnetting – Classful Network
Host ID of each network
Calculation Methodology: we need the subnet masks of given IP address
class and IP address.
General Formula: Change the network bits of the IP address to 0’s while
keeping the host bits unchanged. The subnet mask successive 1’s will tell
the no. of networks bits.
Considerable things while calculating:
• Default subnet mask of the given IP address class.
• IP address.
Subnetting – Classful Network
Host ID of each network
Example: Given: IP address: 192.168.1.20 and we have to calculate
Host ID.
Solution: Step 1:
Analyze the IP address class as it is Class C (ranges 192-223). So its
default subnet mask is 255.255.255.0 and convert the IP address &
default subnet mask into doted binary notation.
. . .
. . .
Here the number of 1’s in the subnet mask tells the network bits in the IP address is 24 bits
and remaining 8 bits is host bits.
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 1 0 1 0 0
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
IP Address
Subnet Mask
Subnetting – Classful Network
Host ID of each network
Step 2: Now by changing the network bits of the IP address to 0’s we will get
the Network ID.
. . .
. . .
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 1 0 1 0 0IP Address
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0Host ID
Decimal Host ID 0.0.0.20
Subnetting – Classful Network
Broadcast ID of each network
Calculation Methodology: we need the subnet masks of given IP address
class and IP address.
General Formula: Change the Host bits of the IP address to 1’s while
keeping the network bits unchanged. The subnet mask successive 1’s will
tell the no. of networks bits.
Considerable things while calculating:
• Default subnet mask of the given IP address class.
• IP address.
Subnetting – Classful Network
Broadcast ID of each network
Example: Given: IP address: 192.168.1.20 and we have to calculate
Broadcast ID.
Solution: Step 1:
Analyze the IP address class as it is Class C (ranges 192-223). So its
default subnet mask is 255.255.255.0 and convert the IP address &
default subnet mask into doted binary notation.
. . .
. . .
Here the number of 1’s in the subnet mask tells the network bits in the IP address is 24 bits
and remaining 8 bits is host bits.
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 1 0 1 0 0
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
IP Address
Subnet Mask
Subnetting – Classful Network
Broadcast ID of each network
Step 2: Now by changing the host bits of the IP address to 1’s we will get the
Broadcast ID.
. . .
. . .
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 1 0 1 0 0IP Address
1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1Broadcast ID
Decimal Broadcast ID 192.168.1.255/24
No. of network bits
Subnetting – Classful Network
First Valid host address of each network
Calculation Methodology: we need to calculate the Network ID first
(already mentioned details in slide 14-16) then we will easily calculate the
first valid IP address.
General Formula: Find the Decimal Notation of Network Id and add
1(integer) to the address of the Network ID.
Considerable things while calculating:
• Network ID
Subnetting – Classful Network
First Valid Host Address ID of each network
Example: Given: IP address: 192.168.1.20 and we have to calculate
First valid host address.
Solution: Step 1:
Step 2:
Decimal Network ID 192.168.1.0 /24 (Already Calculated)
192.168.1.0
+ 1
192.168.1.1
Decimal Network ID
First Valid Address
Subnetting – Classful Network
Last Valid host address of each network
Calculation Methodology: we need to calculate the Broadcast ID first
(already mentioned details in slide 20-22) then we will easily calculate the
last valid IP address.
General Formula: Find the Decimal Notation of Broadcast Id and subtract
1(integer) to the address of the Broadcast ID.
Considerable things while calculating:
• Broadcast ID
Subnetting – Classful Network
First Valid Host Address ID of each network
Example: Given: IP address: 192.168.1.20 and we have to calculate
First valid host address.
Solution: Step 1:
Step 2:
Decimal Broadcast ID 192.168.1.255/24 (Already Calculated)
192.168.1.255
- 1
192.168.1.254
Decimal Broadcast ID
Last Valid Address
Subnetting – Classful Network
Hosts per network
Calculation Methodology: To calculate the hosts per network we need to
find the no. of network bits in the subnet mask.
General Formula: ((2^32-N )-2) where N = number of the network bits in
the subnet marks which is calculated by the no. of successive 1’s in the
subnet mask.
We subtract two address which is Network ID and Broadcast ID which
cannot assigned to any host.
Considerable things while calculating:
• Network bits of subnet mask.
Subnetting – Classful Network
Host per network
Example: Given: IP address: 192.168.1.20 and we have to calculate
host per network.
Solution: Step 1:
Analyze the IP address class as it is Class C (ranges 192-223). So its
default subnet mask is 255.255.255.0 and convert the default subnet
mask into doted binary notation.
. . .
Step 2:
Here N = 24 . So, Applying the formula : ((2^32-24)-2) = 2^8 – 2 = 254
hosts per network.
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 0Subnet Mask
Subnetting – Classless Network
CIDR [ Classless Inter Domain Routing]:
CIDR is a slash notation of subnet mask. CIDR tells us number of on bits
in a network address.
•Class A has default subnet mask 255.0.0.0. that means first octet of the
subnet mask has all on bits. In slash notation it would be written as /8,
means address has 8 bits on.
•Class B has default subnet mask 255.255.0.0. that means first two octets
of the subnet mask have all on bits. In slash notation it would be written
as /16, means address has 16 bits on.
•Class C has default subnet mask 255.255.255.0. that means first three
octets of the subnet mask have all on bits. In slash notation it would be
written as /24, means address has 24 bits on.
Subnetting – Classless Network
Consider 200.113.20.16/28
a.Calculate
i. How many networks are possible?
ii. How many hosts per network are possible?
iii.What is the first valid IP of the first network?
iv.What is the last valid IP of the first network?
v. What is the broadcast ID of first network?
Subnetting – Classless Network
Solution:
In this question, /28 means that 28 bits are the network bits
i. How many networks are possible?
Answer:
. . .
. . .
As the number of network bits is 28 (as given) and IP address class is C.
So, Here N = 4 because 4 bits are extra used as compared to Default
subnet mask(255.255.255.0) of the class C.
Applying formula(Slide 10), we get no. of possible networks = 2^4 = 16
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 0Given Subnet Mask 0 0 0 0
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 0Default Subnet Mask
Subnetting – Classless Network
Solution:
In this question, /28 means that 28 bits are the network bits
ii. How many hosts per network are possible?
Answer:
. . .
. . .
As the number of network bits is 28 (as given) and IP address class is C.
So, Using (Slide-27) formula, Number of host = ((2^32-28)-2) = 2^4 – 2 = 16 – 2
= 14
1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0
0 0 0 0
Given IP Address
1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Given Subnet Mask
0 0 0 1 0 0 0 0
Subnetting – Classless Network
Solution:
In this question, /28 means that 28 bits are the network bits
iii. What is the first valid IP of the first network?
Answer:
. . .
. . .
To calculate the first valid IP we have to calculate Network ID and add one to
It as already mentioned.
1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0
0 0 0 0
Given IP Address
1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Given Subnet Mask
0 0 0 1 0 0 0 0
1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0Network ID 0 0 0 1 0 0 0 0
200.113.20.16 / 28Decimal Network ID
200.113.20.17 / 28First Valid IP
Subnetting – Classless Network
Solution:
In this question, /28 means that 28 bits are the network bits
iv. What is the Last valid IP of the first network?
Answer:
. . .
. . .
To calculate the last valid IP we have to calculate Broadcast ID and subtract one to
It as already mentioned.
1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0
0 0 0 0
Given IP Address
1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Given Subnet Mask
0 0 0 1 0 0 0 0
1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0Broadcast ID 0 0 0 1 1 1 1 1
200.113.20.31/ 28Decimal Network ID
200.113.20.30 / 28Last Valid IP
NAT(Network address translation)
Definition:
NAT is short for Network Address Translation. NAT is an Internet standard
that enables a local-area network (LAN) to use one set of IP addresses for
internal traffic and a second set of addresses for external traffic.
 Purpose:
NAT serves three main purposes:
•Provides a type of firewall by hiding internal IP addresses
•Enables a company to use more internal IP addresses. Since they're used
internally only, there's no possibility of conflict with IP addresses used by
other companies and organizations.
•Allows a company to combine multiple ISDN connections into a single
Internet connection
NAT(Network address translation)
Basic Operation Of NAT
• NAT device has address translation table
• One to one address translation
NAT(Network address translation)
Types of NAT
• Static NAT:
A pool of public IP addresses are assigned to the NAT device. A private IP
address can then be statically mapped to anyone of these public addresses.
NAT(Network address translation)
Types of NAT
•Dynamic NAT:
The NAT device will consist of a pool of IP addresses. This time though the
pool of IP addresses will be used when needed and then given back to the
pool. So if computer A needed a public address, it would take one from the
pool, then hand it back when done. The next time the same computer
wanted an IP address it may be assigned a different public address from the
pool, because the one used previously may be in use by another computer,
hence the name "dynamic".
NAT(Network address translation)
Types of NAT
• NAT overload or Port Address translation:
During PAT, each computer on LAN is translated to the same IP address, but
with a different port number assignment.
NAT(Network address translation)
Terminology of NAT:
Specific terms are used to identify the various NAT addresses:
• Inside Local:
the specific IP address assigned to an inside host behind a NAT-enabled device
(usually a private address).
• Inside Global:
the address that identifies an inside host to the outside world (usually a public
address). Essentially, this is the dynamically or statically-assigned public address
assigned to a private host.
• Outside Global:
the address assigned to an outside host (usually a public address).
• Outside Local :
the address that identifies an outside host to the inside network. Often, this is the
same address as the Outside Global. However, it is occasionally necessary to translate
an outside (usually public) address to an inside (usually private) address.
Thank You
You can download this presentation from
Slideshare.

More Related Content

PPT
DES.ppt
PPT
PPT
Ip addressing
PPT
Ip addressing
PPT
CCNA Chapter1
DOCX
Ip address
PDF
DNS server configuration in packet tracer
PPTX
Subnetting Presentation
DES.ppt
Ip addressing
Ip addressing
CCNA Chapter1
Ip address
DNS server configuration in packet tracer
Subnetting Presentation

What's hot (20)

PDF
Ccna new lab_manual_by_esp_team
PPT
Ip Addressing Basics
PPTX
Network layer
PPT
MPLS (Multi-Protocol Label Switching)
PPTX
Ip address presentation
PPTX
Subnet Masks
PPT
PDF
GLBP (gateway load balancing protocol)
PPTX
CCNA ppt Day 1
PPTX
PPTX
Wireless security using wpa2
PPTX
Access control list [1]
PPTX
Subnetting made simple
PPT
Packet switching
PPTX
Ch 19 Network-layer protocols Section 1
PPT
CCNA PPT
PPTX
Routing Protocols.pptx
PDF
MAC Address – All you Need to Know About it
PPTX
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
Ccna new lab_manual_by_esp_team
Ip Addressing Basics
Network layer
MPLS (Multi-Protocol Label Switching)
Ip address presentation
Subnet Masks
GLBP (gateway load balancing protocol)
CCNA ppt Day 1
Wireless security using wpa2
Access control list [1]
Subnetting made simple
Packet switching
Ch 19 Network-layer protocols Section 1
CCNA PPT
Routing Protocols.pptx
MAC Address – All you Need to Know About it
CRYPTOGRAPHY AND NETWORK SECURITY
Ad

Viewers also liked (20)

PPT
Ip address and subnetting
PPS
Lesson 2: Subnetting basics
PPTX
Subnetting Basics Tutorial
PPT
Subnetting
PPSX
Mill harmonics r1
PDF
Dynamic Vs Static
PPT
Classful ip address (ip address picture book 4 from visual land animations)
PPT
Ip addressing
PPTX
Dynamic vs static
PPTX
Dynamic vs static stretching
PDF
Configuring dynamic and static routing
PPTX
Shortest path algorithm
PPT
IP Addressing and subnetting
PPTX
Discrete Mathematics Presentation
PPT
Subnetting Made Easy
PPT
Practical Power System Harmonics, Earthing and Power Quality - Problems and S...
PPT
Introduction to Computer Networks
PPT
Computer Networking: Subnetting and IP Addressing
PPT
Chapter 19: Logical Addressing
PDF
Easy IP Addressing and Subnetting Manual for Starters
Ip address and subnetting
Lesson 2: Subnetting basics
Subnetting Basics Tutorial
Subnetting
Mill harmonics r1
Dynamic Vs Static
Classful ip address (ip address picture book 4 from visual land animations)
Ip addressing
Dynamic vs static
Dynamic vs static stretching
Configuring dynamic and static routing
Shortest path algorithm
IP Addressing and subnetting
Discrete Mathematics Presentation
Subnetting Made Easy
Practical Power System Harmonics, Earthing and Power Quality - Problems and S...
Introduction to Computer Networks
Computer Networking: Subnetting and IP Addressing
Chapter 19: Logical Addressing
Easy IP Addressing and Subnetting Manual for Starters
Ad

Similar to NAT and Subnetting (20)

PPTX
computer network notes in network layer.
PPTX
Lecture W5 CN IP Subnetting P2.pptx
PDF
Subnetting basics in networking, for network engineers
PPT
subnetting ipv4-Ipv4 subneeting methodologies
PPTX
Week10 lec1
PDF
Basics of IP address ,IP-address classes, Subnet mask
PPTX
lecture 33333222234555555555555555556.pptx
PPTX
lecture 6.pptx
PPT
IP Addressing.ppt
PPT
Ipv4 address
PPTX
chapter 4.pptx
PPT
Subnetting ked
PPT
8-Additional_IPSubnetting_KED (2).ppt
PPTX
Ravi namboori subnetting
PPTX
Ravi namboori subnetting
PDF
13788 3
PPTX
1703_anusua_basuclassful addressing_IP_Addressing
PPTX
Lecture 03 networking
PPTX
Subnetting - Computer network (Daffodil International University)
PPT
Classful_addressing_Class for IP Addressing
computer network notes in network layer.
Lecture W5 CN IP Subnetting P2.pptx
Subnetting basics in networking, for network engineers
subnetting ipv4-Ipv4 subneeting methodologies
Week10 lec1
Basics of IP address ,IP-address classes, Subnet mask
lecture 33333222234555555555555555556.pptx
lecture 6.pptx
IP Addressing.ppt
Ipv4 address
chapter 4.pptx
Subnetting ked
8-Additional_IPSubnetting_KED (2).ppt
Ravi namboori subnetting
Ravi namboori subnetting
13788 3
1703_anusua_basuclassful addressing_IP_Addressing
Lecture 03 networking
Subnetting - Computer network (Daffodil International University)
Classful_addressing_Class for IP Addressing

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Lesson notes of climatology university.
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
01-Introduction-to-Information-Management.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Classroom Observation Tools for Teachers
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Pre independence Education in Inndia.pdf
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
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Complications of Minimal Access Surgery at WLH
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Lesson notes of climatology university.
O5-L3 Freight Transport Ops (International) V1.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial disease of the cardiovascular and lymphatic systems
GDM (1) (1).pptx small presentation for students
Anesthesia in Laparoscopic Surgery in India
01-Introduction-to-Information-Management.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
102 student loan defaulters named and shamed – Is someone you know on the list?
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Supply Chain Operations Speaking Notes -ICLT Program
Classroom Observation Tools for Teachers
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Pre independence Education in Inndia.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 Đ...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf

NAT and Subnetting

  • 2. Names ID’s Maria Ahmed 14005065-083 Saad Tanvir 14005065-045 Talha Imdad 14005065-084 Hina Ilyas 14005065-068 Group Members SE332 – Computer Networking Presentation no. 1 Presented to: Sir Mustahsan Hammad Naqvi
  • 3. Subnetting is a process of dividing large network into the smaller networks . OR Subnetting means we borrow some bits from the Host part to add to the Network part. Every computer on network has an IP address that represent its location on network. Subnetting
  • 4. • The version of IP address used is IPv4(Internet Protocol version 4). • Each number of an IP address is made from eight individual bits known as octet. • Each octet can create number value from 0 to 255. • An IP address would be 32 bits long in binary divided into the two components, network component and host component. Subnetting – Classful Networks
  • 5. • IP addresses are broken into the two components: • Network component :- Defines network segment of device. • Host component :- Defines the specific device on a particular network segment. IP Classes in decimal notation Subnetting – Classful Network Class A addresses range from 1-126 Class B addresses range from 128-191 Class C addresses range from 192-223 Class D addresses range from 224-239 Class E addresses range from 240-254
  • 6. • 0 [Zero] is reserved and represents all IP addresses. • 127 is a reserved address and is used for testing, like a loop back on an interface. • 255 is a reserved address and is used for broadcasting purposes.  Subnet Mask Subnet mask is always used with IP address. Subnet mask has only one purpose, to identify which part of an IP address is network address and which part is host address. Subnetting – Classful Network
  • 7. • In decimal notation subnet mask value 1 to 255 represent network address and value 0 [Zero] represent host address. • In binary notation subnet mask ON bit [1] represent network address while OFF bit[0] represent host address. • Example: IP address is: 192.168.1.10 and subnet mask is 255.255.255.0 Subnetting – Classful Network 192 168 1 10 255 255 255 0 IP Address Subnet Mask Network Address Host Address
  • 8. Subnetting – Classful Network Class name Default subnet mask Networks bits Host bits CIDR Class A 255.0.0.0 First 8 bits Last 24 bits /8 Class B 255.255.0.0 First 16 bits Last 16 bits /16 Class C 255.255.255.0 First 24 bits Last 8 bits /24
  • 9. Subnetting – Classful Network  Notations There are two notations to represent IP address and Subnet Mask. • Decimal notation. • Binary notation. Each octet has eight individual bits which has following pattern: 192 168 1 10 255 255 255 0 IP Address Subnet Mask
  • 10. Subnetting – Classful Network A network has following things to be calculated: Followings are calculated using IP address and Subnet Mask Network ID of each network Host ID of each network Broadcast ID of each network Hosts per Network
  • 11. Subnetting – Classful Network A network has following things to be calculated: Followings are calculated using IP address and Subnet Mask First valid IP address of each network Last valid IP address of each network Total Subnet
  • 12. Subnetting – Classful Network Total Subnets/Number of the networks Calculation Methodology: In order to calculate the total subnet of a network, we need the subnet masks of the IP address class. As we know that the classful networks uses default subnet mask according to the IP address class. General Formula: 2^N where N= Number of the host bits added to the network bits of a given subnet mask as compared to the default subnet mask of given IP address class. Considerable things while calculating total Subnets: • Default subnet mask of the given IP address class. • Given subnet mask.
  • 13. Subnetting – Classful Network Total Subnets/Number of the networks Example: Given: IP address: 192.168.1.20 and we have to calculate total subnet available. Solution: Step 1: Analyze the IP address class as it is Class C (ranges 192-223). So its default subnet mask is 255.255.255.0 and convert the default subnet mask into doted binary notation. . . . As the no number of network bits added to the host bits as compared to the default subnet mask of the IP address class. So here N will be zero . (Because no other subnet mask is given and we uses the default subnet Mask). So Total Subnet = 2^0 = 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
  • 14. Subnetting – Classful Network Network ID of each network Calculation Methodology: we need the subnet masks of given IP address class and IP address. General Formula: Change the host bits of the IP address to 0’s while keeping the network bits unchanged . The subnet mask successive 1’s will tell the no. of networks bits. Considerable things while calculating: • Default subnet mask of the given IP address class. • IP address.
  • 15. Subnetting – Classful Network Network ID of each network Example: Given: IP address: 192.168.1.20 and we have to calculate Network ID. Solution: Step 1: Analyze the IP address class as it is Class C (ranges 192-223). So its default subnet mask is 255.255.255.0 and convert the IP address & default subnet mask into doted binary notation. . . . . . . Here the number of 1’s in the subnet mask tells the network bits in the IP address is 24 bits and remaining 8 bits is host bits. 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 1 0 1 0 0 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 IP Address Subnet Mask
  • 16. Subnetting – Classful Network Network ID of each network Step 2: Now by changing the host bits of the IP address to 0’s we will get the Network ID. . . . . . . 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 1 0 1 0 0IP Address 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 0Network ID Decimal Network ID 192.168.1.0 /24 No. of network bits
  • 17. Subnetting – Classful Network Host ID of each network Calculation Methodology: we need the subnet masks of given IP address class and IP address. General Formula: Change the network bits of the IP address to 0’s while keeping the host bits unchanged. The subnet mask successive 1’s will tell the no. of networks bits. Considerable things while calculating: • Default subnet mask of the given IP address class. • IP address.
  • 18. Subnetting – Classful Network Host ID of each network Example: Given: IP address: 192.168.1.20 and we have to calculate Host ID. Solution: Step 1: Analyze the IP address class as it is Class C (ranges 192-223). So its default subnet mask is 255.255.255.0 and convert the IP address & default subnet mask into doted binary notation. . . . . . . Here the number of 1’s in the subnet mask tells the network bits in the IP address is 24 bits and remaining 8 bits is host bits. 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 1 0 1 0 0 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 IP Address Subnet Mask
  • 19. Subnetting – Classful Network Host ID of each network Step 2: Now by changing the network bits of the IP address to 0’s we will get the Network ID. . . . . . . 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 1 0 1 0 0IP Address 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0Host ID Decimal Host ID 0.0.0.20
  • 20. Subnetting – Classful Network Broadcast ID of each network Calculation Methodology: we need the subnet masks of given IP address class and IP address. General Formula: Change the Host bits of the IP address to 1’s while keeping the network bits unchanged. The subnet mask successive 1’s will tell the no. of networks bits. Considerable things while calculating: • Default subnet mask of the given IP address class. • IP address.
  • 21. Subnetting – Classful Network Broadcast ID of each network Example: Given: IP address: 192.168.1.20 and we have to calculate Broadcast ID. Solution: Step 1: Analyze the IP address class as it is Class C (ranges 192-223). So its default subnet mask is 255.255.255.0 and convert the IP address & default subnet mask into doted binary notation. . . . . . . Here the number of 1’s in the subnet mask tells the network bits in the IP address is 24 bits and remaining 8 bits is host bits. 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 1 0 1 0 0 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 IP Address Subnet Mask
  • 22. Subnetting – Classful Network Broadcast ID of each network Step 2: Now by changing the host bits of the IP address to 1’s we will get the Broadcast ID. . . . . . . 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 1 0 1 0 0IP Address 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1Broadcast ID Decimal Broadcast ID 192.168.1.255/24 No. of network bits
  • 23. Subnetting – Classful Network First Valid host address of each network Calculation Methodology: we need to calculate the Network ID first (already mentioned details in slide 14-16) then we will easily calculate the first valid IP address. General Formula: Find the Decimal Notation of Network Id and add 1(integer) to the address of the Network ID. Considerable things while calculating: • Network ID
  • 24. Subnetting – Classful Network First Valid Host Address ID of each network Example: Given: IP address: 192.168.1.20 and we have to calculate First valid host address. Solution: Step 1: Step 2: Decimal Network ID 192.168.1.0 /24 (Already Calculated) 192.168.1.0 + 1 192.168.1.1 Decimal Network ID First Valid Address
  • 25. Subnetting – Classful Network Last Valid host address of each network Calculation Methodology: we need to calculate the Broadcast ID first (already mentioned details in slide 20-22) then we will easily calculate the last valid IP address. General Formula: Find the Decimal Notation of Broadcast Id and subtract 1(integer) to the address of the Broadcast ID. Considerable things while calculating: • Broadcast ID
  • 26. Subnetting – Classful Network First Valid Host Address ID of each network Example: Given: IP address: 192.168.1.20 and we have to calculate First valid host address. Solution: Step 1: Step 2: Decimal Broadcast ID 192.168.1.255/24 (Already Calculated) 192.168.1.255 - 1 192.168.1.254 Decimal Broadcast ID Last Valid Address
  • 27. Subnetting – Classful Network Hosts per network Calculation Methodology: To calculate the hosts per network we need to find the no. of network bits in the subnet mask. General Formula: ((2^32-N )-2) where N = number of the network bits in the subnet marks which is calculated by the no. of successive 1’s in the subnet mask. We subtract two address which is Network ID and Broadcast ID which cannot assigned to any host. Considerable things while calculating: • Network bits of subnet mask.
  • 28. Subnetting – Classful Network Host per network Example: Given: IP address: 192.168.1.20 and we have to calculate host per network. Solution: Step 1: Analyze the IP address class as it is Class C (ranges 192-223). So its default subnet mask is 255.255.255.0 and convert the default subnet mask into doted binary notation. . . . Step 2: Here N = 24 . So, Applying the formula : ((2^32-24)-2) = 2^8 – 2 = 254 hosts per network. 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 0Subnet Mask
  • 29. Subnetting – Classless Network CIDR [ Classless Inter Domain Routing]: CIDR is a slash notation of subnet mask. CIDR tells us number of on bits in a network address. •Class A has default subnet mask 255.0.0.0. that means first octet of the subnet mask has all on bits. In slash notation it would be written as /8, means address has 8 bits on. •Class B has default subnet mask 255.255.0.0. that means first two octets of the subnet mask have all on bits. In slash notation it would be written as /16, means address has 16 bits on. •Class C has default subnet mask 255.255.255.0. that means first three octets of the subnet mask have all on bits. In slash notation it would be written as /24, means address has 24 bits on.
  • 30. Subnetting – Classless Network Consider 200.113.20.16/28 a.Calculate i. How many networks are possible? ii. How many hosts per network are possible? iii.What is the first valid IP of the first network? iv.What is the last valid IP of the first network? v. What is the broadcast ID of first network?
  • 31. Subnetting – Classless Network Solution: In this question, /28 means that 28 bits are the network bits i. How many networks are possible? Answer: . . . . . . As the number of network bits is 28 (as given) and IP address class is C. So, Here N = 4 because 4 bits are extra used as compared to Default subnet mask(255.255.255.0) of the class C. Applying formula(Slide 10), we get no. of possible networks = 2^4 = 16 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 0Given Subnet Mask 0 0 0 0 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 0Default Subnet Mask
  • 32. Subnetting – Classless Network Solution: In this question, /28 means that 28 bits are the network bits ii. How many hosts per network are possible? Answer: . . . . . . As the number of network bits is 28 (as given) and IP address class is C. So, Using (Slide-27) formula, Number of host = ((2^32-28)-2) = 2^4 – 2 = 16 – 2 = 14 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 Given IP Address 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Given Subnet Mask 0 0 0 1 0 0 0 0
  • 33. Subnetting – Classless Network Solution: In this question, /28 means that 28 bits are the network bits iii. What is the first valid IP of the first network? Answer: . . . . . . To calculate the first valid IP we have to calculate Network ID and add one to It as already mentioned. 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 Given IP Address 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Given Subnet Mask 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0Network ID 0 0 0 1 0 0 0 0 200.113.20.16 / 28Decimal Network ID 200.113.20.17 / 28First Valid IP
  • 34. Subnetting – Classless Network Solution: In this question, /28 means that 28 bits are the network bits iv. What is the Last valid IP of the first network? Answer: . . . . . . To calculate the last valid IP we have to calculate Broadcast ID and subtract one to It as already mentioned. 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 Given IP Address 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1Given Subnet Mask 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0Broadcast ID 0 0 0 1 1 1 1 1 200.113.20.31/ 28Decimal Network ID 200.113.20.30 / 28Last Valid IP
  • 35. NAT(Network address translation) Definition: NAT is short for Network Address Translation. NAT is an Internet standard that enables a local-area network (LAN) to use one set of IP addresses for internal traffic and a second set of addresses for external traffic.  Purpose: NAT serves three main purposes: •Provides a type of firewall by hiding internal IP addresses •Enables a company to use more internal IP addresses. Since they're used internally only, there's no possibility of conflict with IP addresses used by other companies and organizations. •Allows a company to combine multiple ISDN connections into a single Internet connection
  • 36. NAT(Network address translation) Basic Operation Of NAT • NAT device has address translation table • One to one address translation
  • 37. NAT(Network address translation) Types of NAT • Static NAT: A pool of public IP addresses are assigned to the NAT device. A private IP address can then be statically mapped to anyone of these public addresses.
  • 38. NAT(Network address translation) Types of NAT •Dynamic NAT: The NAT device will consist of a pool of IP addresses. This time though the pool of IP addresses will be used when needed and then given back to the pool. So if computer A needed a public address, it would take one from the pool, then hand it back when done. The next time the same computer wanted an IP address it may be assigned a different public address from the pool, because the one used previously may be in use by another computer, hence the name "dynamic".
  • 39. NAT(Network address translation) Types of NAT • NAT overload or Port Address translation: During PAT, each computer on LAN is translated to the same IP address, but with a different port number assignment.
  • 40. NAT(Network address translation) Terminology of NAT: Specific terms are used to identify the various NAT addresses: • Inside Local: the specific IP address assigned to an inside host behind a NAT-enabled device (usually a private address). • Inside Global: the address that identifies an inside host to the outside world (usually a public address). Essentially, this is the dynamically or statically-assigned public address assigned to a private host. • Outside Global: the address assigned to an outside host (usually a public address). • Outside Local : the address that identifies an outside host to the inside network. Often, this is the same address as the Outside Global. However, it is occasionally necessary to translate an outside (usually public) address to an inside (usually private) address.
  • 41. Thank You You can download this presentation from Slideshare.