Changing the cost of routes learned on a VLAN interface

By default, the switch interface increases the cost of an RIP route that is learned on the interface. The switch increases the cost by adding one to the route's metric before storing the route.

You can change the amount that an individual VLAN interface adds to the metric of RIP routes learned on the interface.

NOTE:

RIP considers a route with a metric of 16 to be unreachable. Use this metric only if you do not want the route to be used. In fact, you can prevent the switch from using a specific interface for routes learned though that interface by setting its metric to 16.

Syntax:


ip rip metric 1-16

To increase the cost a VLAN interface adds to RIP routes learned on that interface, enter commands such as the following:

switch(config)# vlan 1
switch(vlan-1)# ip rip metric 5

These commands configure vlan-1 to add 5 to the cost of each route learned on the interface.