SlideShare a Scribd company logo
CChhaapptteerr 55 
IIPP AAddddrreesssseess:: 
CCllaasssslleessss AAddddrreessssiinngg 
Objectives 
Upon completion you will be able to: 
• Understand the concept of classless addressing 
• Be able to find the first and last address given an IP address 
• Be able to find the network address given a classless IP address 
• Be able to create subnets from a block of classless IP addresses 
• Understand address allocation and address aggregation 
TCP/IP Protocol Suite 1
5.1 VARIABLE-LENGTH BLOCKS 
a In classless addressing variable-length blocks arree aassssiiggnneedd tthhaatt bbeelloonngg 
ttoo nnoo ccllaassss.. IInn tthhiiss aarrcchhiitteeccttuurree,, tthhee eennttiirree aaddddrreessss ssppaaccee ((22^^3322 
aaddddrreesssseess)) iiss ddiivviiddeedd iinnttoo bblloocckkss ooff ddiiffffeerreenntt ssiizzeess.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
RReessttrriiccttiioonnss 
FFiinnddiinngg tthhee BBlloocckk 
GGrraanntteedd BBlloocckk 
TCP/IP Protocol Suite 2
Figure 5.1 Variable-length blocks 
TCP/IP Protocol Suite 3
ExamplE 1 
Which of the following can be the beginning address 
of a block that contains 16 addresses? 
a. 205.16.37.32 b.190.16.42.44 
c. 17.17.33.80 d.123.45.24.52 
Solution 
Only two are eligible (a and c). The address 
205.16.37.32 is eligible because 32 is divisible by 16. 
The address 17.17.33.80 is eligible because 80 is 
divisible by 16. 
TCP/IP Protocol Suite 4
ExamplE 2 
Which of the following can be the beginning address 
of a block that contains 256 addresses? 
a.205.16.37.32 b.190.16.42.0 
c.17.17.32.0 d.123.45.24.52 
Solution 
In this case, the right-most byte must be 0. As we 
mentioned in Chapter 4, the IP addresses use base 
256 arithmetic. When the right-most byte is 0, the 
total address is divisible by 256. Only two addresses 
are eligible (b and c). 
TCP/IP Protocol Suite 5
ExamplE 3 
Which of the following can be the beginning address 
of a block that contains 1024 addresses? 
a. 205.16.37.32 b.190.16.42.0 
c. 17.17.32.0 d.123.45.24.52 
Solution 
In this case, we need to check two bytes because 
1024 = 4 × 256. The right-most byte must be divisible 
by 256. The second byte (from the right) must be 
divisible by 4. Only one address is eligible (c). 
TCP/IP Protocol Suite 6
Figure 5.2 Format of classless addressing address 
TCP/IP Protocol Suite 7
TTaabbllee 55..11 PPrreeffiixx lleennggtthhss 
TCP/IP Protocol Suite 8
NNoottee:: 
Classful addressing is a special case of 
classless addressing. 
TCP/IP Protocol Suite 9
ExamplE 4 
What is the first address in the block if one of the 
addresses is 167.199.170.82/27? 
Solution 
The prefix length is 27, which means that we must 
keep the first 27 bits as is and change the remaining 
bits (5) to 0s. The following shows the process: 
Address in binary: 10100111 11000111 10101010 01010010 
Keep the left 27 bits: 10100111 11000111 10101010 01000000 
Result in CIDR notation: 167.199.170.64/27 
TCP/IP Protocol Suite 10
ExamplE 5 
What is the first address in the block if one of the 
addresses is 140.120.84.24/20? 
Solution 
Figure 5.3 shows the solution. The first, second, and 
fourth bytes are easy; for the third byte we keep the 
bits corresponding to the number of 1s in that group. 
The first address is 140.120.80.0/20. 
See Next Slide 
TCP/IP Protocol Suite 11
Figure 5.3 Example 5 
TCP/IP Protocol Suite 12
ExamplE 6 
Find the first address in the block if one of the 
addresses is 140.120.84.24/20. 
Solution 
The first, second, and fourth bytes are as defined in 
the previous example. To find the third byte, we write 
84 as the sum of powers of 2 and select only the 
leftmost 4 (m is 4) as shown in Figure 5.4. The first 
address is 140.120.80.0/20. 
See Next Slide 
TCP/IP Protocol Suite 13
Figure 5.4 Example 6 
TCP/IP Protocol Suite 14
ExamplE 7 
Find the number of addresses in the block if one of 
the addresses is 140.120.84.24/20. 
Solution 
The prefix length is 20. The number of addresses in 
the block is 232−20 or 212 or 4096. Note that 
this is a large block with 4096 addresses. 
TCP/IP Protocol Suite 15
ExamplE 8 
Using the first method, find the last address in the 
block if one of the addresses is 140.120.84.24/20. 
Solution 
We found in the previous examples that the first 
address is 140.120.80.0/20 and the number of 
addresses is 4096. To find the last address, we need to 
add 4095 (4096 − 1) to the first address. 
See Next Slide 
TCP/IP Protocol Suite 16
ExamplE 8 (Continued) 
To keep the format in dotted-decimal notation, we 
need to represent 4095 in base 256 (see Appendix B) 
and do the calculation in base 256. We write 4095 as 
15.255. We then add the first address to this number 
(in base 255) to obtain the last address as shown 
below: 
140 . 120 . 80 . 0 
15 . 255 
------------------------- 
140 . 120 . 95 . 255 
The last address is 140.120.95.255/20. 
TCP/IP Protocol Suite 17
ExamplE 9 
Using the second method, find the last address in the 
block if one of the addresses is 140.120.84.24/20. 
Solution 
The mask has twenty 1s and twelve 0s. The 
complement of the mask has twenty 0s and twelve 1s. 
In other words, the mask complement is 
00000000 00000000 00001111 11111111 
or 0.0.15.255. We add the mask complement to the 
beginning address to find the last address. 
See Next Slide 
TCP/IP Protocol Suite 18
ExamplE 9 (Continued) 
We add the mask complement to the beginning 
address to find the last address. 
140 . 120 . 80 . 0 
0 . 0 . 15 . 255 
---------------------------- 
140 . 120 . 95 . 255 
The last address is 140.120.95.255/20. 
TCP/IP Protocol Suite 19
ExamplE 
10 
Find the block if one of the addresses is 
190.87.140.202/29. 
Solution 
We follow the procedure in the previous examples to 
find the first address, the number of addresses, and 
the last address. To find the first address, we notice 
that the mask (/29) has five 1s in the last byte. So we 
write the last byte as powers of 2 and retain only the 
leftmost five as shown below: 
See Next Slide 
TCP/IP Protocol Suite 20
ExamplE 10 (Continued) 
202 ➡ 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 
The leftmost 5 numbers are ➡ 128 + 64 + 0 + 0 + 8 
The first address is 190.87.140.200/29 
The number of addresses is 232−29 or 8. To find the last address, 
we use the complement of the mask. The mask has twenty-nine 
1s; the complement has three 1s. The complement is 0.0.0.7. If 
we add this to the first address, we get 190.87.140.207/29. In 
other words, the first address is 190.87.140.200/29, the last 
address is 190.87.140.207/29. There are only 8 addresses in 
this block. 
TCP/IP Protocol Suite 21
ExamplE 
11 
Show a network configuration for the block in the previous 
example. 
Solution 
The organization that is granted the block in the previous 
example can assign the addresses in the block to the hosts in its 
network. However, the first address needs to be used as the 
network address and the last address is kept as a special 
address (limited broadcast address). Figure 5.5 shows how the 
block can be used by an organization. Note that the last 
address ends with 207, which is different from the 255 seen in 
classful addressing. 
See Next Slide 
TCP/IP Protocol Suite 22
Figure 5.5 Example 11 
TCP/IP Protocol Suite 23
NNoottee:: 
In classless addressing, the last 
address in the block does not 
necessarily end in 255. 
TCP/IP Protocol Suite 24
NNoottee:: 
In CIDR notation, the block granted is 
defined by the first address and the 
prefix length. 
TCP/IP Protocol Suite 25
5.2 SUBNETTING 
When an organization is granted a block ooff aaddddrreesssseess,, iitt ccaann ccrreeaattee 
ssuubbnneettss ttoo mmeeeett iittss nneeeeddss.. TThhee pprreeffiixx lleennggtthh iinnccrreeaasseess ttoo ddeeffiinnee tthhee 
ssuubbnneett pprreeffiixx lleennggtthh.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
FFiinnddiinngg tthhee SSuubbnneett MMaasskk 
FFiinnddiinngg tthhee SSuubbnneett AAddddrreesssseess 
VVaarriiaabbllee--LLeennggtthh SSuubbnneettss 
TCP/IP Protocol Suite 26
NNoottee:: 
In fixed-length subnetting, the number 
of subnets is a power of 2. 
TCP/IP Protocol Suite 27
ExamplE 
12 
An organization is granted the block 130.34.12.64/26. 
The organization needs 4 subnets. What is the subnet 
prefix length? 
Solution 
We need 4 subnets, which means we need to add two 
more 1s (log2 4 = 2) to the site prefix. The subnet 
prefix is then /28. 
TCP/IP Protocol Suite 28
ExamplE 
13 
What are the subnet addresses and the range of 
addresses for each subnet in the previous example? 
Solution 
Figure 5.6 shows one configuration. 
See Next Slide 
TCP/IP Protocol Suite 29
Figure 5.6 Example 13 
TCP/IP Protocol Suite 30
ExamplE 13 (ContinuEd) 
The site has 232−26 = 64 addresses. Each subnet has 
232–28 = 16 addresses. Now let us find the first and last 
address in each subnet. 
1. The first address in the first subnet is 130.34.12.64/28, 
using the procedure we showed in the previous examples. 
Note that the first address of the first subnet is the first 
address of the block. The last address of the subnet can 
be found by adding 15 (16 −1) to the first address. The 
last address is 130.34.12.79/28. 
See Next Slide 
TCP/IP Protocol Suite 31
ExamplE 13 (ContinuEd) 
2.The first address in the second subnet is 
130.34.12.80/28; it is found by adding 1 to the last 
address of the previous subnet. Again adding 15 to 
the first address, we obtain the last address, 
130.34.12.95/28. 
3. Similarly, we find the first address of the third 
subnet to be 130.34.12.96/28 and the last to be 
130.34.12.111/28. 
4. Similarly, we find the first address of the fourth 
subnet to be 130.34.12.112/28 and the last to be 
130.34.12.127/28. 
TCP/IP Protocol Suite 32
ExamplE 
14 
An organization is granted a block of addresses with the 
beginning address 14.24.74.0/24. There are 232−24= 256 
addresses in this block. The organization needs to have 11 
subnets as shown below: 
a. two subnets, each with 64 addresses. 
b. two subnets, each with 32 addresses. 
c. three subnets, each with 16 addresses. 
d. four subnets, each with 4 addresses. 
Design the subnets. 
See Next Slide For One Solution 
TCP/IP Protocol Suite 33
Figure 5.7 Example 14 
TCP/IP Protocol Suite 34
ExamplE 14 (ContinutEd) 
1. We use the first 128 addresses for the first two 
subnets, each with 64 addresses. Note that the mask 
for each network is /26. The subnet address for each 
subnet is given in the figure. 
2. We use the next 64 addresses for the next two 
subnets, each with 32 addresses. Note that the mask 
for each network is /27. The subnet address for each 
subnet is given in the figure. 
See Next Slide 
TCP/IP Protocol Suite 35
ExamplE 14 (ContinutEd) 
3. We use the next 48 addresses for the next three 
subnets, each with 16 addresses. Note that the mask 
for each network is /28. The subnet address for each 
subnet is given in the figure. 
4. We use the last 16 addresses for the last four 
subnets, each with 4 addresses. Note that the mask for 
each network is /30. The subnet address for each 
subnet is given in the figure. 
TCP/IP Protocol Suite 36
ExamplE 
15 
As another example, assume a company has three 
offices: Central, East, and West. The Central office is 
connected to the East and West offices via private, 
point-to-point WAN lines. The company is granted a 
block of 64 addresses with the beginning address 
70.12.100.128/26. The management has decided to 
allocate 32 addresses for the Central office and 
divides the rest of addresses between the two offices. 
Figure 5.8 shows the configuration designed by the 
management. 
See Next Slide 
TCP/IP Protocol Suite 37
Figure 5.8 Example 15 
TCP/IP Protocol Suite 38
ExamplE 15 (ContinuEd) 
The company will have three subnets, one at Central, one at 
East, and one at West. The following lists the subblocks 
allocated for each network: 
a. The Central office uses the network address 
70.12.100.128/27. This is the first address, and the mask 
/27 shows that there are 32 addresses in this network. 
Note that three of these addresses are used for the 
routers and the company has reserved the last address 
in the sub-block. The addresses in this subnet are 
70.12.100.128/27 to 70.12.100.159/27. Note that the 
interface of the router that connects the Central subnet 
to the WAN needs no address because it is a point-to-point 
See Next Slide 
connection. 
TCP/IP Protocol Suite 39
ExamplE 15 (ContinuEd) 
b. The West office uses the network address 
70.12.100.160/28. The mask /28 shows that there are 
only 16 addresses in this network. Note that one of 
these addresses is used for the router and the company 
has reserved the last address in the sub-block. The 
addresses in this subnet are 70.12.100.160/28 to 
70.12.100.175/28. Note also that the interface of the 
router that connects the West subnet to the WAN needs 
no address because it is a point-to- point connection. 
See Next Slide 
TCP/IP Protocol Suite 40
ExamplE 15 (ContinuEd) 
c. The East office uses the network address 
70.12.100.176/28. The mask /28 shows that there are 
only 16 addresses in this network. Note that one of 
these addresses is used for the router and the company 
has reserved the last address in the sub-block. The 
addresses in. this subnet are 70.12.100.176/28 to 
70.12.100.191/28. Note also that the interface of the 
router that connects the East subnet to the WAN needs 
no address because it is a point-to-point connection. 
TCP/IP Protocol Suite 41
5.3 ADDRESS ALLOCATION 
Address allocation is the responsibility of a global aauutthhoorriittyy ccaalllleedd tthhee 
IInntteerrnneett CCoorrppoorraattiioonn ffoorr AAssssiiggnneedd NNaammeess aanndd AAddddrreesssseess ((IICCAANNNN)).. IItt 
uussuuaallllyy aassssiiggnnss aa llaarrggee bblloocckk ooff aaddddrreesssseess ttoo aann IISSPP ttoo bbee ddiissttrriibbuutteedd ttoo 
iittss IInntteerrnneett uusseerrss.. 
TCP/IP Protocol Suite 42
ExamplE 
16 
An ISP is granted a block of addresses starting with 
190.100.0.0/16 (65,536 addresses). The ISP needs to 
distribute these addresses to three groups of 
customers as follows: 
a. The first group has 64 customers; each needs 256 
addresses. 
b. The second group has 128 customers; each needs 128 
addresses 
c. The third group has 128 customers; each needs 64 
addresses. 
See Next Slide 
TCP/IP Protocol Suite 43
ExamplE 16 (ContinuEd) 
Design the subblocks and find out how many 
addresses are still available after these allocations. 
Solution 
Figure 5.9 shows the situation. 
See Next Slide 
TCP/IP Protocol Suite 44
Figure 5.9 Example 16 
TCP/IP Protocol Suite 45
ExamplE 16 (ContinuEd) 
Group 1 
For this group, each customer needs 256 addresses. 
This means the suffix length is 8 (28 =256). The prefix 
length is then 32 − 8 = 24. The addresses are: 
1st Customer 190.100.0.0/24 190.100.0.255/24 
2nd Customer 190.100.1.0/24 190.100.1.255/24 
. . . 
64th Customer 190.100.63.0/24 190.100.63.255/24 
Total = 64 × 256 = 16,384 
See Next Slide 
TCP/IP Protocol Suite 46
ExamplE 16 (ContinuEd) 
Group 2 
For this group, each customer needs 128 addresses. 
This means the suffix length is 7 (27 =128). The prefix 
length is then 32 − 7 = 25. The addresses are: 
1st Customer 190.100.64.0/25 190.100.64.127/25 
2nd Customer 190.100.64.128/25 190.100.64.255/25 
· · · 
128th Customer 190.100.127.128/25 190.100.127.255/25 
Total = 128 × 128 = 16,384 
See Next Slide 
TCP/IP Protocol Suite 47
ExamplE 16 (ContinuEd) 
Group 3 
For this group, each customer needs 64 addresses. 
This means the suffix length is 6 (26 = 64). The prefix 
length is then 32 − 6 = 26. The addresses are: 
1st Customer 190.100.128.0/26 190.100.128.63/26 
2nd Customer 190.100.128.64/26 190.100.128.127/26 
· · · 
128th Customer 190.100.159.192/26 190.100.159.255/26 
Total = 128 × 64 = 8,192 
See Next Slide 
TCP/IP Protocol Suite 48
ExamplE 16 (ContinuEd) 
Number of granted addresses to the ISP: 65,536 
Number of allocated addresses by the ISP: 40,960 
Number of available addresses: 24,576 
TCP/IP Protocol Suite 49

More Related Content

What's hot

OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)
Ann Joseph
 
Basic Block
Basic BlockBasic Block
Basic Block
Shiv1234567
 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
meenamunesh
 
Framing in data link layer
Framing in data link layerFraming in data link layer
Framing in data link layer
Ahtesham Ullah khan
 
CCNP Switching Chapter 1
CCNP Switching Chapter 1CCNP Switching Chapter 1
CCNP Switching Chapter 1
Chaing Ravuth
 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree Protocol
Arash Foroughi
 
Traffic profiles, congestion and network performance
Traffic profiles, congestion and network performanceTraffic profiles, congestion and network performance
Traffic profiles, congestion and network performance
Raj Parekh
 
Interrupts
InterruptsInterrupts
Interrupts
Urwa Shanza
 
Ethernet
EthernetEthernet
Chapter 14
Chapter 14Chapter 14
Chapter 14
Faisal Mehmood
 
Rarp
RarpRarp
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
Ram Dutt Shukla
 
OSI Layers
OSI LayersOSI Layers
OSI Layers
Kishore Kumar
 
Multiple access protocol
Multiple access protocolMultiple access protocol
Multiple access protocol
Merlin Florrence
 
Presentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC LayerPresentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC Layer
Mahdi Ahmed Jama
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
Muhammad Arshad
 
Chapter 25
Chapter 25Chapter 25
Chapter 25
Faisal Mehmood
 
RIP Routing Information Protocol Extreme Networks
RIP Routing Information Protocol Extreme NetworksRIP Routing Information Protocol Extreme Networks
RIP Routing Information Protocol Extreme Networks
Dani Royman Simanjuntak
 
Ethernet
EthernetEthernet
Ethernet
Mihika Shah
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
NetProtocol Xpert
 

What's hot (20)

OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)OPEN SHORTEST PATH FIRST (OSPF)
OPEN SHORTEST PATH FIRST (OSPF)
 
Basic Block
Basic BlockBasic Block
Basic Block
 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
 
Framing in data link layer
Framing in data link layerFraming in data link layer
Framing in data link layer
 
CCNP Switching Chapter 1
CCNP Switching Chapter 1CCNP Switching Chapter 1
CCNP Switching Chapter 1
 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree Protocol
 
Traffic profiles, congestion and network performance
Traffic profiles, congestion and network performanceTraffic profiles, congestion and network performance
Traffic profiles, congestion and network performance
 
Interrupts
InterruptsInterrupts
Interrupts
 
Ethernet
EthernetEthernet
Ethernet
 
Chapter 14
Chapter 14Chapter 14
Chapter 14
 
Rarp
RarpRarp
Rarp
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
OSI Layers
OSI LayersOSI Layers
OSI Layers
 
Multiple access protocol
Multiple access protocolMultiple access protocol
Multiple access protocol
 
Presentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC LayerPresentation of the IEEE 802.11a MAC Layer
Presentation of the IEEE 802.11a MAC Layer
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
 
Chapter 25
Chapter 25Chapter 25
Chapter 25
 
RIP Routing Information Protocol Extreme Networks
RIP Routing Information Protocol Extreme NetworksRIP Routing Information Protocol Extreme Networks
RIP Routing Information Protocol Extreme Networks
 
Ethernet
EthernetEthernet
Ethernet
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 

Viewers also liked

Chap 01 intro
Chap 01 introChap 01 intro
Chap 01 intro
Noctorous Jamal
 
Chap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsChap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packets
Noctorous Jamal
 
Semantech: IT Architecture in the Enterprise
Semantech: IT Architecture in the EnterpriseSemantech: IT Architecture in the Enterprise
Semantech: IT Architecture in the Enterprise
Stephen Lahanas
 
Chap 26 vpn
Chap 26 vpnChap 26 vpn
Chap 26 vpn
Noctorous Jamal
 
Computer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary MaterialComputer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary Material
Mohamed Loey
 
Chap 02 osi model
Chap 02 osi modelChap 02 osi model
Chap 02 osi model
Noctorous Jamal
 
Chap 28 security
Chap 28 securityChap 28 security
Chap 28 security
Noctorous Jamal
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1
Mohamed Loey
 
Introduction to Cyber Security
Introduction to Cyber SecurityIntroduction to Cyber Security
Introduction to Cyber Security
Stephen Lahanas
 
Computer Security Lecture 1: Overview
Computer Security Lecture 1: OverviewComputer Security Lecture 1: Overview
Computer Security Lecture 1: Overview
Mohamed Loey
 
Cyber security
Cyber securityCyber security
Cyber security
Siblu28
 

Viewers also liked (11)

Chap 01 intro
Chap 01 introChap 01 intro
Chap 01 intro
 
Chap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packetsChap 06 delivery and routing of ip packets
Chap 06 delivery and routing of ip packets
 
Semantech: IT Architecture in the Enterprise
Semantech: IT Architecture in the EnterpriseSemantech: IT Architecture in the Enterprise
Semantech: IT Architecture in the Enterprise
 
Chap 26 vpn
Chap 26 vpnChap 26 vpn
Chap 26 vpn
 
Computer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary MaterialComputer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary Material
 
Chap 02 osi model
Chap 02 osi modelChap 02 osi model
Chap 02 osi model
 
Chap 28 security
Chap 28 securityChap 28 security
Chap 28 security
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1
 
Introduction to Cyber Security
Introduction to Cyber SecurityIntroduction to Cyber Security
Introduction to Cyber Security
 
Computer Security Lecture 1: Overview
Computer Security Lecture 1: OverviewComputer Security Lecture 1: Overview
Computer Security Lecture 1: Overview
 
Cyber security
Cyber securityCyber security
Cyber security
 

Similar to Chap 05 ip addresses classfless

Ip addressing classless
Ip addressing classlessIp addressing classless
Ip addressing classless
Abhishek Kesharwani
 
Ip addressing classless
Ip addressing classlessIp addressing classless
Ip addressing classless
Abhishek Kesharwani
 
Chap 05
Chap 05Chap 05
Classless addressing
Classless addressingClassless addressing
Classless addressing
Iqra Abbas
 
1606660774-ip-addresses-classful-3.ppt
1606660774-ip-addresses-classful-3.ppt1606660774-ip-addresses-classful-3.ppt
1606660774-ip-addresses-classful-3.ppt
PUSHPAKJAIN8
 
Chap 05
Chap 05Chap 05
Chap 05
IGNOU
 
Chap 04 ip addresses classful
Chap 04 ip addresses classfulChap 04 ip addresses classful
Chap 04 ip addresses classful
Noctorous Jamal
 
Umutima.ppt
Umutima.pptUmutima.ppt
Umutima.ppt
kigaliac
 
Chap 04
Chap 04Chap 04
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
Abhishek Kesharwani
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
Abhishek Kesharwani
 
ip address
ip addressip address
ip address
gaurav koriya
 
17433_ip-addressing-subnetting-supernetting.ppt
17433_ip-addressing-subnetting-supernetting.ppt17433_ip-addressing-subnetting-supernetting.ppt
17433_ip-addressing-subnetting-supernetting.ppt
kashifmajeedjanjua
 
Internet Technology
Internet TechnologyInternet Technology
Internet Technology
home
 
Module 6 ip addresing
Module 6   ip addresingModule 6   ip addresing
Module 6 ip addresing
Charlette Tolentino
 
Ch05
Ch05Ch05
IP-address trial.ppt
IP-address trial.pptIP-address trial.ppt
IP-address trial.ppt
sol zem
 
CN Unit 3
CN Unit 3 CN Unit 3
CN Unit 3
Shrikant Kokate
 
Ch04
Ch04Ch04
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Sovonesh Pal
 

Similar to Chap 05 ip addresses classfless (20)

Ip addressing classless
Ip addressing classlessIp addressing classless
Ip addressing classless
 
Ip addressing classless
Ip addressing classlessIp addressing classless
Ip addressing classless
 
Chap 05
Chap 05Chap 05
Chap 05
 
Classless addressing
Classless addressingClassless addressing
Classless addressing
 
1606660774-ip-addresses-classful-3.ppt
1606660774-ip-addresses-classful-3.ppt1606660774-ip-addresses-classful-3.ppt
1606660774-ip-addresses-classful-3.ppt
 
Chap 05
Chap 05Chap 05
Chap 05
 
Chap 04 ip addresses classful
Chap 04 ip addresses classfulChap 04 ip addresses classful
Chap 04 ip addresses classful
 
Umutima.ppt
Umutima.pptUmutima.ppt
Umutima.ppt
 
Chap 04
Chap 04Chap 04
Chap 04
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
ip address
ip addressip address
ip address
 
17433_ip-addressing-subnetting-supernetting.ppt
17433_ip-addressing-subnetting-supernetting.ppt17433_ip-addressing-subnetting-supernetting.ppt
17433_ip-addressing-subnetting-supernetting.ppt
 
Internet Technology
Internet TechnologyInternet Technology
Internet Technology
 
Module 6 ip addresing
Module 6   ip addresingModule 6   ip addresing
Module 6 ip addresing
 
Ch05
Ch05Ch05
Ch05
 
IP-address trial.ppt
IP-address trial.pptIP-address trial.ppt
IP-address trial.ppt
 
CN Unit 3
CN Unit 3 CN Unit 3
CN Unit 3
 
Ch04
Ch04Ch04
Ch04
 
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
 

More from Noctorous Jamal

Chap 27 next generation i pv6
Chap 27 next generation i pv6Chap 27 next generation i pv6
Chap 27 next generation i pv6
Noctorous Jamal
 
Chap 25 multimedia
Chap 25 multimediaChap 25 multimedia
Chap 25 multimedia
Noctorous Jamal
 
Chap 24 mobile ip
Chap 24 mobile ipChap 24 mobile ip
Chap 24 mobile ip
Noctorous Jamal
 
Chap 23 ip over atm
Chap 23 ip over atmChap 23 ip over atm
Chap 23 ip over atm
Noctorous Jamal
 
Chap 22 www http
Chap 22 www httpChap 22 www http
Chap 22 www http
Noctorous Jamal
 
Chap 21 snmp
Chap 21 snmpChap 21 snmp
Chap 21 snmp
Noctorous Jamal
 
Chap 20 smtp, pop, imap
Chap 20 smtp, pop, imapChap 20 smtp, pop, imap
Chap 20 smtp, pop, imap
Noctorous Jamal
 
Chap 19 ftp & tftp
Chap 19 ftp & tftpChap 19 ftp & tftp
Chap 19 ftp & tftp
Noctorous Jamal
 
Chap 18 telnet
Chap 18 telnetChap 18 telnet
Chap 18 telnet
Noctorous Jamal
 
Chap 17 dns
Chap 17 dnsChap 17 dns
Chap 17 dns
Noctorous Jamal
 
Chap 16 bootp & dhcp
Chap 16 bootp & dhcpChap 16 bootp & dhcp
Chap 16 bootp & dhcp
Noctorous Jamal
 
Chap 15 multicasting
Chap 15 multicastingChap 15 multicasting
Chap 15 multicasting
Noctorous Jamal
 
Chap 14 rip, ospf
Chap 14 rip, ospfChap 14 rip, ospf
Chap 14 rip, ospf
Noctorous Jamal
 
Chap 13 stream control transmission protocol
Chap 13 stream control transmission protocolChap 13 stream control transmission protocol
Chap 13 stream control transmission protocol
Noctorous Jamal
 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
Noctorous Jamal
 
Chap 11 udp
Chap 11 udpChap 11 udp
Chap 11 udp
Noctorous Jamal
 
Chap 10 igmp
Chap 10 igmpChap 10 igmp
Chap 10 igmp
Noctorous Jamal
 
Chap 09 icmp
Chap 09 icmpChap 09 icmp
Chap 09 icmp
Noctorous Jamal
 
Chap 08 ip
Chap 08 ipChap 08 ip
Chap 08 ip
Noctorous Jamal
 
Chap 07 arp & rarp
Chap 07 arp & rarpChap 07 arp & rarp
Chap 07 arp & rarp
Noctorous Jamal
 

More from Noctorous Jamal (20)

Chap 27 next generation i pv6
Chap 27 next generation i pv6Chap 27 next generation i pv6
Chap 27 next generation i pv6
 
Chap 25 multimedia
Chap 25 multimediaChap 25 multimedia
Chap 25 multimedia
 
Chap 24 mobile ip
Chap 24 mobile ipChap 24 mobile ip
Chap 24 mobile ip
 
Chap 23 ip over atm
Chap 23 ip over atmChap 23 ip over atm
Chap 23 ip over atm
 
Chap 22 www http
Chap 22 www httpChap 22 www http
Chap 22 www http
 
Chap 21 snmp
Chap 21 snmpChap 21 snmp
Chap 21 snmp
 
Chap 20 smtp, pop, imap
Chap 20 smtp, pop, imapChap 20 smtp, pop, imap
Chap 20 smtp, pop, imap
 
Chap 19 ftp & tftp
Chap 19 ftp & tftpChap 19 ftp & tftp
Chap 19 ftp & tftp
 
Chap 18 telnet
Chap 18 telnetChap 18 telnet
Chap 18 telnet
 
Chap 17 dns
Chap 17 dnsChap 17 dns
Chap 17 dns
 
Chap 16 bootp & dhcp
Chap 16 bootp & dhcpChap 16 bootp & dhcp
Chap 16 bootp & dhcp
 
Chap 15 multicasting
Chap 15 multicastingChap 15 multicasting
Chap 15 multicasting
 
Chap 14 rip, ospf
Chap 14 rip, ospfChap 14 rip, ospf
Chap 14 rip, ospf
 
Chap 13 stream control transmission protocol
Chap 13 stream control transmission protocolChap 13 stream control transmission protocol
Chap 13 stream control transmission protocol
 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
 
Chap 11 udp
Chap 11 udpChap 11 udp
Chap 11 udp
 
Chap 10 igmp
Chap 10 igmpChap 10 igmp
Chap 10 igmp
 
Chap 09 icmp
Chap 09 icmpChap 09 icmp
Chap 09 icmp
 
Chap 08 ip
Chap 08 ipChap 08 ip
Chap 08 ip
 
Chap 07 arp & rarp
Chap 07 arp & rarpChap 07 arp & rarp
Chap 07 arp & rarp
 

Recently uploaded

RECENT DEVELOPMENTS IN RING SPINNING.pptx
RECENT DEVELOPMENTS IN RING SPINNING.pptxRECENT DEVELOPMENTS IN RING SPINNING.pptx
RECENT DEVELOPMENTS IN RING SPINNING.pptx
peacesoul123
 
Data Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptxData Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptx
TelanganaPakkaFolk
 
Online airline reservation system project report.pdf
Online airline reservation system project report.pdfOnline airline reservation system project report.pdf
Online airline reservation system project report.pdf
Kamal Acharya
 
Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in City
sunnuchadda
 
Tutorial on MySQl and its basic concepts
Tutorial on MySQl and its basic conceptsTutorial on MySQl and its basic concepts
Tutorial on MySQl and its basic concepts
anishacotta2
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
Jim Mimlitz, P.E.
 
Adv. Digital Signal Processing LAB MANUAL.pdf
Adv. Digital Signal Processing LAB MANUAL.pdfAdv. Digital Signal Processing LAB MANUAL.pdf
Adv. Digital Signal Processing LAB MANUAL.pdf
T.D. Shashikala
 
Metrology Book, Bachelors in Mechanical Engineering
Metrology Book, Bachelors in Mechanical EngineeringMetrology Book, Bachelors in Mechanical Engineering
Metrology Book, Bachelors in Mechanical Engineering
leakingvideo
 
Disaster Management and Mitigation presentation
Disaster Management and Mitigation presentationDisaster Management and Mitigation presentation
Disaster Management and Mitigation presentation
RajaRamannaTarigoppu
 
Traffic Engineering-MODULE-1 vtu syllabus.pptx
Traffic Engineering-MODULE-1 vtu syllabus.pptxTraffic Engineering-MODULE-1 vtu syllabus.pptx
Traffic Engineering-MODULE-1 vtu syllabus.pptx
mailmad391
 
Jet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdfJet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdf
KIET Group of Institutions
 
Rockets and missiles notes engineering ppt
Rockets and missiles notes engineering pptRockets and missiles notes engineering ppt
Rockets and missiles notes engineering ppt
archithaero
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
yadavsuyash008
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
Tool and Die Tech
 
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
PradeepKumarSK3
 
readers writers Problem in operating system
readers writers Problem in operating systemreaders writers Problem in operating system
readers writers Problem in operating system
VADAPALLYPRAVEENKUMA1
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
Mani Krishna Sarkar
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
Mani Krishna Sarkar
 
Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...
Pilar Valbuena Perez
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
Tool and Die Tech
 

Recently uploaded (20)

RECENT DEVELOPMENTS IN RING SPINNING.pptx
RECENT DEVELOPMENTS IN RING SPINNING.pptxRECENT DEVELOPMENTS IN RING SPINNING.pptx
RECENT DEVELOPMENTS IN RING SPINNING.pptx
 
Data Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptxData Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptx
 
Online airline reservation system project report.pdf
Online airline reservation system project report.pdfOnline airline reservation system project report.pdf
Online airline reservation system project report.pdf
 
Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 in City
 
Tutorial on MySQl and its basic concepts
Tutorial on MySQl and its basic conceptsTutorial on MySQl and its basic concepts
Tutorial on MySQl and its basic concepts
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
 
Adv. Digital Signal Processing LAB MANUAL.pdf
Adv. Digital Signal Processing LAB MANUAL.pdfAdv. Digital Signal Processing LAB MANUAL.pdf
Adv. Digital Signal Processing LAB MANUAL.pdf
 
Metrology Book, Bachelors in Mechanical Engineering
Metrology Book, Bachelors in Mechanical EngineeringMetrology Book, Bachelors in Mechanical Engineering
Metrology Book, Bachelors in Mechanical Engineering
 
Disaster Management and Mitigation presentation
Disaster Management and Mitigation presentationDisaster Management and Mitigation presentation
Disaster Management and Mitigation presentation
 
Traffic Engineering-MODULE-1 vtu syllabus.pptx
Traffic Engineering-MODULE-1 vtu syllabus.pptxTraffic Engineering-MODULE-1 vtu syllabus.pptx
Traffic Engineering-MODULE-1 vtu syllabus.pptx
 
Jet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdfJet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdf
 
Rockets and missiles notes engineering ppt
Rockets and missiles notes engineering pptRockets and missiles notes engineering ppt
Rockets and missiles notes engineering ppt
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
 
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
 
readers writers Problem in operating system
readers writers Problem in operating systemreaders writers Problem in operating system
readers writers Problem in operating system
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
 
Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
 

Chap 05 ip addresses classfless

  • 1. CChhaapptteerr 55 IIPP AAddddrreesssseess:: CCllaasssslleessss AAddddrreessssiinngg Objectives Upon completion you will be able to: • Understand the concept of classless addressing • Be able to find the first and last address given an IP address • Be able to find the network address given a classless IP address • Be able to create subnets from a block of classless IP addresses • Understand address allocation and address aggregation TCP/IP Protocol Suite 1
  • 2. 5.1 VARIABLE-LENGTH BLOCKS a In classless addressing variable-length blocks arree aassssiiggnneedd tthhaatt bbeelloonngg ttoo nnoo ccllaassss.. IInn tthhiiss aarrcchhiitteeccttuurree,, tthhee eennttiirree aaddddrreessss ssppaaccee ((22^^3322 aaddddrreesssseess)) iiss ddiivviiddeedd iinnttoo bblloocckkss ooff ddiiffffeerreenntt ssiizzeess.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: RReessttrriiccttiioonnss FFiinnddiinngg tthhee BBlloocckk GGrraanntteedd BBlloocckk TCP/IP Protocol Suite 2
  • 3. Figure 5.1 Variable-length blocks TCP/IP Protocol Suite 3
  • 4. ExamplE 1 Which of the following can be the beginning address of a block that contains 16 addresses? a. 205.16.37.32 b.190.16.42.44 c. 17.17.33.80 d.123.45.24.52 Solution Only two are eligible (a and c). The address 205.16.37.32 is eligible because 32 is divisible by 16. The address 17.17.33.80 is eligible because 80 is divisible by 16. TCP/IP Protocol Suite 4
  • 5. ExamplE 2 Which of the following can be the beginning address of a block that contains 256 addresses? a.205.16.37.32 b.190.16.42.0 c.17.17.32.0 d.123.45.24.52 Solution In this case, the right-most byte must be 0. As we mentioned in Chapter 4, the IP addresses use base 256 arithmetic. When the right-most byte is 0, the total address is divisible by 256. Only two addresses are eligible (b and c). TCP/IP Protocol Suite 5
  • 6. ExamplE 3 Which of the following can be the beginning address of a block that contains 1024 addresses? a. 205.16.37.32 b.190.16.42.0 c. 17.17.32.0 d.123.45.24.52 Solution In this case, we need to check two bytes because 1024 = 4 × 256. The right-most byte must be divisible by 256. The second byte (from the right) must be divisible by 4. Only one address is eligible (c). TCP/IP Protocol Suite 6
  • 7. Figure 5.2 Format of classless addressing address TCP/IP Protocol Suite 7
  • 8. TTaabbllee 55..11 PPrreeffiixx lleennggtthhss TCP/IP Protocol Suite 8
  • 9. NNoottee:: Classful addressing is a special case of classless addressing. TCP/IP Protocol Suite 9
  • 10. ExamplE 4 What is the first address in the block if one of the addresses is 167.199.170.82/27? Solution The prefix length is 27, which means that we must keep the first 27 bits as is and change the remaining bits (5) to 0s. The following shows the process: Address in binary: 10100111 11000111 10101010 01010010 Keep the left 27 bits: 10100111 11000111 10101010 01000000 Result in CIDR notation: 167.199.170.64/27 TCP/IP Protocol Suite 10
  • 11. ExamplE 5 What is the first address in the block if one of the addresses is 140.120.84.24/20? Solution Figure 5.3 shows the solution. The first, second, and fourth bytes are easy; for the third byte we keep the bits corresponding to the number of 1s in that group. The first address is 140.120.80.0/20. See Next Slide TCP/IP Protocol Suite 11
  • 12. Figure 5.3 Example 5 TCP/IP Protocol Suite 12
  • 13. ExamplE 6 Find the first address in the block if one of the addresses is 140.120.84.24/20. Solution The first, second, and fourth bytes are as defined in the previous example. To find the third byte, we write 84 as the sum of powers of 2 and select only the leftmost 4 (m is 4) as shown in Figure 5.4. The first address is 140.120.80.0/20. See Next Slide TCP/IP Protocol Suite 13
  • 14. Figure 5.4 Example 6 TCP/IP Protocol Suite 14
  • 15. ExamplE 7 Find the number of addresses in the block if one of the addresses is 140.120.84.24/20. Solution The prefix length is 20. The number of addresses in the block is 232−20 or 212 or 4096. Note that this is a large block with 4096 addresses. TCP/IP Protocol Suite 15
  • 16. ExamplE 8 Using the first method, find the last address in the block if one of the addresses is 140.120.84.24/20. Solution We found in the previous examples that the first address is 140.120.80.0/20 and the number of addresses is 4096. To find the last address, we need to add 4095 (4096 − 1) to the first address. See Next Slide TCP/IP Protocol Suite 16
  • 17. ExamplE 8 (Continued) To keep the format in dotted-decimal notation, we need to represent 4095 in base 256 (see Appendix B) and do the calculation in base 256. We write 4095 as 15.255. We then add the first address to this number (in base 255) to obtain the last address as shown below: 140 . 120 . 80 . 0 15 . 255 ------------------------- 140 . 120 . 95 . 255 The last address is 140.120.95.255/20. TCP/IP Protocol Suite 17
  • 18. ExamplE 9 Using the second method, find the last address in the block if one of the addresses is 140.120.84.24/20. Solution The mask has twenty 1s and twelve 0s. The complement of the mask has twenty 0s and twelve 1s. In other words, the mask complement is 00000000 00000000 00001111 11111111 or 0.0.15.255. We add the mask complement to the beginning address to find the last address. See Next Slide TCP/IP Protocol Suite 18
  • 19. ExamplE 9 (Continued) We add the mask complement to the beginning address to find the last address. 140 . 120 . 80 . 0 0 . 0 . 15 . 255 ---------------------------- 140 . 120 . 95 . 255 The last address is 140.120.95.255/20. TCP/IP Protocol Suite 19
  • 20. ExamplE 10 Find the block if one of the addresses is 190.87.140.202/29. Solution We follow the procedure in the previous examples to find the first address, the number of addresses, and the last address. To find the first address, we notice that the mask (/29) has five 1s in the last byte. So we write the last byte as powers of 2 and retain only the leftmost five as shown below: See Next Slide TCP/IP Protocol Suite 20
  • 21. ExamplE 10 (Continued) 202 ➡ 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 The leftmost 5 numbers are ➡ 128 + 64 + 0 + 0 + 8 The first address is 190.87.140.200/29 The number of addresses is 232−29 or 8. To find the last address, we use the complement of the mask. The mask has twenty-nine 1s; the complement has three 1s. The complement is 0.0.0.7. If we add this to the first address, we get 190.87.140.207/29. In other words, the first address is 190.87.140.200/29, the last address is 190.87.140.207/29. There are only 8 addresses in this block. TCP/IP Protocol Suite 21
  • 22. ExamplE 11 Show a network configuration for the block in the previous example. Solution The organization that is granted the block in the previous example can assign the addresses in the block to the hosts in its network. However, the first address needs to be used as the network address and the last address is kept as a special address (limited broadcast address). Figure 5.5 shows how the block can be used by an organization. Note that the last address ends with 207, which is different from the 255 seen in classful addressing. See Next Slide TCP/IP Protocol Suite 22
  • 23. Figure 5.5 Example 11 TCP/IP Protocol Suite 23
  • 24. NNoottee:: In classless addressing, the last address in the block does not necessarily end in 255. TCP/IP Protocol Suite 24
  • 25. NNoottee:: In CIDR notation, the block granted is defined by the first address and the prefix length. TCP/IP Protocol Suite 25
  • 26. 5.2 SUBNETTING When an organization is granted a block ooff aaddddrreesssseess,, iitt ccaann ccrreeaattee ssuubbnneettss ttoo mmeeeett iittss nneeeeddss.. TThhee pprreeffiixx lleennggtthh iinnccrreeaasseess ttoo ddeeffiinnee tthhee ssuubbnneett pprreeffiixx lleennggtthh.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: FFiinnddiinngg tthhee SSuubbnneett MMaasskk FFiinnddiinngg tthhee SSuubbnneett AAddddrreesssseess VVaarriiaabbllee--LLeennggtthh SSuubbnneettss TCP/IP Protocol Suite 26
  • 27. NNoottee:: In fixed-length subnetting, the number of subnets is a power of 2. TCP/IP Protocol Suite 27
  • 28. ExamplE 12 An organization is granted the block 130.34.12.64/26. The organization needs 4 subnets. What is the subnet prefix length? Solution We need 4 subnets, which means we need to add two more 1s (log2 4 = 2) to the site prefix. The subnet prefix is then /28. TCP/IP Protocol Suite 28
  • 29. ExamplE 13 What are the subnet addresses and the range of addresses for each subnet in the previous example? Solution Figure 5.6 shows one configuration. See Next Slide TCP/IP Protocol Suite 29
  • 30. Figure 5.6 Example 13 TCP/IP Protocol Suite 30
  • 31. ExamplE 13 (ContinuEd) The site has 232−26 = 64 addresses. Each subnet has 232–28 = 16 addresses. Now let us find the first and last address in each subnet. 1. The first address in the first subnet is 130.34.12.64/28, using the procedure we showed in the previous examples. Note that the first address of the first subnet is the first address of the block. The last address of the subnet can be found by adding 15 (16 −1) to the first address. The last address is 130.34.12.79/28. See Next Slide TCP/IP Protocol Suite 31
  • 32. ExamplE 13 (ContinuEd) 2.The first address in the second subnet is 130.34.12.80/28; it is found by adding 1 to the last address of the previous subnet. Again adding 15 to the first address, we obtain the last address, 130.34.12.95/28. 3. Similarly, we find the first address of the third subnet to be 130.34.12.96/28 and the last to be 130.34.12.111/28. 4. Similarly, we find the first address of the fourth subnet to be 130.34.12.112/28 and the last to be 130.34.12.127/28. TCP/IP Protocol Suite 32
  • 33. ExamplE 14 An organization is granted a block of addresses with the beginning address 14.24.74.0/24. There are 232−24= 256 addresses in this block. The organization needs to have 11 subnets as shown below: a. two subnets, each with 64 addresses. b. two subnets, each with 32 addresses. c. three subnets, each with 16 addresses. d. four subnets, each with 4 addresses. Design the subnets. See Next Slide For One Solution TCP/IP Protocol Suite 33
  • 34. Figure 5.7 Example 14 TCP/IP Protocol Suite 34
  • 35. ExamplE 14 (ContinutEd) 1. We use the first 128 addresses for the first two subnets, each with 64 addresses. Note that the mask for each network is /26. The subnet address for each subnet is given in the figure. 2. We use the next 64 addresses for the next two subnets, each with 32 addresses. Note that the mask for each network is /27. The subnet address for each subnet is given in the figure. See Next Slide TCP/IP Protocol Suite 35
  • 36. ExamplE 14 (ContinutEd) 3. We use the next 48 addresses for the next three subnets, each with 16 addresses. Note that the mask for each network is /28. The subnet address for each subnet is given in the figure. 4. We use the last 16 addresses for the last four subnets, each with 4 addresses. Note that the mask for each network is /30. The subnet address for each subnet is given in the figure. TCP/IP Protocol Suite 36
  • 37. ExamplE 15 As another example, assume a company has three offices: Central, East, and West. The Central office is connected to the East and West offices via private, point-to-point WAN lines. The company is granted a block of 64 addresses with the beginning address 70.12.100.128/26. The management has decided to allocate 32 addresses for the Central office and divides the rest of addresses between the two offices. Figure 5.8 shows the configuration designed by the management. See Next Slide TCP/IP Protocol Suite 37
  • 38. Figure 5.8 Example 15 TCP/IP Protocol Suite 38
  • 39. ExamplE 15 (ContinuEd) The company will have three subnets, one at Central, one at East, and one at West. The following lists the subblocks allocated for each network: a. The Central office uses the network address 70.12.100.128/27. This is the first address, and the mask /27 shows that there are 32 addresses in this network. Note that three of these addresses are used for the routers and the company has reserved the last address in the sub-block. The addresses in this subnet are 70.12.100.128/27 to 70.12.100.159/27. Note that the interface of the router that connects the Central subnet to the WAN needs no address because it is a point-to-point See Next Slide connection. TCP/IP Protocol Suite 39
  • 40. ExamplE 15 (ContinuEd) b. The West office uses the network address 70.12.100.160/28. The mask /28 shows that there are only 16 addresses in this network. Note that one of these addresses is used for the router and the company has reserved the last address in the sub-block. The addresses in this subnet are 70.12.100.160/28 to 70.12.100.175/28. Note also that the interface of the router that connects the West subnet to the WAN needs no address because it is a point-to- point connection. See Next Slide TCP/IP Protocol Suite 40
  • 41. ExamplE 15 (ContinuEd) c. The East office uses the network address 70.12.100.176/28. The mask /28 shows that there are only 16 addresses in this network. Note that one of these addresses is used for the router and the company has reserved the last address in the sub-block. The addresses in. this subnet are 70.12.100.176/28 to 70.12.100.191/28. Note also that the interface of the router that connects the East subnet to the WAN needs no address because it is a point-to-point connection. TCP/IP Protocol Suite 41
  • 42. 5.3 ADDRESS ALLOCATION Address allocation is the responsibility of a global aauutthhoorriittyy ccaalllleedd tthhee IInntteerrnneett CCoorrppoorraattiioonn ffoorr AAssssiiggnneedd NNaammeess aanndd AAddddrreesssseess ((IICCAANNNN)).. IItt uussuuaallllyy aassssiiggnnss aa llaarrggee bblloocckk ooff aaddddrreesssseess ttoo aann IISSPP ttoo bbee ddiissttrriibbuutteedd ttoo iittss IInntteerrnneett uusseerrss.. TCP/IP Protocol Suite 42
  • 43. ExamplE 16 An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows: a. The first group has 64 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses c. The third group has 128 customers; each needs 64 addresses. See Next Slide TCP/IP Protocol Suite 43
  • 44. ExamplE 16 (ContinuEd) Design the subblocks and find out how many addresses are still available after these allocations. Solution Figure 5.9 shows the situation. See Next Slide TCP/IP Protocol Suite 44
  • 45. Figure 5.9 Example 16 TCP/IP Protocol Suite 45
  • 46. ExamplE 16 (ContinuEd) Group 1 For this group, each customer needs 256 addresses. This means the suffix length is 8 (28 =256). The prefix length is then 32 − 8 = 24. The addresses are: 1st Customer 190.100.0.0/24 190.100.0.255/24 2nd Customer 190.100.1.0/24 190.100.1.255/24 . . . 64th Customer 190.100.63.0/24 190.100.63.255/24 Total = 64 × 256 = 16,384 See Next Slide TCP/IP Protocol Suite 46
  • 47. ExamplE 16 (ContinuEd) Group 2 For this group, each customer needs 128 addresses. This means the suffix length is 7 (27 =128). The prefix length is then 32 − 7 = 25. The addresses are: 1st Customer 190.100.64.0/25 190.100.64.127/25 2nd Customer 190.100.64.128/25 190.100.64.255/25 · · · 128th Customer 190.100.127.128/25 190.100.127.255/25 Total = 128 × 128 = 16,384 See Next Slide TCP/IP Protocol Suite 47
  • 48. ExamplE 16 (ContinuEd) Group 3 For this group, each customer needs 64 addresses. This means the suffix length is 6 (26 = 64). The prefix length is then 32 − 6 = 26. The addresses are: 1st Customer 190.100.128.0/26 190.100.128.63/26 2nd Customer 190.100.128.64/26 190.100.128.127/26 · · · 128th Customer 190.100.159.192/26 190.100.159.255/26 Total = 128 × 64 = 8,192 See Next Slide TCP/IP Protocol Suite 48
  • 49. ExamplE 16 (ContinuEd) Number of granted addresses to the ISP: 65,536 Number of allocated addresses by the ISP: 40,960 Number of available addresses: 24,576 TCP/IP Protocol Suite 49