Re: Centos 6 - Persistant static routes

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



On Thu, Mar 12, 2015 at 3:01 PM, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> wrote:
>
>>>>>
>>>>> where it says to add to ifcfg-eth0:
>>>>>
>>>>> 192.168.128.0/17 via 40.53.24.3
>>>
>>> That’s only for RHEL 7: http://goo.gl/AtjIyI
>>
>> Aside from being irritating, that's just wrong.   I'm using that
>> syntax on Centos5,
>
>
> AH, I think I see what I did wrong.  I put that line in the ifcfg-eth0 when
> according to this page, it goes in the route-eth0 just like the old format.
> I will give that a try tomorrow...
>

Yes, I missed that part.  You can put a default gateway in the
ifcfg-xxxx file with GATEWAY= but if you have more than one NIC you
should only have one GATEWAY= entry  for the NIC facing that router,
and any routes in a route-xxx file should be through a router where
the next hop specified is reachable though the xxx-named interface.
The routes are added as the interfaces are brought up and will fail if
the gateway specified isn't reachable - as might happen if they need
to go through an interface that isn't up yet.   If you only have one
interface you don't have to worry about that - the default GATEWAY=
can be in ifcfg-eth0 and the static route(s) through a different
router on the same subnet go in route-eth0.

-- 
   Les Mikesell
     lesmikesell@xxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos





[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux