Public and privateIP address
Public IP address
Are provided by an ISP and assigned to the router.
They are a unique on the Internet.
Other machines like servers and websites are use a public IP to identify and
communicate with the devices connected to a LAN.
Private IP address
Private IP addresses aren’t routed on the Internet.
They are never leave the local network, and no traffic can be exchanged using
private IP addresses.
Private IP addresses within the same local network must be unique.
Subnetting
Subnetting isthe strategy used to partition a single physical network
into smaller logical sub-networks.
It allows an organization to add sub-networks without the need to
acquire a new network address via the ISP.
The sub-nets can be sub-netted again into sub-subnets.
Class A, B, and C IPv4 addresses are made up of 2-levels of hierarchy
before they are sub-netted: the network portion and host portion.
4.
Subnetting
To reacha host in the Internet, we first reach the network using the network
address and then we reach the host using the hostid based up on the class of
the address.
If an organization is interested to categorize its host into different groups, the
best solution is sub-netting.
Creating subnetworks in class A ,B and C IPv4 addresses will add an
intermediary level in the hierarchy of addressing.
Subnetted networks have 3-levels of hierarchy:
Netid portion
Subnetid portion
Hostid portion
5.
Subnetting
The routing ofan IP packet now involves three steps: delivery to the
network, delivery to the subnetwork , and delivery to the host.
Why Sub-netting?
To minimize wastage of IPv4 address
To manage network traffic easily
To improve network performance and security
We borrow some bits from the host portion during the sub-netting processes in
order to divide the large network into smaller networks.
Borrowing bits from the host portion reduces the number of hosts
6.
Sub-net mask
Sub-net mask
It is a 32-bit value that is produced by setting the host bits to all 0s
and the network bits to all 1s.
The default masks are used when the network is not sub-netted
• Given IP Address & Sub-net mask→sub-net address. where
&,represents bit-wise And operation.
7.
Calculating subnet andhost
• Use 2n
to calculate the number of sub-nets: where n, the number of
bits borrowed.
• Use 2h
to calculate the number of hosts per network: where h, the
number of bits remaining in the host field.
• Use 2h
-2 to calculate the number of valid host address in the network:
where h, the number of bits remaining in the host field, -2 because
hosts cannot use the network address and broadcast address from a
sub-net.
8.
Subnetting example
A companyis assigned a class B address of 172.16.0.0 by an ISP and the
company wants to create 256 subnets.
A. Design the sub-nets?
B. Identify the sub-net mask?
C. Maximum number of hosts that can be accommodated in each sub-
net?
9.
Subnetting example
Solution: Torepresent 256 subnets we should borrow 8 bits from the
host portion. since 28
= 256. The remaining 8 bits in the hostid portion
can be used to represent 254 (28
– 2 )different hosts in each subnet.
A. Design Sub-nets
The 1st subnet is : 172.16.0.0 – 172.16.0.255
The 2nd subnet is : 172.16.1.0 – 172.16.1.255
The last is : 172.16.255.0 – 172.16.255.255
10.
Subnetting example
B. Identifysub-net mask and valid host address
The subnet mask is 255.255.255.0
Valid host address : 28
-2 = 254
11.
Subnetting example2
Given thatHost IP Address: 138.101.114.250, and Subnet Mask:
255.255.255.192
A. Identify the subnet network where this host must have placed.
B. Identify the other subnets in the network.
C. Identify the total number of hosts in each subnet.
Subnetting example2 (solutionB)
Step:1. Find the total number of subnets
Addresses before sub-netting.
1 Network Address : 138.101.0.0
2 Broadcast Address : 138.101.255.255
3 Valid host addresses : 138.101.0.1 to 138.101.255.254
4 Number of sub-net = 210
=1024, How?
16.
Subnetting example2 (solutionB)
Step:2. Find the possible subnets
1st subnet : 138.101.0.0 – 138.101.0.63
2nd subnet: 138.101.0.64 – 138.101.0.127
Last subnet : 138.101.255.192 –138.101.255.255
17.
Subnetting example2 (solutionC)
Step:1. Total Number of Hosts per Subnet
Number of host bits 6
Total number of hosts per subnet 26
= 64
Valid host address per subnet 26
- 2 = 62
18.
Exercise 1
• Exercise1 Consider address block is 192.168.1.0/24. If you borrow 2
bits from the host portion.
1 Calculate the number of sub-nets
2 Calculate the number of hosts per network
3 Calculate the number of valid host address per each sub-net.
4 Find the sub-net mask
5 Find the first valid host address of the first sub-net.
6 Find the broadcast address of the 3rd
sub-net.
Exercise(Cont..)
Exercise 2: Determiningthe network address.
A Host address: 192.168.192.190 Subnet mask: 255.255.255.224
B Host address 172.30.181.38 Subnet mask 255.255.255.224
Exercise 3: Calculate the number of valid host address
A. Network Address 192.168.164.92 Subnet mask: 255.255.255.240
B network address 172.22.0.0 Subnet mask 255.255.192.0
Exercise 4 : Find the range of hosts, the broadcast address and the next network address
Network address 192.168.69.0 subnet mask 255.255.255.0