MikeL's FreeBSD howto - Static Routes

The syntax for setting up static routes is not real obvious. For each route, you make up a name, and list these names. Then you make a command with eqach of these names following the word "route_". These commands are then passed, one at a time to the 'route' command, following the 'add' arg. (See /etc/rc.network.)

For example, the following entries in the rc.conf:

static_routes="00 16 32"
route_00=" -net -interface"
route_16=" -net -interface"
route_32=" -net -interface"
will perform the following commands:
route add  -net -interface
route add  -net -interface
route add  -net -interface
This specific example allows this system to see computers with addresses of 16.64.0.*, 16.64.16.*, and 16.64.32.* via the NIC with the address

Copyright © 1995-1998 Mike Lempriere