UserPreferences

ApplicationNotes/GatedNotes


1. GateD Notes

1.1. Starter Configuration

A simple configuration for a beginner with OSPF and GateD is as follows (for example, I use this in my home network):
rip no;

ospf yes {
 # Enable for tracing
        #traceoptions "/var/log/gated.trace" general;
        backbone { interface ethX { priority 10; }; };
};

static { 
        default gateway X.X.X.X preference 250 retain ;
} ;

export proto ospfase {
        proto static { 0.0.0.0 mask 0.0.0.0 ; } ;
} ;
rip no;

ospf yes {
        #traceoptions "/var/log/gated.trace" general ;
        backbone { interface all { priority 1; }; };
};

You can now remove the default gateway from your internal hosts, as they will pick up the default gateway from OSPF. You will also want to configure authentication between your hosts and router for security. I was unable to get the default configuration recommended by the GateD docs to work; 3.6 does not like the router-prio or the ospfarea backbone parameters.

1.2. Viewing Your Routing Tables

On Red Hat Linux 7.2, with kernel 2.4 and GateD 3.6, routes are not inserted into the 'main' routing table. As such, they are not viewable with the old netstat -r or route commands (you shouldn't use the latter anyway, since it's not portable to other Linux-like systems). You have to use the ip command:
ip route list table all
or for brevity:
ip rout ls tab all
On my system, routes go into table with ID 253, so to view just the GateD routes:
ip rout ls tab 253

1.3. Using ospf_monitor

To run ospf_monitor, you have to create a file with a list of your routers running gated that you want to monitor (let's call it 'ospf_routers'):

X.X.X.X myrouter.example.com

and run ospf_monitor as 'ospf_monitor ospf_routers'. Then in the monitor "shell", you can list your "configured destinations" with 'd':

[ 27 ] dest command params > d 1: X.X.X.X myrouter.example.com

You use the index, the number before the ':' with the '@' command, such as:

[ 32 ] dest command params > @1 N