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 04-15-2008, 08:36 PM
"Eric B."
 
Default How to create static routes on startup with CentOS4?

"Filipe Brandenburger" <filbranden@gmail.com>
wrote in message
news:e814db780804151317j1e3a9e15td960d074f37a6978@ mail.gmail.com...
> On Tue, Apr 15, 2008 at 3:48 PM, Eric B.
> <ebenze@hotmail.com> wrote:
>> The last question then is if there is a way to add "ip rule" rules to
>> specify which routing table to use based on packet information.
>> ex: ip rule add fwmark 3 table 3
>>
>> Are any of the network scripts able to handle this as well?
>
> If you look at the end of the same script (ifup-routes), you'll see
> that it reads rules from file
> /etc/sysconfig/network-scripts/rule-eth0. For each line in that file,
> it will run "/sbin/ip rule add $line". It's unfortunate that this
> isn't all better documented somewhere. But on Linux you can always...
> Use the source, Luke!

Really? I looked through ifup-routes but I don't see anything that searches
for rule-<ifname> anywhere. All my ifup-routes looks for is files called
route-$2. Further more a quick "grep rule /etc/sysconfig/network-scripts/*"
finds nothing.

My last two lines in ifup-routes (unless I don't know how to read them
properly) are:
# Red Hat network configuration format
NICK=${2:-$1}
CONFIG="/etc/sysconfig/network-scripts/$NICK.route"
[ -f $CONFIG ] && handle_file $CONFIG $1

And if I look at handle_file method, I see all it does is call /sbin/ip
route add $line.

Am I missing something obvious somewhere? Or do you have a different
version of ifup-routes? I'm running CentOS4 with the latest patches....

Thanks again!

Eric



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-15-2008, 09:04 PM
"Filipe Brandenburger"
 
Default How to create static routes on startup with CentOS4?

On Tue, Apr 15, 2008 at 4:36 PM, Eric B. <ebenze@hotmail.com> wrote:
> Am I missing something obvious somewhere? Or do you have a different
> version of ifup-routes? I'm running CentOS4 with the latest patches....

I'm running CentOS5 here, that's probably new in CentOS5.

You may consider appending the last 15 lines of ifup-routes from
CentOS5 to your CentOS4 installation. It's not that beautiful but it's
not that ugly either. At least it's forward compatible in a way that
if you upgrade to CentOS5 later it will continue working. I'm sending
the file attached to you in case you want to do it.

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:53 PM.

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