Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The command is used to configure the router for using RIP-1 and RIP-2 protocols.

Syntax:

rip start|stop|restart|flush|[-]trace[LEVEL]|dump|show|[-]ridhosts|[-]keepstatic

rip IFNAME v1 v2 [-]in [-]out [-]v1in [-]v1out [-]v2in [-]v2out [-]ag [-]subag

rip IFNAME peer ADDR[/MASK | /MASKLEN] ... | del

rip [-]static NET[/MASK] GATEWAY

Export/import filters:

rip [INTERFACE] [no]export|[no]import NET[/MASK|/MASKLEN] [exact]|all| default [[+|-]metric N] [pref N] ...
rip [INTERFACE] [no]export |[no]import NET[/MASK]|[/MASKLEN]del

The routing module supports two versions of the Routing Information Protocol: RIP-1 and RIP-2. The rip command is used to set up the module for using these routing protocols.

Description:

rip start
rip stop
rip restart

Starts, terminates, restarts operation in RIP mode. To save the current state of the routing module in the flash memory, use the "config save" command.

rip flush

Flushes all import and export filters.

rip [-]trace [LEVEL]

Switches the RIP operation into the trace mode. The optional "LEVEL" parameter specifies the detalization level of debug information.

Allowed values are as follows:

  1. minimum level of events tracing
  2. tracing of received/sent packets
  3. tracing of received/sent packets and their contents
  4. tracing of changes in the kernel routing tables.

Default value for this parameter is 4.

rip dump

Displays the status of the routing module's internal routing tables and interfaces.

rip show

Displays current RIP setup parameters

rip [-]ridhosts

Prohibits the export of addresses of PtP local interfaces, when there is a network route going to the same network via the same interface. This is a specific case of aggregation and allows limiting the number of exported routes.

rip [-]keepstatic

Keeps saved static routes as default routes. Sometimes, it is useful to specify some routes statically using the route add command. This allows configuring the router for the "warm start" mode: the router starts operation immediately after switching power on, when dynamic routing tables have not been built yet. Typically, these static routes are overridden by dynamic routes built by RIP. The present command allows keeping static routes in the routing tables as by default routes even after starting RIP operation, when other sources of routing information become available. Exported metrics value of such routes will be equal to 1. If another value is needed, an appropriate export rule shall be specified by the rip export command.

After disabling this mode by a "rip -keepstatic" command, those static routes will be replaced by dynamic routes.

rip IFNAME v1 v2 [-]in [-]out [-]v1in [-]v1out [-]v2in [-]v2out

Group of options managing protocol version.

Allows specifying protocol versions used for import and for export, for each interface separately. By default, RIP2 is enabled for import and export, and RIP1 is fully disabled (rip IFNAME v2 -v1).

rip IFNAME peer  ADDR[/MASK] ... | clear

Using this filter one can limit nodes number through which routing information is being exchanged via IFNAME interface. As a limiting parameter a range of addresses is set within which possible partners can be allocated. Routing information will be sent only though those interfaces which addresses correspond with range set. Received information will be filtered if source address does not match in the defined range.

 Example,

rip rf5.0 peer 10.1.2.3 10.4.5.6 192.168.1.0/16

Routing information exchange is limited by 10.1.2.3, 10.4.5.6 nodes and everyone who matches 192.168.1.0/16 range.

rip IFNAME [-]ag [-]subag

Enables/disables aggregation of routing information.The command allows significantly decreasing the volume of routing information transmitted via the network. By default, this regime is disabled.

When "subag" option is enabled, the routing module tries to assemble (aggregate) in a bigger block several blocks of routing information pertaining to different small subnetworks and arriving from different sources to the same router interface.

When "ag" option is enabled, the same is done for class C natural networks.

Aggregation is extremely useful in routing nodes located between two independent parts of your network, or at the border with an external network. For example, a client's router on the border between the client's LAN and a provider network can use aggregation, if the client has been assigned a whole IP address block for his sub networks.

CAUTION

You should be careful with the route aggregation. For example, it is better to avoid using it in ring networks where not all of the hosts support this mode or static routing is used on some of them. In this case, it may happen that one group of sub networks will appear aggregated in one routing path, and separated in another. Naturally, when choosing the route the most specific one (with the longest mask) will be used that could be undesirable.

rip [-]static NET[/MASK] GATEWAY [metric XX]

This command is eliminated starting from 3.31 version. One must use route add command instead. All rip static commands that exist in the configuration are automatically transformed to route add commands.

Export/import filters:

Enabling export/import filters allows the system administrator to limit the distribution of the routing information and force some changes in the properties of routes built.

Filters are combined in groups, each group consisting of 4 tables (Export, NoExport, Import, NoImport).There are 3 different groups of filters:

Filters for specific interface addresses. The "INTERFACE" parameter is of the form "int:ADDR". In this way it is possible to define a filter for any specific interface address, if there are several addresses (aliases) assigned to the interface.

Example,

rip int:10.2.3.4 export all

Filters for the whole interface. The "INTERFACE" parameter contains then the interface name. A filter applies to the whole interface, that is, to all its alias addresses.

Example,

 rip eth0 export all

Filters for the protocol as a whole. The "INTERFACE" parameter is then not used, as such a filter applies to the whole protocol, on all interfaces.

Example,

rip export all

Export and NoExport tables list the networks that, respectively, must or must not be exported from the router.

Similarly, Import and NoImport tables list the networks that, respectively, must or must not be imported to the internal tables of the router.

When specifying filters, the following is to be noticed:

  • Filters are ordered from less to more general. First are considered filters related to specific interface addresses; then, to specific interfaces; and then the general ones. Individual rules in the tables are ordered according to the same principle: from the smallest networks to the biggest ones, from the more detailed information to the more general.
  • By default (when no filters are specified), all routes with their natural metrics are imported and exported.
  • If at least one prohibiting (NOIMPORT/NOEXPORT) filter is enabled, all the rest is assumed permitted. If at least one permitting (IMPORT/EXPORT) filter is enabled, all the rest is assumed prohibited. Therefore, if you have started with a permitting filter,you must continue with permitting filters up to the end. Conversely, if you have prohibited something, only that particular thing will be prohibited.
  • If for a given network a permitting and a prohibiting filter are simultaneously enabled, then the prohibiting filter will take priority.
  • Only filters of the most prioritary group applicable to a particular network are effectively applied to that network.

The filter definition syntax is quite simple; it is better understood using examples hereafter.

Examples,

Permitting export of all routing information, except a narrow network and the default route:

rip noexport 192.168.9.0/24
rip noexport default
rip export all

Permitting the import of all routing information, except that of private networks from the address block 10.0.0.0/8:

rip noimport 10.0.0.0/255.0.0.0
rip import all

Several networks may be specified on the same command line:

rip noexport 192.168.9.0/24 192.168.10.0/24 192.168.20.0/24

A route metrics value may be explicitly specified in exporting/importing filters:

rip import 192.168.9.0/24 metric 5
rip export 192.168.9.0/24 metric 7

Furthermore, you can specify relative metrics change for a route when it traverses the given node. In the following example, original metrics values of all routes will be incremented by 2:

rip export all +metric 2

Example of decrementing metrics values:

rip import default -metric 1

When specifying relative metrics change, the resulting value shall never become less than 2 or more than13.

Normally, a network address specified in a filter defines the correspondent network with all its subnetworks (corresponding to longer masks). If however a filter needs precise address value, the exact keyword shall be used.

For example, the filter:

rip noimport 10.0.0.0/255.0.0.0

prohibits the import of the 10.0.0.0 network and of any its subnetwork (10.XXX.XXX.XXX), while the filter:

rip noimport 10.0.0.0/255.0.0.0 exact

prohibits the import of the 10.0.0.0 network only (the import of the subnetworks is permitted).

To delete a filter, the del keyword is added after specifying the addressing information:

rip noexport 192.168.9.0/24 del 
  • No labels