cap. 13 forouzan. chapter 13 routing protocols (rip, ospf, bgp)

83
Cap. 13 Forouzan

Upload: beryl-lucas

Post on 16-Dec-2015

247 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Cap. 13 ForouzanCap. 13 Forouzan

Page 2: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Chapter 13

Routing Protocols(RIP, OSPF, BGP)

Page 3: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Servicios:Servicios:

Crear o Actualizar una tabla de ruteo basado en la trayectoria de mínimo atraso entre el fuente y el destino. Conociendo totalmente a la red. Basándome en un conocimiento

Parcial de la red

Page 4: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Tipos de Protocolos de RuteoTipos de Protocolos de Ruteo

Static: A parameter is minimized outline; the router is manually configured given the result of

the minimization process. Protocols:

1-MD + backtracking n-MD + backtracking (p.e. bifurcación) Flooding Flow based

Dynamic (Adaptable) Centralized:

All information is sent to a RCC (Routing Center Control) node. Aislado: Cada nodo colecta informacion SIN intercambiar mensajes.

Papa caliente: en la fila mas corta Distributed: Each node collect information to send to the others.

Vector de distancias (Bellman-Ford distribuido o Ford-Fulkerson) Estado-del-enlace

Static: A parameter is minimized outline; the router is manually configured given the result of

the minimization process. Protocols:

1-MD + backtracking n-MD + backtracking (p.e. bifurcación) Flooding Flow based

Dynamic (Adaptable) Centralized:

All information is sent to a RCC (Routing Center Control) node. Aislado: Cada nodo colecta informacion SIN intercambiar mensajes.

Papa caliente: en la fila mas corta Distributed: Each node collect information to send to the others.

Vector de distancias (Bellman-Ford distribuido o Ford-Fulkerson) Estado-del-enlace

Page 5: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

MetricsMetrics

Hop number Delay Throughput

Page 6: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Autonomous SystemAutonomous System

Exterior Routing

Page 7: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Interior and Exterior RoutingInterior and Exterior Routing

Page 8: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Autonomous SystemAutonomous System

Interior Routing

Interior Routing

Interior Routing

Interior Routing

Exterior Routing

Page 9: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

RIP (Routing Information Protocol)RIP (Routing Information Protocol)

Page 10: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

RIP (Routing Information

Protocol)

RIP (Routing Information

Protocol) It is a vector distance algorithm which

uses the Bellman-Ford Algorithm to calculate the routing tables to be used inside an AS.

Hop count is used as the metric for path selection.

If the hop count is greater than 15, the packet will be discarded.

By default, routing updates are broadcast every 30 seconds.

Page 11: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

EnvironmentEnvironment

Enlace Datos

Red

Físico

Transporte

Sesión

Presentación

Aplicación

Varies

IP, ICMP

TCP, UDP

HTTP, SNMP,

Telnet, ftp

Varies

IP,ICMP,RIP

Varies

IP,ICMP,RIP

Varies

IP,ICMP,RIP

Varies

IP,ICMP,RIP

Varies

IP,ICMP,RIP

Enlace Datos

Red

Físico

Transporte

Sesión

Presentación

Aplicación

Varies

IP, ICMP

TCP, UDP

HTTP, SNMP,

Telnet, ftp

Page 12: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Léxico: RIP (Routing Information

Protocol)

Léxico: RIP (Routing Information

Protocol) Request Response

Solicited Unsolicited

Update Message

Page 13: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Semantics:Semantics: Request

Send for a router that just come up or by a router that some has some time-out entries.

Unicast, multicast or broadcast. Response

Solicited: Send only in answer to a request

Unsolicited: Sent periodically, every 30 seconds.

Update Message: Periodic Timer Controls the advertising of regular update

messages.

Page 14: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-7

Sintaxis:Formato del Frame de un

Request

Sintaxis:Formato del Frame de un

Request

Page 15: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Sintaxis:Formato del Frame de un

Response

Sintaxis:Formato del Frame de un

ResponseComando (1-5) ReservedVesion(1)

Familia de Red 1 (For TCP/IP=2)

Dirección IP de la Red 1

0 24168 31

Debe de estar puesto a cero.

Debe de estar puesto a cero.

Debe de estar puesto a cero.

Distancia hacia la Red 1: Hop count from the advertising router to the destination network

Familia de Red 2

Dirección IP de la Red 2

Debe de estar puesto a cero.

Debe de estar puesto a cero.

Debe de estar puesto a cero.

…Distancia hacia la Red 2: Hop count from the advertising router to the destination network

Page 16: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-8

Page 17: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Routing TableRouting Table

Each entry in the routing table has: destination network IP address, shortest distance to reach the destination

in hop count and next hop (interface) to which the packet

should be deliver to reach its final destination..

Page 18: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-4

Page 19: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-5

Page 20: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Reglas de Procedimiento: RIP (Routing Information

Protocol)

Reglas de Procedimiento: RIP (Routing Information

Protocol) Incialization. Every T msec:

1. Node’s distance calculation.2. Send information(vector of

estimates) to its neighbors.3. Recieve information from its

neighbors.4. For each value of vector adds the

calculated distance.5. Updates Routing Table (RIP

Updating algorithm).

Page 21: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

2. Nodes sending information,3. Neighbors receiving information

2. Nodes sending information,3. Neighbors receiving information

Page 22: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

En realidad los nodos NO estan sincronizados, y eso hace que una grafica mas real para un tiempo t1 sea:

Nota: Utiliza broadcast al enviar mensajes a sus vecinos

Page 23: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

En realidad los nodos NO estan sincronizados, y eso hace que una grafica mas real para un tiempo t2 sea:

Page 24: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

En realidad los nodos NO estan sincronizados, y eso hace que una grafica mas real para un tiempo t3 sea:

Page 25: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

En realidad los nodos NO estan sincronizados, y eso hace que una grafica mas real para un tiempo t4 sea:

Page 26: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

En realidad los nodos NO estan sincronizados, y eso hace que una grafica mas real para un tiempo t5 sea:

Page 27: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Etc.

Page 28: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

5. RIP Updating algorithm5. RIP Updating algorithm

Receive: a response RIP message1. Add one hop to the hop count for each advertising

destination.2. Repeat the following steps for each advertised destination:

1. If (destination not in the routing table) // New router1. Add the advertised information to the table

2. Else1. If (next-hop field is the same)

1. Replace entry in the table with the advertising one

2. Else1. If (advertised hop count < than the one in the

table)1. Add it to the routing table.

2. Else1. Do nothing.

Page 29: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

RIP message from C

Old routing table

Page 30: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

RIP message from C

1. RIP message from C

After increment

Old routing table

Updating Algorithm

Page 31: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

RIP message from C

RIP message from C

After increment

Old routing table

Page 32: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

Net1 7 A

RIP message from C

RIP message from C

After increment

Old routing tableNew routing table

Rules:

Net1: No news, don’t change.

Page 33: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

Net1 7 ANet2 5 C

RIP message from C

RIP message from C

After increment

Old routing tableNew routing table

Rules:

Net2: Same next hope, replace.

Page 34: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

Net1 7 ANet2 5 CNet3 9 C

RIP message from C

RIP message from C

After increment

Old routing tableNew routing table

Rules:

Net3: A new router, add.

Page 35: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router receive a RIP messageA router receive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

Net1 7 ANet2 5 CNet3 9 CNet6 5 C

RIP message from C

RIP message from C

After increment

Old routing tableNew routing table

Rules:

Net6: Different next hope, new hop count smaller, replace.

Page 36: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router recive a RIP messageA router recive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

Net1 7 ANet2 5 CNet3 9 CNet6 5 CNet8 4 E

RIP message from C

RIP message from C

After increment

Old routing tableNew routing table

Rules:

Net8: Different next hope, new hop count the same, don’t change.

Page 37: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

A router recive a RIP messageA router recive a RIP message

Net2 4Net3 8Net6 4Net8 3Net9 5

Net2 5Net3 9Net6 5Net8 4Net9 6

Net1 7 ANet2 2 CNet6 8 FNet8 4 ENet9 5 F

Updating Algorithm

Net1 7 ANet2 5 CNet3 9 CNet6 5 CNet8 4 ENet9 5 F

RIP message from C

RIP message from C

After increment

Old routing tableNew routing table

Rules:

Net9: Different next hope, new hop count larger, don’t change.

Page 38: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Timers en RIPTimers en RIP

Sending of messages(distance’s vector)

Validity of a route(route is invalid, but the route is not still purged from the table )

Failure of a Router(after this time, finally the route is purged from the table )

Page 39: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Problems:Problems:

Slow Convergence: Since information is on the neigbors, it shows very

slow Convergece (Infinite Counting Problem: reacts faster to the good news than to the bad news).

Solution: Limiting the number of hops (AS Diameter) a 15.

Instability: messages can go from one router to another in a

loop. Solutions:

Triggered Update Split Horizon Poison Reverse

Page 40: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Tiempo esperado entes que un cambio alcance un ruteador:

Entonces, el tiempo de le toma actualizar un ruteador que está a N ruteadores, entonces

sec152

}{30

===

RIPpt

ptxE

sec152

×=× Nt

NRIPpt

p

Page 41: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-10

Page 42: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Ejemplo:Ejemplo: Si hay 10 enrutadores:

Suponiendo que la tecnología de red utilizada es Ethrenet, entonces la cantidad de bits transmitidos en este tiempo es:

sec1502

10,30

=×== Nt

p

RIPp

tN

Mbps150

Page 43: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Problems:Problems:

Slow Convergence: Since information is on the neigbors,

it shows very slow Convergece (Infinite Counting Problem: reacts faster to the good news than to the bad news).

Solution: Limiting the number of hops (AS

Diameter) a 15.

Page 44: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-11

Page 45: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Problems:Problems:

Instability: messages can go from one router to

another in a loop. Solutions:

Limiting the number of Hops, reduce the problem but do NOT eliminate it.

Triggered Update Split Horizon Poison Reverse

Page 46: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-12

3

Page 47: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-12

45 B

5 B 6

7 6

Page 48: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Triggered UpdateTriggered Update

If there is a change in the network, the router springs into action inmediatly by sending out its new table.

Page 49: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

16 -

Page 50: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Split HorizonSplit Horizon

If a router receive a packege from an interface, then the same update information must not be send back for the same interface.

Page 51: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-12

Eenvia información de Net3, pero NO de Net1,

16 - 16 -

Eenvia información de Net1, pero NO de Net3,

Page 52: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-13

Page 53: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Poisson ReversePoisson Reverse

Information receive by the router is used to update the routing table and then passed out to all interfaces. However, a table entry that has come through one interface is set to a metric of 16 as it goes out through the same interface.

Page 54: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-14

Page 55: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

RIP v2RIP v2

Enables RIP to receive information of an exterior routing protocol.

Authentication is added to protect message against unauthorized advertisement.

Utiliza la dirección de multicast: 224.0.0.9

Page 56: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-15

Page 57: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-16

Page 58: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

OSPFOSPF

Interior Routing Protocol. Divide the AS in areas (colection of

networks, hosts and routers inside an AS). Routers inside an area floods the area

with routing information. There is a special area called ¨backbone¨. All areas inside an AS must be connected

to the “backbone”. Allow the administrator to assign cost

(based on delay, maximum throughput, etc.) to each router.

Page 59: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

OSPF:OSPF:

Interior Routing Protocol. Divide the AS in areas (colection of

networks, hosts and routers inside an AS).

Routers inside an area floods the area with routing information.

Allow the administrator to assign cost (based on delay, maximum throughput, etc.) to each router.

Page 60: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Routers inside the Area flood the area with routing information.

At the border of an area, a special router summarize the information about the area and send it to other areas.

All the areas inside an autonomous system must be connected to the backbone. 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.

Page 61: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-19

a. Transient link phisical representation.b. Transient link “possible” phyisical representation: Even if they are connected to the same LAN, in this case each router would had to advertise the other routers the status of the links!!!c. Transient link “convenient” logical representation: there is a special router who is a true router and a designeted router. The designated router collect the interface information attached to the LAN.

Page 62: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Graphical RepresentationGraphical Representation

Page 63: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-24

Page 64: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-30-Part 1

Page 65: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-30-Part 2

Page 66: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-30 Part 3

Page 67: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-31

Test Reacheability.First step in the link state routing.

When a router in connected for first time to the network, it needs to know the the complete link state database.

A router needs information about specific route or routes.It is answered with a link State update packet.

All the links of the router

All the links connected to a networkOne for each network. It sends the network masks and the metrics

To which network, the border router is attached.One for each network. It

sends the network masks and the metrics

Page 68: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-32

Link State Request

Database Description

Link State Update

Page 69: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-33

Page 70: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-36

Page 71: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-41

Page 72: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

BGPBGP

The autonomous boundary routers advertise the reachability of the networks in their own autonomous systems to neighbor autonomous boundary routers.

Each router that receive a path vector message verifies that the advertised path is in agreement with its policy.

If it is, the router updates its routing table modifies the message (

adds its number to the path and replaces the next routing with its own

identification) sending it to the next neighbor.

Page 73: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-42

Page 74: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Loop Prevention: Can be avoided using the path

vector routing. Policy Routing:

The path is not based in minmium delay or minimum number of hops, but in policies.

Page 75: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

FinFin

Page 76: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-43

Page 77: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-44

Page 78: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-45

Page 79: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-46

Page 80: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-47

Page 81: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-48

Page 82: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-49

Page 83: Cap. 13 Forouzan. Chapter 13 Routing Protocols (RIP, OSPF, BGP)

Figure 13-50