• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    FOG 1.2.0 - WOL on multiple VLANs

    Scheduled Pinned Locked Moved
    FOG Problems
    4
    30
    13.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Fernando Gietz Developer
      last edited by

      I think that make a wakeOnLan plugin will be a good solution. If you want, I can develope it … I need it 🙂

      It’s easy, and the code changes are littles. The “big” problem is how manage the different broadcast directions. Actually, those relationships are “saved” in the code.

      [PHP]function wakeOnLan( $mac, $ipHost=null)
      {
      if ($ipHost != null)
      {
      list($ip1, $ip2, $ip3, $ip4) = explode(“.”, $ipHost);
      $subnet=$ip1 . “.” . $ip2 . “.” . $ip3;

                  if ( getSetting( $conn, "FOG_WOL_BCAST" ) == "" )
                          switch ($subnet) {
      

      ##########################################################################
      ####### Here you must to write the broadcast IPs
      ##########################################################################
      case “10.227.34”: $ipBroadcast = “10.227.35.255”; break;
      case “10.227.84”: $ipBroadcast = “10.227.87.255”; break;
      case “10.227.85”: $ipBroadcast = “10.227.87.255”; break;
      case “10.227.15”: $ipBroadcast = “10.227.15.31”; break;
      #########################################################################
      default: $ip = $ip1 . “.” . $ip2 . “.” . $ip3 . “.” . “255”;
      // default: $ipBroadcast = “255.255.255.255”;
      } else $ipBroadcast = getSetting( $conn, “FOG_WOL_BCAST” );
      …
      [/PHP]

      I would like manage them from the webUI

      1 Reply Last reply Reply Quote 0
      • J
        Jacob Gallant
        last edited by

        [quote=“Fernando Gietz, post: 37878, member: 13”]We may match the IP address with the broadcast address of the subnet. We put this relationship into wakeOnLan function, isn’t the best solution, but works.[/quote]

        Fernando - just wondering where you would get the IP address you’re referring to? Just given that computers can and do change subnets fairly often in our environment, so the last IP of the workstation isn’t necessarily correct.

        1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott
          last edited by

          The idea of the “plugin” would be to create a management page for WOL that you simply specify the broadcast addresses you need.

          If you guys want to try:

          maybe edit the 255.255.255.255 part of the WakeOnLan .class.php file and put it to your broadcast as in the post above?

          (10.155.255.255) and see if that works?

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • F
            Fernando Gietz Developer
            last edited by

            This IP is the IP of the host, and you can get it from the DB. In the hosts table, there is a atribute hostIP.

            From “Create new host” submenu in the webUI you can not enter the IP address , but if you import the computers, you can enter the IP address.

            For example:
            Host 1: IP 10.227.15.25 -> subnet direction: 10.227.15 -> broadcast IP is 10.227.15.31 (and not 10.227.15.255, with this direcction doesn’t work)

            You can test the Tom’s solution 🙂

            1 Reply Last reply Reply Quote 0
            • F
              Fernando Gietz Developer
              last edited by

              [quote=“Tom Elliott, post: 37895, member: 7271”]The idea of the “plugin” would be to create a management page for WOL that you simply specify the broadcast addresses you need.

              If you guys want to try:

              maybe edit the 255.255.255.255 part of the WakeOnLan .class.php file and put it to your broadcast as in the post above?

              (10.155.255.255) and see if that works?[/quote]

              It works 🙂 . I change the broadcast 255.255.255.255 to 10.227.15.31

              1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott
                last edited by

                If my suggestion works, we won’t have to change much and I can build in default and plugin style commands to loop through the vlans.

                We don’t use the IP field any more in FOG 1.x.x, though it is still present.

                The nice part about building a plugin for handling this is it makes a place to edit changes down the road, and values can be stored in the DB allowing for “upgrades” to keep the settings you set rather than having to recode a specific file every time you update.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • J
                  Jacob Gallant
                  last edited by

                  [quote=“Tom Elliott, post: 37895, member: 7271”]The idea of the “plugin” would be to create a management page for WOL that you simply specify the broadcast addresses you need.

                  If you guys want to try:

                  maybe edit the 255.255.255.255 part of the WakeOnLan .class.php file and put it to your broadcast as in the post above?

                  (10.155.255.255) and see if that works?[/quote]

                  We actually did try this last week and it did work with a single VLAN broadcast IP. We then attempted to add in all of our VLAN broadcast IPs directly (copying and pasting the if statement) but that didn’t work, unsurprisingly.

                  If, as you mentioned in your last post, there was a mechanism to loop through all broadcast IPs specified in a plugin that would be ideal.

                  1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott
                    last edited by

                    That’s what I’m working on right now, a prototype of sorts to attempt this.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • Tom ElliottT
                      Tom Elliott
                      last edited by

                      2426 pushed.

                      I don’t quite know if it will work for you, but the plugin Fernando and I were talking about has been created. The WakeOnLan takes this into consideration as well and iterates through the broadcast addresses and recreates the sockets.

                      To install, upgrade just like you normally would.

                      You’ll likely need to update db as you’re coming from 1.2.0 rather than a 2403 and up svn revision. Once you upgrade, you will not be able to retrograde, AND if you upgrade, if you have separate nodes, they’ll all need to be at least at that level or higher. So please take this into consideration.

                      If you understand and are able to continue on, please do so.

                      To install the plugin, go to FOG Configuration page -> FOG Settings -> Plugin settings, and check the checkbox to enable installing of plugins.

                      Once saved, you’ll see a new icon in the menu. It should look like a gear. Click on it
                      Go to active plugins
                      Choose the one with the plug icon.
                      Click on it to “activate” it
                      Go to installed plugins.
                      Click on it and it should ask you to install
                      Click the submit and you should be good there along with another new menu entry.

                      The new menu entry will have the same icon as that of what you clicked to install the plugin.
                      Click on it and add your entries.

                      Have fun as this method seems to work now.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jacob Gallant
                        last edited by

                        Sounds promising! Is there any quick and easy way to check my current svn revision? Although I’m sure you’re correct that below 2403.

                        And follow this for upgrading? (I’m a first timer!): [url]http://www.fogproject.org/wiki/index.php/SVN[/url]

                        1 Reply Last reply Reply Quote 0
                        • Tom ElliottT
                          Tom Elliott
                          last edited by

                          Right.

                          If your “cloud” displays 1.2.0, you’re on a “stable” release.

                          If your “cloud” displays 2205 or something like that, you’re already on svn.

                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jacob Gallant
                            last edited by

                            Perfect, thanks. I’ll post back with my results.

                            [COLOR=#ff0000]EDIT: As this is a production installation and it’s needed over the next few days, I’ve scheduled the upgrade for Monday morning. If anyone else experiencing the same issue does the upgrade before and has success, feel free to post so others are aware (although judging by Tom’s posts it looks good!)[/COLOR]

                            1 Reply Last reply Reply Quote 0
                            • J
                              Jacob Gallant
                              last edited by

                              Revision upgrade (ended up at 2432) and using the plugin did the trick. Thanks for everything!

                              1 Reply Last reply Reply Quote 0
                              • J
                                Jeroen Brussich
                                last edited by

                                Let’s bump an old topic 🙂

                                Do I have to tag my FOGserver in all VLANS in order to get this plugin working?
                                And configure all VLANS on my FOGserver?

                                /etc/network/interfaces
                                
                                eth0.1 (default vlan)
                                
                                eth0.100 (vlan 100)
                                
                                eth0.1000 (vlan 1000)
                                
                                Tom ElliottT 1 Reply Last reply Reply Quote 0
                                • Tom ElliottT
                                  Tom Elliott @Jeroen Brussich
                                  last edited by

                                  @Jeroen-Brussich said:

                                  Let’s bump an old topic 🙂

                                  Do I have to tag my FOGserver in all VLANS in order to get this plugin working?
                                  And configure all VLANS on my FOGserver?

                                  /etc/network/interfaces
                                  
                                  eth0.1 (default vlan)
                                  
                                  eth0.100 (vlan 100)
                                  
                                  eth0.1000 (vlan 1000)
                                  

                                  No.

                                  The WOLBroadcast plugin just needs your networks broadcast addresses specified. Once specified, you will likely need udp-directed-broadcast enabled on your switches. After that, fog will send WOL packet to each of the broadcast addresses.

                                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 1
                                  • 1
                                  • 2
                                  • 2 / 2
                                  • First post
                                    Last post

                                  176

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project