CS计算机代考程序代写 flex Chapter 10

Chapter 10

IFN507 Lecture 4
Subnetting and Supernetting

Subnet #1:
193.2.1.0/26

Subnet #2:
193.2.1.64/26

Subnet #3:
193.2.1.128/26

Subnet #4:
193.2.1.192/26

1

Outline
IPv4 subnetting
What is subnetting
Why subnetting is required?
How is subnetting calculated
What are the rules in subnetting
Supernetting
What is subnetting
Why subnetting is required?
How is subnetting calculated
Classless Interdomain Routing (CIDR)

2

Subnetting

Subnetting
Splitting up an address range into a group of smaller networks
End result is multiple smaller sub-networks

4

Subnetting (continued)
Purposes of subnetting
To enable the reduction and management of broadcast domains
To reduce congestion by allowing fewer devices in a subnet
To divide a network into logical subnets
Departments/divisions
Staff/visitors
To support different network technologies
Ethernet/WiFi/…
To support WAN by allowing geographically separated LANS to use a single network ID
131.181.0.0/16 = 131.181.0.0/24+131.181.1.0/24+…

5

Subnetting (continued)
Sometimes you have a large number of IP addresses to manage
Break the host ID portion of the address into a subnet ID and host ID

Network portion Host portion

subnetting
6

Subnetting (continued)

subnetting
Example – subnet mask 255.255.255.0 applied to a class B address will break the host ID (normally 16 bits) into an 8-bit subnet ID and an 8-bit host ID

11111111
11111111
00000000
11111111
Network portion
Host portion

7

Changes from two level address structure to three level address structure
External networks do not know about subnet/host ID details
They only see a single network
User-definable subnet/host ID boundary
Subnetting (continued)
Host ID
becomes

Network ID
Network ID
Subnet ID
Host ID
8

With Subnetting – 4 subnets required
Subnetting (continued)
Without Subnetting
193. 2. 1 . 0
Netid
Network access Hostid
Host access

193 2 1 0–63 64-127
128-191
192-254

9

The network is seen: 193.2.1.0
As a whole network EXTERNALLY
Subnetting (continued)

subnet:
193.2.1.0/26

subnet:
193.2.1.64/26

subnet:
193.2.1.128/26

subnet:
193.2.1.192/26
0-63
64-127
128-191
192-255
10

Subnetting (continued)
What address class is this given address?
Class A, B or C?
What is the subnet mask?
What are the subnet addresses?
Subnets 1, 2, 3 and 4
How many valid IP addresses in a subnet?

11

Calculating a Subnet Mask
To decide how to derive the subnet mask:
Decide how many subnets you need
Decide how many bits you need to meet or exceed the number of required subnets
Use the formula 2n, with n representing the number of bits you must add to the starting subnet mask
Borrow bits from the top of the host portion of the address down
Ensure that you have enough host bits available to assign to computers on each subnet (2n-2)
12

12

Calculating a Subnet Mask (continued)
When you create non-default subnet masks you are borrowing two or more host bits and asking IP to interpret them as network bits.
Example:
Creating 4 subnets in a class C address and figuring out the subnet mask value.
4 = 22
13

Calculating a Subnet Mask (continued)
STEP1:
Initial class C address – 24 bits network ID, 8 bits host ID

STEP2:
Subnetted address 24 bits network ID, 2 bits subnet ID and 6 bits host ID  4 subnets each with 62 (2^6-2) hosts

STEP3:
we would apply the mask 255.255.255.192 or
11111111 11111111 11111111 11000000 to identify the subnet

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 0 0 0 0 0 0

1 1 1 1 1 1 1 1

Subnet Part
Subnet Part
14

Subnetting rules
Valid IP addresses in a subnet
Host bits cannot be all 0s  subnet ID
Host bits cannot be all 1s  broadcast address
Broadcasts are used to send packets to all hosts within the subnet
15

Subnet addresses
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
Network Portion
Host Part
Subnet

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

0
1
0
0
0
0
0
0

1
0
0
0
0
0
0
0

1
1
0
0
0
0
0
0

0
64
128
192
193
2
1
1
1
0
0
0
0
0
1
Network Portion

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

1
1
0
0
0
0
0
1
Network Portion

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

1
1
0
0
0
0
0
1
Network Portion

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

193
2
1
193
2
1
193
2
1
16

0
Valid IP addresses in Subnet#1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
Network Portion
Host Part
Subnet

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

193
2
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
2
3
4
62
63

17

64
65
66
67
68
126
127
64
Valid IP addresses in Subnet#2
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
Network Portion
Host Part
Subnet

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

193
2
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

18

128
129
130
131
132
190
191
128
Valid IP addresses in Subnet#3
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
Network Portion
Host Part
Subnet

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

193
2
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

19

192
193
194
195
196
254
255
192
Valid IP addresses in Subnet#4
1
1
0
0
0
0
0
1
1
1
0
0
0
0
0
0
Network Portion
Host Part
Subnet

0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

193
2
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1

20

Subnetting Example
Your ISP has allocated a block of addresses 193.64.33.0/24. Your organization needs to have 8 subnets for its structure.
You need to work out:
The subnet mask
The 8 subnets
The valid IP addresses for each subnet

8>=23
0
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

Network portion (24 bits)
1
1
1
Subnet
Portion
(3 bits)

21

Another Subnetting Example (continued)
Your ISP has allocated a block of addresses 193.64.33.0/24. Your organization needs to have 8 subnets for its structure.
Figure out:
the subnet mask,
The 8 subnets
the host range each subnet

1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1

1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
0
0
0
1
1
32
64
96
128
160
192
224
193
64
33
22

“Subnet Pie”

23

Another Subnetting Example (continued)
Your ISP has allocated a block of addresses 193.64.33.0/24. Your organization needs to have 8 subnets for its structure.
Figure out:
the subnet mask,
the 8 subnets
the host range each subnet

1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1

1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
2
30
31
193
64
33
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
1
0
0
0
1
1

1 – 30
This subnet address
Broadcast address for this subnet
Subnet #1
24

Another Subnetting Example (continued)
Your ISP has allocated a block of addresses 193.64.33.0/24. Your organization needs to have 8 subnets for its structure.
Figure out:
the subnet mask,
The 8 subnets
the host range each subnet

1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
32
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
0
1
1

1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
1
1
193
64
33
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
1
1

33 – 62
This subnet address
Broadcast address for this subnet
33
34
62
63
Subnet # 2
25

VLSM (Variable Length Subnetting)
Most sites use the same subnet mask throughout
The subnet mask is 255.255.255.192

MASK 255.255.255.192
#2
#3
#4
#1
26

VLSM (Variable Length Subnetting) (cont.)
Suppose a class C address 212.5.5.0
We requires 3 subnets 60 hosts and 2 with 30 hosts
The solution is to subnet a subnet: by borrowing more bits from the host portion…

MASK 255.255.255.224
MASK 255.255.255.224

MASK 255.255.255.192
#2
#3
#4
#1

27

VLSM – Example
212.5.5.0
We require 3 subnets with 60hosts and 2 with 30 hosts.
Borrow 2 bits from the host portion
Gives 4 subnets (2 bits for subnet) with 60 hosts each (6 bits for host portion)
Further subnet one of the 4 subnets by borrowing an additional 1 bit from the host portion
28

Supernetting

Supernetting
It is also called Network summarisation
To combine a group of continuous subnets to form a single network
It is used for route aggregation to reduce the size of routing tables
A way of reducing the number of routes in the routing table
To consolidate continuous routes into a single route for route advertisement

30

Supernetting (continued)
Example 1
The network is seen 193.2.1.0/24 as a whole network EXTERNALLY
Subnet 193.2.1.0/25
Subnet 193.2.1.128/25
193.2.1.0/24
31

Supernetting (continued)
Example 2
The network is seen 193.2.1.0/24 as a whole network EXTERNALLY
Subnet 193.2.1.0/26
Subnet 193.2.1.64/26
Subnet 193.2.1.128/26
Subnet 193.2.1.192/26
193.2.1.0/24
32

Supernetting
Opposite of subnetting
“borrow” bits from the network portion
combine group of continuous network addresses to form a single larger network
Manipulate subnet (supernet) mask to form a supernet
Key lies in (supernet) mask:
Masks distinguish network bits from host bits
When mask is applied to any address in any of the NWs making up the supernet:
resultant NW address is the same (first network)
Routers need only know one address for entire supernet
Reduces load on Internet routers

33

“Borrowing” Bits for Supernetting
Supernetting involves borrowing network bits from left of default mask boundary
Subnetting involves borrowing host bits
34

Supernet – Smaller Routing Table

210.78.168.0
210.78.169.0
210.78.170.0
210.78.171.0
210.78.172.0
210.78.173.0
210.78.174.0
210.78.175.0
255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0
255.255.255.0
210.78.168.1
210.78.168.1
210.78.168.1
210.78.168.1
210.78.168.1
210.78.168.1
210.78.168.1
210.78.168.1

Routing table for Router B

210.78.168.0 255.255.248.0 210.78.168.1
Routing table for Router B
Before supernetting
After supernetting

35

ISP
Destination Network Next hop
200.0.0.0/24 Directly Connected
192.0.0.0/24 200.0.0.1
192.0.1.0/24 200.0.0.1
192.0.2.0/24 200.0.0.1
192.0.3.0/24 200.0.0.1

Supernetting (continued)
ISP
Destination Network Next hop
200.0.0.0/24 Directly Connected
192.0.0.0/22 =
(192.0.0.0/24+192.0.1.0/24+
192.0.2.0/24+192.0.3.0/24) 200.0.0.1

The network 193.0.0.0/22 is seen as a whole network externally
36

Supernetting (continued)
Benefits of supernetting
To minimize the latency in a complex network structure
To reduce the overhead for routing process, since the reduced number of route entries in the routing table
To improve network stability by reducing or eliminating unnecessary routing updates after part of the network undergoes a change in topology
To reduce processor workloads, memory requirements and bandwidth demand

37

Supernetting (continued)
“Borrow” bits form the network portion
Manipulate the network mask to form a supernetwork
The key lies in the network mask
The mask distinguish network bits from host portion
When mask is applied to any the networks making up the supernetwork
Resultant network address is the same

38

Implementing Supernetting
Identify the number of networks to aggregate
Determine number of bits to borrow from network portion
Define the mask
Example:
Assume a mid size organization requires 1000 addresses.
How many C class addresses are required?
What is the subnet mask?
39

Solution
1000 addresses would normally require a Class B network
Instead a range of 4 C class addresses is allocated and supernetted so the organisation can be reached through a single NW address
Each class C address has 254 host addresses
4 networks = 2 n => n = 2
So 2 bits are borrowed from network portion
So mask is:
11111111.11111111.11111100.00000000
255.255.252.0
40

Example Continued
Suppose the 4 class C addresses allocated to our organisation are:
212.5.4.0 = 11010100.00000101.00000100.00000000
212.5.5.0 = 11010100.00000101.00000101.00000000
212.5.6.0 = 11010100.00000101.00000110.00000000
212.5.7.0 = 11010100.00000101.00000111.00000000

Applying the mask 255.255.252.0 to an address in any of these networks will then resolve to 212.5.4.0
The bits borrowed for the supernet are masked off with the host bits leaving the id of the first network only
41

41

To verify the network ID with the mask
IP address 212 5 6 12
Binary 11010100 00000101 00000110 00001100
Supernet mask 11111111 11111111 11111100 00000000
AND Result 11010100 00000101 00000100 00000000
Decimal 212 5 4 0

42

CIDR
Classless InterDomain Routing

Classless Interdomain Routing (CIDR)
Addressing by class has been superseded by a more flexible addressing method
Classless Interdomain Routing (CIDR)
The network and host demarcation can be made with any number of bits from beginning of address
E.g. a Class C address’s network section is 24 bits
Using CIDR, an address registry can assign an address with a network section of 26 bits
193.2.1.0/24 =
193.2.1.0/26 + 193.2.1.64/26 + 193.2.1.128/26 + 193.2.1.192/26
Subnetting divides network address in two or more subnetwork addresses (with fewer host IDs for each)
44

44

Classless Interdomain Routing (CIDR)
Example:
Instead of applying for two Class C addresses, a company could contact an ISP, which would lease 500 IP addresses to the company
The addresses are not identified by any class – they are simply a contiguous block of IP addresses
193.2.0.0/23 = 193.2.0.0/24 + 193.2.1.0/24
Classless addressing has led to a much more efficient allocation of the IP address space

45

Subnetting vs. Supernetting
The process of dividing a network into a group of smaller networks
To enable the reduction and management of broadcast domains
Host bits are borrowed to be used as a subnet ID
Manipulate the network mask to divide a network into subnets

The process of combining a group of continuous network addresses to form a single network
To reduce the number of entries in a routing table to simplify the routing process
Network bits are borrowed to be used as the host ID
Manipulate the network mask to form a supernetwork

46

IP addressing references
Greg Tomsho, Guide to Networking Essentials, 7th Edition
Chapter 6 IP Addressing
IP Addressing and Subnetting for New Users
https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13788-3.html
TCP/IP Fundamentals for Windows (Chapter 3: IP Addressing)
http://technet.microsoft.com/en-us/library/bb726995.aspx
47

Lecture 5 Routing

A

B

C
Application
Presentation
Session
Transport
Network
Data Link
Physical
Network
Data Link
Physical
Network
Data Link
Physical
Network
Data Link
Physical
Application
Presentation
Session
Transport
Network
Data Link
Physical

/docProps/thumbnail.jpeg