RIP v2 routing protocol is a revised version of RIP v1.
|
RIP v2 is supported by Cisco IOS 11.1 software.
|
The differences between RIP v1 and v2 stem from the enhancements that form part of the RIP v2 route information packet.
|
The first enhancement is the inclusion of a netmask field in the route information packet.
|
The term £Rnetmask£r or £Rprefix mask£r is now replacing the older term £Rsubnet mask£r.

This is due to the increased use of prefix addressing, where the prefix indicates the number of bits in an address that represent the network.
|
<f>The netmask field allows you to implement variable length subnet masks (VLSMs) and £Rc£rlassless £Ri£rnter£Rd£romain £Rr£routing (CIDR) in your RIP internetwork.
|
The combination of classless routing and VLSMs allows you to optimize the use of your NIC-assigned IP addresses.
|
Therefore, the netmask field allows you to make the most of your IP addresses.
|
RIP v2 also provides an authentication field in the routing information packet.
|
You can use the authentication field to minimize the risk of someone injecting incorrect routing information into your internetwork.
|
You have a choice of two authentication types:

• plain text authentication
|
• Cisco message digest (MD5)
|
MD5 is an encryption type of authentication. It verifies the integrity of the message, authenticates the origin and checks for timeliness.

Plain text is the default authentication type.
|
RIP v2 provides the ability to multicast updates.
|
Multicast refers to single packets copied by a network and sent to a specific subset of network addresses.
|
You can use this to restrict information received to RIP v2 routers only, rather than all the devices on a network.
|
Another key enhancement of RIP v2 is the inclusion of a next hop field in the route information packet.
|
If the next hop to a destination is on the same logical subnet, the router will advertise that next hop address in this field.
@@
Both RIP v1 and RIP v2 discover, select, and maintain routes in the same way.
|
However, the enhanced features of RIP v2 result in a number of operational differences.
|
The first difference results from RIP v2's use of the netmask field.
|
The netmask for a network address is included in the datagram when sending routing information.
|
RIP v1 routers ignore this field and use the locally configured netmask instead.
|
This can result in the RIP v1 router misinterpreting the destination as a host rather than a network.
|
RIP v2's authentication field allows you to configure routers so that they only accept routing update information when the packet has the correct key or password.
|
Each neighboring router must share the same key, if the route updating process is to function correctly.
|
RIP v1 routers handle these packets normally by ignoring the authentication field.
|
RIP v2 can send updates to a multicast address instead of a broadcast address.
|
RIP v1 cannot receive route updates that are sent by way of a multicast address.
@@
When you implement RIP v2 on an internetwork with disconnected subnetworks, you need to disable automatic route summarization.
|
Route summarization is enabled by default in RIP v2.
|
As an example, consider two domains that share the same class B address but have different prefixes defined.
|
In RIP v2, the netmask information is used in forwarding explicit routes to their appropriate domains.
|
Consider the domain addresses 172.16.0/17 and 172.16.128/17.
|
Where route summarization is enabled, both of these addresses would have the same classful route summary, 172.16.0/16. The routers cannot distinguish between them.
@@
Let's look at an example of how to configure RIP v2 on both a host and remote router.
|
Let's assume that you are logged in to the SanFran router and are currently in User Exec mode.
|
First, you need to change to Privileged mode by typing £Renable£r and pressing £UReturn£u.
|
When prompted for a password, you type in £Rcisco£r.
|
Privileged mode is indicated by the prompt.
|
Next, you need to enter Configuration mode.
|
To do this you type £Rconfig£r at the command prompt.
|
The system responds with a question about the source of the configuration information.
|
The default source is "terminal", so you can respond by simply pressing £UReturn£u.
|
You can configure RIP v2 both on a global and interface-by-interface basis.
|
Configuration on an interface-by-interface basis provides flexibility and helps facilitate migration from RIP v1.
|
To configure RIP v2 globally, you first type £Rrouter rip£r and press £UReturn£u.
|
You then specify the version number by typing £Rversion 2£r.
|
By specifying version 2, this router will accept and send only v2 packets.

If no version is specified, the router will accept v1 and v2 packets, but will only send v1 packets.
|
Next, you need to specify the network on which RIP v2 is to operate.
|
For this example you would type £Rnetwork 172.16.0.0£r.
|
The network that RIP v2 will be running on has been designed with disconnected subnetworks.
|
Therefore, the next step is to disable automatic route summarization.
|
This ensures that only explicit routes are exchanged between domains.
|
You disable automatic route summarization by typing £Rno auto-summary£r.
|
Prior to Cisco IOS 11.1, you had to define secondary addresses to solve this problem in a classless routing environment.
|
You can control the RIP version on an interface-by-interface basis using the interface subcommands.
|
First, you need to enter Interface Configuration mode.
|
You do this using the Interface command, specifying the target interface as the only argument.
|
If Ethernet0 is selected as the target interface, then you would type £Rinterface ethernet0£r.
|
Then, you need to set the primary address for this interface using the IP Address command.
|
For example, here you would enter the line shown.
|
Now you are ready to configure the interface.
|
If you want the interface to send v1 and v2 packets, but only accept v2 packets, then you would enter the following command lines:

£Rip rip send version 1 2£r
£Rip rip receive version 2£r
|
Once configuration of the router is complete, you leave Configuration mode by pressing £UCtrl+Z£u.
|
The final step is to copy this new running configuration to the startup configuration in NVRAM.
|
To do this you type £Rcopy runn start£r.
|
Having successfully configured the host router, you now need to consider how to configure a remote router.
|
Let's use the London router as our example.
|
The first step is to log on to the London router.
|
You can use any of the following command lines to log on to the London router:

£Rtelnet London£r
|
£Rtelnet 172.16.65.1£r
|
£RLondon£r
|
You are then asked to enter the password.
|
Successful logon is indicated by the appearance of the User Exec command prompt.
|
From this point on, the configuration procedure is similar to that used on the host Dublin router.
|
You first change to Privileged mode by typing £Renable£r and then entering the appropriate password.
|
Then you type £Rconfig£r and press £UReturn£u to move into Configuration mode.
|
You simply press £UReturn£u again to indicate the configuration information source "terminal".
|
The Privileged mode prompt for the London router is now displayed.
|
To configure RIP v2 globally on the London router, you first type £Rrouter rip£r and press £UReturn£u.
|
Then, you specify the version of RIP by typing £Rversion 2£r.
|
This router will now accept and send only v2 packets.
|
Next, you specify the network on which RIP v2 is to operate.
|
For this example you would type £Rnetwork 172.16.0.0£r.
|
Next, you need to disable automatic route summarization by typing £Rno auto-summary£r.
|
Once configuration of the router is complete, you leave Configuration mode by pressing £UCtrl+Z£u.
|
Finally, you need to copy this new running configuration to London's startup configuration file in NVRAM by typing £Rcopy runn start£r.
|
Let's now see how to verify the new configuration on this router.
|
If you type £Rshow ip protocol£r, you get a display showing the state and parameters of the active routing protocol process.
|
Included in the display is the version and authentication information.
|
You can then log out of the London router by typing £Rexit£r at the prompt.
@@
If you are sending and receiving RIP v2 packets, you can enable RIP authentication on an interface.
|
RIP v2 supports the following types of authentication:

• plain text
|
• MD5 (message digest) 
  - a Cisco proprietary 
  encryption type
|
Plain text authentication is only recommended where you want to ensure that misconfigured hosts do not participate in routing.
|
Plain text is of little use as a security measure, because the unencrypted authentication key is sent in every RIP v2 packet.
|
When configuring an interface for authentication, you need to be familiar with the following terms:

• £Rkey string£r - the password
  used by neighboring 
  routers to authenticate 
  packets received
|
Key strings are case sensitive.
|
• £Rkey£r - this refers to a key
  string and its associated
  accept and send time 
  frames
|
• £Rkey chain£r - the collection
  of keys that can be used 
  on an interface
|
It is important to note that all neighboring routers must share the same key if the routing update process is to function properly.
|
If you fail to configure a key chain, no authentication will be performed on that interface, not even the default plain text authentication.
|
A packet is sent for each active key in a key chain.
@@
Let's now consider an example of how you would enable authentication on an interface.
|
Let's assume you have logged on to the SanFran router and entered the Show IP Protocol command to verify the current configuration.
|
The resulting display shows that no key chain is currently defined, so no form of authentication is in operation.
|
Your first task is to enter Configuration mode using the Config command.
|
Now you can configure one or more key chains.
|
You need to decide on the key chain name and the individual key strings (passwords) you wish to use.
|
Taking "trees" as the key chain name, you would enter the command line £Rkey chain trees£r.
|
Next, you need to define each of the keys you want included in this key chain.
|
To begin entering the first key, you type £Rkey 1£r.
|
Then, you specify the key string you want associated with this key.
|
For example, the key string "maple" would be defined by entering £Rkey-string maple£r.
|
You now have the option of specifying accept and send time frames for the key.
|
If no accept and send time frames are defined, packets authenticated as "maple" are sent indefinitely.
|
Let's define accept and send time frames for "maple".
|
You use the Send-Lifetime and Accept-Lifetime commands to specify accept and receive time frames.
|
When entering lengthy command lines, Cisco inserts a scroll character "$" in place of the undisplayed portion of the text.
|
For this example, you could enter the command lines shown.
|
The start and end times can be entered in either of the following formats:

• hh:mm:ss day month year

• hh:mm:ss month day year

When configuring authentication, you should consider overlapping the accept and send times of keys, just in case the router clocks are not synchronized.
|
You need to type £Rkey 2£r to begin defining the second key in the key chain.
|
You then enter the key string chosen for this key (say "willow") by typing £Rkey-string willow£r.
|
As before, you can define accept and send time frames for this second key.
|
However, let's not specify time frames in this case.
|
That way, the router will continue sending packets authenticated with this key indefinitely.
|
Further keys can be entered as required.
|
Once you have configured one or more key chains, you are ready to enable RIP authentication on one or more interfaces.
|
First, you need to enter Interface Configuration mode using the Interface command.
|
Say you wish to enable authentication on the Ethernet0 interface, you would type £Rinterface ethernet0£r.
|
Next, you need to set the primary address for this interface, provided one has not already been specified.
|
You use the IP Address command.
|
For this example, you would type the line shown.
|
Next, you enter the interface subcommand to enable authentication and identify the set of keys that can be used on the interface.
|
Here, you would type the line shown.
|
You follow this by defining which authentication protocol to use.
|
To select md5, you would enter this line.
|
If you omit this command line plain text authentication is used as the default type.
|
Once you have finished the process of enabling authentication on an interface, you leave config mode using £UCtrl+Z£u.
|
Finally, you need to copy the new running configuration to the startup configuration in NVRAM by typing £Rcopy runn start£r.
|
You can now verify the new configuration by typing £Rshow ip protocol£r at the prompt.
|
Included in the display is the version and authentication information.
|
You can also verify the authentication key information by typing £Rshow key chains£r.
|
More information can be obtained using the Show Running-Config command.
|
The display includes each configured key chain and its associated keys.
|
You can also use this command to verify the protocols currently running on the router.
@@
Now you are going to configure RIP v2 on a router.
|
Let's assume that configuration of RIP v2 on the SanFran and London routers is complete, but the Dublin router still needs to be configured.
|
You are currently logged onto the SanFran router in User Exec mode.
|
The first step is to remotely log on to the Dublin router.
|
You can type £Rtelnet dublin£r to log on to the Dublin router.
|
You complete the logon procedure by entering the appropriate password.
|
Successful logon is indicated by the appearance of the Dublin User Exec command prompt.
|
To begin configuration of this router, you first need to access Privileged mode.
|
You type £Renable£r and enter the appropriate password to access Privileged mode.
|
Successful access is indicated by the appearance of the Privileged mode prompt.
|
Next, you need to enter Global Configuration mode.
|
You type £Rconfig£r to enter Global Configuration mode.
|
You are now ready to perform RIP v2 configuration on the router.
|
You first type £Rrouter rip£r and press £UReturn£u.
|
You then type £Rversion 2£r.
|
Finally, you need to specify the network that RIP v2 is to operate on using the Network command.
|
Here, you would type £Rnetwork 172.16.0.0£r.
|
You now need to disable automatic route summarization.
|
To disable route summarization you type £Rno auto-summary£r.
|
Now, you are going to configure RIP v2 on the router's Serial0 interface (S0).
|
You enter Interface Configuration mode by typing £Rinterface serial0£r.
|
You would then specify the IP address of this interface using the IP Address command.
|
By default, this interface will send and receive RIP v2 packets.
|
Let's set it up to receive v1 and v2 packets.
|
You would type £Rip rip receive version 1 2£r to configure the interface to accept v1 and v2 packets. 
|
By typing £Rexit£r, you return to Global Configuration mode.
@@
Your next task is to enable authentication on the Serial0 interface of the Dublin router.
|
First, you need to configure one or more key chains.
|
Let's assume that neighboring routers in the network have been configured to authenticate packets using the following key strings:

• maple
|
• willow
|
• chestnut
|
Let's configure a key chain "trees", which will contain the key strings "chestnut" and "maple".
|
You would begin configuring the key chain "trees" by typing £Rkey chain trees£r.
|
Next, you define each of the keys (passwords) you want associated with this key chain.
|
To begin entering the first key, you type £Rkey 1£r and press £UReturn£u.
|
You would type the command £Rkey-string chestnut£r to specify "chestnut" as the key string you want associated with this key.
|
Let's specify accept and send time frames for the key string "chestnut".
|
You would use the £RAccept-Lifetime£r command to specify an accept time frame spanning the period Oct 20 1996 to Dec 31 1996.
|
You would enter the £RSend-Lifetime£r command to indicate the send time frame.
|
Let's define a second key for this key chain.
|
This time you want packets authenticated as "maple" to be sent indefinitely.
|
You first type £Rkey 2£r and press £UReturn£u.
|
You complete the key by simply typing £Rkey-string maple£r.
|
You don't need to specify accept and send time frames when you want authenticated packets to be sent indefinitely.
|
You can use the Exit command repeatedly to return to Global Configuration mode.
|
Now that you have configured the key chain, you are ready to enable RIP v2 authentication on the selected Serial0 interface.
|
You first enter Interface Configuration mode by typing £Rinterface serial0£r.
|
Next, you specify the IP address of the interface using the IP Address command.
|
You would type the following command line to enable authentication and identify the set of keys that can be used on this interface.
|
Finally, let's select md5 as the authentication type for this interface.
|
To select md5, you would type the line shown here.
|
Now, you need to save this new running configuration to the startup configuration file in NVRAM.
|
You type £Rcopy runn start£r to save the new running configuration to the router's startup configuration file.
|
You would type £Rshow ip protocol£r to verify version and authentication information for the currently active routing protocol.
|
If you wanted to see more detailed information on the key chains configured on the router you could use the Show Running-Config command.
|
The Show Key Chain command gives you a more concise display of authentication key information.
@@