SlideShare a Scribd company logo
1 of 27
Computer Networks
LEC #2
Communicating Over the
Network
Computer Networks
LEC #7
Network Layer
(CONT.)
Lecture
Outlines
2
 Network Layer.
Addressing
Subnetting
Mask (default and subnet)
Routing
Next
Lecture
Remember
32 bit Binary
Expressed in DOTTED DECIMAL NOTATION
Divided into OCTETS
Subnet Mask
Class
First
Octet
Range
Number
of Network
Bits
Number
of Host
Bits
Default
Subnet
Mask
Number
of
Networks
Number
of Hosts
per Network
A 0-127 8 24 255.0.0.0 128 16,777,216
B 128-191 16 16 255.255.0.0 16,384 65,536
C 192-223 24 8 255.255.255.0 2,097,152 256
 Each class has a default or "natural" subnet mask based on the
default number of bits used for the network and host portion.
Netid Hostid Hostid Hostid
Netid Netid Hostid Hostid
Netid Netid Netid Hostid
Class A
Class B
Class C
First Byte Second Byte Third Byte Fourth Byte
Network Prefixes
How do you know the number of bits assigned to the network and the
number of bits assigned to the host?
 Prefix Mask:
The address is followed by a number that represents the number of bits
(prefix length), beginning from the left, that apply to the network.
A slash (/) is used to separate the address and the prefix length.
192.168.10.2/24
Means that the first 24 bits are the network portion.
The last 8 bits are the host portion.
Class
Number of
Network Bits
Number of
Host Bits
Default
Prefix
Default
Subnet Mask
A 8 24 /8 255.0.0.0
B 16 16 /16 255.255.0.0
C 24 8 /24 255.255.255.0
Classful IPAddressing – Class C
We know from the Class C default subnet mask (255.255.255.0):
 The first 24 bits are the network number and the
last 8 bits are the host numbers.
11111111
01001101
00010100
11010010
255
77.
20.
210.
• The last host address (all 1's) is reserved for the broadcast address.
00000000
01001101
00010100
11010010
0
77.
20.
210.
• The first host address (all 0's) is reserved for the network address.
 The number of usable host addresses for the entire network is 28 – 2 = 254
11111110
01001101
00010100
11010010
254
77.
20.
210.
00000001
01001101
00010100
11010010
1
77.
20.
210.
The range of available
addresses is:
Example
For example: In Class C :
 Address range: 192 - 223
 Number of network bits: 24
 Number of networks: 2^24 = 2,097,152
 Number of host bits: 8
 Number of hosts per network: 28 = 256
 Number of Useable Hosts per network: 28 - 2 = 254
 Default Subnet Mask: 255.255.255.0 or /24
Exemple
Exemple
Exemple
Resume
12
Subnetting
 It divides the main network into several subnets Each one with its own
subnet address.
 For example, if you want to take 5 bits from the Host field for subnetting and
leaves 3 bits for defining hosts as shown in figure below. Having 5 bits
available for defining subnets means that we can have up to 32 (2^5) different
subnets.
 Let a class C network with 256 host addresses. One of these addresses is used
to identify the network address and another one is used to identify the
broadcast address on the network. Therefore, we are left with 254 addresses
available for addressing hosts.
13
Subnetting
Suppose the IP address = 192.168.10.44
Default Mask = 255.255.255.0
How to calculate subnet using binary method?
1. Convert to binary
2. Calculate the Subnet Address
 To calculate the IP Address Subnet you need to perform a bit-wise AND
operation (1 and 1 = 1, 1 and 0 or 0 and 1 = 0, 0 and 0 = 0) on the host
IP address and subnet mask. The result is the subnet address.
Subnetting
3. Find Host Range
Subnetting
3. Find Host Range
Subnetting
4. Calculate the Total Number of Subnets and Hosts Per Subnet
So number of subnets is = 2 ^# subnet bits
Number of hosts in each subnet is = 2^ # host bits
Example
211.215.9.115/29 : 29 (24+5) means we will take 5 bits from the host part for the
subnetting and leave 3 bits for the hosts in the subnet. So to find the first subnet
 Suppose the following IP 211.215.9.115/29 find first subnet address, first host in
the subnet, Last host in the first subnet, broadcast address of the first subnet and
the address of the second subnet.
Answer
211.215.9. 115 = 01110011
subnetMask for the 5 bits is 11111000
Bit wise And operation 01110000 = 112
So, the first subnet is 211.215.9.112
First host in the subnet is 211.215.9.113
last host in the subnet is 211.215.9.118
Broadcast address is 211.215.9.119
Second subnet will start 211.215.9.120
Example
 Note that if you need for example 3 subnets only from your network,
How to compute the number of bits that you need?
 So, convert number 3 to binary?
2 3
1
 So, we need Two bits
1
1
11000110 10101000 11010100 00 000000
Netid (For network) Hostid
Subnet
11000110 10101000 11010100 00000000
Netid (For network) Hostid
Routing
 To route the router, need to know:
1) Destination address
2) Different routes
3) Best route
4) Maintain and verify routing information
Routing
 Each router has a routing table to specify the different networks and best
route to this networks
 To know the best route, router should perform routing process because it
only know the direct connected devices.
 there are two different types of routing : Static and Dynamic
 Static uses the route that is entered manually by the admin
 Dynamic uses a network routing protocol adjusts automatically for
topology or traffic changes
Static Route
 Configure unidirectional static routes to and from a sub network to allow
communications to occur.
 For example, if we have packets on router A and need to travel to network
172.16.1.0 we should configure router A to decide the path to the
destination address How?
Destination address Subnet Mask Next Hop which means next router
Static Route
 How to decide more than route in the static way?
 The same command is used but with adding distance for each command to
specify the priority of each route.
 The distance value ranged from 0 to 255 and default value is 1.
 The low value is the best route
Distance
value
Dynamic Routing
 Routing protocols are used to determine paths and maintain routing table such
as RIP (Routing Information Protocol).
 Once the path is determined a router can route a routed protocol.
Routing
Protocols
Interior
Protocols
Hybrid
Routing
EIGRP (Enhanced
Interior Gateway
Routing Protocol)
Distance
Vector
RIP (Routing
Information
Protocol)
Link State
OSPF (Open
Shortest Path
First)
Exterior
Protocols
BGP (Border
Gateway
Protocol)
Dynamic Routing – Distance Vector - RIP
 It uses hop count as a routing metric to find the best path between the source and the
destination network.
 RIP uses port number 520.
 Hop count is the number of routers occurring in between the source and destination
network. The path with the lowest hop count is considered as the best route to reach a
network and therefore placed in the routing table.
 Routers periodically exchange the router information (default exchange time 30 second).
 if no update comes until 180 seconds, then the destination router considers the other
router is out of service.
 Default distance is 120 (priority of the route).
 In case there are more than one route between two networks the RIP will prefers the
route that has least hop.
25
Dynamic Routing – RIP Example
 Each Router will send its Routing table to the routers in its neighbors.
 For example, Router C will send its table to Router B
 The 0 value in last column means number of hops to reach to the network
because its direct connection so it’s equal 0.
 So, what is the content of the table at the end of round?
26
 So Router B will investigate the incoming table to register the missing
information in its table for example routing table of router C have two
networks 10.3.0.0 and 10.4.0.0 and in the table of router B there are two
networks 10.2.0.0 and 10.3.0.0, So Router B will add network 10.4.0.1 in
its table with port S1.
Dynamic Routing – RIP Example
27
https://www.youtube.com/watch?v=F5JbMXEBHO0

More Related Content

Similar to 7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) Routing

Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slidesadam_merritt
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basicstmavroidis
 
-LAB 3-IP Addressing and Subnettinncgbg.pdf
-LAB 3-IP Addressing and Subnettinncgbg.pdf-LAB 3-IP Addressing and Subnettinncgbg.pdf
-LAB 3-IP Addressing and Subnettinncgbg.pdfAreshZabi
 
Subnetting Network administrators are usually granted wi.docx
Subnetting Network administrators are usually granted wi.docxSubnetting Network administrators are usually granted wi.docx
Subnetting Network administrators are usually granted wi.docxpicklesvalery
 
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
 
Computer Networks Module III
Computer Networks Module IIIComputer Networks Module III
Computer Networks Module IIIAjit Nayak
 
lecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for anslecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for anspeterhaile1
 
IP Address & Its Classes .pdf
IP    Address   &   Its    Classes  .pdfIP    Address   &   Its    Classes  .pdf
IP Address & Its Classes .pdfnandiaditi2010
 
ip addressing & routing
 ip addressing & routing ip addressing & routing
ip addressing & routingVikas Jagtap
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategyMustafa Salam
 

Similar to 7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) Routing (20)

Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slides
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basics
 
CCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick NotesCCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick Notes
 
-LAB 3-IP Addressing and Subnettinncgbg.pdf
-LAB 3-IP Addressing and Subnettinncgbg.pdf-LAB 3-IP Addressing and Subnettinncgbg.pdf
-LAB 3-IP Addressing and Subnettinncgbg.pdf
 
Subnetting Network administrators are usually granted wi.docx
Subnetting Network administrators are usually granted wi.docxSubnetting Network administrators are usually granted wi.docx
Subnetting Network administrators are usually granted wi.docx
 
Ccna1v3 mod10
Ccna1v3 mod10Ccna1v3 mod10
Ccna1v3 mod10
 
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
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
 
Computer Networks Module III
Computer Networks Module IIIComputer Networks Module III
Computer Networks Module III
 
lecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for anslecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for ans
 
IP Address & Its Classes .pdf
IP    Address   &   Its    Classes  .pdfIP    Address   &   Its    Classes  .pdf
IP Address & Its Classes .pdf
 
Mod6
Mod6Mod6
Mod6
 
gofortution
gofortutiongofortution
gofortution
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
ip addressing & routing
 ip addressing & routing ip addressing & routing
ip addressing & routing
 
Subnet Design
Subnet DesignSubnet Design
Subnet Design
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategy
 
Computer network
Computer networkComputer network
Computer network
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Ch7 IP addressing.pptx
Ch7 IP addressing.pptxCh7 IP addressing.pptx
Ch7 IP addressing.pptx
 

More from ZahouAmel1

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...ZahouAmel1
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptxZahouAmel1
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxZahouAmel1
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationZahouAmel1
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxZahouAmel1
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxZahouAmel1
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyZahouAmel1
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxZahouAmel1
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptxZahouAmel1
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer ProtocolsZahouAmel1
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork LayerZahouAmel1
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptxZahouAmel1
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptxZahouAmel1
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink LayerZahouAmel1
 

More from ZahouAmel1 (18)

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptx
 
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptxDB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
 

Recently uploaded

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 

Recently uploaded (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) Routing

  • 1. Computer Networks LEC #2 Communicating Over the Network Computer Networks LEC #7 Network Layer (CONT.)
  • 3. Remember 32 bit Binary Expressed in DOTTED DECIMAL NOTATION Divided into OCTETS
  • 4. Subnet Mask Class First Octet Range Number of Network Bits Number of Host Bits Default Subnet Mask Number of Networks Number of Hosts per Network A 0-127 8 24 255.0.0.0 128 16,777,216 B 128-191 16 16 255.255.0.0 16,384 65,536 C 192-223 24 8 255.255.255.0 2,097,152 256  Each class has a default or "natural" subnet mask based on the default number of bits used for the network and host portion. Netid Hostid Hostid Hostid Netid Netid Hostid Hostid Netid Netid Netid Hostid Class A Class B Class C First Byte Second Byte Third Byte Fourth Byte
  • 5. Network Prefixes How do you know the number of bits assigned to the network and the number of bits assigned to the host?  Prefix Mask: The address is followed by a number that represents the number of bits (prefix length), beginning from the left, that apply to the network. A slash (/) is used to separate the address and the prefix length. 192.168.10.2/24 Means that the first 24 bits are the network portion. The last 8 bits are the host portion. Class Number of Network Bits Number of Host Bits Default Prefix Default Subnet Mask A 8 24 /8 255.0.0.0 B 16 16 /16 255.255.0.0 C 24 8 /24 255.255.255.0
  • 6. Classful IPAddressing – Class C We know from the Class C default subnet mask (255.255.255.0):  The first 24 bits are the network number and the last 8 bits are the host numbers. 11111111 01001101 00010100 11010010 255 77. 20. 210. • The last host address (all 1's) is reserved for the broadcast address. 00000000 01001101 00010100 11010010 0 77. 20. 210. • The first host address (all 0's) is reserved for the network address.  The number of usable host addresses for the entire network is 28 – 2 = 254 11111110 01001101 00010100 11010010 254 77. 20. 210. 00000001 01001101 00010100 11010010 1 77. 20. 210. The range of available addresses is:
  • 7. Example For example: In Class C :  Address range: 192 - 223  Number of network bits: 24  Number of networks: 2^24 = 2,097,152  Number of host bits: 8  Number of hosts per network: 28 = 256  Number of Useable Hosts per network: 28 - 2 = 254  Default Subnet Mask: 255.255.255.0 or /24
  • 12. 12 Subnetting  It divides the main network into several subnets Each one with its own subnet address.  For example, if you want to take 5 bits from the Host field for subnetting and leaves 3 bits for defining hosts as shown in figure below. Having 5 bits available for defining subnets means that we can have up to 32 (2^5) different subnets.  Let a class C network with 256 host addresses. One of these addresses is used to identify the network address and another one is used to identify the broadcast address on the network. Therefore, we are left with 254 addresses available for addressing hosts.
  • 13. 13 Subnetting Suppose the IP address = 192.168.10.44 Default Mask = 255.255.255.0 How to calculate subnet using binary method? 1. Convert to binary 2. Calculate the Subnet Address  To calculate the IP Address Subnet you need to perform a bit-wise AND operation (1 and 1 = 1, 1 and 0 or 0 and 1 = 0, 0 and 0 = 0) on the host IP address and subnet mask. The result is the subnet address.
  • 16. Subnetting 4. Calculate the Total Number of Subnets and Hosts Per Subnet So number of subnets is = 2 ^# subnet bits Number of hosts in each subnet is = 2^ # host bits
  • 17. Example 211.215.9.115/29 : 29 (24+5) means we will take 5 bits from the host part for the subnetting and leave 3 bits for the hosts in the subnet. So to find the first subnet  Suppose the following IP 211.215.9.115/29 find first subnet address, first host in the subnet, Last host in the first subnet, broadcast address of the first subnet and the address of the second subnet. Answer 211.215.9. 115 = 01110011 subnetMask for the 5 bits is 11111000 Bit wise And operation 01110000 = 112 So, the first subnet is 211.215.9.112 First host in the subnet is 211.215.9.113 last host in the subnet is 211.215.9.118 Broadcast address is 211.215.9.119 Second subnet will start 211.215.9.120
  • 18. Example  Note that if you need for example 3 subnets only from your network, How to compute the number of bits that you need?  So, convert number 3 to binary? 2 3 1  So, we need Two bits 1 1 11000110 10101000 11010100 00 000000 Netid (For network) Hostid Subnet 11000110 10101000 11010100 00000000 Netid (For network) Hostid
  • 19. Routing  To route the router, need to know: 1) Destination address 2) Different routes 3) Best route 4) Maintain and verify routing information
  • 20. Routing  Each router has a routing table to specify the different networks and best route to this networks  To know the best route, router should perform routing process because it only know the direct connected devices.  there are two different types of routing : Static and Dynamic  Static uses the route that is entered manually by the admin  Dynamic uses a network routing protocol adjusts automatically for topology or traffic changes
  • 21. Static Route  Configure unidirectional static routes to and from a sub network to allow communications to occur.  For example, if we have packets on router A and need to travel to network 172.16.1.0 we should configure router A to decide the path to the destination address How? Destination address Subnet Mask Next Hop which means next router
  • 22. Static Route  How to decide more than route in the static way?  The same command is used but with adding distance for each command to specify the priority of each route.  The distance value ranged from 0 to 255 and default value is 1.  The low value is the best route Distance value
  • 23. Dynamic Routing  Routing protocols are used to determine paths and maintain routing table such as RIP (Routing Information Protocol).  Once the path is determined a router can route a routed protocol. Routing Protocols Interior Protocols Hybrid Routing EIGRP (Enhanced Interior Gateway Routing Protocol) Distance Vector RIP (Routing Information Protocol) Link State OSPF (Open Shortest Path First) Exterior Protocols BGP (Border Gateway Protocol)
  • 24. Dynamic Routing – Distance Vector - RIP  It uses hop count as a routing metric to find the best path between the source and the destination network.  RIP uses port number 520.  Hop count is the number of routers occurring in between the source and destination network. The path with the lowest hop count is considered as the best route to reach a network and therefore placed in the routing table.  Routers periodically exchange the router information (default exchange time 30 second).  if no update comes until 180 seconds, then the destination router considers the other router is out of service.  Default distance is 120 (priority of the route).  In case there are more than one route between two networks the RIP will prefers the route that has least hop.
  • 25. 25 Dynamic Routing – RIP Example  Each Router will send its Routing table to the routers in its neighbors.  For example, Router C will send its table to Router B  The 0 value in last column means number of hops to reach to the network because its direct connection so it’s equal 0.  So, what is the content of the table at the end of round?
  • 26. 26  So Router B will investigate the incoming table to register the missing information in its table for example routing table of router C have two networks 10.3.0.0 and 10.4.0.0 and in the table of router B there are two networks 10.2.0.0 and 10.3.0.0, So Router B will add network 10.4.0.1 in its table with port S1. Dynamic Routing – RIP Example