0% found this document useful (0 votes)
9 views66 pages

Chapter-7-Network Layer Delivery - Forwarding and Routing

The document discusses network layer delivery, forwarding, and routing. It covers forwarding techniques and routing tables, unicast routing protocols including distance vector routing and link state routing, and network layer protocols such as ARP, ICMP, and routing protocols like RIP and OSPF.

Uploaded by

bethelhem_seifu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views66 pages

Chapter-7-Network Layer Delivery - Forwarding and Routing

The document discusses network layer delivery, forwarding, and routing. It covers forwarding techniques and routing tables, unicast routing protocols including distance vector routing and link state routing, and network layer protocols such as ARP, ICMP, and routing protocols like RIP and OSPF.

Uploaded by

bethelhem_seifu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Chapter 7: Network Layer -

Delivery, Forwarding and Routing

Undergraduate Program
School of Electrical and Computer Engineering
Outlines
• Forwarding Techniques and Routing Table
• Unicast Routing Protocols
• Intra- and Interdomain Routing algorithms
• Distance Vector Routing,
• Link State Routing ,
• Path Vector Routing
• Network layer protocols
• Address mapping protocols
• ARP,RARP, DHCP
• Network management protocols
• ICMP, IGMP, ICMPV6
• Routing protocols (will be covered in unicast routing protocols)
• RIP, OSPF, BGP

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 2
Delivery, Forwarding and Routing
Delivery
• The handling of datagrams by the underlying physical network –
Delivery
• Direct delivery
• The destination host and the deliverer are connected to the same physical
network
• How to know→ if the network address of destination is the same as the
network address of network the sender id connected.
• Indirect delivery
• The destination host is not on the same network as the deliverer
• The datagram travels from router to router until it reaches the destination
• The last delivery is always a direct delivery.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 3
Delivery, Forwarding and Routing
Forwarding
• Forwarding – to place the datagram in its route to its
destination
• To place a datagram from an incoming port to an outgoing
• Routing table is required to make the forwarding decision !!
• Table where routers store routes to the list of all their known
destinations
• Forwarding techniques – based on the content of the routing
table

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 4
Delivery, Forwarding and Routing
Cont.… (Forwarding techniques )
• Next-hop method versus route method

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 5
Delivery, Forwarding and Routing
Cont.… (Forwarding techniques )
• Network specific method vs. host specific

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 6
Delivery, Forwarding and Routing
Cont.… (Forwarding techniques )
• Default forwarding

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 7
Delivery, Forwarding and Routing
Forwarding process
• A simple forwarding module
• We need at least four columns in a routing table

Next-hop= the next


router in the path to
the destination X

• Decision: To tell router


• to send the datagram to the destination 𝑋, forward the datagram to the
next-hop 𝑦
• Or, if the destination is directly connected to the router, send the datagram
directly to the destination
• Or, if the destination is the router own IP address, receive the datagram
for yourself (do not forward)
• if no information is available, drop the datagram.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 8
Delivery, Forwarding and Routing
E.g.:
• Build a routing table for router R1

• Show the forwarding process if a packet arrives at R1 with


the destination address 180.70.65.140

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 9
Delivery, Forwarding and Routing
Address aggregation

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 10
Delivery, Forwarding and Routing
Longest mask matching
• The routing table is sorted from longest mask to the shortest mask

• A packet arrives for organization 4 with destination address


140.24.7.200?
Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 11
Delivery, Forwarding and Routing
Outlines
• Forwarding Techniques and Routing Table
• Unicast Routing Protocols
• Intra- and Interdomain Routing algorithms
• Distance Vector Routing,
• Link State Routing ,
• Path Vector Routing
• Network layer protocols
• Address mapping protocols
• ARP,RARP, BOOTP, DHCP
• Network management protocols
• ICMP, IGMP, ICMPV6
• Routing protocols
• RIP, OSPF, BGP

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 12
Delivery, Forwarding and Routing
Routing table
• How do routers acquire these routing tables?

• Static routing table


• Manual entries
• Easy on simple network
• Limitation:
• Route failure or network expansion requires continues route updating
• Automatic route updating
• Removing faulty routes

• Dynamic routing table


• Is updated periodically by using routing protocols

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 13
Delivery, Forwarding and Routing
Routing protocols

• A routing protocol is a combination of rules and procedures


that let router in the internet inform each other of changes
• When forwarding a packet, the decision is based on optimization
• Which of the available route is the optimum route?
• Requires different routing algorithms
• Could be Intra and inter domain routing

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 14
Delivery, Forwarding and Routing
Cont.…
• Intradomain (Interior gateway protocol(IGP)) : sharing routing
protocol with in a single network domain (Autonomous
Systems).
• Routing algorithms
• Distance-based (RIP routing protocol)
• Link state (OSPF routing protocol)

• Inter domain (Exterior gateway protocol(EGP)): sharing routing


protocol among different network domain (Autonomous
Systems).
• Routing algorithms
• Path-vector (BDP routing protocol)

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 15
Delivery, Forwarding and Routing
Distance vector routing
• The least-cost route between any two nodes is the route with minimum
distance
• Uses Routing by Rumor
• Each router shares the information about what they know to their
neighbor router and the metrics cost to reach each destination.
• The metrics cost is the number of hops/routers from source to destination.
• Routers don’t have the complete map of the whole network.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 16
Delivery, Forwarding and Routing
Cont.…

• Initialization→

• Updating →

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 17
Delivery, Forwarding and Routing
Two node loop instability

• Solutions
• Defining infinity – to redefine infinity to a smaller number
• Most implementation define Infinity=16
• Implies - the distance vector routing cannot be used in large system
• Split horizon
• Each node sends only part of its table through each interface
• If the optimum path to x is through A, the node doesn’t advertise this piece of
information to A
• Split horizon and poison reverse
• DV- if there is no news about a route within a giver time, the node deletes the
route
• Node B can still advertise the value for X, but if the source of information is A,
it can replace the distance with infinity

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 18
Delivery, Forwarding and Routing
Routing information protocol (RIP)
• Applies Distance vector algorithm
• Included in BSD-UNIX Distribution in 1982
• Distance metric: uses hop count (max = 15 hops and infinity=16)
• Distance vectors: exchanged among neighbors every 30 sec via Response
• Message (also called advertisement) contains
• The routers destination network
• Their metrics to reach their known destination network
• Each advertisement: list of up to 25 destination nets within AS

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 20
Delivery, Forwarding and Routing
Cont.… (RIP)

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 21
Delivery, Forwarding and Routing
Cont.… (RIP: Link Failure and Recovery)

• If no advertisement heard after 180 sec → neighbor/link


declared dead
• routes via neighbor invalidated
• new advertisements sent to neighbors
• neighbors in turn send out new advertisements (if tables changed)
• link failure info quickly propagates to entire net
• poison reverse used to prevent ping-pong loops (infinite distance =
16 hops)

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 22
Delivery, Forwarding and Routing
Cont.… (RIP: Limitations)

• INFINITY defined as 16, thus RIP cannot be used in


networks where routes are more than 15 hops.
• thus the value for INFINITY should be large; but this can result in
slow convergence of RIP due to count-to-infinity problem

• Difficulty in supporting multiple metrics (default metric: # of


hops)
• the potential range for such metrics as bandwidth, throughput,
delay, and reliability can be large.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 23
Delivery, Forwarding and Routing
Link state routing
• Each node has the entire topology of the domain, the list of
nodes and link, how they are connected (type, cost,
condition of the link (up or down)
• Employs Dijkstra's algorithm
• The whole topology is established from partial knowledge of each
node

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 24
Delivery, Forwarding and Routing
Cont.…
• Building routing tables: Four set of actions
• Creation of the states of links by each node- link state packet (LSP)
• Dissemination of LSP to every other router
• Formation of a shortest path tree for each node
• Calculation of a routing table based on the shortest path tree

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 25
Delivery, Forwarding and Routing
Link state packet
• Contains
• Node identity
• List of links
• Sequence number
• To distinguished new LSP from old ones
• Age
• Prevents old LSPs from remaining in the domain for a long time
• Generated
• When there is a change in the topology of the domain
• On a periodic basis

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 26
Delivery, Forwarding and Routing
Flooding of LSPs
• The creating node sends a copy of the LSP out of each
interface
• A node that receives an LSP compares it with the copy it
may already have
• If older than the one it has – discards the LSP
• Otherwise, sends a copy of it out of each interface except the one
from which the packet arrived

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 27
Delivery, Forwarding and Routing
Formation of shortest path tree
• Start with root node
• All other nodes can be reached from the root through only one
single route
• A shortest path tree – the distance between the root and every
other node is the shortest
• Dijkstra algorithm

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 28
Delivery, Forwarding and Routing
Example

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 29
Delivery, Forwarding and Routing
Open Shortest Path First(OSPF)
• Open
• Developed by IETF IGP working group, RFC2328.
• Version:
• OSPFV1(1989): old, not used anymore ; OSPFV2(1998): used for IPV4;
OSPFV3(2008): used for IPV6 (also for IPV4 as well)
• OSPF
• Each router floods link-state information through its neighbors to other
routers with Link state Advertisements (LSA)
• Based on the flooded link-state information, each router maintains a
complete link-state database (LSDB)
• Based on the LSDB, a routing table is constructed using SPF (e.g.,
Dijkstra’s) algorithm.
• At the border of an area, special routers summarize the information and
sent it to other areas
• Runs over IP directly.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 30
Delivery, Forwarding and Routing
Cont.….
• OSPF Tables
• Neighbor table
• Directly connected OSPF
routers
• State of Adjacency

• Topology table
• Everything OSPF knows
• Stored in link-state database
(LSDB) in a form of LSA

• Routing table
• Routers routing table (not only
for OSPF)
• OSPF contributes its best routes

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 31
Delivery, Forwarding and Routing
Example
• Router 4: Neighbor table

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 32
Delivery, Forwarding and Routing
Cont.… (Example)
• Router 5: Topology table

OSPF LSDB

 LSA

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 33
Delivery, Forwarding and Routing
Cont.… (Example)
• Router 5: routing table

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 34
Delivery, Forwarding and Routing
LSA Flooding
• OSPF is enabled on R2 G0/0,
Se0/1/0 and Se0/0/0 interface.
• When a new network is added
to R2, it will tell about the new
network segment.
Se0/0/0
192.168.10.192/30
Se0/0/0 • R2 creates an LSA update to
.194 .202 192.168.10.200/30 tell the neighbors about the
R0 network on G0/0
Se0/1/0 .193 .201 Se0/1/0 • Some of the information on the
192.168.10.196/30
R1
.197 .198 LSA,
Se0/0/0 R2
Se0/0/0
• Until all routers have the
.1 G0/1
G0/0 .129 same information the LSA
will be flooded
192.168.10.0/26 192.168.10.128/26
• 30 min. expiration time.
LSA
• Each router the calculates
RouterID: 1.1.1.1
IP: their best route to
192.168.10.128/26 192.168.10.128/26.
Cost: 1

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 35
Delivery, Forwarding and Routing
Features of OSPF
• Use flexible metrics instead of only hop count.
• Supports variable-length subnetting.
• Allows load balancing among equal-cost paths.
• Supports multiple routes; one for each IP type of service
(ToS).
• Authenticates route exchanges.
• Quick convergence.
• Uses multicast rather than broadcast of its messages to
reduce network load.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 36
Delivery, Forwarding and Routing
OSPF Areas
• OSPF uses areas to divide up the network.
• Small networks can be single-area without any negative on performance.

• In large network, a single-area designs have negative impacts.


• OSPF algorithm take more time and computational resources to calculate routes,
and large LSDB storage memory.
• Any small change in the network causes every router to flood LSAs and run OSPF
algorism again and again.
• Large networks needs to be divided hierarchically to avoid these negative
effects.
Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 37
Delivery, Forwarding and Routing
• Autonomous system is organized as two-
OSPF Areas… level hierarchy
• AS is partitioned into self-contained
areas.
• An area is a set of routers and links that
share the same the same LSDB.
• All areas are interconnected by a
backbone area (Area 0).
Area 0 • Areas are identified by a 32-bit area ID.
(Backbone) • 0.0.0.0 is reserved for the backbone area.
• Four types of routers
• Internal router: All routers in the same
area
• Area border router (ABR): Routers with
interfaces in multiple areas. They
maintain a separate LSDB for each area
they are connected to (Max. of 2
advised).
• Backbone router (BR): Routers
Connected to area 0. Within each area,
BR responsible for routing outside the
Area Area area. Backbone area contains all area
1 2 border routers and possibly others and
exactly one area is backbone area.
• Autonomous system boundary router
(ASBR)

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 38
Delivery, Forwarding and Routing
OSPF Areas…
• OSPF areas must be
contagious.
• All OSPF areas must at least
Area 0 have one ABR connected to
(Backbone) the backbone.
• OSPF interfaces with the
same subnet must belong to
the same area.

Area Area
1 2

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 39
Delivery, Forwarding and Routing
Router Identities (Router ID)
• Each router in an OSPF network needs a unique ID.
• The ID is included in any OSPF messages the router generates that
other OSPF routers will process.
• The router ID is chosen according to one of the following criteria:
• The highest IP address on the routers active loopback interfaces is used
(this is a logical interface on a router).
• If no loopback interface exists with an IP address, the highest IP address
on its active interfaces is used when the router boots up.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 40
Delivery, Forwarding and Routing
OSPF cost
• OSFP metrics is called cost.
• It is automatically calculated based on the bandwidth (speed) of the
interface.
• It is calculated by dividing a references bandwidth value by the interface's
bandwidth.

• The default reference bandwidth is 100mbps


• If the interface is 10 mbps, the cost is 100mbps/10mbps = 10
• If the interface is 100 mbps, the cost is 100mbps/10mbps = 1
• If the fiber interface is 1000 mbps, the cost is 100mbps/10mbps = 1??

• All values less than 1 is going to be converted 1.


• All Fast Ethernet, Gigabit Ethernet and 10Gig ethernet have the cost of
1.
• You should change the this references bandwidth value.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 41
Delivery, Forwarding and Routing
OSPF cost…
• The OSPF cost to a destination
is the total cost of the outgoing
/exit interfaces
R0

Se0/0/0 Se0/0/0 • E.g. : R1 cost to reach to the


192.168.10.192/30 .194 .202 192.168.10.200/30 destination 192.168.10.128/26 is
(if reference bandwidth =
Se0/1/0 .193
.201
Se0/1/0 1Gbps)
192.168.10.196/30
• (1000/1.54)Se0/0/0+
.197 .198
R1 R2
Se0/0/0 Se0/0/0
.1 G0/1 G0/0 .129
(1000/1000)G0/0 = 651

192.168.10.0/26 192.168.10.128/26

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 42
Delivery, Forwarding and Routing
Path vector routing
• Distance vector routing
• Intra-domain
• Subjected to instability if there are more than a few hops in the
domain of operation
• Link state routing
• Intra-domain
• needs a huge amount of resources to calculate routing tables
• creates heavy traffic because of flooding
• Path vector
• Inter-domain routing
• Applies the principle of distance vector routing

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 43
Delivery, Forwarding and Routing
Path vector routing
• There is one node (can be more than one) in each AS that
acts on behalf of the entire AS
• Let us call it the speaker node
• The speaker node in an AS creates a routing table and
advertises it to speaker nodes in the neighboring ASs
• speaker node advertises the path, not the metric of the
nodes

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 44
Delivery, Forwarding and Routing
Initial routing tables and updating

• Updating
• When a speaker node receives a two-column table from a
neighbor, it updates its own table

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 45
Delivery, Forwarding and Routing
Border Gateway Protocol (BGP)
• Inter-domain(exterior getaway) routing protocol using path vector
routing
• BGP is the routing protocol of choice on the Internet.
• Essentially, the Internet is a collection of interconnected Autonomous
Systems.
• BGP maintains a separate routing table based on shortest AS Path and
various other attributes, as opposed to IGP metrics like distance or
cost.
• Weight - Which route has the highest weight?
• AS-Path - Which route has the shortest AS-Path?
• Age - Which route is the oldest? (oldest is preferred).
• BGP operation
• Establish session (use TCP service)
• Exchange all active routes
• Exchange incremental updates

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 47
Delivery, Forwarding and Routing
Outlines
• Forwarding Techniques and Routing Table
• Unicast Routing Protocols
• Network layer protocols
• Address mapping protocols
• ARP,RARP, DHCP
• Network management protocols
• ICMP, IGMP, ICMPV6

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 48
Delivery, Forwarding and Routing
Network layer Protocols
• Address mapping
• Maps a logical address to its corresponding physical address and
vice versa
• Static mapping
• Creation of a table that associates a logical address with a physical
address
• Dynamic mapping
• A machine that knows one of the two addresses, can use a protocol to
find the other one

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 49
Delivery, Forwarding and Routing
Address resolution protocol (ARP)
• IP datagram must be
encapsulated in a frame
• The sender needs the physical
address of the receiver
• The host/router sends an ARP
query
• The packet includes the physical
and IP addresses of the sender +
the IP address of the receiver
• Every host/router receivers and
process the ARP query
• The intended recipient sends back
an ARP reply
• Recipient IP + physical address

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 50
Delivery, Forwarding and Routing
Cont.… (ARP)
• Cache memory
• ARP rely is stored in the cache memory (for about 20 to 30
minutes)
• Before sending ARP request, the system first checks it cache
• Packet format

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 51
Delivery, Forwarding and Routing
Cont.… (ARP: Operation)

• The sender know the IP address of the target

• Create an ARP request


• The sender physical and IP addresses, the target IP address

• The target hardware address field is filled with 0s

• The message is encapsulated in a frame


• Physical address of the sender + the physical broadcast address
as the destination address

• Every host/ router receives the frame

• The target machine replies with an ARP reply (unicast)

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 52
Delivery, Forwarding and Routing
ARP: Different cases
• Different cases in which ARP service can be required
• A host wants to send a packet to another host on the same
network
• The logical address that must be mapped to the physical address
→the destination IP address of the datagram
• A host wants to send a packet to another host on another network
• The logical address that must be mapped to the physical address →
the IP address of the router
• A routers that has received a datagram destined for a host on
another network
• The logical address that must be mapped to the physical address
→the IP address of the next router
• A router that has received a datagram destined for a host on the
same network
• The logical address that must be mapped to the physical address
→the destination IP address of the datagram

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 53
Delivery, Forwarding and Routing
Cont.…

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 54
Delivery, Forwarding and Routing
Example

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 55
Delivery, Forwarding and Routing
Proxy ARP
• A proxy ARP is an ARP that acts on behalf of a set of hosts
• Whenever a router running a proxy ARP receives an ARP
request to one of these hosts
• Sends an ARP reply announcing its own hardware address

• A subnet is created without changing the whole system to


recognize subnetted addresses

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 56
Delivery, Forwarding and Routing
Reverse address resolution protocol (RARP)
• Finds the logical address for a machine that knows only its
physical address
• A RARP request is created and broadcasted on the local network
• A machine on the local network that knows all the IP addresses will
respond with a RARP reply
• The requesting machine must be running a RARP client program
• The responding machine must be running a RARP server program

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 57
Delivery, Forwarding and Routing
Dynamic host configuration protocol (DHCP)

• DHCP provides static and dynamic address allocation that


can be manual or automatic
• Static address allocation (manual configuration)
• DHCP acts as Bootstrap Protocol (application layer protocol) does

• Dynamic address allocation (dynamic configuration)


• Pool of available IP addresses

• When a DHCP client requests a temporary IP address, the DHCP


assigns one the available addresses in the pool for a negotiable
period of time

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 58
Delivery, Forwarding and Routing
Outlines
• Forwarding Techniques and Routing Table
• Unicast Routing Protocols
• Network layer protocols
• Address mapping protocols
• ARP,RARP, DHCP
• Network management protocols
• ICMP, IGMP, ICMPV6

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 59
Delivery, Forwarding and Routing
Internet control message protocol (ICMP)
• IP protocol is a best-delivery service
• No error-reporting or error correcting mechanisms
• What happens if a router must discard a datagram because if cannot find
a route to the final destination or the TTL has a zero value?
• ICMP is designed to compensate the deficiencies of IP
• Types of ICMP messages
• Error-reporting
• Query
• ICMP message format

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 60
Delivery, Forwarding and Routing
Error reporting
• ICMP reports error ( doesn’t correct error)
• Error messages are always sent to the original source
• Error types

• ICMP error messages


• Destination unreachable
• Error → A router cannot route a datagram or a host cannot deliver a
datagram
• Source quench
• Error → a datagram is discarded due to congestion
• Warns the source that there is a congestion somewhere in the path
and that the source should slow down the sending process

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 61
Delivery, Forwarding and Routing
Cont.… (ICMP error messages)
• Time exceeded
• Error=>TTL value reaches zero or not all fragments that make up a
message arrive at the destination host within a certain time limit
• Parameter problem
• Error=> ambiguous or missing value in any field of the datagram
• Redirection
• Redirection message to the sending host

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 62
Delivery, Forwarding and Routing
Cont.… (ICMP error messages)
• No ICMP error message will be generated in response to a datagram
carrying an ICMP error message

• No ICMP error message will be generated for a fragmented datagram


that is not the first fragment

• No ICMP error message will be generated for a datagram having a


multicast address

• No ICMP error message will be generated for a datagram having a


special address such as 127.0.0.0 or 0.0.0.0.

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 63
Delivery, Forwarding and Routing
ICMP query
• ICMP can diagnose some network problem

• Echo request and reply


• To determine whether two system can communicate each other
• Timestamp request and reply
• To determine the round trip time (can be used to synchronize the clocks in two
machines)
• Address-mask request and reply
• To request the address mask (unicast or broadcast)
• Route solicitation and advertisement
• A host sends a router-solicitation message to know the address of a
connected router
• A router sends a periodic route advertisement or response to solicitation
message

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 64
Delivery, Forwarding and Routing
Debugging tools
• Ping
• The source host sends ICMP each request messages
• The destination responds with ICMP echo-reply message

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 65
Delivery, Forwarding and Routing
Traceroute
• Used to trace the route of packet from the source to the
destination

• How to find route from A to B


• UDP message encapsulate in an IP packet with a TTL=1
• R1 sends a time-exceeded ICMP message
• UDP message encapsulate in an IP packet with a TTL=2
• R2 sends a time-exceeded ICMP message
• UDP message encapsulate in an IP packet with a TTL=3
• The message reached the destination
• The destination port of the UDP packet is set to one that is not
supported by the UDP prtotocl
• B discard the message and sends an ICMP destination unreachable
message

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 66
Delivery, Forwarding and Routing
Internet group management protocol (IGMP)
• IGMP – a protocol that manages multicast group
membership
• IGMP operation
• For each group there is one router that has the duty of distributing
the multicast packets destined for that group
• A host or multicast router can have membership in a group

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 67
Delivery, Forwarding and Routing
ICMPv6
• Network layer in v4 and v6

• ARP and IGMP are combined in ICMPv6


• RARP is dropped
• Error reporting and query messages

Sem. II, 2023/24 Data communication and Computer networks - Ch. 7 –Network Layer 68
Delivery, Forwarding and Routing

You might also like