Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2009 02:19:36 +0200
From:      KES <kes-kes@yandex.ru>
To:        KES <kes-kes@yandex.ru>
Cc:        questions@freebsd.org, Arjan van der Oest <arjan.van.der.oest@worldmax.nl>
Subject:   Re[5]: FreeBSD 7.1, routing tables, rc.conf
Message-ID:  <1277250109.20090318021936@yandex.ru>
In-Reply-To: <825952815.20090129190245@yandex.ru>
References:  <1868031977.20090129180026@yandex.ru> <FC5FF0B613540249959195342B6D034C7547BA@worldmax-sbs01.Worldmax.local> <161257714.20090129182553@yandex.ru> <FC5FF0B613540249959195342B6D034C7547BE@worldmax-sbs01.Worldmax.local> <825952815.20090129190245@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Здравствуйте, KES.

K> As I said it be handy to have:
K> apache_enable="YES"
K> apache_fib="1"

K> named_enable="YES"
K> named_fib="2"
K> etc
patch to allow to setup fib for service running from rc.conf


/etc/rc.conf

                                        # setup the full command to run
                                        #
+++                        _fib=
+++                        if [ "${name}_fib" ]; then
+++                                eval _fib=\$${name}_fib
+++                                _fib="/usr/sbin/setfib $_fib"
+++                        fi

                        echo "Starting ${name}."
                        if [ -n "$_chroot" ]; then
                                _doit="\
${_nice:+nice -n $_nice }\
chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\
---$_chroot $command $rc_flags $command_args"
+++$_chroot $_fib $command $rc_flags $command_args"
                        else
                                _doit="\
${_chdir:+cd $_chdir && }\
--- $command $rc_flags $command_args"
+++ $_fib $command $rc_flags $command_args"


Вы писали 29 января 2009 г., 19:02:45:

K> Здравствуйте, Arjan.

K> Yes, it is possible to use 'setfib'. As I write:
AvdO>> Then I do manually:
AvdO>> setfib 0 route add default <G.A.T.E1>
AvdO>> setfib 1 route add default <G.A.T.E2>

K> Also to run services, I can edit /etc/rc.d scripts, but this is ugly,
K> very ugly.

K> As I said it be handy to have:
K> apache_enable="YES"
K> apache_fib="1"

K> named_enable="YES"
K> named_fib="2"
K> etc


K> Вы писали 29 января 2009 г., 18:33:53:

AvdO>> Funny, I wasn't aware of this new option in 7.1, hence my
AvdO>> question. From what I see some stuff is already modified to use
AvdO>> this new option (like ipfw), but others require the setfib
AvdO>> utility. I'm not sure if you can add routes directly from
AvdO>> rc.conf, but why not try 'setfib -<fib> route add xxx' ?

AvdO>> (http://www.freebsd.org/releases/7.1R/errata.html)

AvdO>> -- 

AvdO>> -----Original Message-----
AvdO>> From: KES [mailto:kes-kes@yandex.ru] 
AvdO>> Sent: donderdag 29 januari 2009 17:26
AvdO>> To: Arjan van der Oest
AvdO>> Cc: questions@freebsd.org
AvdO>> Subject: Re[2]: FreeBSD 7.1, routing tables, rc.conf

AvdO>> Здравствуйте, Arjan.

AvdO>> I mean:
AvdO>> options         ROUTETABLES=2


AvdO>> Then I do manually:
AvdO>> setfib 0 route add default <G.A.T.E1>
AvdO>> setfib 1 route add default <G.A.T.E2>

AvdO>> in rc.conf I can do for FIB0:
AvdO>> defaultrouter="<GATE1>"

AvdO>> How to do same thing for other routing tables?

AvdO>> I exepct next feature to exists:
AvdO>> defaultrouter_fib1="<GATE2>"



AvdO>>> What exactly do you mean with two routing tables?

AvdO>>> -- 
AvdO>>> Met vriendelijke groet / Kind Regards,
AvdO>>> Worldmax Operations B.V.
AvdO>>>  
AvdO>>> Arjan van der Oest
AvdO>>> Network Design Engineer
AvdO>>>  
AvdO>>> T.: +31 (0) 88 001 7912
AvdO>>> F.: +31 (0) 88 001 7902
AvdO>>> M.: +31 (0) 6 10 62 58 46
AvdO>>>  
AvdO>>> GPG: https://keyserver.pgp.com/ (Key ID: 07286F78) fingerprint:
AvdO>>> 2E9F 3AE2 0A8B 7579 75A9  169F 5D9E 5312 0728 6F78
AvdO>>> -----Original Message-----
AvdO>>> From: owner-freebsd-questions@freebsd.org
AvdO>>> [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of KES
AvdO>>> Sent: donderdag 29 januari 2009 17:00
AvdO>>> To: questions@freebsd.org
AvdO>>> Subject: FreeBSD 7.1, routing tables, rc.conf

AvdO>>> Здравствуйте, Questions.

AvdO>>> I have two routing tables.
AvdO>>> How to setup two default routes for each routing table in rc.conf?










-- 
С уважением,
 KES                          mailto:kes-kes@yandex.ru




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1277250109.20090318021936>