[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Semi OT ucarp avvio macchina e servizi che non ci dovrebbero essere



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scusatemi di nuovo oggi non e' proprio giornata finisce che prima di
sera tiro un server in testa a qualcuno.





Buongiorno a tutti,

ho un problema che non riesco a capire con ucarp o meglio col suo avvio.

la situazione e' la seguente:

2 macchine che fanno da firewall e proxy

master sangiorgio

slave perseo

indirizzo da da far "ballare" 192.168.2.210

su master ho creato in /etc/init.d il seguente file ucarp


#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin


OPTIONS="-B -v 10 -p xxxxxxx -a 192.168.2.210 -s 192.168.2.240 -u
/etc/ucarp/ucarp-up.sh -d /etc/ucarp/ucarp-down.sh -P -z"

test -x /usr/sbin/ucarp || exit 0

case "$1" in
    start)

        if [ ! -x /usr/sbin/ucarp ]; then
            echo "ucarp binary missing - not starting"
            exit 1
        fi
        if ( ! pgrep -f /usr/sbin/ucarp )
        then
                echo -n "Starting ucarp service: ucarp"
                start-stop-daemon --start --quiet --exec /usr/sbin/ucarp \
                        -- $OPTIONS
        else
                 echo "ucarp is running, not starting"
        fi
                 echo "."
    ;;

    stop)
         echo -n "Stopping ucarp service: ucarp"
         killall ucarp
         echo "."
    ;;

    restart|force-reload)
        $0 stop
        sleep 2
        $0 start
    ;;

    *)
         echo "Usage: /etc/init.d/bind
{start|stop|restart|force-reload}" >&2
         exit 1

;;

esac


exit 0


e i 2 files

/etc/ucarp/ucarp-down.sh


#!bin/sh

exec 2> /dev/null
ifconfig eth1:0 192.168.2.210 down
/etc/init.d/squid stop
echo virtual eth on "`hostname`" down


/etc/ucarp/ucarp-up.sh

exec 2> /dev/null
ifconfig eth1:0 192.168.2.210/24 up
/etc/init.d/squid start
echo virtual eth on "`hostname`" up


identico su perseo a meno dell'opzione -P nel file /etc/init.d/ucarp
essendo perseo lo slave e dell source address che e' 192.168.2.5


quello che non riesco assolutamente a capire e che sfida secondo me ogni
logica e' la seguente cosa:


perseo:/home/guardian# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:A0:24:4D:3C:A7
          inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.111
Mask:255.255.255.240
          inet6 addr: fe80::2a0:24ff:fe4d:3ca7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:37 errors:0 dropped:0 overruns:0 frame:0
          TX packets:398 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6180 (6.0 KiB)  TX bytes:27783 (27.1 KiB)
          Interrupt:5 Base address:0xa000

eth1      Link encap:Ethernet  HWaddr 00:50:04:F8:B2:6B
          inet addr:192.168.2.5  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fef8:b26b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1654 errors:0 dropped:0 overruns:0 frame:0
          TX packets:161 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:146667 (143.2 KiB)  TX bytes:77082 (75.2 KiB)
          Interrupt:11 Base address:0xc000
- -
-
---------------------------------------------------------------------------------------------------------------------------------
eth1:0    Link encap:Ethernet  HWaddr 00:50:04:F8:B2:6B
          inet addr:192.168.2.210  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0xc000
- -
-
----------------------------------------------------------------------------------------------------------------------------------

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2022 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2022 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:111705 (109.0 KiB)  TX bytes:111705 (109.0 KiB)



sangiorgio:/home/guardian# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:05:1C:0B:7F:7F
          inet addr:xxx.xxxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx
Mask:255.255.255.0

          inet6 addr: fe80::205:1cff:fe0b:7f7f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:40685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67320 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3900390 (3.7 MiB)  TX bytes:4801070 (4.5 MiB)
          Interrupt:9 Base address:0xb000

eth1      Link encap:Ethernet  HWaddr 00:05:1C:04:FA:AE
          inet addr:192.168.2.240  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::205:1cff:fe04:faae/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:102449 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7613030 (7.2 MiB)  TX bytes:918 (918.0 b)
          Interrupt:5 Base address:0xa800
- -
-
-----------------------------------------------------------------------------------------------------------------------------------
eth1:0    Link encap:Ethernet  HWaddr 00:05:1C:04:FA:AE
          inet addr:192.168.2.210  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:5 Base address:0xa800
- -
-
------------------------------------------------------------------------------------------------------------------------------------
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

la eth1:0 e' presente _CONTEMPORANEAMENTE_  su ambo le macchine.

e' una settimana che mi ci applico come un matto ma non ne vengo fuori e
ho paura di essere andato in loop col cervello e di non accorgermi di
qualcosa di estremamente evidente che e' poi il nocciolo della questione.

Qualche suggerimento da darmi?

grazie in anticipo




- --

Mario Vittorio Guenzi
E-mail jclark@tiscali.it
Si vis pacem, para bellum
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFpKe7m6qs1ZkNrIoRAmpsAJ4zc8k1F+BCc1Oy+JKhTZdp3z7qIwCcDdAv
iii6/wzwz/grtNwNRf5+qGc=
=6Ar+
-----END PGP SIGNATURE-----



Reply to: