Protocolo de Información de Enrutamiento (RIP)

Existen dos versiones de RIP. La versión 1 (RIP-1) es un protocolo destacado ampliamente con sus limitaciones. La versión 2 (RIP-2) es una versión mejorada diseñada para aliviar las limitaciones de RIP hasta que sea altamente compatible con él. El término RIP se usa para referirse a la versión 1, mientras que RIP-2 se refiere a la versión 2. Cuando el lector se encuentre el término RIP en la literatura de TCP/IP, debería asumir que se está refiriendo a la versión 1 a menos que explícitamente se diga lo contrario. Se usará esta nomenclatura en esta sección excepto cuando las dos versiones se estén comparando, donde se usará el término RIP-1 para evitar posibles confusiones.

Protocolo de Información de Enrutamiento
versión 1 (RIP, RIP-1)

RIP es un protocolo estándar (STD 34). Su estado es electivo. Se describe en el RFC 1058, aunque muchas implementaciones RIP preceden este RFC por un número de años. RIP se implementa generalmente con un demonio llamado routed. los demonios gated también soportan RIP.

RIP se basó en los protocolos de enrutamiento de Xerox PUP y XNS. Se usa ampliamente, así que el código está incorporado en el código de enrutamiento del UNIX BSD de Berkeley que proporciona los fundamentos para muchas implementaciones UNIX.

RIP es una implementación directa del enrutamiento distancia-vector para redes locales. La communicación RIP usa UDP como protocolo de transporte, con número de puerto 520 como puerto de destino (ver Protocolo de Datagrama de Usuario (UDP) para un descripción de UDP y puertos). RIP opera en uno de los dos modos siguientes: activo (normalmente lo usan los routers) y pasivo (normalmente lo usan los hosts). La diferencia entre los dos se explica más abajo. Los mensajes RIP se envían en datagramas UDP y cada uno contiene 25 parejas de números como se muestra en la siguiente figura.

Figura: Mensaje RIP

Se pueden listar entre 1 y 25 rutas en un mensaje RIP. Con 25 rutas el mensaje es de 504 bytes (25x20+4) que es el tamaño máximo del mensaje que puede transmitirse en un datagrama UDP de 512 bytes.

Orden
es 1 para una petición RIP o 2 para una respuesta RIP.
Versión
es 1.
Familia de direcciones
es 2 para direcciones IP.
dirección IP
es la dirección IP para esta entrada de enrutamiento: un host o una subred (en cuyo caso el número de host es cero).
Métrica de salto
es la número de saltos al destino. El contador de saltos para una interfaz conectada directamente es 1, y cada router intermedio lo incrementa en 1 hasta un máximo de 15, un 16 indica que no existe ruta hacia el destino.

Ambos participantes RIP, activo y pasivo, escuchan todos los mensajes emitidos y actualizan sus tablas de enrutamiento según el algoritmo vector-distancia descrito anteriormente.

Operaciones Básicas

Limitaciones

RIP is not designed to solve every possible routing problem.RFC 1720 (STD 1) describes these technical limitations of RIP as ``serious'' and the IETF es evaluating candidates for a new standard ``open'' protocol to replace RIP. Possible candidates include OSPF (see Open Shortest Path First Protocol (OSPF) Version 2) and OSI IS-IS (see OSI Intermediate System to Intermediate System (IS-IS)). However, RIP is widely deployed and therefore is unlikely to be completely replaced for some time. RIP has the following specific limitations:

Solving the counting to infinity problem is done by using the split horizon, poisoned reverse and triggered updates techniques.

Split horizon with poisoned reverse

Consideremos nuestra red de ejemplo mostrada en la figura:

Figura: El problema de la cuenta a infinito - Todos los enlaces tienen una métrica de 1 excepto para la ruta indirecta de C a D que tiene una métrica de 10

As described in Vector-Distancia the problem was caused by the fact that A and C are engaged in a pattern of mutual deception. Each claims to be able to reach D via the other. This can be prevented by being more careful about where information is sent. In particular, it is never useful to claim reachability for a destination network to the neighbor from which the route was learned (reverse routes). The split horizon with poisoned reverse scheme includes routes in updates sent to the router from which they were learned, but sets their metrics to infinity. If two routers have routes pointing at each other, advertising reverse routes with a metric of 16 will break the loop immediately. If the reverse routes are simply not advertised (this scheme is called simple split horizon), the erroneous routes will have to be eliminated by waiting for a timeout. Poisoned reverse does have a disadvantage: it increases the size of the routing messages.

Triggered updates

Split horizon with poisoned reverse will prevent any routing loop that involves only two gateways. However, it is still possible to end up with patterns in which three routers are engaged in mutual deception. For example, A may believe it has a route through B, B through C, and C through A. This cannot be solved using split horizon. This loop will only be resolved when the metric reaches infinity and the network or host involved is then declared unreachable. Triggered updates are an attempt to speed up this convergence. Whenever a router changes the metric for a route, it is required to send update messages almost immediately, even if it is not yet time for one of the regular update messages (RIP specifies a small time delay, between 1 and 5 seconds, in order to avoid having triggered updates generate excessive network traffic).

Protocolo de información de enrutamiento
versión 2 (RIP-2)

RIP-2 es un protocolo estándar borrador. Su estado es electivo y se describe en el RFC 1723.

RIP-2 extende RIP-1. Es menos potente que otros IGPs recientes tales como OSPF (ver Open Shortest Path First Protocol (OSPF) Version 2) and IS-IS (see OSI Intermediate System to Intermediate System (IS-IS)), but it has the advantages of easy implementation and lower overheads. The intention of RIP-2 is to provide a straightforward replacement for RIP which can be used on small to medium-sized networks, can be employed in the presence of variable subnetting (see Subnets) or supernetting (see Classless Inter-Domain Routing (CIDR)) and importantly, can interoperate with RIP-1.

RIP-2 takes advantage of the fact that half of the bytes in a RIP-1 message are reserved (must be zero) and that the original RIP-1 specification was well designed with enhancements in mind, particularly in the use of the version field. One notable area where this is not the case is in the interpretation of the metric field. RIP-1 specifies it as being a value between 0 and 16 stored in a four-byte field. For compatibility, RIP-2 preserves this definition, meaning that it agrees with RIP-1 that 16 is to be interpreted as infinity, and wastes most of this field.

Nota: Neither RIP-1 nor RIP-2 are properly suited for use as an IGP in an AS where a value of 16 is too low to be regarded as infinity, because high values of infinity exacerbate the counting to infinity problem. The more sophisticated Link-State protocol used in OSPF and IS-IS provides a much better routing solution when the AS is large enough to have a legitimate hop count close to 16.

Provided that a RIP-1 implementation obeys the specification in RFC 1058, RIP-2 can interoperate with RIP-1. El formato de mensaje RIP se extiende como se muestra en figura siguiente.

Figura: Mensaje RIP-2 - La primera entrada del mensaje puede ser una entrada de autentificación, como se muestra aquí, o puede ser una ruta como en un mensaje RIP-1. Si la primera entrada es una entrada de autentificación, sólo pueden incluirse 24 rutas en un mensaje; en otro caso el máximo es 25 como en RIP-1

Los campos en un mensaje RIP-2 son los mismos que los de RIP-1 excepto los siguientes:

Versión
Is 2. This tells RIP-1 routers to ignore the fields designated as ``must be zero'' (if the value is 1, RIP-1 routers are required to discard messages with non-zero values in these fields since the messages originate with a router claiming to be RIP-1-compliant but sending non-RIP-1 messages).

Familia de direcciones
May be X'FFFF' in the first entry only, indicating that this entry is an authentication entry.
Tipo de autentificación
Defines how the remaining 16 bytes are to be used. The only defined types are 0 indicating no authentication and 2 indicating that the field contains password data.
Datos de autentificación
The password is 16 bytes, plain text ASCII, left adjusted and padded with ASCII NULLs (X'00').
Etiqueta de ruta
Is a field intended for communicating information about the origin of the route information. It is intended for interoperation between RIP and other routing protocols. RIP-2 implementations must preserve this tag, but RIP-2 does not further specify how it is to be used.
Máscara de subred
The subnet mask associated with the subnet referred to by this entry.
Salto siguiente
A recommendation about the next hop that the router should use to send datagrams to the subnet or host given in this entry.

Para asegurar interoperación con RIP, el RFC 1723 especifica las restricciones siguientes para los routers RIP-2 que envían sobre una interfaz de red donde un router RIP-1 puede oir y operar sobre los mensajes RIP.

  1. La información interna para una red nunca se debe advertir en otra red.
  2. Information about a more specific subnet may not be advertised where RIP-1 routers would consider it a host route.
  3. Supernet routes (routes with a subnet mask shorter than the natural or ``unsubnetted'' network mask) must not be advertised where they could be misinterpreted by RIP-1 routers.

RIP-2 also supports the use of multicasting rather than simple broadcasting. This can reduce the load on hosts which are not listening for RIP-2 messages. This option is configurable for each interface to ensure optimum use of RIP-2 facilities when a router connects mixed RIP-1/RIP-2 subnets to RIP-2-only subnets. Similarly, the use of authentication in mixed environments can be configured to suit local requirements.

RIP-2 is implemented in recent versions of the gated daemon, often termed gated Version 3. Since the draft standard is new at the time of writing, many implementations will comply with the earlier version described in RFC 1388. Such implementations will interoperate with those adhering to RFC 1723.

Para más información sobre RIP-2, ver:

Enrutamiento IP básico  |  Tabla de Contenidos  |  Protocolos de aplicación