Cap. 13 Forouzan
Chapter 13 Routing Protocols (RIP, OSPF, BGP)
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
Tipos 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) Enlace-estado 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) Enlace-estado
Metrics Hop number Delay Throughput
Autonomous System Exterior Routing
Interior and Exterior Routing
Autonomous System Interior Routing Exterior Routing
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.
Environment 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
Formato del Frame: RIP (Routing Information Protocol) Comando (1-5) Reserved Vesion(1) Familia de Red 1 (For TCP/IP=2) Dirección IP de la Red 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. … Distancia hacia la Red 2: Hop count from the advertising router to the destination network
Figure 13-6
Léxico: RIP (Routing Information Protocol) Request Response Solicited Unsolicited Update Message
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.
Figure 13-7
Figure 13-8
Routing Table Each entry in the routing table has: destination network IP address, shortest distance to reach the destination in hop count and next hop to which the packet should be deliver to reach its final destination..
Figure 13-4
Figure 13-5
Reglas de Procedimiento: RIP (Routing Information Protocol) Incicialization. Every T m sec : 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).
2. Nodes sending information, 3. Neighbors receiving information
5. RIP Updating algorithm Receive: a response RIP message 1. 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 router 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 advertising one 2. Else 1. If (advertised hop count smaller than the one in the table) 1. Add it to the routing table. 2. Else 1. Do nothing.
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net17A Net22C Net68F Net84E Net95F RIP message from C Old routing table
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F RIP message from C After increment Old routing table Updating Algorithm
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm RIP message from C After increment Old routing table
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm Net17A RIP message from C After increment Old routing table New routing table Rules: Net1: No news, don’t change.
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm Net17A Net25C RIP message from C After increment Old routing table New routing table Rules: Net2: Same next hope, replace.
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm Net17A Net25C Net39C RIP message from C After increment Old routing table New routing table Rules: Net3: A new router, add.
A router receive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm Net17A Net25C Net39C Net65C RIP message from C After increment Old routing table New routing table Rules: Net6: Different next hope, new hop count smaller, replace.
A router recive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm Net17A Net25C Net39C Net65C Net84E RIP message from C After increment Old routing table New routing table Rules: Net8: Different next hope, new hop count the same, don’t change.
A router recive a RIP message Net24 Net38 Net64 Net83 Net95 Net25 Net39 Net65 Net84 Net96 Net17A Net22C Net68F Net84E Net95F Updating Algorithm Net17A Net25C Net39C Net65C Net84E Net95F RIP message from C After increment Old routing table New routing table Rules: Net9: Different next hope, new hop count larger, don’t change.
Figure 13-3
Figure 13-9 Sending of messages 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 )
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. Instability: messages can go from one router to another in a loop. Solutions: Triggered Update Split Horizon Poison Reverse
Figure 13-10
Figure 13-11
Figure 13-12
Figure 13-13
Figure 13-14
Figure 13-15
Figure 13-16
Figure 13-17
Figure 13-18
Figure 13-19
Figure 13-20
Figure 13-21
Figure 13-22
Figure 13-23
Figure 13-24
Figure 13-25
Figure 13-26
Figure 13-27
Figure 13-28
Figure 13-29
Figure Part 1
Figure Part 2
Figure Part 3
Figure 13-31
Figure 13-32
Figure 13-33
Figure 13-34
Figure 13-35
Figure 13-36
Figure 13-37
Figure 13-38
Figure 13-39
Figure 13-40
Figure 13-41
Figure 13-42
Figure 13-43
Figure 13-44
Figure 13-45
Figure 13-46
Figure 13-47
Figure 13-48
Figure 13-49
Figure 13-50
Chapter 14 Application Layer and Client-Server Model
Figure 14-1
Figure 14-2
Figure 14-3
Figure 14-14
Figure 14-5
Figure 14-6
Figure 14-7
Figure 14-8
Figure 14-9
Figure 14-10
Figure 14-11
Figure 14-12
Figure 14-13
Figure 14-14
Figure 14-15
Figure 14-16
Enfoques de Interconexion Nivel Aplicacion (Observaciones) Un programa de nivel aplicación que corre en cada maquina de la red “entiende” los detalles sobre las conexiones de red para esa maquina e interactua con los programas de aplicación a través de dichas conexiones. Para agregar funcionalidad al sistema implicaría diseñar un nuevo programa de aplicación para cada máquina. Agregar nuevo hardware implicaría modificar o crear nuevos programas para cada posible aplicación. En cada máquina cada aplicación debe entender las conexiones de red para esa máquina dando como resultado duplicación de código.
Actividad: El ahorcado Objetivo: el estudiantes entenderá a través de esta actividad las características de transmision basado en Nivel Aplicación. Requerimientos: Cada nodo tiene la aplicacion de red: Ahorcado. Cada estudiante puede tener alguno de los siguientes roles: Ser Aplicación: Ahorcado Ser Nodo: representado por el Sistema Operativo. jugador 1: Un usuario de la aplicación de red. jugador 2: Un usuario de la aplicación de red. Los nodos de la red forman una topología de red. Cada conexión tiene un identificador (dirección). La aplicación de red sabe a que conexion dirigir el mensaje que ha recibido. Características del sistema: Si la topología cambia se suspende el servicio de transferencia de datos hasta que todos tienen la topología correcta. El “entendimiento” de las conexiones cambian al cambiar la topología de la red.
1. El jugador 1 envía la cantidad de letras a un jugador 2 a través de un jugador 1 de la red. 2. El jugador 2 de la red se comunica con el jugador 1 a través de la aplicación de red (a través de los nodos intremedios de la red). 3. Cuando un nodo recibe información de un nodo vecino entonces verifica si es para el. Si no es para el, entonces la envia al siguiente nodo dependiente de la topología de la red. 4. Cuando el jugador 2 recibe la cantidad de letras envía un mensaje de confirmación, confirmando la cantidad de letras recibidas, al jugador 1 a través de la aplicación de red. 5. Cuando el profesor recibe la confirmación de la cantidad de letras, envía a través del jugador 1 un mensaje pidiéndole al jugador 2 que envie su primer intento de letra. 6. Cuando el jugador 2 recibe la peticion envia la letra al jugador 1 que la pidio. 7. El jugador 1 recibe a través de la red 1 la letra y va formando el ahoracado. 8. El profesor envia una figura del ahorcado al jugador 2 a través del usuario fuente.
Jugador 1: como transmisor Transmist() 1. Ocio. 2. Envía un mensaje a un jugador 2 invitándolo a jugar. 3. Espera respuesta. 4. Recibe la respuesta del jugador Si el mensaje es de aceptación: genera una palabra y cuenta la cantidad de letras que tiene la palabra, pone en status inicial al ahorcado. Envía la cantidad de letras de una palabra a adivinar a un jugador 2 a través de un nodo de la red. Ir al siguiente paso. 2. Si el mensaje es de rechazo ir a paso Espera respuesta. 6. Recibe la letra sugerida por el jugador 2, llena los huecos de la palabra correspondientes a la letra recibida, actualiza el status del ahorcado entonces. 1. Si no ha terminado, entonces envía el status del ahorcado y continua en Sino, continua en el siguiente paso.
Jugador 2: como receptor. Receive() 1. Ocio. 2. Recibe un mensaje de invitación del jugador Si el jugador 2 desea jugar envía un mensaje de aceptación y continua en el paso Sino envía un mensaje de rechazo y continua en el paso Espera. 4. Recibe un mensaje con la cantidad de letras que tiene la palabra y con el status del ahorcado. 1. Si el status es de Continuar, entonces de acuerdo a su experiencia en el lenguaje, el jugador 2 envía un mensaje con la letra que cree que llenará los huecos faltantes de la palabra-escondida. 2. Si el status es de Gano, voy a paso 1 3. Si el status es de Perdió voy a paso 1.
Nodo (clase 1): Transmit(): 1. Ocio. 2. Transferencia de Datos 1. Recibe del jugador el mensaje. Revisa a quien va dirigido, revisa la tabla de ruteo y lo envía por la conexión correspondiente. 2. Espera Ack 3. Recibe la respuesta del nodo correspondiente al jugador Si el mensaje es de aceptación: envía mensaje de aceptación al jugador 1. Ir al paso Si el mensaje es de rechazo: envía mensaje de rechazo al jugador 1. Ir a paso 1.
Nodo (clase 2): Transmit() 1. Ocio. Al llegar el primer dato del jugador, entonces ve a Conexión: 1. Envía un mensaje al nodo2 invitándolo a hacer conexión. 2. Espera respuesta. 3. Recibe la respuesta del nodo Si el mensaje es de aceptación: envía mensaje de aceptación al jugador 1. Ir al paso Si el mensaje es de rechazo: envía mensaje de rechazo al jugador 1. Ir a paso Desconexión: 1. Envía un mensaje al nodo2 invitándolo a hacer desconexión. 2. Espera respuesta. 3. Recibe la respuesta del nodo Si el mensaje es de aceptación-des: envía mensaje de aceptación-des al jugador 1. Ir al paso Si el mensaje es de rechazo: envía mensaje de rechazo al jugador 1. Ir a paso Transmisión de Datos: 1. Recibe mensaje del jugador. Envía un mensaje al nodo 2 con el dato recibido del jugador. 2. Espera acuse. 3. Recibe dato del nodo 2, envía dato al jugador. Al llegar el siguiente dato. Ir a paso 5.1
Nodo: 1. Ocio. 2. Recibe del jugador el mensaje. Revisa a quien va dirigido, revisa la tabla de ruteo y lo envía por la conexión correspondiente. 3. Envía un mensaje al nodo correspondiente al jugador 2 invitándolo a aceptar conexión. 4. Espera respuesta. 5. Recibe la respuesta del nodo correspondiente al jugador Si el mensaje es de aceptación: envía mensaje de aceptacion al jugador 1. Ir al paso Si el mensaje es de rechazo: envia mensaje de rechazo al jugador 1. Ir a paso Recibe mensaje de dato. 7. Revisa a quien va dirigido, revisa la tabla de ruteo y lo envía por la conexión correspondiente. 8. Envía un mensaje al nodo correspondiente al jugador 2 invitándolo a aceptar conexión. 9. Espera respuesta. 10. Recibe la respuesta del nodo correspondiente al jugador Si el mensaje es de aceptación: envia mensaje de aceptacion al jugador 1. Ir al paso Si el mensaje es de rechazo: envia mensaje de rechazo al jugador 1. Ir a paso 1.
Que pasa cuando hay otra aplicación?
Enfoques de Interconexion Nivel Red: Computadoras intermedias manejan el trafico de red sin entender la aplicacion que los genera. Se pueden agregar nuevas tecnologias de red al cambiar una pieza sencilla de software a nivel red, mientras los programas de aplicacion permanecen sin cambio.
3.2 Intereconexion de nivel de aplicacion
Chapter 24 Socket Interface
Figure 24-1
Figure 24-2
Figure 24-3
Figure 24-4
Figure 24-5
Figure 24-6
Figure 24-7
Figure 24-8
Figure 24-9
Figure 24-10
Figure 24-11
Figure 24-12
Figure 24-13
Figure 24-14
Figure 24-15
Figure 24-16
Figure 24-17
Figure 24-18
Figure 24-19
Figure 24-20
Figure 24-21
Figure 24-22
Figure 24-23
Figure 24-24
Figure 24-25
Figure 24-26
Figure (repeated), Part I
Figure (repeated), Part II
Figure 24-27, Part I
Figure 24-27, Part II