The document discusses subnetting, variable length subnet masking (VLSM), private and public IP addresses, and network address translation (NAT) and port address translation (PAT). It provides examples of how to use subnetting and VLSM to divide a network into subnets with unequal host requirements. It also explains the differences between private and public IP addresses and how NAT and PAT can be used to translate private IP addresses to public IP addresses when connecting to the Internet.
2. Subnetting (Revision)
Subnetting is the process of breaking down an IP network into
smaller sub-networks called "subnets."
Subnetting an IP Network can be done for preservation of address
space
Additional bits can be added to the default subnet mask for a given
Class to further subnet, or break down, a network
Classless Inter-Domain Routing
3. Subnetting
If required 2 useable ip address/subnet for
192.168.10.0/24?
So, borrow 6 bits for making subnets and 2 bits for host part
26 =64 subnets each having 22 -2=4-2 useable hosts per subnet
ID Subnetwork Broadcast First Host Last Host
1 192.168.10.0 192.168.10.3 192.168.10.1 192.168.10.2
2 192.168.10.4 192.168.10.7 192.168.10.5 192.168.10.6
3 192.168.10.8 192.168.10.11 192.168.10.9 192.168.10.10
4 192.168.10.12 192.168.10.15 192.168.10.13 192.168.10.14
5 192.168.10.16 192.168.10.19 192.168.10.17 192.168.10.18
- - - - -
- - - - -
64 192.168.10.252 192.168.10.255 192.168.10.253 192.168.10.254
4. Variable Length Subnet Masking
(VLSM)
Way of further subnetting a subnet.
By using Variable Length Subnet Masking (VLSM), we
can allocate IP addresses to the subnets by the exact
need.
While By subnetting, we can divide a network only into
subnets with equal number of IP addresses.
Variable Length Subnet Masking (VLSM) allows to
create subnets from a single network with unequal
number of IP addresses.
5. Variable Length Subnet Masking
(VLSM)
Example: We want to divide 192.168.10.0, which is a
Class C network, into four networks, each with unequal
number of IP address requirements as shown below.
Subnet A : 126 IP Addresses.
Subnet B : 62 IP Addresses.
Subnet C : 30 IP Addresses.
Subnet D : 30 IP Addresses.
6. Variable Length Subnet Masking
(VLSM)
Original Network (Network to be sub-netted) –
192.168.10.0/24
Divide the two networks equally with 128 IP Addresses (126
usable IP addresses) in each network using 255.255.255.128
subnet mask (192.168.10.0/25) by 1-bit subnetting
We will get two subnets each with 128 IP Addresses (126
usable IP addresses).
1) 192.168.10.0/25 - 192.168.10.127/25 (for Subnet A)
2) 192.168.10.128/25 - 192.168.10.255/25(for further Subnetting)
7. Variable Length Subnet Masking
(VLSM)- Second Division
Divide second subnet (192.168.10.128/25) we got from
the first division again into two Networks, each with 64
IP Addresses (62 usable IP Addresses) using
255.255.255.192 subnet mask.
We will get two subnets each with 64 IP Addresses (62
usable IP Addresses).
1) 192.168.10.128/26 - 192.168.10.191/26 (for Subnet B)
2) 192.168.10.192/26 - 192.168.10.255/26(for further Subnetting)
8. Variable Length Subnet Masking
(VLSM) - Third Division
Divide 192.168.10.192/26 Network again into two
Networks, each with 32 IP Addresses (30 usable IP
addresses) using 255.255.255.224 subnet mask
We will get two subnets each with 32 IP Addresse (30
usable IP addresses).
1) 192.168.10.192/27 - 192.168.10.223/27
2) 192.168.10.224/27 - 192.168.10.255/27
9. VLSM
Now we have split the 192.168.10.0/24 network into four subnets
using Variable Length Subnet Masking (VLSM), with unequal
number of IP addresses as shown below. Also note that when you
divide a network using Variable Length Subnet Masking (VLSM),
the subnet masks are also different.
1) 192.168.10.0 - 255.255.255.127 (126 (128-2) usable IP Addresses)
2) 192.168.10.128 - 255.255.255.192 (62 (64-2) usable IP Addresses)
3) 192.168.10.192 - 255.255.255.224 (30 (32-2) usable IP Addresses)
4) 192.168.10.224 - 255.255.255.224 (30 (32-2) usable IP Addresses)
10. Problem
Given the Class C network of
204.15.5.0/24, subnet the
network in order to create
the network in the figure
below, with the host
requirements shown.
Develop a subnetting scheme using VLSM, given:
netA: must support 14 hosts
netB: must support 28 hosts
netC: must support 2 hosts
netD: must support 7 hosts
netE: must support 28 host
Determine what mask allows the required number of hosts.
11. Private and Public IP Addresses
In Early network design, when global end-to-end
connectivity was envisioned for communications with all
Internet hosts, intended that IP addresses be
uniquely assigned to a particular computer or
device. However, it was found that this was not always
necessary
Computers not connected to the Internet, such as factory
machines that communicate only with each other via
TCP/IP, need not have globally unique IP addresses.
12. Private Addresses
Private Addresses
Private addresses are a predefined set of IPv4 addresses that
the designers of the Internet provided for those hosts within
an organization that do not require direct access to the
Internet.
These addresses are commonly used for home, office, and
enterprise local area networks (LANs), when globally routable
addresses are not mandatory, or are not available for the
intended network applications
13. Private Addresses
Start End No. of addresses
24-bit Block
(/8 prefix, 1 × A)
10.0.0.0 10.255.255.255 16777216
20-bit Block
(/12 prefix, 16 × B)
172.16.0.0 172.31.255.255 1048576
16-bit Block
(/16 prefix, 256 × C)
192.168.0.0 192.168.255.255 65536
14. Private and Public IP Addresses
Public Addresses
A unique Internet Protocol (IP) address, known as a public IP
address, is assigned to every computer that connects to the
Internet. The IP addressing scheme makes it possible for
computers to “find each other” online and exchange
information.
Public addresses are globally unique on the Internet. In
addition, routes are programmed into the routers on the
Internet so that traffic can reach those assigned public
addresses. That is why public addresses can be reached on
the Internet.
15. Address Translation
Assuming the network has Internet connectivity, the computer
connected to the digital subscriber line (DSL) modem is assigned
public IP addresses by the Internet Service Provider (ISP).
Now the network’s router acts as a gatekeeper between the private
network and the public Internet.
Network Address Translation (NAT) and Port Address
Translation (PAT) both map IP addresses on an internal network to
IP addresses on an external network. Which method of address
translation you use depends on the types of networks that you are
translating and the number of available IP addresses that you have.
16. Network Address Translation
192.168.1.5
S: 192.168.1.5
D: 128.143.71.21
1
192.168.1.1
138.76.29.7
Public translation table
WAN side addr LAN side addr
138.76.29.7 192.168.1.5
…… ……
S: 128.143.71.21
D: 192.168.1.5 4
S: 138.76.29.7
D: 128.143.71.21
2
S: 128.143.71.21
D: 138.76.29.7 3
17. Network Address Translation
If you are connecting number of PCs in the 192.168.1.0
network to a site in the 128.143.71.21 network, you could
use NAT to translate 192.168.1.0 IP addresses to available
public IP addresses
So that hosts on the 192.168.1.0 network can access data
and use network resources on the public network.
However, for this scenario to work, you must have an
address pool that contains enough available IP public
addresses on the network to accommodate every host on
the private network of 192.168.1.0
Requires one-to-one relationship when translating
18. Network Address Translation
192.168.1.5
192.168.1.1
138.76.29.7
Public translation table
WAN side addr LAN side addr
192.168.1.10
192.168.1.15
138.76.29.8
138.76.29.9
Requires one-to-one relationship when
translating
138.76.29.7 192.168.1.5
138.76.29.8 192.168.1.10
138.76.29.9 192.168.1.15
19. Port Address Translation
192.168.1.5
S: 192.168.1.5, 58631
D: 128.143.71.21, 80
1
192.168.1.1
138.76.29.7
Public translation table
WAN side addr LAN side addr
138.76.29.7, 5001 192.168.1.5, 58631
…… ……
S: 128.143.71.21, 80
D: 192.168.1.5, 58631 4
S: 138.76.29.7, 5001
D: 128.143.71.21, 80
2
S: 128.143.71.21, 80
D: 138.76.29.7, 5001 3
192.168.1.10
192.168.1.15
20. Port Address Translation
PAT attempts to use the original source port number of the
internal host to form a unique, registered IP address and
port number combination.
For example, two hosts that have been assigned the IP
addresses 192.168.1.5 and 192.168.1.10, respectively,
could send traffic to and receive traffic from the Internet by
using the single public IP address138.76.29.7 but unique
port number
If that port number is already allocated, PAT searches for
an available alternate source port number.