RIP Commands

This chapter contains the following sections:

clear rip statistics

The clear rip statistics Privileged EXEC mode command clears statistics counters of all interfaces and all peers.

Syntax

clear rip statistics

Parameters

N/A

Command Mode

Privileged EXEC mode

Example

The following example shows how to clear all counters:

switchxxxxxx# clear rip statistics

default-information originate

To generate a default route into Routing Information Protocol (RIP), use the default-information originate command in Router Configuration mode. To disable this feature, use the no form of this command.

Syntax

default-information originate

no default-information originate

Default Configuration

Default route is not generated by RIP.

Command Mode

Router RIP Configuration mode

User Guidelines

Use the command to enable generation of a default route.

Examples

Example 1 - The following example shows how to originate a default route:

switchxxxxxx(config)# router rip switchxxxxxx(config-rip)# default-information originate switchxxxxxx(config-rip)# exit

default-metric

The default-metric Router RIP configuration mode command sets the default metric value when RIP advertises routes derived by other protocols (for example, by static configuration). The no format of the command sets the default value.

Syntax

default-metric [metric-value]

no default-metric

Parameters

  • metric-value—Default metric value. Range 1-15.

Default Configuration

metric-value—1.

Command Mode

Router RIP Configuration mode

Example

The following example shows how to set the default metric to 2:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# default-metric 2
switchxxxxxx(config-rip)# exit

ip rip authentication key-chain

The ip rip authentication key-chain IP Interface Configuration mode command specifies the set of keys that can be used for and specifies the type of authentication. The no format of the command returns to default.

Syntax

ip rip authentication key-chain name-of-chain

no ip rip authentication key-chain

Parameters

  • name-of-chain—Specifies the name of key set. The name-change parameter points to list of keys specified by the key chain CLI command.

Default Configuration

No defined key chain.

Command Mode

IP Configuration mode

User Guidelines

Use the ip rip authentication key-chain IP Interface Configuration mode command to define a key chain name. Only one key chain may be defined per an IP interface. Each the ip rip authentication key-chain command overrides the previous definition.

In order to have a smooth rollover of keys in a key chain, a key should be configured with a lifetime that starts several minutes before the lifetime of the previous key expires.

Example

The following example shows how to define a chain name:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip authentication key-chain alpha
switchxxxxxx(config-route-map)# exit

ip rip authentication mode

The ip rip authentication mode IP Interface Configuration mode command enables authentication. The no format of the command returns to default.

Syntax

ip rip authentication mode {text | md5}

no ip rip authentication mode

Parameters

  • text—Specifies the clear text authentication.

  • md5—Specifies the MD5 authentication.

Default Configuration

No authentication.

Command Mode

IP Configuration mode

User Guidelines

If you enable the MD5 authentication, you must configure a key chain name with the ip rip authentication key-chain interface command. If a key chain is not defined for the IP interface or there is not a valid key then RIP packets are not sent on the IP interface and received IP interface packets are dropped.

If you enable the clear text authentication, you must configure a password with the ip rip authentication-key interface command. If a password is not defined for the IP interface then RIP packets are not sent on the IP interface and received IP interface packets are dropped.

Example

The following example shows how to set the md5 mode:

switchxxxxxx(config)# interface ip 1.1.1.1

switchxxxxxx(config-route-map)# ip rip authentication mode md5
switchxxxxxx(config-route-map)# exit

ip rip authentication-key

To assign a password to be used by neighboring routers that are using the RIP clear text authentication, use the ip rip authentication-key command in interface configuration mode. To remove the RIP password, use the no form of this command.

Syntax

ip rip authentication-key password

no ip rip authentication-key

Parameters

  • password—Any continuous string of characters that can be entered from the keyboard up to 16 characters in length.

Default Configuration

No password is specified.

Command Mode

IP Configuration mode

User Guidelines

The password created by this command is used as a "key" that is inserted directly into the RIP header when the switch software originates routing protocol packets. A separate password can be assigned to each subnetwork. All neighboring routers on the same subnetwork must have the same password to be able to exchange RIP information.

Only one password may be defined per IP interface. Each ip rip authentication-key command overrides the previous definition.

Example

The following example shows how to define a password:

switchxxxxxx(config)# interface ip 1.1.1.1

switchxxxxxx(config-route-map)# ip rip authentication mode text
switchxxxxxx(config-route-map)# ip rip authentication-key alph$$12
switchxxxxxx(config-route-map)# exit

ip rip default-information originate

The ip rip default-information originate IP Interface generates a metric for a default route in RIP. The no format of the command disables the feature.

Syntax

ip rip default-information originate {disable | metric}

no ip rip default-information originate

Parameters ranges

  • disable—Do not send the default route.

  • metric—Default route metric value. Range: 1-15.

Default Configuration

The RIP behavior is specified by the default-information originate command.

Command Mode

IP Configuration mode

User Guidelines

Use the command to override the RIP behavior specified by the default-information originate command on a given IP interface.

Example

The following example shows how to enable sending of default route with metric 3:

switchxxxxxx(config)# interface ip 1.1.1.1

switchxxxxxx(config-route-map)# ip rip default-information originate 3
switchxxxxxx(config-route-map)# exit

ip rip distribute-list in

The ip rip distribute-list in IP configuration mode command enables filtering of routes in incoming RIP update messages. The no format of the command disables the filtering.

Syntax

ip rip distribute-list access access-list-name in

no ip rip distribute-list in

Parameters

  • access-list-name—Standard IP access list name, up to 32 characters. The list defines which routes in incoming RIP update messages are to be accepted and which are to be suppressed.

Default Configuration

No filtering

Command Mode

IP Configuration mode

User Guidelines

Each network from a received RIP update message is evaluated by the access list and it is accepted only if it is permitted by the list. See the ip access-list (IP standard) and ip prefix-list commands for details.

Example

The following example shows how to define input filtering:

witchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip distribute-list access 5 in
switchxxxxxx(config-route-map)# exit

ip rip distribute-list out

The ip rip distribute-list out IP configuration mode command enables filtering of routes in outgoing RIP update messages. The no format of the command disables the filtering.

Syntax

ip rip distribute-list access access-list-name out

no ip rip distribute-list out

Parameters

  • access-list-name—Standard IP access list name, up to 32 characters. The list defines which routes in outgoing RIP update messages are to be sent and which are to be suppressed.

Default Configuration

No filtering

Command Mode

IP Configuration mode

User Guidelines

Each network from the IP Forwarding table is evaluated by the list and it is included in the RIP update message only if it is permitted by the list. See the ip access-list (IP standard) and ip prefix-list commands.

Example

The following example shows how to define outgoing filtering:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip distribute-list access 5 out
switchxxxxxx(config-route-map)# exit

ip rip offset

The ip rip offset IP configuration mode command defines a metric added to incoming routes. The no format of the command returns to default.

Syntax

ip rip offset offset

no ip rip offset

Parameters

  • offset—Specifies the offset to be applied to received routes. Range: 1-15.

Default Configuration

offset—1.

Command Mode

IP Configuration mode

User Guidelines

Example

The following example shows how to set offset to 2:

switchxxxxxx(config)# interface ip 1.1.1.1

switchxxxxxx(config-route-map)# ip rip offset 2
switchxxxxxx(config-route-map)# exit

ip rip passive-interface

The ip rip passive-interface IP Interface Configuration mode command disables sending RIP packets on an IP interface. The no format of the command re-enables the sending RIP packets.

Syntax

ip rip passive-interface

no ip rip passive-interface

Default Configuration

RIP messages are sent.

Command Mode

IP Configuration mode

User Guidelines

Use the ip rip passive-interface command to stop sending RIP messages on the giving IP interface. To stop RIP messages being sent on all interfaces, use the passive-interface command.

Note. The no ip rip passive-interface command does not override the passive-interface command.

Example

The following example shows how to stop the sending of RIP messages:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip passive-interface
switchxxxxxx(config-route-map)# exit

ip rip distribute-list in

The ip rip distribute-list in IP configuration mode command enables filtering of routes in incoming RIP update messages. The no format of the command disables the filtering.

Syntax

ip rip distribute-list access access-list-name in

no ip rip distribute-list in

Parameters

  • access-list-name—Standard IP access list name, up to 32 characters. The list defines which routes in incoming RIP update messages are to be accepted and which are to be suppressed.

Default Configuration

No filtering

Command Mode

IP Configuration mode

User Guidelines

Each network from a received RIP update message is evaluated by the access list and it is accepted only if it is permitted by the list. See the ip access-list (IP standard) and ip prefix-list commands for details.

Example

The following example shows how to define input filtering:

witchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip distribute-list access 5 in
switchxxxxxx(config-route-map)# exit

ip rip distribute-list out

The ip rip distribute-list out IP configuration mode command enables filtering of routes in outgoing RIP update messages. The no format of the command disables the filtering.

Syntax

ip rip distribute-list access access-list-name out

no ip rip distribute-list out

Parameters

  • access-list-name—Standard IP access list name, up to 32 characters. The list defines which routes in outgoing RIP update messages are to be sent and which are to be suppressed.

Default Configuration

No filtering

Command Mode

IP Configuration mode

User Guidelines

Each network from the IP Forwarding table is evaluated by the list and it is included in the RIP update message only if it is permitted by the list. See the ip access-list (IP standard) and ip prefix-list commands.

Example

The following example shows how to define outgoing filtering:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip distribute-list access 5 out
switchxxxxxx(config-route-map)# exit

ip rip offset

The ip rip offset IP configuration mode command defines a metric added to incoming routes. The no format of the command returns to default.

Syntax

ip rip offset offset

no ip rip offset

Parameters

  • offset—Specifies the offset to be applied to received routes. Range: 1-15.

Default Configuration

offset—1.

Command Mode

IP Configuration mode

User Guidelines

Example

The following example shows how to set offset to 2:

switchxxxxxx(config)# interface ip 1.1.1.1

switchxxxxxx(config-route-map)# ip rip offset 2
switchxxxxxx(config-route-map)# exit

ip rip passive-interface

The ip rip passive-interface IP Interface Configuration mode command disables sending RIP packets on an IP interface. The no format of the command re-enables the sending RIP packets.

Syntax

ip rip passive-interface

no ip rip passive-interface

Default Configuration

RIP messages are sent.

Command Mode

IP Configuration mode

User Guidelines

Use the ip rip passive-interface command to stop sending RIP messages on the giving IP interface. To stop RIP messages being sent on all interfaces, use the passive-interface command.

Note. The no ip rip passive-interface command does not override the passive-interface command.

Example

The following example shows how to stop the sending of RIP messages:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip passive-interface
switchxxxxxx(config-route-map)# exit

ip rip shutdown

The ip rip shutdown IP Interface configuration mode command changes the RIP interface state from enabled to disabled. The no format of the command returns the state to a value of enabled.

Syntax

ip rip shutdown

no ip rip shutdown

Default Configuration

Enabled

Command Mode

IP Configuration mode

User Guidelines

Use the ip rip shutdown CLI command to disable RIP on an IP interface without removing its configuration.The ip rip shutdown CLI command may be applied only to RIP interfaces created by the network CLI command. The ip rip shutdown CLI command does not remove the RIP interface configuration.

Example

The following example shows how to disable RIP on the 1.1.1.1 IP interface:

switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip shutdown
switchxxxxxx(config-route-map)# exit

network

The network Router RIP configuration mode command enables RIP on the given IP interfaces. The no format of the command disables RIP on the given IP interfaces and removes its interface configuration.

Syntax

network ip-address [shutdown]

no network ip-address

Parameters

  • ip-address—An IP address of a switch IP interface.

  • shutdown—RIP is enabled on the interface in the shutdown state.

Command Mode

Router RIP Configuration mode

User Guidelines

RIP can be defined only on manually-configured IP interfaces, meaning that RIP cannot be defined on an IP address defined by DHCP or on a default IP address.

Use the network CLI command with the shutdown keyword to create RIP on an interface if you are going to change the default values of RIP configuration and the use the no ip rip shutdown CLI command.

Use the no network CLI command to remove RIP on an IP interface and remove its interface configuration.

Examples

Example 1.The following example shows how to enable RIP on IP interface 1.1.1.1 with the default interface configuration:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# network 1.1.1.1
switchxxxxxx(config-rip)# exit

Example 2. The following example enables RIP on 1.1.1.1 in the shutdown state, configures metric and starts RIP:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# network 1.1.1.1 shutdown
switchxxxxxx(config-rip)# exit
switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# ip rip offset 2
switchxxxxxx(config-route-map)# no ip rip shutdown
switchxxxxxx(config-route-map)# exit

passive-interface (RIP)

To disable sending routing updates on all RIP IP interfaces, use the passive-interface command in Router RIP Configuration mode. To re-enable the sending of RIP routing updates, use the no form of this command.

Syntax

passive-interface

no passive-interface

Default Configuration

Routing updates are sent on all IP RIP interfaces.

Command Mode

Router RIP Configuration mode

User Guidelines

After using the passive-interface command, you can then configure individual interfaces where adjacencies are desired using the no ip rip passive-interface command.

Example

The following example sets all IP interfaces as passive and then excludes the IP interface 1.1.1.1:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# passive-interface
switchxxxxxx(config-rip)# network 1.1.1.1
switchxxxxxx(config-rip)# network 2.2.2.2
switchxxxxxx(config-rip)# network 3.3.3.3
switchxxxxxx(config-rip)# exit
switchxxxxxx(config)# interface ip 1.1.1.1
switchxxxxxx(config-route-map)# no ip rip passive-interface
switchxxxxxx(config-route-map)# exit

redistribute (RIP)

To redistribute routes from one routing domain into a RIP routing domain, use the redistribute command in the Router RIP configuration mode. To disable redistribution, use the no form of this command.

Syntax

redistribute protocol [metric {metric-value | transparent}]

no redistribute protocol

Parameters

  • protocol—Source protocol from which routes are being redistributed. It can be one of the following keywords: connected or static.

  • metric transparent—Causes RIP to use the source protocol metric for redistributed routes as the RIP metric. Only routes with metric less than 16 are redistributed.

  • metric metric-value—Specifies the metric assigned to the redistributed routes. The value supersedes the metric value specified using the default-metric command.

Default Configuration

Route redistribution is disabled

Command Mode

Router RIP Configuration mode

User Guidelines

Routes distributed to the source protocol are never redistributed by it

The connected keyword is used to redistribute to RIP routes that correspond to defined IP interfaces on which RIP is not enabled. By default, the RIP Routing Table includes only routes that correspond only to IP interfaces on which it is enabled.

The static keyword is used to redistribute to RIP static routes. By default, static routes are not redistributed to RIP.

If the metric value is set by the route map (by the set metric command) then the value will supersede the metric value specified by the metric-value argument.

If the metric keyword is not defined, then the metric is specified by the default-metric CLI command is assigned to the redistributed routes. If metric value set by the route map is equal or bigger than 16 the route is not redistributed.

Changing or disabling any keyword will not affect the state of other keywords.

Removing options that you have configured for the redistribute command requires careful use of the no form of the redistribute command to ensure that you obtain the result that you are expecting.

Examples

Example 1.The following example enables redistribution of static routes by RIP with transparent metric:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# redistribute static metric transparent
switchxxxxxx(config-rip)# exit

Example 2. The following example enables redistribution of static routes by RIP with transparent metric and then changes the metric to default:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# redistribute static metric transparent
switchxxxxxx(config-rip)# no redistribute static metric transparent
switchxxxxxx(config-rip)# exit

Example 3. The following example enables redistribution of static routes by RIP with default metric and then changes the metric to transparent:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# redistribute static
switchxxxxxx(config-rip)# redistribute static metric transparent
switchxxxxxx(config-rip)# exit

Example 4. The following example enables redistribution of static routes by RIP with transparent metric. The second redistribute command does not affect:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# redistribute static metric transparent
switchxxxxxx(config-rip)# redistribute static
switchxxxxxx(config-rip)# exit

Example 5. The following example disables redistribution of static routes by RIP:

switchxxxxxx(config)# router rip
switchxxxxxx(config-rip)# no redistribute static
switchxxxxxx(config-rip)# exit

router rip

The router rip Global Configuration mode command specifies the Router RIP mode and enables it if it was disabled. The no format of the command disables RIP globally and removes its configuration.

Syntax

router rip

no router rip

Default Configuration

Disabled

Command Mode

Global Configuration mode

User Guidelines

RIP supports the following global states:

  • disabled

  • enabled

  • shutdown

If a value of the RIP global state is disabled (default value), RIP is not operational and cannot be configured. When this state is set, the RIP configuration is removed. The state may be set by the no router rip CLI command from any RIP global state.

If a value of the RIP global state is shutdown, RIP is not operational, but can be configured. When the state is set the RIP configuration is not changed. The state may be set by the shutdown CLI command from the enabled RIP global state.

If the value of the RIP global state is enabled, RIP is operational, and can be configured. The state can be set by the router rip CLI command from the disabled RIP global state and by the no shutdown CLI command from the shutdown RIP global state.

Example

The following example shows how to enable RIP globally:

router rip

show ip rip database

The show ip rip database Privileged EXEC mode command displays information about the RIP Database.

Syntax

show ip rip database [all | brief | ip-address]

Parameters

  • all—Provides the full RIP database information about all RIP interfaces. The option is assumed if the parameter is omitted.

  • brief—Provides a summary view of the RIP database information.

  • ip-address—Provides the full RIP database information about the given IP Address.

Command Mode

Privileged EXEC mode

Examples

Example 1—The following example shows the full RIP database information about all RIP interfaces is displayed:

switchxxxxxx# show ip rip database
RIP is enabled
RIP Administrative state is UP
Default metric value is 1
Redistributing is enabled from
Connected:
Metric is default-metric
Static:
Metric is transparent
IP Interface: 1.1.1.1
Administrative State is enabled
IP Interface Offset is 10
Default Originate Metric is 12
Authentication Type is text
Password is afGRwitew%3
IN Filtering Type is Access List
Access List Name is 10
OUT Filtering Type is Access List
Access List Name is List12
IP Interface: 2.2.2.2
Administrative State is enabled
IP Interface Offset is 2
No Default Originate Metric
Authentication Type is MD5
Key Chain Name is chain1
IN Filtering Type is Access List
Access List Name is 10
OUT Filtering Type is Access List
Access List Name is 12
IP Interface: 3.3.3.3
Administrative State is enabled
IP Interface Offset is 1
IP Interface is passive
Default Originate Metric 3, on passive too
No Authentication
No IN Filtering
No OUT Filtering
IP Interface: 4.4.4.4
Administrative State is shutdown
IP Interface Offset is 1
No Authentication
No IN Filtering
No OUT Filtering

Example 2—The following example shows the full RIP database information about a given IP address is displayed:

switchxxxxxx# show ip rip database 1.1.1.1
RIP is enabled
RIP Administrative state is UP
Default Originate Metric: on passive only
Default metric value is 1
Redistributing is enabled from
Connected
Metric is default-metric
Static
Metric is transparent
IP Interface: 1.1.1.1
Administrative State is enabled
IP Interface Offset is 10
Default Originate Metric is 12
Authentication Type is text
Password is afGRwitew%3
IN Filtering Type is Access List
Access List Name is 10
OUT Filtering Type is Access List
Access List Name is List12

Example 3—The following example shows the brief RIP database information about all RIP interfaces is displayed:

switchxxxxxx# show ip rip database brief
RIP is enabled
RIP Administrative state is UP
Default Originate Metric: route-map is condition
Default metric value is 1
Redistributing is enabled from
Connected
Metric is default-metric
Static
Metric is transparent

IP Interface    Admin    Offset  Passive   Default Auth.  IN Filt. OUT Filt.
                State            Interface Metric  Type   Type     Type
--------------- -------- ------- --------  ------- -----  -------  ---------
100.100.100.100 enabled    10      No         12   Text   Access   Access
2.2.2.2         enabled     2      No              MD5    Access   Access
3.3.3.3         enabled     1      Yes
4.4.4.4         shutdown    1      No

Example 4—The following example shows the output when RIP is disabled:

switchxxxxxx# show ip rip database
RIP is disabled

show ip rip peers

The show ip rip peers Privileged EXEC mode command displays information about RIP Peers.

Syntax

show ip rip peers

Command Mode

Privileged EXEC mode

Example

switchxxxxxx# show ip rip peers
RIP is enabled
Static redistributing is enabled with Default metric
Default redistributing metric is 1
Address       Last          Received       Received       	
              Update        Bad Packets    Bad Route
------------  ---------     ----------     ---------
1.1.12        00:10:17          -                  1
2.2.2.3       00:10:01          -              -

shutdown

The shutdown Router RIP configuration mode command sets the RIP global state to shutdown. The no format of the command sets the RIP global state to enabled.

Syntax

shutdown

no shutdown

Default Configuration

Enabled

Command Mode

Router RIP Configuration mode

User Guidelines

Use the shutdown CLI command to stop RIP globally without removing its configuration

Example

The following example shows how to shutdown RIP globally:

router rip
  shutdown
exit