1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan...

62

Click here to load reader

Transcript of 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan...

Page 1: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

1

Chapter 22

Network layer Delivery, Forwarding and

Routing

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 2: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

2

Network layer

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 3: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 3

Direct and indirect delivery

Page 4: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 4

Forwarding means to place the packet in its route to its destination. Forwarding requires a host or a router to have a routing table. When a host has a packet to send or when a router has received a packet to be forwarded, it looks at this table to find the route to the final destination.

Forwarding TechniquesForwarding ProcessRouting Table

Topics discussed in this section:

FORWARDING

Page 5: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 5

Route method versus next-hop method

Page 6: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 6

Host-specific versus network-specific method

Page 7: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 7

Host-specific routing

Page 8: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 8

Default method

Page 9: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 9

Simplified forwarding module in classless address

In classless addressing, we need at least four columns in a routing table.

Note

Page 10: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 10

Example 1:

(0.0.0.0)(/0)

m3

Make a routing table for router R1, using the following configuration

Page 11: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 11

Show the forwarding process if a packet arrives at R1 with the destination address 180.70.65.140.

Routing table for R1:

(/0) (0.0.0.0)

Example

Page 12: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 12

Solution:The router performs the following steps:1. The first mask (/26) is applied to the destination address. The result is 180.70.65.128, which does not match the corresponding network address.

2. The second mask (/25) is applied to the destination address. The result is 180.70.65.128, which matches the corresponding network address. The next-hop address and the interface number m0 are passed to ARP for further processing .

Page 13: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 13

Show the forwarding process if a packet arrives at R1 in with the destination address 201.4.22.35.

Example

Solution: The router performs the following steps:1. The first mask (/26) is applied to the destination

address. The result is 201.4.22.0, which does notmatch the corresponding network address.

2. The second mask (/25) is applied to the destination address. The result is 201.4.22.0, which does not match the corresponding network address (row 2).

3. The third mask (/24) is applied to the destination address. The result is 201.4.22.0, which matches the corresponding network address. The destination address of the packet and the interface number m3

Page 14: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 14

Show the forwarding process if a packet arrives at R1 in Figure 22.6 with the destination address 18.24.32.78.

SolutionThis time all masks are applied, one by one, to the destination address, but no matching network address is found. When it reaches the end of the table, the module gives the next-hop address 180.70.65.200 and interface number m2 to ARP. This is probably an outgoing package that needs to be sent, via the default router, to someplace else in the Internet.

Example

Page 15: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Routing

15Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking

Packet go from source to destination via routers.

Routing means to place the packet in its route to its

destination.

Routing requires a host or a router to have a routing

table. When a host has a packet to send or when a

router has received a packet to be forwarded, it looks

at this table to find the route to the final destination

Page 16: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Routing Table

Static : does not change automatically (manual entries)

Dynamic: Updated automatically when there is change in the Internet.

For instance, they need to be updated when a router is down, and they need to be updated whenever a better route has been found

Routing protocols are needed to create the routing tables dynamically.

A routing protocol is a combination of rules and procedures that: Lets routers in the internet inform one another of changes. Allows routers to share whatever they know about the

internet or their neighbourhood. 16Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking

Page 17: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

In unicast routing, there is only one source and only one destination.

When a router receives a packet, it forwards the packet through only one of its ports (the one belonging to the optimum path) as defined in routing table.

Discard the packet, if there is no route.17

Unicast Routing

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking

Page 18: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Solid lines show the communication between routers that use interior routing protocols.

Broken lines show the communication between routers that use an exterior routing protocols.

18

Autonomous systems

Autonomous System (AS): Group of networks and routers under the authority of a single administration.

Routers inside an autonomous system is referred to as interior routing (Intradomain).

Routing between autonomous systems is referred to as exterior routing (Interdomain).

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking

Page 19: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Each AS can choose one or more intradomain(interior) routing protocol to handle routing inside the AS such as RIP and OSPF

One interdomain (exterior) routing protocol is usually chosen to handle routing between ASs ; BGP

19

Interior and Exterior routing protocols

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 20: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Metric is the cost assigned for passing through a network. The total metric of a particular router is equal to the sum

of the metrics of networks that comprise the route.

A router chooses the route with smallest metric.

The metric assigned to each network depends on the type of protocol

RIP (Routing Information Protocol): “Shortest distance” Cost of passing each network is same; it is one hop count.

If a packet passes through 10 networks to reach the destination, the total cost is 10 hop counts.

20

Metric of different protocols

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking

Page 21: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

OSPF (Open Shortest Path First): Administrator can assign cost for passing a network

based on type of service required such as :throughput, delay,..etc.

OSPF allows each router to have more than one routing table based on required type of service

BGP (Border Gateway Protocol): Criterion is the policy, which is set by the administrator.

21

Metric of different protocols

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking

Page 22: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

22Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Routing algorithms can be:1. distance vector algorithms:

router knows physically-connected neighbors, link costs to neighbors, iterative process of computation, exchange of partial information with neighbors.

The least cost between any two nodes is the route with minimum distance

Routing Information Protocol (RIP) is an implementation of this approach

2. link state algorithms: all routers have complete topology, link cost

information Open Shortest Path First (OSPF) is an implementation

of this approach.

Routing Algorithm classification

Page 23: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 23

Each node( router) maintains a set of triples (table): Destination, Cost and Next Hop

Node knows the cost to each neighbor (the distance between itself and its immediate neighbors)

Directly connected neighbors exchange updates periodically (on the order of several seconds -30s) whenever table changes (called triggered update)

Each update is a list of pairs: Destination, Cost

Update local table if receive a “better” rout (smaller cost)

Distance Vector Routing

Page 24: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

24Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Distance vector routing

Initialization of tables in distance vector routing:

infinite ∞ ( unreachable). Think the node as the cities and the lines as the roads

connecting them

Page 25: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

25Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Sharing: Updating in distance vector routing

Distance vector routing

Page 26: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

26Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Distance vector routing The least cost route between any two nodes is the route with min distance.

Each node maintains a table which contains : Destination, Cost, Next hop

Page 27: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

1. Each router shares its entire routing table with its neighbours.

2. Sharing:periodically update :on the order of several seconds -30s-Triggered update: The change can result from the following: A node receives a table from a neighbor, resulting in changes in its

own table after updating. A node detects some failure in the neighboring links which results in a

distance change to infinity ∞

3. Each update is a list of pairs: Destination, Cost

(two column routing table)

27Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Distance vector routing

Page 28: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Routing Information Protocol (RIP)

RIP is based on Distance vector routing:RIP implement Distance vector routing with some considerations:

Destination in the routing table is a network (first column defines network address)

Metric(distance) is Hop count : is the number of networks that a packet encounters to reach its final destination

Infinity is defined as value of 16 . Therefore, the Max limited of hops is 15 suitable for small networks (local area environments) Router sends update message to neighbors every 30 sec. If router does not receive update message from neighbor X within this

limit, it assumes the link to X has failed and sets the corresponding minimum cost to 16 (infinity).

28Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 29: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 29

In distance vector routing, each node shares its routing table with its

immediate neighbors periodically and when there is a change.

Note

Page 30: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Routing Information Protocol (RIP)Routing table

Has one entry for each destination network of which the router is aware. Each entry has destination network address, the shortest distance to

reach the destination in hop count, and next router to which the packet should be delivered to reach its final destination.

30Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

DestinationHop

CountNext

Router Other information

163.5.0.0 7 172.6.23.4

197.5.13.0 5 176.3.6.17

189.45.0.0 4 200.5.1.6

115.0.0.0 6 131.4.7.19

Page 31: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

31

Example Internetwork

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 32: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

When a router is added to a network, it initializes a routing table for itself, using its configuration file.

The table consists only the directly attached networks and the hop counts, which are initialized to 1.

The next-hop field, which identifies the next router, is empty.

32

Initial routing tables in a small autonomous system

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 33: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

33Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Updating Routing Table for Router A

Page 34: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Each routing table is updated upon receipt of RIP messages using the RIP updating algorithm.

34

Final routing tables

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 35: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

35

Receive: a response RIP message(significant portion of its routing table)

1. Add one hop to the hop count for each advertised destination.2. Repeat the following steps for each advertised destination: 1. If (destination not in the routing table) 1. Add the advertised information to the table. 2. Else 1. If (next-hop field is the same) 1. Replace entry in the table with the advertised one. 2. Else 1. If (advertised hop count smaller than one in the table) 1. Replace entry in the routing table.3. Return.

RIP Updating Algorithm

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 36: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

36

Example of updating a routing table

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 37: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

37Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Example of a domain using RIP

Page 38: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Link State RoutingEach node in the domain has the entire topology

of the domain.Analogous to a city map.Each node uses the same topology to create a

routing table.

Dr. Gihan Naguib 38

Page 39: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 39

Building Routing table

1. Creation link state packet (LSP)2. LSP is a tabular representation of the

topology of the internet3. Every router in the same area has the

same LSP4. After a node has prepared an LSP , it

must be disseminated to all other nodes . The process is called Flooding

5. Formation of shortest path tree for each node (router) using Dijkstra algorithm

6. Calculation of routing table.

Page 40: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 40

Building Routing table

Creation link state packet (LSP): LSP can carry a large amount of information such as : the

node identity, list of links, sequence number,…etc. LSP are generated on two occasions:

When there is a change in topology of the domain. Triggering of LSP dissemination to inform any node in the domain to update its topology

On a periodic basis. The period in this case is much longer compared to distance vector routing . The timer set for periodically dissemination is in the range 1 or 2 h. It done to ensure that the old LSP is removed A longer period ensures that flooding doesn’t create

much traffic on the network

Page 41: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

41Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

(a)

X A

C B D

(b)

X A

C B D

(c)

X A

C B D

(d)

X A

C B D

Flooding

Building Routing table

The creating node sends a copy of the LSP out of each interface

A node receives an LSP compares it with the copy it has. If the newly arrived is older than one it has , it discards

If it is newer the node do the following : It discards the old LSP and

keep the new one It sends a copy of it out of

each interface except the one from which the packet arrived.

Page 42: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Calculates the shortest path between two points on a network, using a graph made up of nodes and edges. Algorithm divides the nodes into two sets: tentative and permanent.

It chooses nodes, makes them tentative, examines them, and if they pass the criteria, makes them permanent.

42

Dijkstra Algorithm

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 43: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

43Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Examples of formation of shortest path tree usingDijkstra algorithm

Example 1:

Page 44: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

44Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Examples of formation of shortest path tree usingDijkstra algorithm

Routing table for node A

Example 1:

Page 45: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Open Shortest Path First :OSPF

OSPF Based on Link state Routing OSPF divides an autonomous system into

areas.

45

Special routers called autonomous system boundary routers are responsible for dissipating information about other autonomous systems into the current system

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 46: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Area is a collection of networks, hosts, and routers all contained within an autonomous system.

Routers inside an area flood the area with routing information.

Area border routers: Summarize the information about the area and send it to other routers.

Backbone area [Primary area]: All the areas inside an autonomous system must be connected to the backbone. Routers in this area are called as backbone routers. This area identification number is 0.

If, due to some problem, the connectivity between a backbone and an area is broken, a virtual link between routers must be created by the administration to allow continuity of the functions of the backbone as the primary area.

46

Areas in an Autonomous System

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 47: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

OSPF

Each router should have the exact topology of the internet at every moment.

From this topology, a router can calculate the shortest path between itself and each network

using Dijkstra algorithm

Types of Links

47Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 48: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

1. Point-to-pointConnects two routers without any other

router or host in between.Directly connected routers using serial line.Only one neighbour.No need to assign a network address to this

type of linkThe metrics are the same at the two ends

48

Types of Links

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 49: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

2. Transient link A network with several routers attached to it. Each router has many neighbours.

49

Types of Links

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

3. StubA network that is connected to only one router. The data packets enter the network through this single router and leave the network through this same router.

4. VirtualWhen the link between two routers is broken, the administration

may create a virtual link between them, using a longer path that probably goes through several routers.

Page 50: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

50

Example of an internet & Graphical representation

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Point to point : between A_D and B-E

Stub: N5, N4 and N2

Transient : N1 and N3

Page 51: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

51

Shortest-path calculation using Dijkstra

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Example 2:

Page 52: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

52

Shortest-path calculation using Dijkstra

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Example 2:

Page 53: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

53

Shortest-path calculation using Dijkstra

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Example 2:

Page 54: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 54

92 permanent66 permanent

Routing Table for Router A

Shortest-path calculation using DijkstraExample 2:

Behrouz A. Forouzan “Data communication and Networking”

Page 55: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

55

Shortest-path calculation using Dijkstra

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Example 3:

Page 56: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

56

Shortest-path calculation

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Page 57: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

57

Shortest-path calculation

Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Network Cost

Next Route

r

N1 5 ----

N2   7 C

N3 10 D

N4 11 B

N5 15 D

Page 58: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

OSPF

58Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

NOTE: OSPF differs from RIP in that each router knows the exact

topology of the network OSPF reduces routing bandwidth usage OSPF is faster than RIP.

Reaction to FailureIf a link fails, Router sets link distance to infinity & floods the networkwith an update packet

All routers immediately update their link database (LSP)&recalculate their shortest paths

Recovery very quick

Page 59: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

59Dr. Gihan Naguib Behrouz A. Forouzan “Data communication and Networking”

Multicasting and Broadcasting

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.

Page 60: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 60

In unicasting, the router forwards the received

packet through only one of its interfaces

In multicasting, the router may forward the received

packet through several of its interfaces.

Page 61: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 61

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.

The Internet doesn’t explicitly support

broadcating because of the huge amount of

traffic it would create

Broadcasting

Page 62: 1 Chapter 22 Network layer Delivery, Forwarding and Routing Dr. Gihan Naguib Behrouz A. Forouzan Data communication and Networking.

Dr. Gihan Naguib 62

Chapter 22 from 4th edition:Section 22.1

Section 22.2 until page 652 (example 22.3 only)

Section 22.3 until page 674 except Two-Node Loop Instability and Three-Node Loop Instability)

Section 22.4 until page680 (Broadcasting)

Reading from the text book