Table of Contents RIP Configuration 1 RIP Overview 1 Operation of RIP 1 Operation of RIP 2 RIP Version 2 RIP Message Format 3 Protocols and Standards 4 Configuring RIP Basic Functions 5 Configuration Prerequisites 5 Configuration Overview 5 Configuring RIP Globally 5 Configuring Interface RIP 6 RIP Configuration Example 7 Configuration Guidelines 9
RIP Configuration NOTE: The term router in this document refers to both routers and Layer 3 switches. RIP Overview RIP is a simple Interior Gateway Protocol (IGP), mainly used in small-sized networks, such as academic networks and simple LANs. RIP is not applicable to complex networks. RIP is still widely used in practical networking due to easier implementation, configuration and maintenance than OSPF and IS-IS. Operation of RIP Introduction RIP routing table RIP timers RIP is a distance vector routing protocol, using UDP packets for exchanging information through port 520. RIP uses a hop count to measure the distance to a destination. The hop count from a router to a directly connected network is 0. The hop count from a router to a directly connected router is 1. To limit convergence time, the range of RIP metric value is from 0 to 15. A metric value of 16 (or greater) is considered infinite, which means the destination network is unreachable. That is why RIP is not suitable for large-scaled networks. A RIP router has a routing table containing routing entries of all reachable destinations, and each routing entry contains: Destination address: IP address of a host or a network. Next hop: IP address of the adjacent router s interface to reach the destination. Egress interface: Packet outgoing interface. Metric: Cost from the local router to the destination. Route time: Time elapsed since the routing entry was last updated. The time is reset to 0 every time the routing entry is updated. Route tag: Identifies a route, used in a routing policy to flexibly control routes. RIP employs four timers, update, timeout, suppress, and garbage-collect. The update timer defines the interval between routing updates. The timeout timer defines the route aging time. If no update for a route is received within the aging time, the metric of the route is set to 16 in the routing table. The suppress timer defines how long a RIP route stays in the suppressed state. When the metric of a route is 16, the route enters the suppressed state. In the suppressed state, only routes which come 1
from the same neighbor and whose metric is less than 16 will be received by the router to replace unreachable routes. The garbage-collect timer defines the interval from when the metric of a route becomes 16 to when it is deleted from the routing table. During the garbage-collect timer length, RIP advertises the route with the routing metric set to 16. If no update is announced for that route after the garbage-collect timer expires, the route will be deleted from the routing table. Routing loops prevention RIP is a distance vector (D-V) routing protocol. Since a RIP router advertises its own routing table to neighbors, routing loops may occur. RIP uses the following mechanisms to prevent routing loops. Counting to infinity. The metric value of 16 is defined as unreachable. When a routing loop occurs, the metric value of the route will increment to 16. Split horizon. A router does not send the routing information learned from a neighbor to the neighbor to prevent routing loops and save bandwidth. Poison reverse. A router sets the metric of routes received from a neighbor to 16 and sends back these routes to the neighbor to help delete such information from the neighbor s routing table. Triggered updates. A router advertises updates once the metric of a route is changed rather than after the update period expires to speed up network convergence. Operation of RIP The following procedure describes how RIP works. 1. After RIP is enabled, the router sends request messages to neighboring routers. Neighboring routers return Response messages including information about their routing tables. 2. After receiving such information, the router updates its local routing table, and sends triggered update messages to its neighbors. All routers on the network do the same to keep the latest routing information. 3. By default, a RIP router sends its routing table to neighbors every 30 seconds. RIP Version 4. RIP ages out routes by adopting an aging mechanism to keep only valid routes. RIP has two versions, RIPv1 and RIPv2. RIPv1, a classful routing protocol, supports message advertisement via broadcast only. RIPv1 protocol messages do not carry mask information, which means it can only recognize routing information of natural networks such as Class A, B, C. That is why RIPv1 does not support discontiguous subnets. RIPv2 is a classless routing protocol. Compared with RIPv1, RIPv2 has the following advantages. Supporting route tags. Route tags are used in routing policies to flexibly control routes. Supporting masks, route summarization and Classless Inter-Domain Routing (CIDR). Supporting designated next hops to select the best next hops on broadcast networks. Supporting multicast routing update to reduce resource consumption. Supporting plain text authentication and MD5 authentication to enhance security. 2
NOTE: RIPv2 has two types of message transmission: broadcast and multicast. Multicast is the default type using 224.0.0.9 as the multicast address. The interface working in the RIPv2 broadcast mode can also receive RIPv1 messages. RIP Message Format A RIP message consists of a header and up to 25 route entries. (A RIPv2 authentication message uses the first route entry as the authentication entry, so it has up to 24 route entries.) Figure 1 shows the format of RIPv1 message. RIPv1 message format Figure 1 RIPv1 Message Format Command: Type of message. 1 indicates a request, which is used to request all or part of the routing information from the neighbor, and 2 indicates a response, which contains all or part of the routing information. A response message consists of up to 25 route entries. Version: Version of RIP, 0x01 for RIPv1. AFI: Address Family Identifier, 2 for IP, and 0 for request messages. IP Address: Destination IP address of the route. It can be a natural network, subnet or a host address. Metric: Cost of the route, 16 for request messages. RIPv2 message format The format of RIPv2 message is similar to RIPv1. Figure 2 shows it. Figure 2 RIPv2 Message Format The differences from RIPv1 are stated as following. 3
Version: Version of RIP. For RIPv2 the value is 0x02. Route Tag: Route Tag. IP Address: Destination IP address. It can be a natural network address, subnet address or host address. Subnet Mask: Mask of the destination address. Next Hop: If set to 0.0.0.0, it indicates that the originator of the route is the best next hop; otherwise it indicates a next hop better than the originator of the route. RIPv2 authentication message format RIPv2 sets the AFI field of the first route entry to 0xFFFF to identify authentication information. See Figure 3. Figure 3 RIPv2 Authentication Message Authentication Type: A value of 2 represents plain text authentication, while a value of 3 represents MD5. Authentication: Authentication data, including password information when plain text authentication is adopted or including key ID, MD5 authentication data length and sequence number when MD5 authentication is adopted. NOTE: RFC 1723 only defines plain text authentication. For information about MD5 authentication, see RFC 2453 RIP Version 2. Protocols and Standards RFC 1058; Routing Information Protocol RFC 1723: RIP Version 2 - Carrying Additional Information RFC 1721: RIP Version 2 Protocol Analysis RFC 1722: RIP Version 2 Protocol Applicability Statement RFC 1724: RIP Version 2 MIB Extension RFC 2082: RIP-2 MD5 Authentication RFC 2453: RIP Version 2 4
Configuring RIP Basic Functions Configuration Prerequisites Before configuring RIP basic functions, complete the following tasks. Configure the link layer protocol. Configure an IP address on each interface, and make sure all adjacent routers are reachable to each other. Configuration Overview Perform the tasks in Table 1 to configure RIP. Table 1 RIP configuration task list Task Enable RIP Import static routes Configuring Interface RIP Configuring RIP Globally Configuring RIP Globally Remarks Required Enable RIP on all interfaces. Optional Configure RIP to redistribute static routes. Optional Configure the Work State, Version, and Authentication Mode for RIP interfaces. Configuring RIP Globally Select Network > Routing Management > RIP from the navigation tree to enter the RIP configuration page, as shown in Figure 4. Figure 4 RIP global configuration page Table 2 describes the RIP global configuration items. Table 2 RIP global configuration items Item Enable RIP (enable all interfaces automatically) Import static routes Description Enable RIP on all interfaces. Configure RIP to redistribute static routes. 5
Return to RIP configuration task list. Configuring Interface RIP Select Network > Routing Management > RIP from the navigation tree to enter the RIP configuration page. If RIP is enabled, the More button is displayed. Click More to display the hidden RIP interface list, as shown in Figure 5. Then, click the icon to enter the configuration page of the specified RIP interface, as shown in Figure 6. Figure 5 Interface configuration page Figure 6 RIP interface configuration page Table 3 describes the RIP interface configuration items. Table 3 RIP interface configuration items Item Interface Description Displays the RIP interface name 6
Item Work State Version Authentication Mode Key String Key ID Description Set whether to allow the receiving/sending of RIP packets on the interface. On: Allows the receiving/sending of RIP packets on the interface. Off: Disallows the receiving/sending of RIP packets on the interface. Specify a RIP version for the interface. Default: Indicates the interface can send RIPv1 broadcasts and can receive RIPv1 broadcast and unicast packets, and RIPv2 broadcast, multicast, and unicast packets. RIPv1: Indicates the interface can send RIPv1 broadcasts, and can receive RIPv1 broadcasts and RIPv1 unicasts. RIPv2: Indicates the interface can send RIPv2 multicasts and can receive RIPv2 unicasts, broadcasts and multicasts. RIPv2 broadcast: Indicates the interface can send RIPv2 broadcasts and can receive RIPv1 unicasts, and broadcasts, and RIPv2 broadcasts, multicasts and unicasts. Set the authentication mode and parameters for authenticating RIP packets on a RIPv2 interface. If the Authentication Mode is null, the interface does not authenticate RIP packets, and the Key String and Key ID are not required. If Simple is specified for Authentication Mode, the interface authenticates RIP packets using simple text key. You need to configure a Key String in simple text. If MD5 RFC2453 is specified for Authentication Mode, the interface adopts the MD5 authentication mode, and the authentication packet is in the format defined in RFC 2453. You need to configure a Key String in MD5 cipher text. If MD5 RFC2082 is specified for Authentication Mode, the interface adopts the MD5 authentication mode, and the authentication packet is in the format defined in RFC 2082. Then, you need to configure a Key String in MD5 cipher text and a Key ID. IMPORTANT: If Default or RIPv1 is specified as the RIP version, the authentication information you have configured does not take effect. Return to RIP configuration task list. RIP Configuration Example Network requirements As shown in Figure 7, enable RIP on all interfaces on Device A and Device B. 7
Figure 7 Network diagram for RIP configuration Configuration procedure Step1 Configure an IP address for each interface and configure security zones (Omitted) Step2 Enable RIP # Configure Device A. Select Network > Routing Management > RIP from the navigation tree of Device A. Select the Enable RIP(Enable all interfaces automatically) check box, as shown in Figure 8. Click Apply. Figure 8 Enable RIP # Configure Device B. Select Network > Routing Management > RIP from the navigation tree of Device B. Select the Enable RIP(Enable all interfaces automatically) check box, as shown in Figure 8. Click Apply. Verify the configuration # Display active routes of Device A. Select Network > Routing Management > Routing Info from the navigation tree of Device A to display learned RIP route destined for 10.0.0.0/8, as shown in Figure 9. 8
Figure 9 RIP configuration result I # Display active routes of Device B. Select Network > Routing Management > Routing Info from the navigation tree of Device B to display learned RIP routes destined for 2.0.0.0/8 and 3.0.0.0/8, as shown in Figure 10. Figure 10 RIP configuration result II Configuration Guidelines 1. RIP multi-process is not supported on the Web interface. Enabling RIP creates process 1, and disabling RIP removes process 1. 2. After you enable RIP, it is enabled on all the interfaces automatically. Enabling RIP on a specific interface is not supported on the Web interface; instead, you can set the Work State of a RIP interface to enable/disable the receiving/sending of RIP packets. 3. If the interface version is set to RIPv2, the automatic route summarization function is disabled. 9