HPlogo Installing and Administering Internet Services: HP 9000 Networking > Chapter 8 Configuring gated

Configuring the RIP Protocol

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

RIP uses hopcount to determine the shortest path to a destination. Hopcount is the number of routers a packet must pass through to reach its destination. If a path is directly connected, it has the lowest hopcount of 1. If the path passes through a single router, the hopcount increases to 2. Hopcount can increase to a maximum value of 16, which is RIP's "infinity metric," an indication that a network or node cannot be reached.

If gated encounters an unreachable node, it goes into "Holddown Mode." Holddown Mode stops a node from propagating routing information until the other nodes it is communicating with stabilize their routing information.

Hosts with only one LAN interface may use the RIP protocol with gated to passively listen to routing information when there is more than one router on the LAN. If there is only one router on the LAN (leaving only one path off the local LAN), you may prefer to configure a static route to that router in /etc/rc.config.d/net, or issue the route command manually, instead of running gated.

In certain cases you may not want traffic to take a certain path, because it incurs an unacceptable cost or security risk. In these cases, gated allows you to assign a metric to each interface. This allows you to select or bypass a path, regardless of its length or speed.

Configuration Options

The -e and -a options help increase the RIP convergent time on HP-UX. These command options can be set in /etc/gated.conf file under the RIP protocol statement.

The -e option refers to route_expiry_time (Reviewers, exactly what is this? Please define this term.). It specifies the expiration time RIP protocol will use for route aging. The minimum value is 1 second and the maximum value is 180 seconds. The default is 180 seconds.

Using the -a option, you can specifiy the route_update_time. This is the number of seconds the RIP protocol will take to send RIP updates to its neighbors (Who are its neighbors? Other systems on the network?). The minimum value is 1 second and the maximum value is 30 seconds. The default is 30 seconds.

You can change the values of either option in the /etc/gated.conf file. If -e and -a options are specified on the command line and in the configuration file, gated will use the value specified in the configuration file.

Simple RIP Configuration

A simple configuration contains RIP routers and end nodes that listen to information exchanged by the RIP routers, as shown in Figure 8-1 “Example of Simple RIP Configuration” below. For the purposes of keeping this example simple, and because the configuration is similar among all end systems, only one end system's (node A) configuration is shown here. The same is true for RIP routers (only node B's configuration is shown here). Note that this example shows only the syntax needed for this simple configuration. A detailed description of the full RIP protocol statement is given after this example.

Figure 8-1 Example of Simple RIP Configuration

Example of Simple RIP Configuration

A: End System on a LAN with RIP Routers

Set up /etc/gated.conf as follows:

rip yes {
interface 121.1.0.10 version 2 multicast;
};
static {
default interface 121.1.0.10 preference 255 ;
};

With one interface, A can listen to RIP traffic on the network but does not forward routing information. Routers must be multicasting RIP packets on this network for A to learn about them and update its routing table. The first syntax statement enables RIP on node A's interface (121.1.0.10). The second statement specifies a static local default route, to prevent gated from deleting it.

B: RIP Router

Set up /etc/gated.conf as follows:

rip yes {
interface all version 2 multicast ;
};

This enables the RIP protocol on all interfaces.

RIP Protocol Statement

The syntax for the RIP protocol statement is:

rip yes|no | on|off [ {
broadcast|nobroadcast ;
nocheckzero ;
preference preference ;
defaultmetric metric ;
query authentication [none|[[simple|md5] password]] ;
interface interface_list
[noripin]|[ripin] [noripout]|[ripout]
[metricin metric] [metricout metric]
[version 1]|[version 2 [multicast|broadcast]]
[[secondary] authentication [none|[simple|md5] password]] ;
[interface ...]
trustedgateways router_list ;
sourcegateways router_list ;
traceoptions traceoptions ;
} ] ;

Curly braces ({}) are part of the syntax for the RIP protocol statement. Square brackets ([]) are not part of the syntax; they are used here to indicate optional parameters.

yes (or on) tells gated to enable the RIP protocol at this node and process RIP packets coming in from other nodes. no (or off) tells gated to disable the RIP protocol at this node. If gated finds fewer than two network interfaces, the node only listens to RIP information. If gated finds two or more network interfaces, the node both listens to and broadcasts or multicasts RIP information. If you do not specify a RIP line in your configuration file, rip on is assumed.

broadcast specifies that RIP packets are always generated. If the RIP protocol is enabled and more than one interface is specified, broadcast is assumed. Specifying broadcast with only one interface is useful only when propagating static routes or routes learned from other protocols.

nobroadcast specifies that RIP packets are sent only to routers listed in the sourcegateways clause. If the RIP protocol is enabled, but only one interface is specified, nobroadcast is assumed.

nocheckzero specifies that the RIP protocol should not check to see if the reserved fields in the RIP packets are zero. In RIP version 1 (as described in RFC 1058), certain reserved fields should be zeroed out; however, this may vary in RIP implementations.

preference determines the order of routes from other protocols to the same destination in the routing table. gated allows one route to a destination per protocol for each autonomous system. In the case of multiple routes, the route used is determined by the value of preference.

  • Default: 100

  • Range: 0 (most preferred) - 255 (least preferred)

defaultmetric is the default metric used when propagating routes learned from other protocols.

  • Default: 16

  • Range: 1 - 16

query authentication [none|[[simple|md5] password]] specifies the authentication, if any, that is required for query packets that do not originate from routers. If authentication consisting of only a password is required, specify simple password or just password. If the required authentication consists of a key that was created with the MD5 algorithm, specify md5. The default is none.

interface is specified as one of the following (in order of precedence): an IP address (for example, 193.2.1.36), a domain or interface name (for example, lan0 or lan1), a wildcard name (for example, lan*), or all (which refers to all interfaces). Multiple interface statements may be specified with different clauses. If a clause is specified more than once, the instance with the most specific interface reference is used.

noripin specifies that gated does not process any RIP information received through the specified interface. ripin is the default.

noripout specifies that gated does not send any RIP information through the specified interface. ripout is the default.

metricin specifies the incoming metric for all routes propagated to this node through the specified interface.

  • Default: kernel interface metric plus 1 (the default RIP hop count)

metricout specifies the outgoing metric for all routes propagated by this node through the specified interface.

  • Default: 0

version 1 specifies that RIP version 1 (as defined in RFC 1058) packets are sent; RIP version 2 packets (defined in RFC 1388) are sent only in response to a version 2 poll packet. version 2 specifies that RIP version 2 packets are sent to the RIP multicast address or to the broadcast addresses. You can specify how the packets are sent with the multicast or broadcast clauses. version 2 multicast means you want to send version 2 packets (containing subnet mask information). version 2 broadcast means you want to send version 1-compatible packets. If you do not specify a version, version 1 is assumed.

[secondary] authentication [none|[simple|md5] password] specifies the authentication type to use for RIP version 2 packets (it is ignored for version 1 packets). secondary indicates that the secondary authentication is being defined; otherwise, the primary authentication is being defined. If authentication consisting of only a password is required, specify simple password or just password (where password is a quoted string of 0 - 16 characters). If the required authentication consists of a key that was created with the MD5 algorithm, specify md5. The default is none. Note that if no authentication clause is specified, the default is primary authentication of none and no secondary authentication.

trustedgateways specifies a list of routers that provide valid RIP routing information; routing packets from other routers are ignored.

  • Default: all routers on the attached network(s).

sourcegateways specifies routers to which RIP routing packets may be sent. If the nobroadcast clause is specified, routing updates are sent only to routers listed in the sourcegateways clause.

traceoptions enables tracing for the RIP protocol. See “Specifying Tracing Options” .

Controlling RIP Traffic

This section describes configuration options for RIP routing information sent out by gated from the node. Use these options to hide all or part of your network from other networks or to limit network traffic.

Two options for limiting RIP routing information exported by gated are in the RIP protocol definition in the /etc/gated.conf file:

  • The noripout clause in the interface definition tells gated not to send any RIP information through the listed interfaces.

  • The sourcegateways clause tells gated to send RIP information directly to the specified routers.

See “RIP Protocol Statement” for more information about these clauses.

Two options for limiting RIP routing information imported by gated are in the RIP protocol definition in the /etc/gated.conf file:

  • The noripin clause in the interface definition tells gated not to process RIP information received through the listed interfaces.

  • The trustedgateways clause tells gated to listen to RIP information received only from the specified routers.

See “RIP Protocol Statement” for more information about these clauses.

You can also use the gated import and export statements to restrict and control the route information propagated from one routing protocol to another. See “Importing and Exporting Routes”.

Large RIP Configuration Example

Figure 8-2 “Example of Large RIP Network” and the accompanying text describe examples of how gated might be configured for the RIP protocol in each node within a networked system.

B, D, and E pass routing information among themselves and update their routes accordingly. C listens to the RIP conversation among B, D, and E, and updates its routes accordingly. If routers D and E can both provide a path to a network, but the path through router D is shorter, nodes B, C, and E will use router D when routing packets to that network. If D goes down, E becomes the new router to that network for nodes B, C, and E.

Figure 8-2 Example of Large RIP Network

Example of Large RIP Network

A: Cluster Node (or Isolated Node)

There is no need to run gated at this node since it is on a LAN with only one router. Set a static default route to the cluster server (B) in the /etc/rc.config.d/netconf file as follows:

ROUTE_DESTINATION[0]= "default"
ROUTE_GATEWAY[0]= "130.15.0.6"
ROUTE_COUNT[0]= "1"

B: Cluster (or Root) Server Node

Run gated to get routing information about the 121.0.0.0 network. Set up /etc/gated.conf as follows:

interfaces {
interface 130.15.0.6 121.1.0.92 passive ;
};
rip yes {
interface 130.15.0.6 noripout ;
interface 121.1.0.92 version 2 multicast;
};
static {
default gateway 121.1.0.2 preference 255 ;
};

In this case, setting rip to yes is like setting rip to broadcast. Either argument tells the node to send out RIP packets because the node has at least two interfaces. To reduce traffic on the 130.15.0.0 LAN, use a noripout option on this interface. This prevents RIP from sending packets on the 130.15.0.0 network.

To isolate the 130.15.0.0 LAN, use the following:

export proto rip interface 121.1.0.92 {
proto direct {
130.15.0.0 restrict ;
};
};

To further isolate the LAN from the 121.1.0.0 LAN, do not specify any static routes that specify that you can reach the LAN through B. See “Importing and Exporting Routes”.

Always specify the passive option with the interface's IP address. It tells gated to maintain routes even if no other nodes on the 121.0.0.0 network are using RIP. Without this clause, gated may change the preference of the route to the interface if routing information is not received for the interface. The static default route adds the specified default to the kernel routing table. Setting the preference to 255 allows this route to be replaced whenever another default route is learned from one of the protocols.

C: End System on a LAN with RIP Routers

Set up /etc/gated.conf as follows:

rip yes {
interface 121.1.0.10 version 2 multicast;
};
static {
default interface 121.1.0.10 preference 255 ;
};

With one interface, C can listen to RIP traffic on the network but does not forward routing information. Routers must be multicasting RIP packets on this network for C to learn about them and update its routing table.

D: Major Router

Set up /etc/gated.conf as follows:

rip yes {
interface all version 2 multicast ;
};

This runs RIP on all attached networks.

E: Major Router

Set up /etc/gated.conf as follows:

rip yes {
interface all version 2 multicast;
};
© 2000 Hewlett-Packard Development Company, L.P.