FreeBSD 7.1, routing tables, rc.conf
KES
kes-kes at yandex.ru
Tue Mar 17 17:45:48 PDT 2009
Здравствуйте, 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 at yandex.ru]
AvdO>> Sent: donderdag 29 januari 2009 17:26
AvdO>> To: Arjan van der Oest
AvdO>> Cc: questions at 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 at freebsd.org
AvdO>>> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of KES
AvdO>>> Sent: donderdag 29 januari 2009 17:00
AvdO>>> To: questions at 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 at yandex.ru
More information about the freebsd-questions
mailing list