Bevan C. Bennett wrote:
I configure my gateway in the following manner, and have never had a problem with sub-interfaces picking it up multiple times:It is a system-wide setting in concept, although the default gateway route is useless without an interface that includes its subnet, thus in practice if the interface is down the default gateway route is not functional either. So IMO neither is more technically correct. If there were multiple interfaces on the same subnet, then I could see the GATEWAY approach as more appropriate.
/etc/sysconfig/network ---------------------- NETWORKING=yes HOSTNAME=saladin GATEWAY=10.0.0.254
/etc/sysconfig/network-scripts/ifcfg-eth* ----------------------------------------- NO GATEWAY entry
IMO this is more technically correct, as the default gateway is a system-wide setting, not an interface-dependant setting.
FYI - I have had problems on older RH releases with multiple routes added due to subinterfaces when configured as you suggest above. But I haven't tried it recently.
If one does use your approach, they may still find the route-<interface_name> file mechanism useful to configure other routes which are relevant to the interface and not its subinterfaces.
-- ----------------------------------------------------------- "Spend less! Do more! Go Open Source..." -- Dirigo.net Chris Johnson, RHCE #807000448202021