<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Je me permet de re-réponde a la liste entière, la réponse peut
    servir pour d'autre.<br>
    <br>
    Avec "ip directed-broadcast" sur les vlan concernée sur les cisco il
    est possible de contourner le problème justement.<br>
    <br>
    En faite je fait déjà comme ceci depuis des années. Je démarre tout
    mes poste prof du lycée le matin avec un serveur qui n'est pas dans
    le même vlan que mes pc.<br>
    <br>
    J'ai justement testée en changeant l'ip broadcast dans le fichier
    /opt/wapt/lib/site-packages/wakeonlan/wol.py de 255.255.255.255 à
    172.21.255.255<br>
    <br>
    Et la effectivement le wapt fonctionne. Donc mon soucis vient bien
    d'ici. Mais comme j'ai plusieur vlan, je souhaite modifier le
    waptserver.py<br>
    <br>
    Simon<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Le 24/02/2016 22:57, MORILLO Jordi a
      écrit :<br>
    </div>
    <blockquote
cite="mid:5B675B42AC323543B15C1E99E934C83EEBD43E81@OBIWAN.educ-for.local"
      type="cite">
      <pre wrap="">Bonsoir Simon,

Peut-être n'ai-je pas compris ce que tu voulais faire exactement mais normalement, d'après mes bases lointaines de réseau et couche OSI, le broadcast ne passe la couche 3 donc n'est pas routé (sauf le dhcp si on specifie un relais)
Pour faire du WOL sur un poste qui n'est pas sur le même réseau, tu dois passer par un poste relais se situant sur le même réseau que le poste.
Bonne soirée
Jordi

________________________________
De : WAPT [<a class="moz-txt-link-abbreviated" href="mailto:wapt-bounces@lists.tranquil.it">wapt-bounces@lists.tranquil.it</a>] de la part de Fonteneau Simon [<a class="moz-txt-link-abbreviated" href="mailto:sfonteneau@stemarie-aizenay.fr">sfonteneau@stemarie-aizenay.fr</a>]
Date d'envoi : mercredi 24 février 2016 18:51
À : <a class="moz-txt-link-abbreviated" href="mailto:wapt@lists.tranquil.it">wapt@lists.tranquil.it</a>
Objet : Re: [Wapt] wakeonlan

Bonjour

J'ai commencée a regarder comment modifier mon problème

J'ai compris que cela se passe dans waptserver.py dans la fonction def trigger_wakeonlan():


def trigger_wakeonlan():
    try:
        uuid = request.args['uuid']
        host_data = hosts().find_one({ "uuid": uuid},fields={'uuid':1,'host':1,'computer_fqdn':1})

        macs = host_data['host']['mac']
        msg = u''
        if macs:
            logger.info(_("Sending magic wakeonlan packets to {} for machine {}").format(macs,host_data['host']['computer_fqdn']))
            wakeonlan.wol.send_magic_packet(*macs)

J'ai vu également que le fichier wol.py est déjà capable de prendre en charge l'argument ip_address pour résoudre mon soucis.:

def send_magic_packet(*macs, **kwargs):
    """
    Wakes the computer with the given mac address if wake on lan is
    enabled on that host.

    Keyword arguments:
    :arguments macs: One or more macaddresses of machines to wake.
    :key ip_address: the ip address of the host to send the magic packet
                     to (default "255.255.255.255")
    :key port: the port of the host to send the magic packet to
               (default 9)

    """


Je voudrais maintenant récupérer le champ broadcast dans dispo dans la base de wapt.

J'ai donc essayée avec host_data['host']['networking']['broadcast']

Mais j'ai du mal a comprendre

Un petit coup de main ?

Simon






Le 24/02/2016 15:59, Fonteneau Simon a écrit :
Pour ceux qui tomberai sur ce poste plus tard
Le broadcast wakeonlan est défini ici
/opt/wapt/lib/site-packages/wakeonlan/wol.py

Merci

Simon

[Collège Privé Ste Marie] <a class="moz-txt-link-rfc2396E" href="https://www.stemarie-aizenay.fr"><https://www.stemarie-aizenay.fr></a>

Fonteneau Simon / Administrateur Réseaux
<a class="moz-txt-link-abbreviated" href="mailto:sfonteneau@stemarie-aizenay.fr">sfonteneau@stemarie-aizenay.fr</a><a class="moz-txt-link-rfc2396E" href="mailto:sfonteneau@stemarie-aizenay.fr"><mailto:sfonteneau@stemarie-aizenay.fr></a> / 0648761484

Collège Privé Ste Marie
Tel: 0251946200 / Fax: 0251946856
24 route de Nantes 85190 Aizenay
<a class="moz-txt-link-freetext" href="https://www.stemarie-aizenay.fr">https://www.stemarie-aizenay.fr</a>

[Facebook]<a class="moz-txt-link-rfc2396E" href="https://www.facebook.com/saintemarieaizenay"><https://www.facebook.com/saintemarieaizenay></a> [Google +] <a class="moz-txt-link-rfc2396E" href="https://plus.google.com/105273696200535069375"><https://plus.google.com/105273696200535069375></a>  [LinkedIn] <a class="moz-txt-link-rfc2396E" href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><https://fr.linkedin.com/in/simon-fonteneau-b13382b0></a>  [Maps] <a class="moz-txt-link-rfc2396E" href="https://goo.gl/maps/Jbyn8JUpumq"><https://goo.gl/maps/Jbyn8JUpumq></a>




Le 24/02/2016 15:29, Fonteneau Simon a écrit :
Bonjour

Je viens de tester le wakeonlan de wapt.
Si je ne me trompe pas le wakeonlan est envoyée a 255.255.255.255

Chez moi le wakeonlan est derrière une gateway, et le serveur wapt n'est pas dans le même vlan que mes clients

Il me faut donc envoyer sur wakeonlan -i 172.21.255.255 BC:EE:7B:9E:51:E2
Au lieu de wakeonlan -i 255.255.255.255 BC:EE:7B:9E:51:E2

Il y a t'il possibilités d'adaptée cela en lisant l'adresse ip et le netmask du client ??

Envoie a 255.255.255.255 et le au broadcast du dernier réseaux de la dernière ip connue pour gérer les poste nomade.

Merci Qu'en pensez vous

Simon
--

[Collège Privé Ste Marie] <a class="moz-txt-link-rfc2396E" href="https://www.stemarie-aizenay.fr"><https://www.stemarie-aizenay.fr></a>

Fonteneau Simon / Administrateur Réseaux
<a class="moz-txt-link-abbreviated" href="mailto:sfonteneau@stemarie-aizenay.fr">sfonteneau@stemarie-aizenay.fr</a><a class="moz-txt-link-rfc2396E" href="mailto:sfonteneau@stemarie-aizenay.fr"><mailto:sfonteneau@stemarie-aizenay.fr></a> / 0648761484

Collège Privé Ste Marie
Tel: 0251946200 / Fax: 0251946856
24 route de Nantes 85190 Aizenay
<a class="moz-txt-link-freetext" href="https://www.stemarie-aizenay.fr">https://www.stemarie-aizenay.fr</a>

[Facebook]<a class="moz-txt-link-rfc2396E" href="https://www.facebook.com/saintemarieaizenay"><https://www.facebook.com/saintemarieaizenay></a> [Google +] <a class="moz-txt-link-rfc2396E" href="https://plus.google.com/105273696200535069375"><https://plus.google.com/105273696200535069375></a>  [LinkedIn] <a class="moz-txt-link-rfc2396E" href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><https://fr.linkedin.com/in/simon-fonteneau-b13382b0></a>  [Maps] <a class="moz-txt-link-rfc2396E" href="https://goo.gl/maps/Jbyn8JUpumq"><https://goo.gl/maps/Jbyn8JUpumq></a>






--

[Collège Privé Ste Marie] <a class="moz-txt-link-rfc2396E" href="https://www.stemarie-aizenay.fr"><https://www.stemarie-aizenay.fr></a>

Fonteneau Simon / Administrateur Réseaux
<a class="moz-txt-link-abbreviated" href="mailto:sfonteneau@stemarie-aizenay.fr">sfonteneau@stemarie-aizenay.fr</a><a class="moz-txt-link-rfc2396E" href="mailto:sfonteneau@stemarie-aizenay.fr"><mailto:sfonteneau@stemarie-aizenay.fr></a> / 0648761484

Collège Privé Ste Marie
Tel: 0251946200 / Fax: 0251946856
24 route de Nantes 85190 Aizenay
<a class="moz-txt-link-freetext" href="https://www.stemarie-aizenay.fr">https://www.stemarie-aizenay.fr</a>

[Facebook]<a class="moz-txt-link-rfc2396E" href="https://www.facebook.com/saintemarieaizenay"><https://www.facebook.com/saintemarieaizenay></a> [Google +] <a class="moz-txt-link-rfc2396E" href="https://plus.google.com/105273696200535069375"><https://plus.google.com/105273696200535069375></a>  [LinkedIn] <a class="moz-txt-link-rfc2396E" href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><https://fr.linkedin.com/in/simon-fonteneau-b13382b0></a>  [Maps] <a class="moz-txt-link-rfc2396E" href="https://goo.gl/maps/Jbyn8JUpumq"><https://goo.gl/maps/Jbyn8JUpumq></a>

</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <p style="font-family: Helvetica, Arial, sans-serif; font-size:
        10px; line-height: 12px; margin-bottom: 10px;"> <a
          style="text-decoration:none"
          href="https://www.stemarie-aizenay.fr" class="clink
          logo-container"> <img
            src="cid:part1.04080409.01000509@stemarie-aizenay.fr"
            alt="Collège Privé Ste Marie" class="sig-logo" border="0"
            height="91" width="116"> </a> </p>
      <p style="font-family: Helvetica, Arial, sans-serif; font-size:
        10px; line-height: 12px; color: rgb(33, 33, 33); margin-bottom:
        10px;"><span style="font-weight: bold; color: rgb(33, 33, 33);
          display: inline;" class="txt signature_name-target sig-hide">Fonteneau
          Simon</span> <span class="title-sep sep" style="display:
          inline;">/</span> <span style="color: rgb(33, 33, 33);
          display: inline;" class="txt signature_jobtitle-target
          sig-hide">Administrateur Réseaux</span> <span
          class="email-sep break" style="display: inline;"><br>
        </span> <a class="link email signature_email-target sig-hide"
          href="mailto:sfonteneau@stemarie-aizenay.fr" style="color:
          rgb(71, 124, 204); text-decoration: none; display: inline;">sfonteneau@stemarie-aizenay.fr</a><span
          class="signature_email-sep sep" style="display: inline;"> / </span><span
          style="color: rgb(33, 33, 33); display: inline;" class="txt
          signature_mobilephone-target sig-hide">0648761484</span></p>
      <p style="font-family: Helvetica, Arial, sans-serif; font-size:
        10px; line-height: 12px; margin-bottom: 10px;"> <span
          style="font-weight: bold; color: rgb(33, 33, 33); display:
          inline;" class="txt signature_companyname-target sig-hide">Collège
          Privé Ste Marie</span> <span class="company-sep break"
          style="display: inline;"><br>
        </span> <span style="color: rgb(33, 33, 33); display: inline;"
          class="txt office-sep sep">Tel: </span> <span style="color:
          rgb(33, 33, 33); display: inline;" class="txt
          signature_officephone-target sig-hide">0251946200 </span> <span
          style="color: rgb(33, 33, 33); display: inline;" class="txt
          fax-sep sep">/ Fax: </span> <span style="color: rgb(33, 33,
          33); display: inline;" class="txt signature_fax-target
          sig-hide">0251946856</span> <span class="address-sep break"
          style="display: inline;"><br>
        </span> <span style="color: rgb(33, 33, 33); display: inline;"
          class="txt signature_address-target sig-hide">24 route de
          Nantes</span> <span class="address2-sep break"
          style="display: block;"></span> <span style="color: rgb(33,
          33, 33); display: inline;" class="txt
          signature_address2-target sig-hide">85190 Aizenay</span> <span
          class="website-sep break" style="display: inline;"><br>
        </span> <a class="link signature_website-target sig-hide"
          href="https://www.stemarie-aizenay.fr" style="color: rgb(71,
          124, 204); text-decoration: none; display: inline;">https://www.stemarie-aizenay.fr</a>
      </p>
      <p class="social-list" style="font-size: 0px; line-height: 0;
        font-family: Helvetica, Arial, sans-serif;"> <a
          style="text-decoration: none; display: inline;" class="social
          signature_facebook-target sig-hide"
          href="https://www.facebook.com/saintemarieaizenay"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="facebook.png"
            src="cid:part5.03080806.08010409@stemarie-aizenay.fr"
            alt="Facebook" height="16" width="16"></a><span
          style="white-space:nowrap;" class="signature_facebook-sep"><img
            src="cid:part7.07010305.05000100@stemarie-aizenay.fr"
            width="2"></span> <a style="text-decoration: none; display:
          inline;" class="social signature_googleplus-target sig-hide"
          href="https://plus.google.com/105273696200535069375"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="googleplus.png"
            src="cid:part8.00040406.08080605@stemarie-aizenay.fr"
            alt="Google +" height="16" width="16"></a><span
          style="white-space:nowrap;" class="signature_googleplus-sep"><img
            src="cid:part7.07010305.05000100@stemarie-aizenay.fr"
            width="2"></span> <a style="text-decoration: none; display:
          inline;" class="social signature_linkedin-target sig-hide"
          href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="linkedin.png"
            src="cid:part11.00000700.00090006@stemarie-aizenay.fr"
            alt="LinkedIn" height="16" width="16"></a><span
          style="white-space:nowrap;" class="signature_linkedin-sep"><img
            src="cid:part7.07010305.05000100@stemarie-aizenay.fr"
            width="2"></span> <a style="display: inline;
          text-decoration: none;" class="social signature_maps-target
          sig-hide" href="https://goo.gl/maps/Jbyn8JUpumq"><img
            style="margin-bottom:2px; border:none; display:inline;"
            data-filename="maps.png"
            src="cid:part14.02050105.02020205@stemarie-aizenay.fr"
            alt="Maps" height="16" width="16"></a><span
          style="white-space:nowrap;" class="signature_maps-sep"><img
            src="cid:part7.07010305.05000100@stemarie-aizenay.fr"
            width="2"></span>
      </p>
    </div>
  </body>
</html>