FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 01-24-2011, 07:37 PM
Ray Van Dolson
 
Default iproute2 custom tables and rules the CentOS way...

Hi all;

I have a custom iproute2 table and a few rules to go along with it
(CentOS 5) -- I have added the table to /etc/iproute2/rt_tables.

if-up and friends doesn't seem to handle this real gracefully. How are
those of you out there doing something similar managing this
customization?

I don't really want to muck with /etc/init.d/network or the if-up
scripts to avoid breaking upgrades. rc.local my best bet?

Thanks,
Ray
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-24-2011, 09:28 PM
Barry Brimer
 
Default iproute2 custom tables and rules the CentOS way...

Quoting Ray Van Dolson <rayvd@bludgeon.org>:

> Hi all;
>
> I have a custom iproute2 table and a few rules to go along with it
> (CentOS 5) -- I have added the table to /etc/iproute2/rt_tables.
>
> if-up and friends doesn't seem to handle this real gracefully. How are
> those of you out there doing something similar managing this
> customization?
>
> I don't really want to muck with /etc/init.d/network or the if-up
> scripts to avoid breaking upgrades. rc.local my best bet?

I have a file named /etc/sysconfig/network-scripts/rule-eth0 which contains my
rules for eth0 and a file named /etc/sysconfig/network-scripts/route-eth0 which
are read by /etc/sysconfig/network-scripts/ifdown-routes and
/etc/sysconfig/network-scripts/ifup-routes.

The contents of my /etc/sysconfig/network-scripts/rule-eth0 is:
from 10.X.X.X/24 table testtable

The contents of my /etc/sysconfig/network-scripts/route-eth0 is:
default via 10.X.X.1 table testtable
10.X.X.0/24 dev eth0 table testtable
127.0.0.0/8 dev lo table testtable

For completeness, I have the following in /etc/iproute2/rt_tables:
100 testtable

There is no modification of /etc/init.d/network or any of the
/etc/sysconfig/network-scripts/if* files.

Hope this helps.

Barry

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 01-24-2011, 09:42 PM
Ray Van Dolson
 
Default iproute2 custom tables and rules the CentOS way...

On Mon, Jan 24, 2011 at 04:28:16PM -0600, Barry Brimer wrote:
> Quoting Ray Van Dolson <rayvd@bludgeon.org>:
>
> > Hi all;
> >
> > I have a custom iproute2 table and a few rules to go along with it
> > (CentOS 5) -- I have added the table to /etc/iproute2/rt_tables.
> >
> > if-up and friends doesn't seem to handle this real gracefully. How are
> > those of you out there doing something similar managing this
> > customization?
> >
> > I don't really want to muck with /etc/init.d/network or the if-up
> > scripts to avoid breaking upgrades. rc.local my best bet?
>
> I have a file named /etc/sysconfig/network-scripts/rule-eth0 which contains my
> rules for eth0 and a file named /etc/sysconfig/network-scripts/route-eth0 which
> are read by /etc/sysconfig/network-scripts/ifdown-routes and
> /etc/sysconfig/network-scripts/ifup-routes.
>
> The contents of my /etc/sysconfig/network-scripts/rule-eth0 is:
> from 10.X.X.X/24 table testtable
>
> The contents of my /etc/sysconfig/network-scripts/route-eth0 is:
> default via 10.X.X.1 table testtable
> 10.X.X.0/24 dev eth0 table testtable
> 127.0.0.0/8 dev lo table testtable
>
> For completeness, I have the following in /etc/iproute2/rt_tables:
> 100 testtable
>
> There is no modification of /etc/init.d/network or any of the
> /etc/sysconfig/network-scripts/if* files.
>
> Hope this helps.
>
> Barry

Many thanks Barry.

Ray
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 02:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org