|
From: Serge L. <ser...@gm...> - 2010-08-30 02:43:46
|
Hi,
OK, the patch for network script is in the attachment.
If this approach is OK, I'll add 'RULE' keyword to work with additional routing
tables.
The suggest modification of the documentation is below:
########################################################
# ROUTE=" ...... "
# where ROUTE is a key word and the line with ROUTE
# should not have spaces between the beginning of
# the line and the keyword
# and route statement is a any valid "ip route"
# command, without "ip route add" prefix - it will
# be added automatically
#
# IPV6ROUTE="...."
# IPV6ROUTE keyword can be used for ipv6 routes.
#
# $DEVICE can be used to directly specify the interface
#
###### samples for several possible scenarios
#
# route to network 192.168.254.0/255.255.255.0 via gateway 10.90.1.252
#ROUTE="192.168.254.0/255.255.255.0 via 10.90.1.252"
# or
#ROUTE="192.168.254.0/24 via 10.90.1.252"
#
#
# route to host 192.168.3.1 via 10.90.1.252
#ROUTE="192.168.3.0/32 via 10.90.1.252"
#
# route to network that is also reachable via this interface
#ROUTE="192.168.3.0/24 dev $DEVICE"
#
# special routes
#ROUTE="unreachable 10.0.0.0/8"
#ROUTE="blackhole 192.168.1.0/24"
#
# add as many ROUTE="...." lines as you need routes
#
# the next line shows how to set the default gateway
#ROUTE="$default via 10.90.1.1".
#
Sincerely,
Serge
On 08/28/2010 11:38 PM, Serge Leschinsky wrote:
> Heiko,
>
> Yes, thank to my current job I have a LOT of enthusiasm to make something useful :)
>
> What do you think about the following solution?:
>
> every ifcfg-XXXX can contain routes in form of lines
>
> ROUTE="default via xxx.xxx.xxx.xxx"
> ROUTE="blackhole 10.0.0.0/8"
> ROUTE="10.1.0.0/16 dev ppp0"
> ROUTE="192.168.1.0/24 via xxx.xxx.xxx.xxx dev $DEVICE"
>
> etc. actually, any "ip route" command is allowed, because the statement is the
> command itself, but without prefix "ip route add".
>
> We will add prefix "ip route add" for each ROUTE statement on 'start' and "ip
> route del" for each statement on 'stop'.
>
> $DEVICE is already defined at the moment of execution (it will be the name of
> this interface) , so we can use it as well.
>
> It seems to be simple and flexible enough.
>
> PS. Sorry for the broken thread - I copied the message from web, because ISP (
> where my email account was) doesn't accept my credential anymore :(
>
>
> Serge
>
>
>
>> I hate to delay the release of 1.4 further, but I think you are right.
>> Would you have time to add it?
>>
>> Heiko
>>
>>> -----Original Message-----
>>> From: Serge Leschinsky [mailto:fi...@in...]
>>> Sent: Friday, August 27, 2010 7:49 PM
>>> To: dev...@li...
>>> Subject: [Devil-linux-develop] network configuration script - add
>>> routes
>>>
>>> Hi,
>>>
>>> there is a new bug:
>>>>
>>> =======================================================
>>> ===============
>>>> Summary: Cannot add blackhole route
>>>> Description:
>>>> There is no way to add blackhole, unreachable etc. type of routes
>>>> using configuration scripts.
>>>>
>>> =======================================================
>>> ===============
>>>
>>> I have taken a look at ROUTE section in network script and have to
>>> admit
>>> that old 'route' command doesn't allow us to add new sophisticated
>>> routes. The main idea is to replace 'route' by 'ip route', but it
>>> obviously
>>> causes the config format modification ('ip route' has much more
>>> options). On the other hand, release 1.4 is a good time to change
>>> things,
>>> because 1.2 -> 1.4 migration is a big deal anyway.
>>>
>>> So, please advise :)
>>>
>>> Serge
>>>
>>>
>>>
>
|