This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem bei automatischen Re-Connect der WAN-Leitungen

Hallo,

wie verwenden 3 Glasfaser-Leitungen an einem SG210 (T1 - REF_IntPppExternaWan, T2 - REF_IntPppExterWanT2500 und T3 - REF_IntPppExterWanT3250). Für 2 der 3 Leitungen brauchen wir ein automatisches Re-Connect, um eine neue IP zu bekommen. T2 - 1x pro Stunde und T3 - einmal aller 6 Stunden. Dafür habe ich eine /etc/crontab.my angelegt mit folgenden 2 Zeilen:

0 * * * *  root /usr/local/bin/pppoe_reconnect.sh REF_IntPppExterWanT2500
30 */6 * * *   root /usr/local/bin/pppoe_reconnect.sh REF_IntPppExterWanT3250

Prinzipiell funktioniert das auch fast, d.h. die Zeilen werden in die crontab übernommen und die Leitungen auch getrennt. Aber immer beide, d.h. auch die T3 wird einmal pro Stunde getrennt???

Ich habe das auch in der Kommandozeile verifiziert, wenn ich den Befehl:

/usr/local/bin/pppoe_reconnect.sh REF_IntPppExterWanT3250

eingebe, wird die T2 und die T3 neu aufgebaut, obwohl ich ja als Paramter nur die T3 angebe? Aber nicht die T1. Irgendwie sind die beiden Leitungen T2 und T3 verbunden.

Kann mir jemand helfen, wie ich immer nur die richtige Leitung neu aufgebaut bekomme?

Vielen Dank!!!!

Ciau g.g.



This thread was automatically locked due to age.
  • Hallo Gunnar,

    Herzlich willkommen hier in der Community !

    (Sorry, my German-speaking brain isn't creating thoughts at the moment. [:(])

    This is the first time I've seen pppoe_reconnect.sh - indeed, it's never appeared in this forum since it started over 20 years ago.  Did you find a user's guide somewhere indicating that the syntax you're using is correct?  What if you use the REF_ of the hardware port instead of that for the interface?

    MfG - Bob (Bitte auf Deutsch weiterhin.)

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi,

    thanks for your help! No, I don't find this in the user guide. But I enable the daily reconnect in the expanded options in the interface configuration (see screenshot).

    Now, you can find the following line in the /etc/crontab.pppreconnect

    00 02 * * *  root /usr/local/bin/pppoe_reconnect.sh REF_IntPppExterWanT2500

    Here you can find the command for reconnecting the line. I use this as template this for my commands.

    If you now have a look in the /usr/local/bin/pppoe_reconnect.sh, you can see the script is searching for the process pppd-pppoe with the parameter REF_IntPppExterWanT2500. Try this in your shell:

    /bin/ps -A -o pid,ppid,cmd --no-heading | grep -v grep | grep pppd | grep REF_Int

    Here my output for the tree lines:

    1326  4825 /usr/sbin/pppd-pppoe call REF_IntPppExterWanT3250 ipparam eth3.7#REF_IntPppExterWanT3250 plugin rp-pppoe.so eth3.7
    11966  4798 /usr/sbin/pppd-pppoe call REF_IntPppExterWanT2500 ipparam eth2.7#REF_IntPppExterWanT2500 plugin rp-pppoe.so eth2.7
    19105  4847 /usr/sbin/pppd-pppoe call REF_IntPppExternaWan ipparam eth1.7#REF_IntPppExternaWan plugin rp-pppoe.so eth1.7

    Now the shell script kill the process 11966 and the line will be re-connected. All this looks perfekt, but it I execute this command:

    /usr/local/bin/pppoe_reconnect.sh REF_IntPppExterWanT2500

    also the line REF_IntPppExterWanT3250 will be reconnected. I don't know why. It looks like a bug?

    Thanks for your help!

    Bye

  • Auch wenn ich selbst diese Konstelation nicht habe, besteht die Möglichkeit T3 auf einem anderen Eth Interf. zu legen da Eth3 meist für den HA-Cluster genutzt / vorgesehen wird / ist.

    Dürfte zwar nicht sein aber ggf. hilft es?

  • Danke für den Hinweis. Habe ich probiert, hilft nicht so richtig. Aber ich hatte den HA-Cluster deaktiviert, um den Ethernet Port 3 verwenden zu können. Weiß denn jemand, wie man direkt den Port mit einem Befehl deaktviert oder aktiviert?

    Die Funktion ist ja auch im Webadmin. Dort kann ich ja auch die Line mit einem Button re-connecten. Dann trennt es immer nur die richtige Line. Die Frage wäre also, welcher Befehl liegt denn hinter diesem Button?

    Danke für Eure Hilfe!

  • Ich habe im Forum auch noch einen anderen Befehl gefunden. Dieser scheint die Buchse zu deaktivieren und wieder zu aktivieren:

    cc change_object REF_IntPppExterWanT2500 status 0; cc change_object REF_IntPppExterWanT2500 status 1

    Aber auch hier wird die T3 mit getrennt, bzw. kommt ein Fehler. Nach ein paar Sekunden sind beide Leitungen wieder aktiv.

    Wenn ich die Verbindung mit dem Befehl

    /usr/local/bin/pppoe_reconnect.sh REF_IntPppExterWanT2500

    neu aufbaue, sieht das im Dashboard dann so aus:

    Auch hier sind nach ein paar Sekunden beide Leitungen wieder aktiv.

  • Hallo,

    ich habe noch den Hinweis gefunden, dass hinter dem ReConnect-Knopf im Webadmin der Befehl

    /var/sec/chroot-pppoe/etc/ppp/ppp_updown.plx

    steckt. Allerdings kann ich dafür keine Hinweise für dessen Verwendung bzw. Parameter finden. Kann jemand helfen?

    Danke g.g.

  • Hallo,

    ich habe die Lösung gefunden: ich habe das Modul "Network Protection" deaktiviert. Durch das automatische Load-Balancing sind die Leitung anscheinend irgendwie verbunden und werden manchmal zusammen reconnectet. Nachdem ich das "Load Balancing" deaktiviert habe, werden beide Leitung wie in der crontab angegeben einzeln zum richtigen Zeitpunkt getrennt und bekommen eine neue IP.

    Danke g.g.