SlideShare a Scribd company logo
Lecture Title: Network Layer
Lecture Name: Dr. Tamer Omar
Lecture Date:
Year: 3rd Year
Spec.:
Subject: MSE 4532 Computer Communication Networks
Objectives
Dr. Tamer Omar
❑Link State Routing
❑Hierarchical Routing
❑Multicasting Routing Protocols
Dr. Tamer Omar
Link State Routing
(an adaptive routing algorithm)
1. Discover your neighbors and learn their
addresses.
2. Measure the cost (delay) to each neighbor.
3. Construct a packet containing all this
information
4. Send this packet to all other routers.
5. Compute the shortest path to every other
router.
Dr. Tamer Omar
1. Discovering Your Neighbors
❑ Send “Hello” packet on each point-to-
point line. Destination node replies with
its address.
Dr. Tamer Omar
1. Discovering Your Neighbors
Nine routers and a broadcast LAN.
Dr. Tamer Omar
1. Discovering Your Neighbors
A graph model of previous slide.
Dr. Tamer Omar
2. Measuring Line Cost
❑ Send an “ECHO” packet over the line.
❑ Destination is required to respond to “ECHO”
packet immediately.
❑ Measure the time required for this operation.
❑ Question: Should we measure just the time it
takes to transmit the packet, or should we
include the time that the packet waits in the
queue?
Dr. Tamer Omar
3. Build Link State Packets
Dr. Tamer Omar
4. Distributing the Link State Packets
❑Use selective flooding
❑Sequence numbers prevent duplicate
packets from being propagated
❑Lower sequence numbers are rejected
as obsolete
Dr. Tamer Omar
4. Distributing the Link State Packets
The packet buffer for router B in previous slide
▪ the link state packet from A arrives directly, so it must be sent
to C and F and acknowledged to A, as indicated by the flag
bits. Similarly, the packet from F has to be forwarded to A and
C and acknowledged to F.
Dr. Tamer Omar
Hierarchical Routing
❑ As a network size grows, routing table grows.
❑ Divide routers into regions
❑ Each router knows all the details about routing
within its region and knows nothing about the
internal structure of other region.
❑ Advantage: less storage requirement
❑ Penalty: longer path.
Dr. Tamer Omar
Hierarchical Routing
❑ As a network size grows, routing table grows.
❑ Divide routers into regions
❑ Each router knows all the details about routing
within its region and knows nothing about the
internal structure of other region.
❑ Works like telephone routing
❑ Advantage: less storage requirement
❑ Penalty: longer path.
Dr. Tamer Omar
Hierarchical Routing
Dr. Tamer Omar
Unicast Routing Protocols
❑ In unicast communication, there is one source and one
destination. The relationship between the source and the
destination is one-to-one.
❑ A unicast packet starts from the source S1 and passes through
routers to reach the destination D1.
❑ In unicast routing, each router in the domain has a table that
defines a shortest path tree to possible destinations.
Dr. Tamer Omar
Unicast Routing Protocols
Dr. Tamer Omar
Multicasting Routing Protocols
❑ In multicast communication, there is one source and a group of
destinations. The relationship is one-to-many. In this type of
communication, the source address is a unicast address, but the
destination address is a group address, which defines one or
more destinations.
A multicast packet starts from the
source S1 and goes to all
destinations that
belong to group G1. In multicasting,
when a router receives a packet, it
may forward it
through several of its interfaces
Dr. Tamer Omar
Multicasting Routing Protocols
❑ A multicast packet may have destinations in more than
one network. Forwarding of a single packet to
members of a group requires a shortest path tree. If we
have n groups, we may need n shortest path trees. We
can imagine the complexity of multicast routing. Two
approaches have been used to solve the problem:
source-based trees and group-shared trees.
❑ Source-Based Tree. In the source-based tree approach,
each router needs to have one shortest path tree for
each group. The shortest path tree for a group defines
the next hop for each network that has loyal
member(s) for that group.
Dr. Tamer Omar
Source-based trees
If router Rl receives a packet with destination address G1, it needs to send a copy of
the packet to the attached network, a copy to router R2, and a copy to router R4 so
that all members of G1 can receive a copy. In this approach, if the number of groups is
m, each router needs to have m shortest path trees, one for each group. We can
imagine the complexity of the routing table if we have hundreds or thousands of
groups. H
Dr. Tamer Omar
Group-Shared Tree
❑In the group-shared tree approach, instead of each
router having m shortest path trees, only one
designated router, called the center core, takes the
responsibility of distributing multicast traffic.
❑The core has m shortest path trees in its routing table.
The rest of the routers in the domain have none. If a
router receives a multicast packet, it encapsulates the
packet in a unicast packet and sends it to the core
router. The core router removes the multicast packet
from its capsule, and consults its routing table to
route the packet.
Dr. Tamer Omar
Group-Shared Tree
Dr. Tamer Omar
Multicast Routing
❑ Multicast routing is a networking method for efficient
distribution of one-to-many traffic. A multicast source,
such as a live video conference, sends traffic in one
stream to a multicast group. The multicast group
contains receivers such as computers, devices, and IP
phones.
• Voice over IP (VOIP)
• Video on demand (VOD)
• Video conferencing
• IP television (IPTV)
Dr. Tamer Omar
Broadcasting
❑ In broadcast communication, the relationship between
the source and the destination is one-to-all. There is
only one source, but all the other hosts are the
destinations
Dr. Tamer Omar
Congestion Control Algorithms
❑ Congestion Control is a mechanism that
controls the entry of data packets into the
network, enabling a better use of a shared
network infrastructure and avoiding
congestive collapse. Congestive-Avoidance
Algorithms (CAA) are implemented at the TCP
layer as the mechanism to avoid congestive
collapse in a network.
Dr. Tamer Omar
General Principles of Congestion Control
❑ Open loop solutions attempt to solve the
problem by good design
❑ Closed loop solutions are based on the concept of a
feedback loop. This approach has three parts when
applied to congestion control:
1. Monitor the system to detect when and where
congestion occurs.
2. Pass this information to places where action can be
taken.
3. Adjust system operation to correct the problem.
Dr. Tamer Omar
Policies that affect congestion.
❑ Retransmission Policy :
It is the policy in which retransmission of the
packets are taken care of. If the sender feels
that a sent packet is lost or corrupted, the
packet needs to be retransmitted. This
transmission may increase the congestion in
the network.
▪ To prevent congestion, retransmission
timers must be designed to prevent
congestion and also able to optimize
efficiency.
Dr. Tamer Omar
Policies that affect congestion.
❑ Window Policy :
The type of window at the sender’s side may
also affect the congestion. Several packets in
the Go-back-n window are re-sent, although
some packets may be received successfully at
the receiver side. This duplication may
increase the congestion in the network and
make it worse.
❑ Therefore, Selective repeat window should be
adopted as it sends the specific packet that
may have been lost.
Dr. Tamer Omar
Policies that affect congestion.
❑ Discarding Policy :
A good discarding policy adopted by the
routers is that the routers may prevent
congestion and at the same time partially
discard the corrupted or less sensitive
packages and also be able to maintain the
quality of a message.
▪ In case of audio file transmission, routers
can discard less sensitive packets to
prevent congestion and also maintain the
quality of the audio file.
Dr. Tamer Omar
Policies that affect congestion.
❑ Acknowledgment Policy :
Since acknowledgements are also the part of
the load in the network, the acknowledgment
policy imposed by the receiver may also affect
congestion. Several approaches can be used
to prevent congestion related to
acknowledgment.
▪ The receiver should send
acknowledgement for N packets rather
than sending acknowledgement for a single
packet. The receiver should send an
acknowledgment only if it has to send a
Dr. Tamer Omar
Policies that affect congestion.
❑ Admission Policy :
In admission policy a mechanism should be
used to prevent congestion. Switches in a flow
should first check the resource requirement of
a network flow before transmitting it further. If
there is a chance of a congestion or there is a
congestion in the network, router should deny
establishing a virtual network connection to
prevent further congestion.
Dr. Tamer Omar
Logical Addressing
❑ IP address
The Internet addresses are 32 bits in length;
this gives us a maximum of 232addresses.
These addresses are referred to as IPv4 (IP
version 4) addresses or simply IP addresses if
there is no confusion.
❑ A new design of the IP layer called the new generation
of IP or IPv6 (lP version 6). In this version, the
Internet uses 128-bit addresses that give much greater
flexibility in address allocation. These addresses are
referred to as IPv6 (IP version 6) addresses.
❑ In this lecture, we first discuss IPv4 addresses, which
are currently being used in the Internet.
Dr. Tamer Omar
IPv4 ADDRESSES
❑ An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device (for example, a
computer or a router) to the Internet.
❑ An identifier for a computer or device on a TCP/IP network.
Networks using the TCP/IP protocol route messages based on
the IP address of the destination.
❑ The IPv4 addresses are universal in the sense that the
addressing system must be accepted by any host that wants to
be connected to the Internet
❑ Address Space
• An address space is the total number of addresses used by
the protocol. If a protocol uses N bits to define an address,
the address space is 2N because each bit can have two
different values (0 or 1) and N bits can have 2N values
Dr. Tamer Omar
IPv4 ADDRESSES
❑ IPv4 uses 32-bit addresses, which means that the
address space is 232 or 4,294,967,296 (more than 4
billion). This means that, theoretically, if there were no
restrictions, more than 4 billion devices could be
connected to the Internet. We will see shortly that the
actual number is much less because of the restrictions
imposed on the addresses.
❑ Notations
• There are two prevalent notations to show an IPv4
address: binary notation and dotte ddecimal
notation.
Dr. Tamer Omar
Binary Notation
❑ In binary notation, the IPv4 address is displayed as
32 bits. Each octet is often referred to as a byte. So
it is common to hear an IPv4 address referred to as
a 32-bit address or a 4-byte address. The following
is an example of an IPv4 address in binary notation:
01110101 10010101 00011101 0000001
Dr. Tamer Omar
Dotted-Decimal Notation
❑ To make the IPv4 address more compact and easier
to read, Internet addresses are usually written in
decimal form with a decimal point (dot) separating
the bytes. The following is the dotted~decimal
notation of the above address:
117.149.29.2
Dr. Tamer Omar
Classful Addressing
❑ Each IP address breaks down into the following sections:
▪ Net ID—Identifies a network. The first several bits of a
net ID, known as the class field or class bits, identify the
class of the IP address.
▪ Host ID—Identifies a host on a network.
❑ In classful addressing, the address space is divided into five
classes: A, B, C, D, and E. Each class occupies some part of
the address space.
❑ We can find the class of an address when given the address
in binary notation or dotted-decimal notation. If the address
is given in binary notation, the first few bits can
immediately tell us the class of the address. If the address is
given in decimal-dotted notation, the first byte defines the
class.
Dr. Tamer Omar
Classful Addressing
• Class A - 168.212.226.204
• supports 16 million hosts on each of 127 networks
• Class B - 168.212.226.204
• supports 65,000 hosts on each of 16,000 networks
– NDUS has two Class B addresses
• 134.129.xxx.xxx Eastern ND
• 134.234.xxx.xxx Western ND
• Class C - 168.212.226.204
• supports 254 hosts on each of 2 million networks
Dr. Tamer Omar
Classful Addressing
Dr. Tamer Omar
Classful Addressing
Class Address range Remarks
A 0.0.0.0 to 127.255.255.255 The IP address 0.0.0.0 is used by a host at
startup for temporary communication. This
address is never a valid destination
address. Addresses starting with 127 are
reserved for loopback test. Packets
destined to these addresses are processed
locally as input packets rather than sent to
the link.
B 128.0.0.0 to 191.255.255.255 N/A
C 192.0.0.0 to 223.255.255.255 N/A
D 224.0.0.0 to 239.255.255.255 Multicast addresses.
E 240.0.0.0 to 255.255.255.255 Reserved for future use, except for the
broadcast address 255.255.255.255.
Dr. Tamer Omar
Classes and Blocks
❑ One problem with classful addressing is that each class is divided into a
fixed number
❑ When an organization requested a block of addresses, it was granted one
in class A, B, or C. Class A addresses were designed for large
organizations with a large number of attached hosts or routers. Class B
addresses were designed for midsize organizations with tens of
thousands of attached hosts or routers. Class C addresses were designed
for small organizations with a small number of attached hosts or routers
Dr. Tamer Omar
Classes and Blocks
❑ We can see the flaw in this design. A block in class A
address is too large for almost any organization. This means
most of the addresses in class A were wasted and were not
used. A block in class B is also very large, probably too
large for many of the organizations that received a class B
block. A block in class C is probably too small for many
organizations. Class D addresses were designed for
multicasting. Each address in this class is used to define one
group of hosts on the Internet. The Internet authorities
wrongly predicted a need for 268,435,456 groups. This
never happened and many addresses were wasted here too.
And lastly, the class E addresses were reserved for future
use; only a few were used, resulting in another waste of
addresses
Dr. Tamer Omar
Subnetting
◼ Divide a network to smaller networks
(subnets)
◼ Reasons
◼ Reduce network traffic
◼ Improve network performance
◼ Management
◼ Allocate host bits for subnet bits
◼ Make use of subnet masks
Dr. Tamer Omar
Mask
❑ Although the length of the netid and hostid (in bits) is
predetermined in classful addressing, we can also use a 32-
bit number called the default mask.
❑ The mask can help us to find the netid and the hostid. For
example, the mask for a class A address has eight 1s, which
means the first 8 bits of any address in class A define the
netid; the next 24 bits define the hosted
Dr. Tamer Omar
Subnet Mask
◼ A 32-bit string
◼ All 1s and then all 0s, they never mix
◼ It specifies number of bits for network
ID in an IP address
Dr. Tamer Omar
Subnet Mask (Example I)
◼ IP address: 190.138.23.45
◼ Subnet Mask: 255.255.0.0
◼ Network ID: 190.138.0.0
◼ Host ID: 23.45
Dr. Tamer Omar
Subnet Mask (Example II)
◼ IP Address: 201.100.26.171
◼ Subnet Mask: 255.255.255.192
11111111.11111111.11111111.11000000
◼ First 26 bits as network ID, therefore
◼ Network ID: 201.100.26.128
◼ Host ID: 43
Dr. Tamer Omar
Subnet Mask (Example III)
◼ Design a subnet mask for a Class B
network with 25 subnets
◼ Number of bits for subnet = lg(25+2) = 5
◼ Number of bits for network ID = 16+5=21
◼ Subnet mask is
11111111.11111111.11111000.00000000
255.255.248.0
Dr. Tamer Omar
Subnet Mask (Example IV)
◼ Given IP address 203.59.43.134 and
subnet mask 255.255.255.192, find
valid host range in this subnet
◼ Network ID: 203.59.43.128
◼ All 0 and all 1 host IDs are reserved,
therefore
◼ 203.59.43.129 – 203.59.43.190
◼ Number of hosts 62
◼ To verify: 62 = 26-2
Dr. Tamer Omar
Subnet Mask (Example VI)
◼ A block of addresses is granted to a small
organization. We know that one of the
addresses is 205.16.37.39/28.
◼ Find the first address
◼ Address: 11001101 00010000 00100101 00100111
AND
◼ Mask 11111111 11111111 11111111 11110000
◼ First address 11001101 00010000 00100101 00100000
◼ Find the last address
◼ Address: 11001101 00010000 00100101 00100111
OR
◼ Mask Complement 00000000 00000000 00000000 00001111
◼ Last address 11001101 00010000 00100101 00101111
◼ The number of addresses
◼ Mask Complement+1=1111+1=16

More Related Content

Similar to Lecture9 is going on the road today so we have a good day

Structure of a Switch
Structure of a SwitchStructure of a Switch
Circuit and packet_switching
Circuit and packet_switchingCircuit and packet_switching
Circuit and packet_switching
hoanv
 
Network in brief
Network in briefNetwork in brief
Network in brief
Himant Prasansu
 
Switching
SwitchingSwitching
Switching
Shankar Gangaju
 
CN UNIT III.pptx
CN UNIT III.pptxCN UNIT III.pptx
CN UNIT III.pptx
VISWANATHAN R V
 
Network Layer
Network LayerNetwork Layer
Network Layer
reshmadayma
 
chapter 5.2.pptx
chapter 5.2.pptxchapter 5.2.pptx
chapter 5.2.pptx
MelkamtseganewTigabi1
 
Lecture number 5 Theory.pdf(machine learning)
Lecture  number  5 Theory.pdf(machine learning)Lecture  number  5 Theory.pdf(machine learning)
Lecture number 5 Theory.pdf(machine learning)
ZainabShahzad9
 
Network layer new
Network layer newNetwork layer new
Network layer new
reshmadayma
 
CN chapter1.ppt
CN chapter1.pptCN chapter1.ppt
CN chapter1.ppt
RoopaliChavan1
 
Practical_4_cse307_ppt.ppt
Practical_4_cse307_ppt.pptPractical_4_cse307_ppt.ppt
Practical_4_cse307_ppt.ppt
AbhishekKumar66407
 
CCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaCCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. Adisesha
Prof. Dr. K. Adisesha
 
Switching
Switching Switching
Switching
Abid Ali
 
CSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptxCSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptx
NoraNjepuome3
 
Computer Networking: LAN and WAN Technologies
Computer Networking: LAN and WAN TechnologiesComputer Networking: LAN and WAN Technologies
Computer Networking: LAN and WAN Technologies
Bisrat Girma
 
distance-vector-routing-3.pdf
distance-vector-routing-3.pdfdistance-vector-routing-3.pdf
distance-vector-routing-3.pdf
Jayaprasanna4
 
Routing and switching
Routing and switchingRouting and switching
Routing and switching
Aashif Raza
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
Haripritha
 
7Multiplexing.pdf
7Multiplexing.pdf7Multiplexing.pdf
7Multiplexing.pdf
12C01AadarshA
 
Switch networking
Switch networking Switch networking
Switch networking
MohikaJamadari
 

Similar to Lecture9 is going on the road today so we have a good day (20)

Structure of a Switch
Structure of a SwitchStructure of a Switch
Structure of a Switch
 
Circuit and packet_switching
Circuit and packet_switchingCircuit and packet_switching
Circuit and packet_switching
 
Network in brief
Network in briefNetwork in brief
Network in brief
 
Switching
SwitchingSwitching
Switching
 
CN UNIT III.pptx
CN UNIT III.pptxCN UNIT III.pptx
CN UNIT III.pptx
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
chapter 5.2.pptx
chapter 5.2.pptxchapter 5.2.pptx
chapter 5.2.pptx
 
Lecture number 5 Theory.pdf(machine learning)
Lecture  number  5 Theory.pdf(machine learning)Lecture  number  5 Theory.pdf(machine learning)
Lecture number 5 Theory.pdf(machine learning)
 
Network layer new
Network layer newNetwork layer new
Network layer new
 
CN chapter1.ppt
CN chapter1.pptCN chapter1.ppt
CN chapter1.ppt
 
Practical_4_cse307_ppt.ppt
Practical_4_cse307_ppt.pptPractical_4_cse307_ppt.ppt
Practical_4_cse307_ppt.ppt
 
CCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaCCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. Adisesha
 
Switching
Switching Switching
Switching
 
CSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptxCSC 424 -Lecture 5n8 2022.pptx
CSC 424 -Lecture 5n8 2022.pptx
 
Computer Networking: LAN and WAN Technologies
Computer Networking: LAN and WAN TechnologiesComputer Networking: LAN and WAN Technologies
Computer Networking: LAN and WAN Technologies
 
distance-vector-routing-3.pdf
distance-vector-routing-3.pdfdistance-vector-routing-3.pdf
distance-vector-routing-3.pdf
 
Routing and switching
Routing and switchingRouting and switching
Routing and switching
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
 
7Multiplexing.pdf
7Multiplexing.pdf7Multiplexing.pdf
7Multiplexing.pdf
 
Switch networking
Switch networking Switch networking
Switch networking
 

Recently uploaded

Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 

Recently uploaded (20)

Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 

Lecture9 is going on the road today so we have a good day

  • 1. Lecture Title: Network Layer Lecture Name: Dr. Tamer Omar Lecture Date: Year: 3rd Year Spec.: Subject: MSE 4532 Computer Communication Networks
  • 2. Objectives Dr. Tamer Omar ❑Link State Routing ❑Hierarchical Routing ❑Multicasting Routing Protocols
  • 3. Dr. Tamer Omar Link State Routing (an adaptive routing algorithm) 1. Discover your neighbors and learn their addresses. 2. Measure the cost (delay) to each neighbor. 3. Construct a packet containing all this information 4. Send this packet to all other routers. 5. Compute the shortest path to every other router.
  • 4. Dr. Tamer Omar 1. Discovering Your Neighbors ❑ Send “Hello” packet on each point-to- point line. Destination node replies with its address.
  • 5. Dr. Tamer Omar 1. Discovering Your Neighbors Nine routers and a broadcast LAN.
  • 6. Dr. Tamer Omar 1. Discovering Your Neighbors A graph model of previous slide.
  • 7. Dr. Tamer Omar 2. Measuring Line Cost ❑ Send an “ECHO” packet over the line. ❑ Destination is required to respond to “ECHO” packet immediately. ❑ Measure the time required for this operation. ❑ Question: Should we measure just the time it takes to transmit the packet, or should we include the time that the packet waits in the queue?
  • 8. Dr. Tamer Omar 3. Build Link State Packets
  • 9. Dr. Tamer Omar 4. Distributing the Link State Packets ❑Use selective flooding ❑Sequence numbers prevent duplicate packets from being propagated ❑Lower sequence numbers are rejected as obsolete
  • 10. Dr. Tamer Omar 4. Distributing the Link State Packets The packet buffer for router B in previous slide ▪ the link state packet from A arrives directly, so it must be sent to C and F and acknowledged to A, as indicated by the flag bits. Similarly, the packet from F has to be forwarded to A and C and acknowledged to F.
  • 11. Dr. Tamer Omar Hierarchical Routing ❑ As a network size grows, routing table grows. ❑ Divide routers into regions ❑ Each router knows all the details about routing within its region and knows nothing about the internal structure of other region. ❑ Advantage: less storage requirement ❑ Penalty: longer path.
  • 12. Dr. Tamer Omar Hierarchical Routing ❑ As a network size grows, routing table grows. ❑ Divide routers into regions ❑ Each router knows all the details about routing within its region and knows nothing about the internal structure of other region. ❑ Works like telephone routing ❑ Advantage: less storage requirement ❑ Penalty: longer path.
  • 14. Dr. Tamer Omar Unicast Routing Protocols ❑ In unicast communication, there is one source and one destination. The relationship between the source and the destination is one-to-one. ❑ A unicast packet starts from the source S1 and passes through routers to reach the destination D1. ❑ In unicast routing, each router in the domain has a table that defines a shortest path tree to possible destinations.
  • 15. Dr. Tamer Omar Unicast Routing Protocols
  • 16. Dr. Tamer Omar Multicasting Routing Protocols ❑ In multicast communication, there is one source and a group of destinations. The relationship is one-to-many. In this type of communication, the source address is a unicast address, but the destination address is a group address, which defines one or more destinations. A multicast packet starts from the source S1 and goes to all destinations that belong to group G1. In multicasting, when a router receives a packet, it may forward it through several of its interfaces
  • 17. Dr. Tamer Omar Multicasting Routing Protocols ❑ A multicast packet may have destinations in more than one network. Forwarding of a single packet to members of a group requires a shortest path tree. If we have n groups, we may need n shortest path trees. We can imagine the complexity of multicast routing. Two approaches have been used to solve the problem: source-based trees and group-shared trees. ❑ Source-Based Tree. In the source-based tree approach, each router needs to have one shortest path tree for each group. The shortest path tree for a group defines the next hop for each network that has loyal member(s) for that group.
  • 18. Dr. Tamer Omar Source-based trees If router Rl receives a packet with destination address G1, it needs to send a copy of the packet to the attached network, a copy to router R2, and a copy to router R4 so that all members of G1 can receive a copy. In this approach, if the number of groups is m, each router needs to have m shortest path trees, one for each group. We can imagine the complexity of the routing table if we have hundreds or thousands of groups. H
  • 19. Dr. Tamer Omar Group-Shared Tree ❑In the group-shared tree approach, instead of each router having m shortest path trees, only one designated router, called the center core, takes the responsibility of distributing multicast traffic. ❑The core has m shortest path trees in its routing table. The rest of the routers in the domain have none. If a router receives a multicast packet, it encapsulates the packet in a unicast packet and sends it to the core router. The core router removes the multicast packet from its capsule, and consults its routing table to route the packet.
  • 21. Dr. Tamer Omar Multicast Routing ❑ Multicast routing is a networking method for efficient distribution of one-to-many traffic. A multicast source, such as a live video conference, sends traffic in one stream to a multicast group. The multicast group contains receivers such as computers, devices, and IP phones. • Voice over IP (VOIP) • Video on demand (VOD) • Video conferencing • IP television (IPTV)
  • 22. Dr. Tamer Omar Broadcasting ❑ In broadcast communication, the relationship between the source and the destination is one-to-all. There is only one source, but all the other hosts are the destinations
  • 23. Dr. Tamer Omar Congestion Control Algorithms ❑ Congestion Control is a mechanism that controls the entry of data packets into the network, enabling a better use of a shared network infrastructure and avoiding congestive collapse. Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as the mechanism to avoid congestive collapse in a network.
  • 24. Dr. Tamer Omar General Principles of Congestion Control ❑ Open loop solutions attempt to solve the problem by good design ❑ Closed loop solutions are based on the concept of a feedback loop. This approach has three parts when applied to congestion control: 1. Monitor the system to detect when and where congestion occurs. 2. Pass this information to places where action can be taken. 3. Adjust system operation to correct the problem.
  • 25. Dr. Tamer Omar Policies that affect congestion. ❑ Retransmission Policy : It is the policy in which retransmission of the packets are taken care of. If the sender feels that a sent packet is lost or corrupted, the packet needs to be retransmitted. This transmission may increase the congestion in the network. ▪ To prevent congestion, retransmission timers must be designed to prevent congestion and also able to optimize efficiency.
  • 26. Dr. Tamer Omar Policies that affect congestion. ❑ Window Policy : The type of window at the sender’s side may also affect the congestion. Several packets in the Go-back-n window are re-sent, although some packets may be received successfully at the receiver side. This duplication may increase the congestion in the network and make it worse. ❑ Therefore, Selective repeat window should be adopted as it sends the specific packet that may have been lost.
  • 27. Dr. Tamer Omar Policies that affect congestion. ❑ Discarding Policy : A good discarding policy adopted by the routers is that the routers may prevent congestion and at the same time partially discard the corrupted or less sensitive packages and also be able to maintain the quality of a message. ▪ In case of audio file transmission, routers can discard less sensitive packets to prevent congestion and also maintain the quality of the audio file.
  • 28. Dr. Tamer Omar Policies that affect congestion. ❑ Acknowledgment Policy : Since acknowledgements are also the part of the load in the network, the acknowledgment policy imposed by the receiver may also affect congestion. Several approaches can be used to prevent congestion related to acknowledgment. ▪ The receiver should send acknowledgement for N packets rather than sending acknowledgement for a single packet. The receiver should send an acknowledgment only if it has to send a
  • 29. Dr. Tamer Omar Policies that affect congestion. ❑ Admission Policy : In admission policy a mechanism should be used to prevent congestion. Switches in a flow should first check the resource requirement of a network flow before transmitting it further. If there is a chance of a congestion or there is a congestion in the network, router should deny establishing a virtual network connection to prevent further congestion.
  • 30. Dr. Tamer Omar Logical Addressing ❑ IP address The Internet addresses are 32 bits in length; this gives us a maximum of 232addresses. These addresses are referred to as IPv4 (IP version 4) addresses or simply IP addresses if there is no confusion. ❑ A new design of the IP layer called the new generation of IP or IPv6 (lP version 6). In this version, the Internet uses 128-bit addresses that give much greater flexibility in address allocation. These addresses are referred to as IPv6 (IP version 6) addresses. ❑ In this lecture, we first discuss IPv4 addresses, which are currently being used in the Internet.
  • 31. Dr. Tamer Omar IPv4 ADDRESSES ❑ An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. ❑ An identifier for a computer or device on a TCP/IP network. Networks using the TCP/IP protocol route messages based on the IP address of the destination. ❑ The IPv4 addresses are universal in the sense that the addressing system must be accepted by any host that wants to be connected to the Internet ❑ Address Space • An address space is the total number of addresses used by the protocol. If a protocol uses N bits to define an address, the address space is 2N because each bit can have two different values (0 or 1) and N bits can have 2N values
  • 32. Dr. Tamer Omar IPv4 ADDRESSES ❑ IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more than 4 billion). This means that, theoretically, if there were no restrictions, more than 4 billion devices could be connected to the Internet. We will see shortly that the actual number is much less because of the restrictions imposed on the addresses. ❑ Notations • There are two prevalent notations to show an IPv4 address: binary notation and dotte ddecimal notation.
  • 33. Dr. Tamer Omar Binary Notation ❑ In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-byte address. The following is an example of an IPv4 address in binary notation: 01110101 10010101 00011101 0000001
  • 34. Dr. Tamer Omar Dotted-Decimal Notation ❑ To make the IPv4 address more compact and easier to read, Internet addresses are usually written in decimal form with a decimal point (dot) separating the bytes. The following is the dotted~decimal notation of the above address: 117.149.29.2
  • 35. Dr. Tamer Omar Classful Addressing ❑ Each IP address breaks down into the following sections: ▪ Net ID—Identifies a network. The first several bits of a net ID, known as the class field or class bits, identify the class of the IP address. ▪ Host ID—Identifies a host on a network. ❑ In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Each class occupies some part of the address space. ❑ We can find the class of an address when given the address in binary notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can immediately tell us the class of the address. If the address is given in decimal-dotted notation, the first byte defines the class.
  • 36. Dr. Tamer Omar Classful Addressing • Class A - 168.212.226.204 • supports 16 million hosts on each of 127 networks • Class B - 168.212.226.204 • supports 65,000 hosts on each of 16,000 networks – NDUS has two Class B addresses • 134.129.xxx.xxx Eastern ND • 134.234.xxx.xxx Western ND • Class C - 168.212.226.204 • supports 254 hosts on each of 2 million networks
  • 38. Dr. Tamer Omar Classful Addressing Class Address range Remarks A 0.0.0.0 to 127.255.255.255 The IP address 0.0.0.0 is used by a host at startup for temporary communication. This address is never a valid destination address. Addresses starting with 127 are reserved for loopback test. Packets destined to these addresses are processed locally as input packets rather than sent to the link. B 128.0.0.0 to 191.255.255.255 N/A C 192.0.0.0 to 223.255.255.255 N/A D 224.0.0.0 to 239.255.255.255 Multicast addresses. E 240.0.0.0 to 255.255.255.255 Reserved for future use, except for the broadcast address 255.255.255.255.
  • 39. Dr. Tamer Omar Classes and Blocks ❑ One problem with classful addressing is that each class is divided into a fixed number ❑ When an organization requested a block of addresses, it was granted one in class A, B, or C. Class A addresses were designed for large organizations with a large number of attached hosts or routers. Class B addresses were designed for midsize organizations with tens of thousands of attached hosts or routers. Class C addresses were designed for small organizations with a small number of attached hosts or routers
  • 40. Dr. Tamer Omar Classes and Blocks ❑ We can see the flaw in this design. A block in class A address is too large for almost any organization. This means most of the addresses in class A were wasted and were not used. A block in class B is also very large, probably too large for many of the organizations that received a class B block. A block in class C is probably too small for many organizations. Class D addresses were designed for multicasting. Each address in this class is used to define one group of hosts on the Internet. The Internet authorities wrongly predicted a need for 268,435,456 groups. This never happened and many addresses were wasted here too. And lastly, the class E addresses were reserved for future use; only a few were used, resulting in another waste of addresses
  • 41. Dr. Tamer Omar Subnetting ◼ Divide a network to smaller networks (subnets) ◼ Reasons ◼ Reduce network traffic ◼ Improve network performance ◼ Management ◼ Allocate host bits for subnet bits ◼ Make use of subnet masks
  • 42. Dr. Tamer Omar Mask ❑ Although the length of the netid and hostid (in bits) is predetermined in classful addressing, we can also use a 32- bit number called the default mask. ❑ The mask can help us to find the netid and the hostid. For example, the mask for a class A address has eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 bits define the hosted
  • 43. Dr. Tamer Omar Subnet Mask ◼ A 32-bit string ◼ All 1s and then all 0s, they never mix ◼ It specifies number of bits for network ID in an IP address
  • 44. Dr. Tamer Omar Subnet Mask (Example I) ◼ IP address: 190.138.23.45 ◼ Subnet Mask: 255.255.0.0 ◼ Network ID: 190.138.0.0 ◼ Host ID: 23.45
  • 45. Dr. Tamer Omar Subnet Mask (Example II) ◼ IP Address: 201.100.26.171 ◼ Subnet Mask: 255.255.255.192 11111111.11111111.11111111.11000000 ◼ First 26 bits as network ID, therefore ◼ Network ID: 201.100.26.128 ◼ Host ID: 43
  • 46. Dr. Tamer Omar Subnet Mask (Example III) ◼ Design a subnet mask for a Class B network with 25 subnets ◼ Number of bits for subnet = lg(25+2) = 5 ◼ Number of bits for network ID = 16+5=21 ◼ Subnet mask is 11111111.11111111.11111000.00000000 255.255.248.0
  • 47. Dr. Tamer Omar Subnet Mask (Example IV) ◼ Given IP address 203.59.43.134 and subnet mask 255.255.255.192, find valid host range in this subnet ◼ Network ID: 203.59.43.128 ◼ All 0 and all 1 host IDs are reserved, therefore ◼ 203.59.43.129 – 203.59.43.190 ◼ Number of hosts 62 ◼ To verify: 62 = 26-2
  • 48. Dr. Tamer Omar Subnet Mask (Example VI) ◼ A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. ◼ Find the first address ◼ Address: 11001101 00010000 00100101 00100111 AND ◼ Mask 11111111 11111111 11111111 11110000 ◼ First address 11001101 00010000 00100101 00100000 ◼ Find the last address ◼ Address: 11001101 00010000 00100101 00100111 OR ◼ Mask Complement 00000000 00000000 00000000 00001111 ◼ Last address 11001101 00010000 00100101 00101111 ◼ The number of addresses ◼ Mask Complement+1=1111+1=16