0% found this document useful (0 votes)
4 views27 pages

Week 8-9

The document discusses Variable Length Subnet Masking (VLSM) and Classless Addressing, emphasizing their efficiency in IP address allocation compared to traditional classful addressing. It also covers Network Address Translation (NAT) and Port Address Translation (PAT) as solutions for IP address scarcity, alongside an introduction to IPv6 addressing, which offers a more extensive address space. The document concludes with details on IPv6 tunneling to ensure compatibility with existing IPv4 infrastructure.
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)
4 views27 pages

Week 8-9

The document discusses Variable Length Subnet Masking (VLSM) and Classless Addressing, emphasizing their efficiency in IP address allocation compared to traditional classful addressing. It also covers Network Address Translation (NAT) and Port Address Translation (PAT) as solutions for IP address scarcity, alongside an introduction to IPv6 addressing, which offers a more extensive address space. The document concludes with details on IPv6 tunneling to ensure compatibility with existing IPv4 infrastructure.
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/ 27

SWE-306

Computer Communication &


Networks (CC&N)
Internet Layer:
VLSM & IPv6 Addressing
(Week 8 Lecture)

1
Variable sized subnets
Variable Sized Subnets
• Variable-length subnet mask
(VLSM) provides more
efficient use of addresses. 30 hosts

• VLSM allows a network space


14 hosts
to be divided in unequal
30 hosts
parts. 14 hosts

• Subnet mask varies,


30 hosts 30 hosts
depending on how many bits
have been borrowed for a
particular subnet. 30 hosts 30 hosts

2
Classless Addressing

• Problem with classful addresses


– wastage due fix blocks of addresses
• Solution: Classless addressing
– Variable length address blocks
– No classes
• Classful addressing is almost obsolete and
replaced with classless addressing.

3
Classless address blocks
• An entity is granted a block (range) of addresses
• The size of the block (the number of addresses) varies
based on the nature and size of the entity
• Restrictions:
1. The addresses in a block must be contiguous, one after
another.
2. The number of addresses in a block must be a power of 2
(1, 2, 4, 8, ... ).
3. The first address must be evenly divisible by the number of
addresses.

4
Mask in Classless Addressing
• In IPv4 addressing, a block of addresses can be
defined as x.y.z.t/n in which x.y.z.t defines one of the
addresses and the /n defines the mask.
• The address and the /n notation completely define
the whole block (the first address, the last address,
and the number of addresses).
• The first address in the block can be found by setting
the rightmost 32-n bits to 0s.

5
Subnetted
Network

6
Subnets and Addresses

Nets 7 – 13 not shown


14
15

7
Example 1
A block of addresses is granted to a small
organization. We know that one of the addresses is
205.16.37.39/28. What is the first address in the
block?
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
8
Example 2
• An ISP is granted a block of addresses starting with
190.100.0.0/16 The ISP needs to distribute these addresses to
three groups of customers as follows:
a) 1st group has 64 customers; each needs 256 addresses.
b) 2nd group has 128 customers; each needs 128 addrs.
c) 3rd group has 128 customers; each needs 64 addresses.

• Design the subblocks and find out how many addresses are still
available after these allocations.

9
Example 2

10
Network Address Translation
• IP addresses are scarce.
• The long-term solution is for the whole Internet to migrate
to IPv6
– 128-bit addresses
• The quick fix is NAT (Network Address Translation)
– described in RFC 3022
• Assign each company a single IP address (or at most, a small
number of them) for Internet traffic.
• Within the company, every computer gets a unique IP address
(private)
• When a packet exits the company and goes to the Internet, an
address translation takes place.
– (private -> global)

11
Private addresses

• 172.16.0.0 – 172.31.255.255: 172.16.0.0/12


– Where does the /12 come from?
12 bits in common
10101100 . 00010000 . 00000000 . 00000000 – 172.16.0.0
10101100 . 00011111 . 11111111 . 11111111 – 172.31.255.255
-------------------------------------------------------------
10101100 . 00010000 . 00000000 . 00000000 – 172.16.0.0/12
12
NAT
• Private network uses private addresses
• NAT router translates private addresses to global address
• The private network is transparent to the rest of the Internet

13
Translation table

14
NAT
• Using one IP address
– 1 private host can access an external host at a time
• Using a pool of IP addresses
– N global addresses = N private hosts can access same
external host at a time
• Using both IP addresses and port numbers
– many private hosts can access many external host at a
time

15
PAT – Port Address Translation

• PAT (Port Address Translation) allows you to use a single Public IP


address and assign it up to 65,536 inside hosts (4,000 is more realistic).
• PAT translates and records the TCP/UDP port address to track inside
Host addresses.
• Also known as Network Address and Port Translation (NAPT) and NAT
Overloading.

16
PAT Example

NAT/PAT table
maintains translation
of: DA, SA, SP

DA SA DP SP DA SA DP SP

128.23.2.2 10.0.0.3 80 1331 Data 128.23.2.2 179.9.8.80 80 3333 Data

IP Header TCP/UDP IP Header TCP/UDP


1 Header 2 Header

DA SA DP SP DA SA DP SP

128.23.2.2 10.0.0.2 80 1555 Data 128.23.2.2 179.9.8.80 80 2222 Data

IP Header TCP/UDP IP Header TCP/UDP


1 Header 2 Header
17
PAT – Port Address Translation

• With PAT multiple private IP addresses can be translated by a single public


address (many-to-one translation).
• This solves the limitation of NAT which is one-to-one translation.

18
IPv6 Addresses

19
IPv6 Addressing - 3 Types

1. Unicast

2. Anycast

3. Multicast
IPv6
1. Inevitability
2. Efficiency
3. Security

• Despite all short-term solutions (e.g. NAT/PAT),


address depletion is still a problem for the
Internet.
• This and other problems in the IP protocol
itself have been the motivation for designing
IPv6.
IPv6 Addresses
• 128 bits long
• assigned to interface
• single interface may have multiple unicast addresses
• three types of addresses:
• An IPv6 address is 128 bits long
• It is usually presented in hexadecimal colon notation

IPv6 address structure

22
Abbreviated IPv6 addresses

Type prefixes for


IPv6 addresses

23
Multicast address in IPv6

24
Reserved addresses in IPv6

Local addresses in IPv6

25
IPv6 Tunnelling: Dual Environments
• Packets travelling on the Internet will
meet routers that are not IPv6
capable
• To ensure compatibility IETF created
IPv6 over IPv4 Tunneling
IPv6 Tunnelling: Dual Environments
• To determine which protocol to use a router will use DNS records

If IPv4 DNS database record is:


www.senecacollege.ca. IN A 142.204.0.0
If IPv6 address, DNS database record is::
www.senecacollege.ca. IN AAAA FE80:DC28:ffff::1234

If multiple IPv4/v6 addresses, IPv6 addresses will be tried first, and then
IPv4 addresses will be tried.

• Connecting to FE80:DC28:ffff::1234, then

www.senecacollege.ca IN AAAA FE80:DC28:ffff::1234


www.senecacollege.ca IN AAAA FE80:DC28:ffff::5678
www.senecacollege.ca IN A 142.204.0.0

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy