[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

right place for routes, etc.



     Good time of day,

I.

  IMHO, it will be good idea to place all static routes to one
file, for example /etc/routes. It will make more simple routes
checking/editing. Usually, routes placed to hostname.* files,
but, actually, routes are iface-independed settings.

  There is reason to exclude route settings from /etc/hostname.*
files.
  Routes related to different ip-subnets must be placed to
different hostname.* files, to be sure that these actions will
not be depended of order in that ifaсes processed by /etc/netstart.
  For example, in hostname.foo0 must not have routes via gateways
located in subnet on foo1 iface, cause it will be discarded if foo0
will be processed before foo1.
  This makes editing network settings more difficult - I must
recall related iface name (to locate iface file), to edit
or check route. Why ?

  Because of tunnels (GIF, GRE), /etc/routes must be processed twice:
    >> Before tunnels up
       Ignoring all /sbin/route errors.
    >> After tunnels up
       Ignoring "File exist" /sbin/route error. Other errors - print.

II.

  Also, may be a good idea to add one more standard rc-script -
local post-netstart script, to place custom network settings (like
static ARP, for example), instead of placing it to hostname.* or
rc.local.

III.

  Hmm ... another thing. What will happen if /etc/mygate will contain
gateway, located on GRE or GIF subnet ? I guess, default route will
not be set. Because default route set only before tunnels up.
  Is it valid ?
  What about multicast routing in same situation ?
  

Ilya A. Kovalenko                      (mailto:shadow_(_at_)_oganer_(_dot_)_net)
System Administrator
JSC Oganer-Service, Russia



Visit your host, monkey.org