SlideShare a Scribd company logo
Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
IP Address Classes
Netid and Hostid
Issues with Classful Addressing
• Flexibility in Internal addressing:
– Thousands of hosts connected to one large network

• Inefficient Use of Address Space:
– Wastage of limited IP address space.

• Router Table Entries:
– Increase in router table entries.

Example:
• Hosts needed by organization are 5000
• Hosts in B 65,536 and in C 256
– Organization with 5,000 hosts is in a dilemma
– It can only choose to either waste 90% of a Class B address
or use 20 different Class C networks.
– Replacing with 20 C networks will increase entries in routers
Subnetting
• Subnetting adds an additional level to the hierarchy
of structures used in IP addressing.
• IP addresses must be broken into three elements
instead of two.
• Network ID is unchanged
• The host ID into a subnet ID and host ID.
• These subnet ID bits are used to identify each
subnet within the network.
• Splitting the host ID into subnet ID and host ID, we
reduce the size of the host ID portion of the address
• Class A networks have 24 bits to split between the
subnet ID and host ID: class B networks have 16, and
class C networks only 8.
Subnetting

The more bits we use from the host ID for the subnet ID, the more
subnets we can have but the fewer hosts we can have for each subnet.
Subnet Mask
• In classful addressing without subnetting
– Routers use the first octet of the IP address to determine
what the class is of the address
– From class they know which bits are the network ID and
which are the host ID.

• In subnetting, the routers also need to know how that
host ID is divided into subnet ID and host ID.
– This division can be arbitrary for each network.
– There is no way to tell how many bits belong to each simply
by looking at the IP address.
– The additional information about which bits are for the
subnet ID and which for the host ID must be communicated
to devices that interpret IP addresses.
– This information is given in the form of a 32-bit binary
number called a subnet mask.
Determining the Subnet Mask
• The subnet mask is a 32-bit binary number
• It is created so that it has a one bit for each corresponding bit of
the IP address that is part of its network ID or subnet ID, and a
zero for each bit of the IP address’s host ID.
• The mask thus tells TCP/IP devices which bits in that IP address
belong to the network ID and subnet ID, and which are part of
the host ID.
Determining the Subnet Mask
• Suppose we have the Class B network 154.71.0.0.
• We decide to subnet this using 5 bits for the subnet
ID and 11 bits for the host ID.
• In this case, the subnet mask will have 16 ones for
the network portion (since this is Class B) followed by
5 ones for the subnet ID, and 11 zeroes for the host
ID.
• That's “11111111 11111111 11111000 00000000” in
binary, with the bits corresponding to the subnet ID
highlighted.
• Converting to dotted decimal, the subnet mask would
be 255.255.248.0
Determining the Subnet Mask
Example
• A company is granted the site address
210.70.64.0. The company needs six
subnets. What is the subnet Mask?
Determining the Subnet Mask
Solution
• Class C address
• 6 subnets means 3 bits in the subnet id
• 3 ones in the subnet mask
• 11111111 11111111 11111111 11100000
• 255.255.255.224 (decimal)
Using a Subnet Mask
• Suppose we have a host on a network with an IP of
154.71.150.42 and subnet mask 255.255.248.0
• A router needs to figure out which subnet this
address is on.

154.71.144.0 is the IP address of the subnet to which 154.71.150.42 belongs.
Designing a Subnet
•
•
•
•

Analyze the requirements
Determine the subnet mask
Each Subnet address
Host Addresses

Example:
• Network Address: 211.77.20.0
• 8 sub networks
• 32 hosts in each
Designing a Subnet
Designing a Subnet
211.77.20.0 in binary is
• 11010011 01001101 00010100 00000000
• Subnet 0
– substitute “000” for the subnet ID bits (211.77.20.0)
• Subnet 1
– substitute “001” for the subnet ID bits, to yield the following:
– 11010011 01001101 00010100 00100000 (211.77.20.32 )
• Subnet 2
– substitute 010 for the subnet ID bits to give:
– 11010011 01001101 00010100 01000000 (211.77.20.64)
• Subnet 3
– Substitute 01100000 (211.77.20.96)
• Subnet 7 (last)
– Substitute 11100000 (211.77.20.224)
Designing a Subnet
Determining Host Address
•

Subnet #0
– First address: 11010011 01001101 00010100 00000000 (211.77.20.0)
– Second address: 11010011 01001101 00010100 00000001
(211.77.20.1)
– Third address: 11010011 01001101 00010100 00000010
(211.77.20.2)
– Last address: 11010011 01001101 00010100 00011111
(211.77.20.31)

•

Subnet #6.
It has “110” for the subnet bits instead of “000”.
– First address: 11010011 01001101 00010100 11000000
(211.77.20.192)
– Second address: 11010011 01001101 00010100 11000001
(211.77.20.193)
– Third address: 11010011 01001101 00010100 11000010
(211.77.20.194)
– Last address: 11010011 01001101 00010100 11011111
– (211.77.20.223)
Similarly for other subnets

•
Designing a Subnet
Home Assignment
• A company is granted the site address
172.16.0.0. The company needs 1000
subnets. Design the subnets?
Classless Addressing
•To overcome address depletion
•No classes, but the address are still granted in blocks.
•The size of the block( the number of addresses) varies based
on the nature and size of the entity.
• Household: 2 addresses
•Large organization: thousands of addresses
• ISP: thousands or hundreds of thousands based on the
number of customers it may serve.
•The number of addresses in a block must be power of two
(2,4,8…..).
•Classless Inter Domain Routing (CIDR)
Mask:Slash Notation
• Each mask is made of some ones from
the left and followed by some 0s.
• Instead of 255.255.255.224
– Mask has 27 1s
– Attach this number to a classless address

–x.y.z.t/n
• n defines the number of bits that are same in
every block.
Classless Addressing: Mask
• The n leftmost bits are 1s
• 32-n rightmost bits are 0s
• In CIDR, n has a value from 0 to 32 and
used to show the mask in the form /n.
• 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.
Example: 172.31.1.2/25
Classless Addressing: Mask
Address allocation with Classful
Addressing
Need 10 addresses

Class C. Give them 256.

Need 200 addresses

Class C. Give them 256.

Need 500 addresses

Class B. Give them 65,536.

Need 1000 addresses

Class B. Give them 65,536.

Need 4000 addresses

Class B. Give them 65,536.

Fig courtesy: Ward Abingdon and Witney College CCNA Exploration
Address allocation with
Classless Addressing
Need 10 addresses

/28. Give them 16.

Need 200 addresses

/24. Give them 256.

Need 500 addresses

/23. Give them 512.

Need 1000 addresses

/22. Give them 1024.

Need 4000 addresses

/20. Give them 4096.

Fig courtesy: Ward Abingdon and Witney College CCNA Exploration
Classless Addressing

• A small organization is given a block with a
beginning address 205.16.37.24/29.What is
the range of the block?
• Number of bits for hosts =32-29=3
• Total hosts=8
• The first address is 205.16.37.24
• The last address is 205.16.37.31
Classless Addressing
• 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?
The given address in binary is
• 11001101 00010000 00100101 00100111
• If we set right most 4 bits to 0 we get
• 11001101 00010000 00100101 00100000
– 205.16.37.32 (decimal)
Classless Addressing
• A block of addresses is granted to a small
organization. We know that one of the
addresses is 167.199.170.82/27.What is
the first address in the block?
Classless Addressing
Solution
• The last byte is 01010010
• Changing the last 5 bits to 0s we get

• 01000000 or 64
• The first address in the block is
167.199.170.64/27
Subnetting
• An organization is granted the block
17.12.40.0/26. The organization has
three offices and needs to divide the
addresses into three sub-blocks of
32,16 and 16 addresses.What are the
subnet addresses and the range of
addresses for each subnet?
Subnetting
Solution:
• For subnet 1 that requires 32 addresses
– The mask is 32-5=27

• For subnet 2 that requires 16 addresses
– The mask is 32-4=28

• For subnet 3 that requires 16 addresses
– The mask is 32-4=28

• This means we have the masks 27,28,28
with the organization mask being 26
Subnetting
Solution:
• For subnet 1
– The first address is 17.12.40.0/27
– The last address is 17.12.40.31/27

• For subnet 2
– The first address is 17.12.40.32/28
– The last address is 17.12.40.47/28

• For subnet 3
– The first address is 17.12.40.48/28
– The last address is 17.12.40.63/28
Subnetting
• An organization is granted the block
130.34.12.64/26. The organization
needs to have four subnets with 16
hosts. What are the subnet addresses
and the range of addresses for each
subnet?
Subnetting

• For all subnets
– The mask is 32-4=28
• For subnet 1
– The first address is 130.34.12.64/28
– The last address is 130.34.12.79/28
• For subnet 2
– The first address is 130.34.12.80/28
– The last address is 130.34.12.95/28
• For subnet 3
– The first address is 130.34.12.96/28
– The last address is 130.34.12.111/28
• For subnet 4
– The first address is 130.34.12.112/28
– The last address is 130.34.12.127/28
Subnetting
Home Assignment

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.

More Related Content

What's hot

19 Network Layer Protocols
19 Network Layer Protocols19 Network Layer Protocols
19 Network Layer Protocols
Meenakshi Paul
 
Data Communication & Computer network: Channel capacity
Data Communication & Computer network: Channel capacityData Communication & Computer network: Channel capacity
Data Communication & Computer network: Channel capacity
Dr Rajiv Srivastava
 
IPv4
IPv4IPv4
Subnetting
SubnettingSubnetting
Subnetting
Fredrick Hall
 
DATA RATE LIMITS
DATA RATE LIMITSDATA RATE LIMITS
DATA RATE LIMITS
ChAwais15
 
Vlsm exercises solutions
Vlsm exercises solutionsVlsm exercises solutions
Vlsm exercises solutions
Gerry Ismanto
 
Classless addressing
Classless addressingClassless addressing
Classless addressingIqra Abbas
 
Computer network unit 1 notes
Computer network unit  1 notesComputer network unit  1 notes
Computer network unit 1 notes
Ravi Rajput
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
TheGodfather HA
 
Subnet calculation Tutorial
Subnet calculation TutorialSubnet calculation Tutorial
Subnet calculation Tutorial
Ritu Ranjan Shrivastwa
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting PresentationTouhidul Fahim
 
Transport layer
Transport layer Transport layer
Transport layer
Mukesh Chinta
 
Physical Layer Questions
Physical Layer QuestionsPhysical Layer Questions
Physical Layer Questions
Manisha Keim
 
Data Communication And Networking - DATA RATE LIMITS
Data Communication And Networking - DATA RATE LIMITSData Communication And Networking - DATA RATE LIMITS
Data Communication And Networking - DATA RATE LIMITS
Avijeet Negel
 
Subnetting
SubnettingSubnetting
Memory organization
Memory organizationMemory organization
Memory organization
ishapadhy
 

What's hot (20)

19 Network Layer Protocols
19 Network Layer Protocols19 Network Layer Protocols
19 Network Layer Protocols
 
Unit 1
Unit 1Unit 1
Unit 1
 
Data Communication & Computer network: Channel capacity
Data Communication & Computer network: Channel capacityData Communication & Computer network: Channel capacity
Data Communication & Computer network: Channel capacity
 
IPv4
IPv4IPv4
IPv4
 
Subnetting
SubnettingSubnetting
Subnetting
 
DATA RATE LIMITS
DATA RATE LIMITSDATA RATE LIMITS
DATA RATE LIMITS
 
Vlsm exercises solutions
Vlsm exercises solutionsVlsm exercises solutions
Vlsm exercises solutions
 
Classless addressing
Classless addressingClassless addressing
Classless addressing
 
Transport layer
Transport layerTransport layer
Transport layer
 
Computer network unit 1 notes
Computer network unit  1 notesComputer network unit  1 notes
Computer network unit 1 notes
 
IP addressing
IP addressingIP addressing
IP addressing
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
Subnet calculation Tutorial
Subnet calculation TutorialSubnet calculation Tutorial
Subnet calculation Tutorial
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
Transport layer
Transport layer Transport layer
Transport layer
 
Physical Layer Questions
Physical Layer QuestionsPhysical Layer Questions
Physical Layer Questions
 
Data Communication And Networking - DATA RATE LIMITS
Data Communication And Networking - DATA RATE LIMITSData Communication And Networking - DATA RATE LIMITS
Data Communication And Networking - DATA RATE LIMITS
 
Subnetting
SubnettingSubnetting
Subnetting
 
Memory organization
Memory organizationMemory organization
Memory organization
 

Similar to Week11 lec1

Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
syedhaiderraza
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclassaskme
 
subnet network Addressing Network v1.pdf
subnet network Addressing Network v1.pdfsubnet network Addressing Network v1.pdf
subnet network Addressing Network v1.pdf
ssuser00e6e21
 
08 - IP Subnetting.ppt
08 - IP Subnetting.ppt08 - IP Subnetting.ppt
08 - IP Subnetting.ppt
ssuserf7cd2b
 
ip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.ppt
FaysalAhamed32
 
Subnetting
SubnettingSubnetting
Subnetting
Netwax Lab
 
lecture 6.pptx
lecture 6.pptxlecture 6.pptx
lecture 6.pptx
MelkamuEndale1
 
Wipro telecom training i pv4 concepts
Wipro telecom training   i pv4 conceptsWipro telecom training   i pv4 concepts
Wipro telecom training i pv4 concepts
JAIGANESH SEKAR
 
CyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingCyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & Subnetting
Vivek chan
 
NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP
hamsa nandhini
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
aakritii765
 
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpenceOct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
O'Reilly Media
 
IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)
cuetcse
 
How IP address works
How IP address worksHow IP address works
How IP address works
Sanjeev Kumar Jaiswal
 
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9eChapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9eadpeer
 
Fixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptxFixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptx
Shaqib3
 
Subnetting
SubnettingSubnetting
Subnetting
Fatima Qayyum
 
1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing
AnusuaBasu
 
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docxLab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
DIPESH30
 

Similar to Week11 lec1 (20)

Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclass
 
subnet network Addressing Network v1.pdf
subnet network Addressing Network v1.pdfsubnet network Addressing Network v1.pdf
subnet network Addressing Network v1.pdf
 
08 - IP Subnetting.ppt
08 - IP Subnetting.ppt08 - IP Subnetting.ppt
08 - IP Subnetting.ppt
 
ip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.ppt
 
Subnetting
SubnettingSubnetting
Subnetting
 
lecture 6.pptx
lecture 6.pptxlecture 6.pptx
lecture 6.pptx
 
Subnetting
SubnettingSubnetting
Subnetting
 
Wipro telecom training i pv4 concepts
Wipro telecom training   i pv4 conceptsWipro telecom training   i pv4 concepts
Wipro telecom training i pv4 concepts
 
CyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingCyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & Subnetting
 
NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
 
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpenceOct. 14, 2011 webcast ch7 subnets bruce hartpence
Oct. 14, 2011 webcast ch7 subnets bruce hartpence
 
IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)IP Addressing (Subnetting, VLSM, Supernetting)
IP Addressing (Subnetting, VLSM, Supernetting)
 
How IP address works
How IP address worksHow IP address works
How IP address works
 
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9eChapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
 
Fixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptxFixed Length Subnetting about ip address.pptx
Fixed Length Subnetting about ip address.pptx
 
Subnetting
SubnettingSubnetting
Subnetting
 
1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing1703_anusua_basuclassful addressing_IP_Addressing
1703_anusua_basuclassful addressing_IP_Addressing
 
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docxLab 18 Answer TemplateProblem 1IP address  192.168.10.0 27 (giv.docx
Lab 18 Answer TemplateProblem 1IP address 192.168.10.0 27 (giv.docx
 

More from syedhaiderraza

Week16 lec1
Week16 lec1Week16 lec1
Week16 lec1
syedhaiderraza
 
Week15 lec1
Week15 lec1Week15 lec1
Week15 lec1
syedhaiderraza
 
Week14 lec2
Week14 lec2Week14 lec2
Week14 lec2
syedhaiderraza
 
Week14 lec1
Week14 lec1Week14 lec1
Week14 lec1
syedhaiderraza
 
Week13 lec2
Week13 lec2Week13 lec2
Week13 lec2
syedhaiderraza
 
Week13 lec1
Week13 lec1Week13 lec1
Week13 lec1
syedhaiderraza
 
Week11 lec2
Week11 lec2Week11 lec2
Week11 lec2
syedhaiderraza
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
syedhaiderraza
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
syedhaiderraza
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
syedhaiderraza
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
syedhaiderraza
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
syedhaiderraza
 
Week5 lec1-bscs1
Week5 lec1-bscs1Week5 lec1-bscs1
Week5 lec1-bscs1
syedhaiderraza
 
Week4 lec2-bscs1
Week4 lec2-bscs1Week4 lec2-bscs1
Week4 lec2-bscs1
syedhaiderraza
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
syedhaiderraza
 
Week3 lec3-bscs1
Week3 lec3-bscs1Week3 lec3-bscs1
Week3 lec3-bscs1
syedhaiderraza
 
Week3 lec 2
Week3 lec 2Week3 lec 2
Week3 lec 2
syedhaiderraza
 
Week3 lec 1
Week3 lec 1Week3 lec 1
Week3 lec 1
syedhaiderraza
 
Week2 lec3-bscs1
Week2 lec3-bscs1Week2 lec3-bscs1
Week2 lec3-bscs1
syedhaiderraza
 
Week2 lec2-bscs1
Week2 lec2-bscs1Week2 lec2-bscs1
Week2 lec2-bscs1
syedhaiderraza
 

More from syedhaiderraza (20)

Week16 lec1
Week16 lec1Week16 lec1
Week16 lec1
 
Week15 lec1
Week15 lec1Week15 lec1
Week15 lec1
 
Week14 lec2
Week14 lec2Week14 lec2
Week14 lec2
 
Week14 lec1
Week14 lec1Week14 lec1
Week14 lec1
 
Week13 lec2
Week13 lec2Week13 lec2
Week13 lec2
 
Week13 lec1
Week13 lec1Week13 lec1
Week13 lec1
 
Week11 lec2
Week11 lec2Week11 lec2
Week11 lec2
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
 
Week5 lec1-bscs1
Week5 lec1-bscs1Week5 lec1-bscs1
Week5 lec1-bscs1
 
Week4 lec2-bscs1
Week4 lec2-bscs1Week4 lec2-bscs1
Week4 lec2-bscs1
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Week3 lec3-bscs1
Week3 lec3-bscs1Week3 lec3-bscs1
Week3 lec3-bscs1
 
Week3 lec 2
Week3 lec 2Week3 lec 2
Week3 lec 2
 
Week3 lec 1
Week3 lec 1Week3 lec 1
Week3 lec 1
 
Week2 lec3-bscs1
Week2 lec3-bscs1Week2 lec3-bscs1
Week2 lec3-bscs1
 
Week2 lec2-bscs1
Week2 lec2-bscs1Week2 lec2-bscs1
Week2 lec2-bscs1
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 

Week11 lec1

  • 1. Chapter 4 Network Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 4. Issues with Classful Addressing • Flexibility in Internal addressing: – Thousands of hosts connected to one large network • Inefficient Use of Address Space: – Wastage of limited IP address space. • Router Table Entries: – Increase in router table entries. Example: • Hosts needed by organization are 5000 • Hosts in B 65,536 and in C 256 – Organization with 5,000 hosts is in a dilemma – It can only choose to either waste 90% of a Class B address or use 20 different Class C networks. – Replacing with 20 C networks will increase entries in routers
  • 5. Subnetting • Subnetting adds an additional level to the hierarchy of structures used in IP addressing. • IP addresses must be broken into three elements instead of two. • Network ID is unchanged • The host ID into a subnet ID and host ID. • These subnet ID bits are used to identify each subnet within the network. • Splitting the host ID into subnet ID and host ID, we reduce the size of the host ID portion of the address • Class A networks have 24 bits to split between the subnet ID and host ID: class B networks have 16, and class C networks only 8.
  • 6. Subnetting The more bits we use from the host ID for the subnet ID, the more subnets we can have but the fewer hosts we can have for each subnet.
  • 7. Subnet Mask • In classful addressing without subnetting – Routers use the first octet of the IP address to determine what the class is of the address – From class they know which bits are the network ID and which are the host ID. • In subnetting, the routers also need to know how that host ID is divided into subnet ID and host ID. – This division can be arbitrary for each network. – There is no way to tell how many bits belong to each simply by looking at the IP address. – The additional information about which bits are for the subnet ID and which for the host ID must be communicated to devices that interpret IP addresses. – This information is given in the form of a 32-bit binary number called a subnet mask.
  • 8. Determining the Subnet Mask • The subnet mask is a 32-bit binary number • It is created so that it has a one bit for each corresponding bit of the IP address that is part of its network ID or subnet ID, and a zero for each bit of the IP address’s host ID. • The mask thus tells TCP/IP devices which bits in that IP address belong to the network ID and subnet ID, and which are part of the host ID.
  • 9. Determining the Subnet Mask • Suppose we have the Class B network 154.71.0.0. • We decide to subnet this using 5 bits for the subnet ID and 11 bits for the host ID. • In this case, the subnet mask will have 16 ones for the network portion (since this is Class B) followed by 5 ones for the subnet ID, and 11 zeroes for the host ID. • That's “11111111 11111111 11111000 00000000” in binary, with the bits corresponding to the subnet ID highlighted. • Converting to dotted decimal, the subnet mask would be 255.255.248.0
  • 10. Determining the Subnet Mask Example • A company is granted the site address 210.70.64.0. The company needs six subnets. What is the subnet Mask?
  • 11. Determining the Subnet Mask Solution • Class C address • 6 subnets means 3 bits in the subnet id • 3 ones in the subnet mask • 11111111 11111111 11111111 11100000 • 255.255.255.224 (decimal)
  • 12. Using a Subnet Mask • Suppose we have a host on a network with an IP of 154.71.150.42 and subnet mask 255.255.248.0 • A router needs to figure out which subnet this address is on. 154.71.144.0 is the IP address of the subnet to which 154.71.150.42 belongs.
  • 13. Designing a Subnet • • • • Analyze the requirements Determine the subnet mask Each Subnet address Host Addresses Example: • Network Address: 211.77.20.0 • 8 sub networks • 32 hosts in each
  • 15. Designing a Subnet 211.77.20.0 in binary is • 11010011 01001101 00010100 00000000 • Subnet 0 – substitute “000” for the subnet ID bits (211.77.20.0) • Subnet 1 – substitute “001” for the subnet ID bits, to yield the following: – 11010011 01001101 00010100 00100000 (211.77.20.32 ) • Subnet 2 – substitute 010 for the subnet ID bits to give: – 11010011 01001101 00010100 01000000 (211.77.20.64) • Subnet 3 – Substitute 01100000 (211.77.20.96) • Subnet 7 (last) – Substitute 11100000 (211.77.20.224)
  • 17. Determining Host Address • Subnet #0 – First address: 11010011 01001101 00010100 00000000 (211.77.20.0) – Second address: 11010011 01001101 00010100 00000001 (211.77.20.1) – Third address: 11010011 01001101 00010100 00000010 (211.77.20.2) – Last address: 11010011 01001101 00010100 00011111 (211.77.20.31) • Subnet #6. It has “110” for the subnet bits instead of “000”. – First address: 11010011 01001101 00010100 11000000 (211.77.20.192) – Second address: 11010011 01001101 00010100 11000001 (211.77.20.193) – Third address: 11010011 01001101 00010100 11000010 (211.77.20.194) – Last address: 11010011 01001101 00010100 11011111 – (211.77.20.223) Similarly for other subnets •
  • 18. Designing a Subnet Home Assignment • A company is granted the site address 172.16.0.0. The company needs 1000 subnets. Design the subnets?
  • 19. Classless Addressing •To overcome address depletion •No classes, but the address are still granted in blocks. •The size of the block( the number of addresses) varies based on the nature and size of the entity. • Household: 2 addresses •Large organization: thousands of addresses • ISP: thousands or hundreds of thousands based on the number of customers it may serve. •The number of addresses in a block must be power of two (2,4,8…..). •Classless Inter Domain Routing (CIDR)
  • 20. Mask:Slash Notation • Each mask is made of some ones from the left and followed by some 0s. • Instead of 255.255.255.224 – Mask has 27 1s – Attach this number to a classless address –x.y.z.t/n • n defines the number of bits that are same in every block.
  • 21. Classless Addressing: Mask • The n leftmost bits are 1s • 32-n rightmost bits are 0s • In CIDR, n has a value from 0 to 32 and used to show the mask in the form /n. • 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. Example: 172.31.1.2/25
  • 23. Address allocation with Classful Addressing Need 10 addresses Class C. Give them 256. Need 200 addresses Class C. Give them 256. Need 500 addresses Class B. Give them 65,536. Need 1000 addresses Class B. Give them 65,536. Need 4000 addresses Class B. Give them 65,536. Fig courtesy: Ward Abingdon and Witney College CCNA Exploration
  • 24. Address allocation with Classless Addressing Need 10 addresses /28. Give them 16. Need 200 addresses /24. Give them 256. Need 500 addresses /23. Give them 512. Need 1000 addresses /22. Give them 1024. Need 4000 addresses /20. Give them 4096. Fig courtesy: Ward Abingdon and Witney College CCNA Exploration
  • 25. Classless Addressing • A small organization is given a block with a beginning address 205.16.37.24/29.What is the range of the block? • Number of bits for hosts =32-29=3 • Total hosts=8 • The first address is 205.16.37.24 • The last address is 205.16.37.31
  • 26. Classless Addressing • 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? The given address in binary is • 11001101 00010000 00100101 00100111 • If we set right most 4 bits to 0 we get • 11001101 00010000 00100101 00100000 – 205.16.37.32 (decimal)
  • 27. Classless Addressing • A block of addresses is granted to a small organization. We know that one of the addresses is 167.199.170.82/27.What is the first address in the block?
  • 28. Classless Addressing Solution • The last byte is 01010010 • Changing the last 5 bits to 0s we get • 01000000 or 64 • The first address in the block is 167.199.170.64/27
  • 29. Subnetting • An organization is granted the block 17.12.40.0/26. The organization has three offices and needs to divide the addresses into three sub-blocks of 32,16 and 16 addresses.What are the subnet addresses and the range of addresses for each subnet?
  • 30. Subnetting Solution: • For subnet 1 that requires 32 addresses – The mask is 32-5=27 • For subnet 2 that requires 16 addresses – The mask is 32-4=28 • For subnet 3 that requires 16 addresses – The mask is 32-4=28 • This means we have the masks 27,28,28 with the organization mask being 26
  • 31. Subnetting Solution: • For subnet 1 – The first address is 17.12.40.0/27 – The last address is 17.12.40.31/27 • For subnet 2 – The first address is 17.12.40.32/28 – The last address is 17.12.40.47/28 • For subnet 3 – The first address is 17.12.40.48/28 – The last address is 17.12.40.63/28
  • 32. Subnetting • An organization is granted the block 130.34.12.64/26. The organization needs to have four subnets with 16 hosts. What are the subnet addresses and the range of addresses for each subnet?
  • 33. Subnetting • For all subnets – The mask is 32-4=28 • For subnet 1 – The first address is 130.34.12.64/28 – The last address is 130.34.12.79/28 • For subnet 2 – The first address is 130.34.12.80/28 – The last address is 130.34.12.95/28 • For subnet 3 – The first address is 130.34.12.96/28 – The last address is 130.34.12.111/28 • For subnet 4 – The first address is 130.34.12.112/28 – The last address is 130.34.12.127/28
  • 34. Subnetting Home Assignment 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.