AIXQuickDirtyRoutes

How to add routes, the quick and dirty way

Overview

This one is really simple: why go through smitty, and the ODM, and all of that, when you can simply add the route definition at the end of the /etc/rc.tcpip file ?

Here is a small example of what I mean:

route add -net 10.200.200/24     10.1.200.90
route add -net  10.254.212/24    10.1.200.90
route add -net  10.254.214/24    10.1.200.90
route add -net  192.168.168/24   10.1.200.90
route add -host 10.254.218.134   10.1.200.10
route add -host 10.254.218.137   10.1.200.10
route add -host 10.254.218.138   10.1.200.10
route add -host 10.254.218.145   10.1.200.10
route add -host 10.254.218.151   10.1.200.10
route add -host 192.168.2.2      10.1.1.2
route add -host galactus         10.1.1.2
route add -host printmaster      10.1.1.2
route add -host 192.168.8.20     10.1.1.5
route add -host 192.168.8.21     10.1.1.5
route add -host 192.168.8.46     10.1.1.5
route add -host 192.168.8.47     10.1.1.5 
route add -host 192.168.8.50     10.1.1.5
route add -host 192.168.8.57     10.1.1.5 
route add -host 192.168.8.60     10.1.1.5
route add -host 192.168.8.61     10.1.1.5
route add -host 192.168.8.62     10.1.1.5
route add -host surfer           10.1.1.5
route add -host 192.168.8.70     10.1.1.5

Add this at the very end of /etc/rc.tcpip and your routes are created each time the machine is rebooted.

Like I said, quick and dirty, but think about it: what could be more simple?

Want to delete a route? Use the the route delete command (see AIXDeleteRoute for more information than you will ever need on that subject!), remove the route from /etc/rc.tcpip and you are done!

Since /etc/rc.tcpip is executed each time the machine is rebooted, your routes will always be there... Simple, no?

WARNING Of course, you should never, ever use the above example on your own site. Hope this helps!