Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Hide_comments

Scroll Ignore

Table of Contents

Description

The command is used to configure the router for using "rip" command allows to configure the routing module. The routing module supports two versions of the Routing Information Protocol: RIP-1 and RIP-2 protocols

Warning
titleWARNING

The "rip" command does not support interaction with the OSPF module, use the "arip" command to configure redistribution to this protocol.

Syntax:

Code Block
languagetext
themeEmacs
rip start | stop | restart | flush | [-]trace [LEVEL] [syslog] | dump

...


    | [-]ridhosts

...

 [-]

...

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

...

defag
rip IFNAME

...

   peer { NETWORK ... | del

...

 }
rip

...

Export/import filters:

Code Block
languagejava
themeDJango
rip [INTERFACE [IFNAME|int:ADDR] [no]export | [no]import NET[/MASK|/MASKLEN] [exact]|all| default  } { NETWORK | all | default }
                        [[+|-]metric N] [pref N] ...
rip [INTERFACEIFNAME|int:ADDR] [no]export | [no]import } { NETWORK | all | default } del
NETWORK:= { NET|HOST } { [/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:

Code Block
languagejava
themeDJango
rip start
rip stop
rip restart

...

 }

Parameters

Center
ParameterDescription

start | stop | restart

Starts/stops/restarts operation of the RIP module. The current state of the routing module is included to configuration in

...

case of saving by the "config save" command.

...

language
Code Block
rip
java
themeDJango
flush

...

Resets all export and import

...

filters.

...

DJango
Code Block
languagejava
theme
rip
[-]trace
[LEVEL[syslog]

...

Enables/disables the trace mode.

...

  • "LEVEL"

...

  •  – specifies the detalization level of debug information.

...

  • Allowed values are

...

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

...

    • Default value

...

rip
    • .
Code Block
languagejava
themeDJango
  • "syslog" – records diagnostic messages into the system log.
dumpDisplays the

...

state of

...

internal routing tables and interfaces

...

Code Block
languagejava
themeDJango
rip show

Displays current RIP setup parameters

Code Block
languagejava
themeDJango
rip
of the routing module.
[-]ridhosts

...

Forbids the export of IP-addresses

...

of local interfaces,

...

if there is a network route going to the same network via the same interface. This is a specific case of aggregation and allows

...

to limit the number of exported routes.

...

code
rip
languagejava
themeDJango
[-]
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.

Code Block
languagejava
themeDJango
rip IFNAME v1 v2 [-]in [-]out [-]v1in [-]v1out [-]v2in
mcastAllows the exchange of service packets using multicast, otherwise unicast is used.

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

Group of options managing protocol version.

...

Allows

...

to specify protocol versions used for import and for export, for each interface separately. By

...

default RIP-2 is enabled for import and export

...

and

...

RIP-1 is fully disabled

...

Code Block
languagejava
themeDJango
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,

Code Block
languagejava
themeDJango
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.

Code Block
languagejava
themeDJango
rip IFNAME [-]ag [-]subag

...

.

[-]ag [-]defag

Allows to configure the routes aggregation (by default is disabled).

  • "[-]ag" – enables/disables aggregation of routing information.

...

  • Allows significantly

...

  • decrease the volume of routing information transmitted via the network

...

  • ,

...

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.

Warning
titleCAUTION
You should be careful with the route aggregation
  • is applied also to class "C" networks.
  • "[-]defag" enables/disables using of the default route in network prefix aggregation process.

    Note
    titleNOTE

    Use these parameter with caution. For example, it is better to avoid using it in ring networks where

not all of the hosts
  • some hosts don't 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.
Code Block
languagejava
themeDJango
rip [-]static NET[/MASK] GATEWAY [metric XX]

...

  • On the other hand, aggregation is very useful on the nodes located between two independent parts of the system or used as a gateway to an external network.

IFNAME peer { NETWORK ... | del }

This filter is used to limit nodes number through which routing information is being exchanged.

  • "IFNAME" – the network interface name through which routing information is exchanged.
  • "NETWORK"  range of addresses 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 dropped if source address does not match in the defined range.
  • "del" – deletes the filter.

Export/import filters

[IFNAME|int:

...

ADDR]

If name or IP-address of network interface is not specified than filter is working for the whole protocol on all interfaces. For more information about the export / import

...

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,

Code Block
languagejava
themeDJango
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,

Code Block
languagejava
themeDJango
 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,

Code Block
languagejava
themeDJango
rip export all

...

filter settings, see the section below.

  • "ADDR" the network interface address. If an interface have a few IP-addresses, this parameter allows to set the filter to specific one.
  • "IFNAME" the interface name. In this case the filter will work for a whole interface.
[no]export | [no]import }

Defines the direction of data flow.

  • "[no]export"enables/disables an export of information.
  • "[no]import" enables/disables an import of information.
{ NETWORK | all | default }

Defines the source of information.

  • "NETWORK" the address of a network to which the parameter will be applied.
  • "default" set as a default route.
  • " all" affects all exported/imported addresses and routes except those that were configured with the "default" parameter and the "NETWORK" argument.
[[+|-]metric N]Sets the value or the relative change of the route metric while passing through this node.
exactAllows to specify an exact IP-address to avoid changes in processing of smaller sub-networks.
delDeletes the filter. The "del" parameter should be set after a network information.

Export/import filters

"EXPORT" and "NOEXPORT" tables list specify networks that, respectively, must or must not be exported from the router.Similarly, Import and NoImport tables list the networks  

"IMPORT" and "NOIMPORT" tables list specify 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 

Following rules must be taken into account while filter configuration:

  • Filters are ordered viewed in order 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 as permitted.
  • If at least one permitting (IMPORT/EXPORT) filter is enabled, all the rest is assumed as prohibited. Therefore, if you have started with a permitting filter, you must continue with permitting filters up to the end. Conversely, if 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 To each network / subnet will be applied 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,

...

  • only one group having the highest priority.

Examples

Enable RIP-1 version and disable RIP-2 for interface import.

Code Block
languagetext
themeEmacs
rip IFNAME v1in -v2in

Limit nodes number through which routing information is exchanged. Information will be sent only though interfaces "10.1.2.3", "10.4.5.6" and all from "192.168.1.0/16" range.

Code Block
language

...

text
theme

...

Emacs
rip

...

 rf5.0 peer 10.1.2.3  10.4.5.6  192.168.

...

1.0/

...

16

Set the filter for a whole protocol and all interfaces.

Code Block
languagetext
themeEmacs
rip export all

Set the filter for the "eth0" network interface.

Code Block
languagetext
themeEmacs
rip eth0 export all

...

Set the filter for "10.2.3.4" IP-address.

Code Block
languagetext
themeEmacs
rip int:10.2.3.4 export all

Permit export of all routing information, except

...

a private networks "192.168.9.0/24", "192.168.10.0/24" and "192.168.20.0/24", and the default route.

Code Block
language

...

text
theme

...

Emacs
rip 

...

noexport 192.168.9.0/24  192.168.10.0/

...

24  192.168.20.0/24
rip 

...

noexport default
rip export all

...

Delete part of the filter created before.

Code Block
language

...

text
theme

...

Emacs
rip noexport 192.168.9.0/24  192.168.10.0/24  192.168.20.0/24 del 

A route

...

metric values are explicitly specified in exporting/importing filters

...

.

Code Block
language

...

text
theme

...

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

...

Original metrics values of all routes will be

...

increased by 2

...

.

Code Block
language

...

text
theme

...

Emacs
rip export all +metric 2

Example of decrementing metrics values:

...

languagejava
themeDJango

...


Note
titleNOTE

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

...

than 13.

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:

...

languagejava
themeDJango

...

Forbid the import of the "10.0.0.0

...

" network, but the import of the

...

subnetworks is permitted.

Code Block
language

...

text
theme

...

Emacs
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:

...

languagejava
themeDJango

...