SlideShare a Scribd company logo
1 of 26
Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Last Lecture

Classful IP Addressing
Today’s Lecture

Classful IP Addressing
Subnetting
IP Address
• An IP address is a 32-bit address.
• The IP addresses are unique.
• The address space of IPv4 is
232 or 4,294,967,296.(more than 4 billion)
• Represented in binary or decimal
CLASSFUL ADDRESSING
• IP addressing when started used the concept of
classes.
• This architecture is called classful addressing.
• Organizations can be of different sizes
• Require varying numbers of IP addresses on the Internet.

• A system was devised whereby the IP address space
would be divided into classes.
• Each class occupies some part of the whole
address space
• Some classes are for
• Large networks on the Internet
• Smaller organizations

•

Some classes are reserved for special purposes.
IP Address Classes
Netid and Hostid
Class A
• Class A is divided into 128 blocks (27)
– Each block having different Netid
• First block covers addresses from
– 0.0.0.0 to 0.255.255.255 (netid 0)
• Second block covers addresses from
– 1.0.0.0 to 1.255.255.255 (netid 1)
• The last block covers addresses from
– 127.0.0.0 to 127.255.255.255 (netid 127)
• Each block in this class contains 16,777,216 addresses
• Class A addresses were designed for large
organizations with large number of hosts attached to
their network

– 16,777,216 too large, millions of class A addresses are wasted
Class B
• Class B is divided into 16384 blocks (214)
– Each block having different netid
• First block covers addresses from
– 128.0.0.0 to 128.0.255.255 (netid 128.0)
• The last block covers addresses from
– 191.255.0.0 to 191.255.255.255 (netid 191.255)
• Each block in this class contains 65,536 addresses
• Class B addresses were designed for medium size
organizations with thousands of hosts attached to
their network
– 65,536 is also too large for medium size organizations, many
of class B addresses are wasted
Class C
• Class C is divided into 2097152 blocks (221)
– Each block having different netid
• First block covers addresses from
– 192.0.0.0 to 192.0.0.255 (netid 192.0.0)
• The last block covers addresses from
– 223.255.255.0 to 223.255.255.255 (netid
223.255.255)
• Each block in this class contains 256 addresses
• Class C addresses were designed for small
organizations
– 256 is small for most organizations
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
• To better meet the administrative and technical
requirements of larger organizations, the “classful”
IP addressing system was enhanced through a
technique known as subnet addressing or subnetting.
• A three-level hierarchy is created: networks, which
contain subnets, each of which then has a number of
hosts.
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?

More Related Content

What's hot (20)

Subnetting and routing
Subnetting and routingSubnetting and routing
Subnetting and routing
 
Ip -subnetting
Ip  -subnettingIp  -subnetting
Ip -subnetting
 
NAT and Subnetting
NAT and Subnetting NAT and Subnetting
NAT and Subnetting
 
Subnet Masks
Subnet MasksSubnet Masks
Subnet Masks
 
Sub Netting
Sub NettingSub Netting
Sub Netting
 
IP addressing and Subnetting PPT
IP addressing and Subnetting PPTIP addressing and Subnetting PPT
IP addressing and Subnetting PPT
 
Ip address classes
Ip address classesIp address classes
Ip address classes
 
Ip Addressing
Ip AddressingIp Addressing
Ip Addressing
 
Ramakant tyagi presentation on ip addressing
Ramakant tyagi presentation on ip addressingRamakant tyagi presentation on ip addressing
Ramakant tyagi presentation on ip addressing
 
Subnetting
SubnettingSubnetting
Subnetting
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
Types of ip address classes
Types of ip address classesTypes of ip address classes
Types of ip address classes
 
Subnet Mask
Subnet MaskSubnet Mask
Subnet Mask
 
IP NETWORKING AND IP SUBNET MASKING
IP NETWORKING AND IP SUBNET MASKING IP NETWORKING AND IP SUBNET MASKING
IP NETWORKING AND IP SUBNET MASKING
 
Subnetting Basics Tutorial
Subnetting Basics TutorialSubnetting Basics Tutorial
Subnetting Basics Tutorial
 
CCNA part 2 ip addressing
CCNA part 2 ip addressingCCNA part 2 ip addressing
CCNA part 2 ip addressing
 
IP Subnetting
IP SubnettingIP Subnetting
IP Subnetting
 
IP classes and subnetting.
IP classes and subnetting.IP classes and subnetting.
IP classes and subnetting.
 
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
 
ITFT - IP adressing
 ITFT - IP adressing ITFT - IP adressing
ITFT - IP adressing
 

Similar to Week10 lec1

Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclassaskme
 
08 - IP Subnetting.ppt
08 - IP Subnetting.ppt08 - IP Subnetting.ppt
08 - IP Subnetting.pptssuserf7cd2b
 
Ip addressing
Ip addressingIp addressing
Ip addressingsid1322
 
ip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptFaysalAhamed32
 
IP and CIDR ipv6 addressing.ppt
IP and CIDR ipv6 addressing.pptIP and CIDR ipv6 addressing.ppt
IP and CIDR ipv6 addressing.pptAkkiKumar26
 
module03-ipaddr.ppt
module03-ipaddr.pptmodule03-ipaddr.ppt
module03-ipaddr.pptImXaib
 
Ip addressing
Ip addressingIp addressing
Ip addressingOnline
 
network design 7.pptx
network design 7.pptxnetwork design 7.pptx
network design 7.pptxaida alsamawi
 
this is a presentationon ip and cidr.ppt
this is a presentationon ip and cidr.pptthis is a presentationon ip and cidr.ppt
this is a presentationon ip and cidr.pptBlackHat41
 
chsadsadasdasdasdasdsadsadsadsadsadasda10.ppt
chsadsadasdasdasdasdsadsadsadsadsadasda10.pptchsadsadasdasdasdasdsadsadsadsadsadasda10.ppt
chsadsadasdasdasdasdsadsadsadsadsadasda10.pptssuserde23af
 
Networking Chapter 7
Networking Chapter 7Networking Chapter 7
Networking Chapter 7mlrbrown
 
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 hartpenceO'Reilly Media
 

Similar to Week10 lec1 (20)

Week11 lec1
Week11 lec1Week11 lec1
Week11 lec1
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
 
Ipaddress presentationdemoclass
Ipaddress presentationdemoclassIpaddress presentationdemoclass
Ipaddress presentationdemoclass
 
08 - IP Subnetting.ppt
08 - IP Subnetting.ppt08 - IP Subnetting.ppt
08 - IP Subnetting.ppt
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
How IP address works
How IP address worksHow IP address works
How IP address works
 
ip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.pptip_addressing_subnetting aaaaaaaaaaa.ppt
ip_addressing_subnetting aaaaaaaaaaa.ppt
 
IP and CIDR ipv6 addressing.ppt
IP and CIDR ipv6 addressing.pptIP and CIDR ipv6 addressing.ppt
IP and CIDR ipv6 addressing.ppt
 
module03-ipaddr.ppt
module03-ipaddr.pptmodule03-ipaddr.ppt
module03-ipaddr.ppt
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
network design 7.pptx
network design 7.pptxnetwork design 7.pptx
network design 7.pptx
 
IP Address
IP AddressIP Address
IP Address
 
Ip address and subnetting
Ip address and subnettingIp address and subnetting
Ip address and subnetting
 
Subnetting
SubnettingSubnetting
Subnetting
 
this is a presentationon ip and cidr.ppt
this is a presentationon ip and cidr.pptthis is a presentationon ip and cidr.ppt
this is a presentationon ip and cidr.ppt
 
Ray ipv4 addresses
Ray   ipv4 addressesRay   ipv4 addresses
Ray ipv4 addresses
 
chsadsadasdasdasdasdsadsadsadsadsadasda10.ppt
chsadsadasdasdasdasdsadsadsadsadsadasda10.pptchsadsadasdasdasdasdsadsadsadsadsadasda10.ppt
chsadsadasdasdasdasdsadsadsadsadsadasda10.ppt
 
Networking Chapter 7
Networking Chapter 7Networking Chapter 7
Networking Chapter 7
 
IPV4 addresses
IPV4 addressesIPV4 addresses
IPV4 addresses
 
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
 

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

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 

Week10 lec1

  • 1. Chapter 4 Network Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 3. Today’s Lecture Classful IP Addressing Subnetting
  • 4. IP Address • An IP address is a 32-bit address. • The IP addresses are unique. • The address space of IPv4 is 232 or 4,294,967,296.(more than 4 billion) • Represented in binary or decimal
  • 5. CLASSFUL ADDRESSING • IP addressing when started used the concept of classes. • This architecture is called classful addressing. • Organizations can be of different sizes • Require varying numbers of IP addresses on the Internet. • A system was devised whereby the IP address space would be divided into classes. • Each class occupies some part of the whole address space • Some classes are for • Large networks on the Internet • Smaller organizations • Some classes are reserved for special purposes.
  • 8. Class A • Class A is divided into 128 blocks (27) – Each block having different Netid • First block covers addresses from – 0.0.0.0 to 0.255.255.255 (netid 0) • Second block covers addresses from – 1.0.0.0 to 1.255.255.255 (netid 1) • The last block covers addresses from – 127.0.0.0 to 127.255.255.255 (netid 127) • Each block in this class contains 16,777,216 addresses • Class A addresses were designed for large organizations with large number of hosts attached to their network – 16,777,216 too large, millions of class A addresses are wasted
  • 9. Class B • Class B is divided into 16384 blocks (214) – Each block having different netid • First block covers addresses from – 128.0.0.0 to 128.0.255.255 (netid 128.0) • The last block covers addresses from – 191.255.0.0 to 191.255.255.255 (netid 191.255) • Each block in this class contains 65,536 addresses • Class B addresses were designed for medium size organizations with thousands of hosts attached to their network – 65,536 is also too large for medium size organizations, many of class B addresses are wasted
  • 10. Class C • Class C is divided into 2097152 blocks (221) – Each block having different netid • First block covers addresses from – 192.0.0.0 to 192.0.0.255 (netid 192.0.0) • The last block covers addresses from – 223.255.255.0 to 223.255.255.255 (netid 223.255.255) • Each block in this class contains 256 addresses • Class C addresses were designed for small organizations – 256 is small for most organizations
  • 11. 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
  • 12. Subnetting • To better meet the administrative and technical requirements of larger organizations, the “classful” IP addressing system was enhanced through a technique known as subnet addressing or subnetting. • A three-level hierarchy is created: networks, which contain subnets, each of which then has a number of hosts.
  • 13. 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.
  • 14. 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.
  • 15. 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.
  • 16. 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.
  • 17. 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
  • 18. 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?
  • 19. 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)
  • 20. 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.
  • 21. 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
  • 23. 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)
  • 25. 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 •
  • 26. Designing a Subnet Home Assignment • A company is granted the site address 172.16.0.0. The company needs 1000 subnets. Design the subnets?