0% found this document useful (0 votes)
5 views32 pages

Addressing II - Subnetting IPv6

The document provides an overview of subnetting, including reasons for segmenting networks, subnetting processes, and the calculation of subnets and hosts. It also discusses Variable Length Subnet Masking (VLSM) to optimize IP address usage and includes exercises for practical application. Additionally, it covers IPv6 addressing, representation, and configuration methods like Stateless Address Autoconfiguration (SLAAC).

Uploaded by

ishuwaraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views32 pages

Addressing II - Subnetting IPv6

The document provides an overview of subnetting, including reasons for segmenting networks, subnetting processes, and the calculation of subnets and hosts. It also discusses Variable Length Subnet Masking (VLSM) to optimize IP address usage and includes exercises for practical application. Additionally, it covers IPv6 addressing, representation, and configuration methods like Stateless Address Autoconfiguration (SLAAC).

Uploaded by

ishuwaraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Addressing II

Malaka Pathirana
MSc – Cyber Security (Reading), BSc in IT | Cisco Certified CCNA Instructor
Subnetting
Reasons for Segmenting Networks
• Subnetting reduces overall network traffic and improves network
performance.
• It can be used to implement security policies between subnets.
• Subnetting reduces the number of devices affected by abnormal broadcast
traffic.
• Subnets are used for a variety of reasons, including by:

Location Group or Function Device Type


Subnet on an Octet Boundary
• Networks are most easily subnetted at the octet boundary of /8, /16, and /24.

• Notice that using longer prefix lengths decreases the number of hosts per
subnet.
# of hosts
Prefix
Subnet Mask Subnet Mask in Binary (n = network, h = host) 2h – 2
Length
(h = # of host bits)

nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
/8 255.0.0.0 16,777,214
11111111.00000000.00000000.00000000

nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
/16 255.255.0.0 65,534
11111111.11111111.00000000.00000000

nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 254
11111111.11111111.11111111.00000000
Subnet within an Octet Boundary
• Refer to the table to see six ways to subnet a /24 network.
# of hosts
Subnet Mask in Binary # of subnets 2h – 2
Prefix Length Subnet Mask
(n = network, h = host) 2n (h = # of host
bits)
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 2 126
11111111.11111111.11111111.10000000

nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 4 62
11111111.11111111.11111111.11000000

nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 8 30
11111111.11111111.11111111.11100000

nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 16 14
11111111.11111111.11111111.11110000

nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 32 6
11111111.11111111.11111111.11111000

nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 64 2
11111111.11111111.11111111.11111100
Create Subnets with a Slash 16 prefix
Prefix Length Subnet Mask Network Address (n = network, h = host) # of subnets # of hosts
nnnnnnnn.nnnnnnnn.nhhhhhhh.hhhhhhhh
/17 255.255.128.0 2 32766
11111111.11111111.10000000.00000000
nnnnnnnn.nnnnnnnn.nnhhhhhh.hhhhhhhh
/18 255.255.192.0 4 16382
11111111.11111111.11000000.00000000
nnnnnnnn.nnnnnnnn.nnnhhhhh.hhhhhhhh
/19 255.255.224.0 8 8190
11111111.11111111.11100000.00000000
nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
/20 255.255.240.0 16 4094
11111111.11111111.11110000.00000000
nnnnnnnn.nnnnnnnn.nnnnnhhh.hhhhhhhh
/21 255.255.248.0 32 2046
11111111.11111111.11111000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnhh.hhhhhhhh
/22 255.255.252.0 64 1022
11111111.11111111.11111100.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnh.hhhhhhhh
/23 255.255.254.0 128 510
11111111.11111111.11111110.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 256 254
11111111.11111111.11111111.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 512 126
11111111.11111111.11111111.10000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 1024 62
11111111.11111111.11111111.11000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 2048 30
11111111.11111111.11111111.11100000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 4096 14
11111111.11111111.11111111.11110000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 8192 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 16384 2
11111111.11111111.11111111.11111100
Subnetting Process
When calculating subnets, the following process should be used. Each step of the process will
be described in detail.

1. Determine the assigned IP address space


2. Determine the number of subnets required for each department in the organization based
on the existing network design and structure.
3. Based on the class of the IP address space and the number of required subnets,
determine how many host bits need to be borrowed. Also, determine how many hosts
each subnet can support
4. Calculate the decimal value and prefix value of the new subnet mask
5. Calculate each subnet's network address, broadcast address, and IP range using the
assigned IP address and subnet mask.
6. Assign IP addresses to all devices, including router interfaces that are connected to that
subnet
Possible Number of Subnets
To calculate the number of possible subnets, use the formula 2n where n equals the
number of host bits borrowed
For example, if 3 host bits are borrowed, then n=3. 23= 8, so eight
subnets are possible if 3 host bits are borrowed.
Determine How Many Host Bits Need to be
Borrowed
• To complete the third step of the subnetting process, determine how many host
bits need to be borrowed and rewrite the formula as 2n > (number of required
subnets).
Ex- if the number of required subnets is 18, then write the formula as 2n > 18

• Solve for n by getting as close to the number of required subnets as


possible without going under.

• In this example, n = 5 (25 = 32). This means that to create at least 18 subnets, 5
host bits must be borrowed
Subnet a Slash 16 and a Slash 8 Prefix
Create 100 Subnets with a Slash 16 prefix
Consider a large enterprise that requires at least
100 subnets and has chosen the private address
172.16.0.0/16 as its internal network address.

• The figure displays the number of subnets that


can be created when borrowing bits from the
third and fourth octets.
• Notice there are now up to 14 host bits that can
be borrowed (i.e., the last two bits cannot be
borrowed).

To satisfy the requirement of 100 subnets for the


enterprise, 7 bits (i.e., 27 = 128 subnets) would
need to be borrowed (for a total of 128 subnets).
Exercise
• You have been assigned the IP address 192.168.100.0/24 for a new network. Design a
subnetting scheme to accommodate 03 subnets with the following requirements:
I. Network address
• Subnet A: 60 hosts
II. Subnet mask
• Subnet B: 30 hosts
III. Usable IP range
• Subnet C: 12 hosts
IV. Broadcast address

• The number of Internet users for each branch is mentioned below. Take the IP block as
172.16.0.0/24 and cater the IP address requirement.
• Branch 1: 6000
• Branch 2: 4000 I. Network address
• Branch 3: 300 II. Subnet mask
• Branch 4: 2000 III. Usable IP range
• Branch 5: 1000 IV. Broadcast address
• Branch 6: 3000
VLSM
IPv4 Address Conservation
Given the topology, 7 subnets are required (i.e, four LANs and three WAN links) and
the largest number of host is in Building D with 28 hosts.

• A /27 mask would provide 8 subnets of 30 host IP addresses and therefore


support this topology.
IPv4 Address Conservation (Cont.)
The point-to-point WAN links only require two addresses and
therefore waste 28 addresses each for a total of 84 unused
addresses.

• Applying a traditional subnetting scheme to this scenario is inefficient and


wasteful.

• VLSM was developed to avoid wasting addresses by enabling us to


subnet a subnet.
VLSM
• The left side displays the traditional subnetting
scheme while the right side illustrates how VLSM
can be used to subnet a subnet and divide the
last subnet into eight /30 subnets.

• When using VLSM, always begin by satisfying


the host requirements of the largest subnet
and continue subnetting until the host
requirements of the smallest subnet are satisfied.

• The resulting topology with VLSM applied.


VLSM Topology Address Assignment
• Using VLSM subnets, the LAN and inter-router networks can be
addressed without unnecessary waste, as shown in the logical topology
diagram.
Exercise
You have been assigned the IP address 192.168.100.0/24 for a new
network. Design a subnetting scheme to accommodate 03 subnets with the
following requirements:

Subnet A: 60 hosts
Subnet B: 30 hosts
Subnet C: 12 hosts
Provide the following details for each subnet:
I. Network address
II. Subnet mask
III. Usable IP range
IV. Broadcast address
Subnet A:

Network address: 192.168.100.0


Subnet mask: 255.255.255.192 (/26)
Usable IP range: 192.168.100.1 to 192.168.100.62
Broadcast address: 192.168.100.63

Subnet B:

Network address: 192.168.100.64


Subnet mask: 255.255.255.224 (/27)
Usable IP range: 192.168.100.65 to 192.168.100.94
Broadcast address: 192.168.100.95
Subnet C:

Network address: 192.168.100.96


Subnet mask: 255.255.255.240 (/28)
Usable IP range: 192.168.100.97 to 192.168.100.110
Broadcast address: 192.168.100.111

Explanation:

Subnet A requires at least 60 hosts, so a /26 subnet is used.


Subnet B requires at least 30 hosts, so a /27 subnet is used.
Subnet C requires at least 12 hosts, so a /28 subnet is used.
Each subnet has a range of usable IP addresses determined by
subtracting 2 from the total addresses in the subnet. The first address is
reserved as the subnet address, and the last address is reserved as the
broadcast address. The remaining addresses are available for hosts.
IPv6 Addressing
IPv6 Address Representation
▪ 128 bits in length and written as a string of hexadecimal values
▪ 4 bits represent a single hexadecimal digit, 32 hexadecimal value =
IPv6 address

2001:0DB8:0000:1111:0000:0000:0000:0200
FE80:0000:0000:0000:0123:4567:89AB:CDEF

▪ Hextet used to refer to a segment of 16 bits or four hexadecimal


▪ Can be written in either lowercase or uppercase
IPv6 Address Representation (cont.)
Rule 1- Omitting Leading 0s
▪ The first rule to reduce the notation of IPv6 addresses is to omit any
leading 0s in any 16-bit section or hextet.
▪ 01AB can be represented as 1AB.
▪ 09F0 can be represented as 9F0.
▪ 0A00 can be represented as A00.
▪ 00AB can be represented as AB.
Rule 2 - Omitting All 0 Segments

▪ A contiguous string of one or more 16-bit segments of all 0's can be


replaced with a double colon (::).

▪ Double colon (::) can only be used once within an address otherwise
the address will be ambiguous.

▪ Known as the compressed format.

▪ Incorrect address - 2001:0DB8::ABCD::1234.


Rule 2 - Omitting All 0 Segments (cont.)
Example #1

Example #2
IPv6 Prefix Length
▪ IPv6 does not use the dotted-decimal subnet mask notation
▪ Prefix length indicates the network portion of an IPv6 address
using the following format:
▪ IPv6 address/prefix length
▪ Prefix length can range from 0 to 128
▪ Typical prefix length is /64
Static Configuration of a Global Unicast
Address
Static Configuration of an IPv6 Global Unicast Address
(cont.)

Windows
IPv6
Setup
Dynamic Configuration of a Global Unicast Address using
SLAAC

Stateless Address Autoconfiguration (SLAAC)


▪ A method that allows a device to obtain its prefix, prefix length and default
gateway from an IPv6 router
▪ No DHCPv6 server needed
▪ Rely on ICMPv6 Router Advertisement (RA) messages

IPv6 routers
▪ Forwards IPv6 packets between networks
▪ Can be configured with static routes or a dynamic IPv6 routing protocol
▪ Sends ICMPv6 RA messages
Dynamic Configuration of a Global Unicast Address using
SLAAC (cont.)

▪ The IPv6 unicast-routing command enables IPv6 routing.


▪ RA message can contain one of the following three options:
▪ SLAAC Only – Uses the information contained in the RA message.
▪ SLAAC and DHCPv6 – Uses the information contained in the RA message and gets
other information from the DHCPv6 server, stateless DHCPv6 (for example, DNS).
▪ DHCPv6 only – The device should not use the information in the RA, stateful DHCPv6.
▪ Routers send ICMPv6 RA messages using the link-local address as the source IPv6
address
Questions?
Thank You

You might also like