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

Support for multiple nics / subnets

Scheduled Pinned Locked Moved
Feature Request
4
28
11.0k
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.
  • Y
    Yusuf
    last edited by Apr 20, 2012, 7:32 PM

    A way to setup fog with the IP addresses of all the nics.

    Maybe add an extra layer / check to see which subnet the client is from and amend fog’s IP to the correct subnet accordingly. This would make this immensely more efficient.

    As it stands a fog server has to be built for each and every subnet.

    If there’s a way to hack around this I’m all ears 🙂

    1 Reply Last reply Reply Quote 0
    • F
      falko Moderator
      last edited by Apr 21, 2012, 9:56 AM

      [quote=“Yusuf, post: 2973, member: 951”]A way to setup fog with the IP addresses of all the nics.

      Maybe add an extra layer / check to see which subnet the client is from and amend fog’s IP to the correct subnet accordingly. This would make this immensely more efficient.

      As it stands a fog server has to be built for each and every subnet.

      If there’s a way to hack around this I’m all ears :)[/quote]

      I have FOG deployed in my school and use multiple vlans/subnets, I have FOG box in Staff Vlan and both Student and STaff can be imaged/multicast too

      1 Reply Last reply Reply Quote 0
      • Y
        Yusuf
        last edited by Apr 21, 2012, 2:42 PM

        Hi Falko,

        To confirmed you have [B]One[/B] fog server serving both subnets or [B]Two[/B] servers?

        If One, could you describe the the setup?

        If say the fog IP is set to 192.168.1.0/24 and student machines are on 192.168.2.0/24, how are you able to image the student machines? Doesn’t it fail once you get past the menu’s and you select an action? e.g quick reg / imaging etc.

        1 Reply Last reply Reply Quote 0
        • F
          falko Moderator
          last edited by Apr 21, 2012, 4:34 PM

          Yes I have one FOG Server, serving both subnets. I am using vlans with cisco switching, enabled distributed multicast routing on the switches.

          what network gear are you using? do you use vlans? can both subnets see the fog menu? what happens if they can?

          check [url]http://fogproject.org/forum/threads/wiki-troubleshooting-multicast.22/[/url]

          1 Reply Last reply Reply Quote 0
          • Y
            Yusuf
            last edited by Apr 21, 2012, 4:45 PM

            Great info, we’re using simple netgear switches, I think the problem is I’ve overthought this, I’ve an automated image pulled via a menu selection and have just realised that this has the IP address of fog hard coded, this must be why imaging fails on other subnets.

            Thanks for your help, I will do some more testing 🙂

            1 Reply Last reply Reply Quote 0
            • Y
              Yusuf
              last edited by Apr 22, 2012, 6:34 PM

              The “bypass host registration” entry I had with hard coded IPs didn’t work when I copied and changed for the other subnet.

              Menu entries appear, but doing any action just causes it to hang, e.g. doing a full host registration, it correctly see’s the hard disk, then says “Starting host registration…” and just stays like that for a long while, then it comes back with the specs, and attempts to send and hangs for longer.

              On the default subnet this works as expected and no hangs.

              Fog’s default IP is on subnet one, the test machine is on subnet two.

              Falko, can you tell me how you initially setup fog, specifically the IP / networking portion when going through the script.

              1 Reply Last reply Reply Quote 0
              • R
                rado
                last edited by Jan 16, 2014, 2:04 PM

                I would like to reopen this as I think it’s better than creating new topic (if not, feel free to move it).

                As far as I understood from reading this forum, there are 2 ways for FOG supporting multiple subnets:
                [LIST=1]
                []1 FOG server and allowing traffic to it from other subnets
                [
                ]1 master FOG server and several nodes per subnet
                [/LIST]
                Suppose I can’t go (I’m not saying that I can’t, but say I can’t) or don’t want to go either of them. So there is this 3rd way - making FOG able to work for multiple nics (virtual or physical). How much work and how hard would it be to accomplish this? I know a bit of php, mysql, shell scripting, so I would help or try to make it myself if it’s not too much of remaking of FOG. I will have maybe 1 or 2 weeks for this.

                1 Reply Last reply Reply Quote 0
                • F
                  falko Moderator
                  last edited by Jan 16, 2014, 4:25 PM

                  I can’t answer that question but for those reading this option one from above is the easiest. Just need a layer 3 switch to do the vlan routeing.

                  Also to answer Yusuf’s question ( I know it was long ago) I simply gave it all the ip settings of the vlan the server was in. And let the switches do the rest

                  1 Reply Last reply Reply Quote 0
                  • R
                    rado
                    last edited by Jan 17, 2014, 2:22 PM

                    I started to explore FOG’s code and now I think I understand which parts are involved in creating multicast task. So I decided to try it. My idea is to associate groups with interfaces (probably by adding new column to table groups, called say “interface”) and then use existing code - function createMulticastJob used in /var/www/management/includes/tasks.confirm.include.php, which has now (in FOG 0.32) set parameter $eth to “null” (change this that the parameter would be set according to group’s interface). And updating /opt/fog/service/common/lib/MulticastTask.class.php accordingly.

                    What do you think? Do you see better/easier way? Or do you see any problems doing this? I would like to make it as simple as possible (because of time constraints) and change as little as is needed to have FOG be able to run multiple (ideally simultaneous) multicast tasks. But would like to see opinions/thoughts of anybody who is interested - to make the changes as widely usable as possible. But bear in mind that I’m not as much experienced in php and mysql and have just 1 or 2 weeks.

                    Does anybody see problems with simultaneous multicast session (sitting on different interfaces and perhaps different ports(?))? Or with any other part (processes) involved?

                    What about new FOG version (0.33)? Are there any changes in code affecting multicast tasks?

                    Thanks.

                    1 Reply Last reply Reply Quote 0
                    • R
                      rado
                      last edited by Jan 17, 2014, 3:53 PM

                      So, small progress. I was able to change FOG to create 2 simultaneous multicast tasks with different interfaces and base ports (but didn’t test it yet). I changed FOGMulticastManager to query interface from db (added column groupInterface to groups table and updated my groups with interface) instead of from /opt/fog/service/etc/config.php. And changed /var/www/fog/commons/functions.include.php (added function getGroupsInterface( $conn, $taskName )) and /var/www/fog/management/includes/tasks.confirm.include.php (lines for getting groups interface and adding this interface to function createMulticastJob).

                      Just wanted to know if my initial idea would work. If somebody is interested, feel free to comment. No time today, will continue next week.

                      1 Reply Last reply Reply Quote 0
                      • T
                        Tom Elliott
                        last edited by Jan 19, 2014, 5:46 AM

                        rado,
                        Unless there’s a particular reason, can you test out 0.33b code? I got multicast tasks working. I can create multiple tasks, though I haven’t played too much with interfaces. I imagine, however, with my new understanding, it’s relatively easy to setup. The only issue I foresee is the storage of the “2nd” interface would have to be either group and/or host related. This is because in 0.33, you can create individual multicast jobs to a host. I haven’t, yet, figured out how to kill a previously generated task and recreate a new one (while also changing the task and pxe files) to reflect the new change. The port would still work as the original task would have been used.

                        I believe the issue you were initially running into was because the ports were all the same. It wouldn’t matter, as far as I can tell, if two interfaces were using the same port, which is why you had to create different ports. The same port was causing your issue, not the interface.

                        I Imagine that you’d only need two interfaces, or more, if you’re trying to separate different segments of the network for testing or some real major need. However, it’d be easier (and you could use the same ports, though it may confuse systems trying to communicate on that/those ports) to setup two separate server rather than trying to make your server perform all the work.

                        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
                        • R
                          rado
                          last edited by Jan 20, 2014, 1:27 PM

                          Hi Tom, yes, I can. I have no special reason to change 0.32 code, just had it installed and didn’t know how usable is 0.33. So, I try it. I’m not sure with some of your sentences, but maybe I should first take look at the changes and then I ask.
                          How far are you from proper release of 0.33 (I don’t know the right name, is it beta?, but hope you understand)?

                          Can you pleas tell me which svn link should I use? I found these 3:
                          [url]https://svn.mastacontrola.com/svn/freeghost[/url]/ but it says it’s revision 1
                          [url]https://svn.mastacontrola.com/p/freeghost/code/trunk/[/url] says revision 1117
                          [url]https://svn.code.sf.net/p/freeghost/code/trunk[/url] says 1118

                          1 Reply Last reply Reply Quote 0
                          • T
                            Tom Elliott
                            last edited by Jan 20, 2014, 1:33 PM

                            svn.mastacontrola.com/svn/freeghost, (That was when I first created my svn server.) (DO NOT USE THIS ONE.)
                            svn.mastacontrola.com/p/freeghost/code/trunk (Syncs every hour, and I just released r1118, so it may not have synced yet.) You can use it, but I would use:

                            svn.code.sf.net/p/freeghost/code/trunk (DING DING DING DING, Use this one for the most accurate.)

                            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
                            • R
                              rado
                              last edited by Jan 20, 2014, 4:17 PM

                              So, I have FOG 0.33 running. Now I’m uploading image (because I accidentally deleted previous one). Tomorrow will test multicast - should I test something concrete regarding multicast?

                              [quote=“Tom Elliott, post: 21567, member: 7271”]The only issue I foresee is [B]the storage[/B] of the “2nd” interface would have to be either group and/or host related. This is because in 0.33, you can create individual multicast jobs to a host. I haven’t, yet, figured out how to kill a previously generated task and recreate a new one (while also changing the task and pxe files) to reflect the new change. The port would still work as the original task would have been used.[/QUOTE]

                              Are you talking about storage node? Or?

                              [quote=“Tom Elliott, post: 21567, member: 7271”]
                              I believe the issue you were initially running into was because the ports were all the same. It wouldn’t matter, as far as I can tell, if two interfaces were using the same port, which is why you had to create different ports. The same port was causing your issue, not the interface.

                              I Imagine that you’d only need two interfaces, or more, if you’re trying to separate different segments of the network for testing or some real major need. However, it’d be easier (and you could use the same ports, though it may confuse systems trying to communicate on that/those ports) to setup two separate server rather than trying to make your server perform all the work.
                              [/quote]

                              What do you mean by this issue? I don’t have problems with ports, just wanted to get fog running on 2 or more ifaces.

                              1 Reply Last reply Reply Quote 0
                              • R
                                rado
                                last edited by Jan 31, 2014, 10:44 AM

                                Originally mistakenly posted to “Latest FOG 0.33b” topic.

                                Hi. So I decided not to work on multiinterface patch - because of time and because there is too much change on 0.33 now and haven't time to figure out which code is involved. So I will postpone it for now.
                                 
                                If you would have time, Tom (or anybody who has some idea about it), to write down the internals of multicasting in FOG 0.33 - which parts of code are involved (I think it should be enough which classes and scripts (just file names) - I think I would be able to understand the logic when I have an idea where to start from. If not, I will ask :) ), it would be really good - I will look here occasionally.
                                1 Reply Last reply Reply Quote 0
                                • Tom ElliottT
                                  Tom Elliott
                                  last edited by Jan 31, 2014, 11:56 AM

                                  The multicast works based on three areas.

                                  The first part: (The actual classes)
                                  MulticastSessions.class.php (Just to create the actual session for use. Multiple or individual system.)
                                  MulticastSessionsManager.class.php (Just the manager for finding/obtaining the sessions.)
                                  MulticastSessionsAssociation.class.php (Used for the host/task relationship, Number of pc’s in tasking are counted through this. Associates the Session with the Tasks and Hosts.)
                                  MulticastSessionsAssociationManager.class.php (Just to help find which tasks are part of a specific session.)
                                  MulticastTask.class.php (Used to actually generate the command, kill the task when complete, update relevant fields as necessary.)
                                  Host.class.php (The function createImagePackage() actually generates the package so hosts can operate as with any other tasking generated, but has separated methods to deal with multicast vs. unicast.)

                                  That’s pretty much it. It looks like a lot, but it really isn’t. The main files you’ll need to work with are:
                                  MulticastSessions.class.php (To generate the session based on interface)
                                  MulticastSessionsAssociation.class.php (So you can assign hosts/groups with a specific interface, this links the session with the tasking.)
                                  MulticastTask.class.php (Really just to make sure the interface setting is where you need it.)

                                  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
                                  • R
                                    rado
                                    last edited by Feb 3, 2014, 3:54 PM

                                    Thanks much Tom. I will look at it when time permits (I suppose in few weeks).

                                    [quote=“Tom Elliott, post: 22323, member: 7271”]The multicast works based on three areas.
                                    The first part: (The actual classes)
                                    [/quote]

                                    What’s the second part, is there any? Thanks.

                                    1 Reply Last reply Reply Quote 0
                                    • Tom ElliottT
                                      Tom Elliott
                                      last edited by Feb 3, 2014, 4:03 PM

                                      Yeah,

                                      The classes are all separated into their own parts.

                                      First Part: (These files handle the sessions generated.)
                                      MulticastSessions.class.php
                                      MulticastSessionsManager.class.php

                                      Second Part: (These files associate the Task to the Session based on the Image)
                                      MulticastSessionsAssociation.class.php
                                      MulticastSessionsAssociationManager.class.php

                                      Third Part: (These files deal with Task Creation and Command Creation:
                                      Host.class.php (The function createImagePackage generates the taskings.)
                                      MulticastTask.class.php (This file creates the command line and handles the stuff on the server.)

                                      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
                                      • R
                                        rado
                                        last edited by Feb 3, 2014, 4:06 PM

                                        Ok, thanks.

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          rado
                                          last edited by Jul 3, 2014, 1:20 PM

                                          So, finally I’ve time to look at this again. I decided that I at first try to tinker with interface settings. But I can’t find right setting which affects udp-sender’s interface - I tried settings in FOG Configuration (FOG_WOL_INTERFACE, FOG_UDPCAST_INTERFACE, FOG_NFS_ETH_MONITOR), in Storage Management and in /var/www/fog/lib/fog/Config.class.php, and some combinations of these, but nothing works.

                                          What’s the right way to change it? Is there some other setting I missed?

                                          Thanks.

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

                                          244

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project