32
1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

Embed Size (px)

Citation preview

Page 1: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

1

Chapter 22

Network layer Delivery, Forwarding and

Routing(part3)

Page 2: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

Three-Node Instability

Page 3: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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).

3

Page 4: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

4

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

immediate neighbors periodically and when there is a change.

Note

Page 5: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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.

5

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 6: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

6

Example Internetwork

Page 7: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

• 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.

7

Initial routing tables in a small autonomous system

Page 8: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

8

Updating Routing Table for Router A

Page 9: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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

9

Final routing tables

Page 10: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

10

Example of updating a routing table

Page 11: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

11

Example of a domain using RIP

Page 12: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

Link State Routing• Each 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.• but the routing table for each node is unique because the calculations are based

on different interpretations of the topology.

12

Page 13: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

13

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 14: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

14

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 15: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

15

(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 discardsIf 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 16: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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.

16

Dijkstra Algorithm

Page 17: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

Examples of formation of shortest path tree usingDijkstra algorithm

17

Example 1:

Page 18: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

Examples of formation of shortest path tree usingDijkstra algorithm

18

Routing table for node A

Example 1:

Page 19: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

Open Shortest Path First :OSPF

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

areas.

19

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

Page 20: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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.

20

Areas in an Autonomous System

Page 21: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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

21

Page 22: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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

22

Types of Links

Page 23: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

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

23

Types of Links

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 24: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

24

Example of an internet & Graphical representation

Point to point : between A_D and B-E

Stub: N5, N4 and N2

Transient : N1 and N3

Page 25: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

25

Shortest-path calculation using Dijkstra

Example 2:

Page 26: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

26

Shortest-path calculation using DijkstraExample 2:

Page 27: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

27

Shortest-path calculation using DijkstraExample 2:

Page 28: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

28

92 permanent66 permanent

Routing Table for Router A

Shortest-path calculation using DijkstraExample 2:

Page 29: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

29

Shortest-path calculation using Dijkstra

Example 3:

Page 30: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

30

Shortest-path calculation

Page 31: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

31

Shortest-path calculation

Network Cost Next Router

N1 5 ----

N2 7 C

N3 10 D

N4 11 B

N5 15 D

Page 32: 1 Chapter 22 Network layer Delivery, Forwarding and Routing (part3)

OSPF

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.

32

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