GateD Configuration Guide - Sample Interior Gateway Configurations

# 6.6 Sample Configurations

## 6.6.2 Sample Interior Gateway Configurations

We need more examples. If you don't see what you need here, and you create a working config file that you're willing to share, please send it to us. (Also, if you find mistakes in the examples here, well, ahem, just tell us quietly and we'll fix them.)

### Contents

- RIP only, subnet to backbone
- RIP with default announcement
- RIP and OSPF
- OSPF Using NBMA Mode

### RIP only, subnet to backbone

Gateway configurations are more complicated than a simple host configuration as gateways have multiple interfaces and may run multiple protocols. This sample configuration file connects two nets within an autonomous system. This configuration can be used for any gateway that uses only RIP and that connects a single subnet to a larger network.

        #
        # enable rip
        #
        rip yes ;
        #
        #  using  rip,  announce subnet 3 via  interface 136.66.1.2
        #
        export proto rip interface 136.66.1.2
        {
            proto direct
            {
                announce 136.66.3.0 metric 0 ;
            } ;
        } ;
        #
        #  using  rip, announce all routes learned from interface
    136.66.1.2
        #
        export proto rip interface 136.66.3.1
        {
            proto rip interface 136.66.1.2
            {
                announce all ;
            } ;
        } ;

The configuration contains two export statements. The first one tells GateD to announce, via the RIP protocol and interface 136.66.1.2 a direct route to subnet 136.66.3.0. The second route announces to subnet 3 all routes learned from the interface 136.66.12. This includes subnet routes and any routes to the rest of the world, including default routes. The first export statement was not required since by default GateD announces every network that is directly connected to the gateway. The first export statement was explicitly entered for two reasons; to document the intended structure and to avoid relying on defaults which may be changed in future releases. In any export statement the main proto clause and the main interface clause may define the protocol and interface through which the routes are advertised. Subsidiary proto and interface clauses define the protocols and the interfaces from which the routes must be learned.

### RIP with default announcement

If the gateway only runs RIP and connects a local backbone to a subnet which in turn provides a gateway to the outside world, the file is configured differently. In this example, the gateway announces a default route to the backbone and announces all of the individual subnet routes to the outside world.

        #
        # enable rip
        #
        rip yes ;
        #
        #  using  rip, announce all local subnets via 136.66.12.3
        #
        export proto rip interface 136.66.12.3 metric 3
        {
            proto rip interface 136.66.1.5
            {
                announce all ;
            } ;
        };
        #
        #  using  rip,  announce default  to  the  local backbone via
    136.66.1.5
        #
        export proto rip interface 136.66.3.1
        {
            proto rip interface 136.66.12.3
            {
                announce 0.0.0.0 ;
            } ;
        } ;

The first export statement statement explicitly directs GateD to announce all of the routes it learns from interface 136.66.1.5 out through interface 136.66.12.3. The explicit announce all is not required. The metric value is specified in the main statement and applies to every route announced via this protocol and interface. When the metric is specified in the export clause, it only applies to the routes specified in that clause. In this example, metric 3 applies to every route announced over interface 136.66.12.3 via RIP.

### RIP and OSPF

This configuration for AS 283 enables both RIP and OSPF protocols and can be used for testing RIP and OSPF.

        #options noinstall ;
        interfaces {
           interface le0 passive ;
        } ;
        autonomoussystem 283 ;
        snmp yes ;
        rip yes {
           broadcast ;
           defaultmetric 5 ;
           interface le version 2 multicast ;
        } ;
        ospf yes {
           traceoptions lsabuild protocol ;
           monauthkey "ZZZZZZZZ" ;
           backbone {
                authtype simple ;
                interface all {
                     priority 2 ;
                } ;
                interface le {
                     authkey "YYYYYYYY" ;
                } ;
           | ;
        } ;
        static {
            default  gateway 132.236.200.200  preference 140 retain ;
        }

In the RIP version 2 case, multicast packets are generated on all ethernet interfaces (le0, le1...). This is a safe way to test RIP since the production gateways on this network do not support RIP version 2. In the OSPF case, all interfaces are configured to be Priority 2 so the Proteon routers (Priority 0) will become designated routers. A simple password is specified "YYYYYYYY" for authentication of all Ethernet interfaces. (The only kind of interfaces in this configuration.)

### OSPF Using NBMA Mode

In this sample configuration, an HP server is configured to be both the area border router and the backbone router.

        traceoptions parse ;
        routerid 195.1.1.2 ;
        #
        RIP no ;
        OSPF yes {
         defaults {
           preference 10 ;
           cost 5 ;
           type 1 ;
         } ;
         area 0.0.0.1 {
           networks {
             195.1.1.0 ;
         } ;
         interface 195.1.1.2 nonbroadcast {
           routers {
             195.1.1.1 eligible ;
             195.1.1.2 eligible ;
           } ;
           priority 15 ;
           enable ;
           hellointerval 30 ;
           routerdeadinterval 30 ;
           pollinterval 30 ;
         } ;
        } ;
        area 0.0.0.2 {
         networks {
           193.2.1.0 ;
           194.1.1.0 ;
         } ;
         interface 194.1.1.3 nonbroadcast {
           routers {
             194.1.1.2 eligible ;
             194.1.1.3 eligible ;
             194.1.1.1 ;
           } ;
           priority 15 ;
           enable ;
           hellointerval 30 ;
           routerdeadinterval 30 ;
           retransmitinterval 30 ;
           pollinterval 30 ;
           } ;
         } ;
         backbone {
           interface 15.13.115.156 nonbroadcast {
             enable ;
             transitdelay 20 ;
             priority 10 ;
             hellointerval 30 ;
             routerdeadinterval 30 ;
             retransmitinterval 30 ;
             pollinterval 30 ;
           } ;
         } ;
        } ;

(SWB: This needs a brief one paragraph explanation.)

Last updated April 27, 1997.