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

    Dual NIC clients

    Scheduled Pinned Locked Moved
    Linux Problems
    3
    25
    7.7k
    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.
    • Q
      Quazz Moderator
      last edited by Quazz

      I also tried adding option tftp-server-name X.X.X.X; to my dhcpd config file, but no luck.

      The correct option is next-server X.X.X.X

      That’s probably already correctly set judging by your post.

      Your problem may be resolved by trunk, maybe not, but you’d need to install newer Ubuntu version for it.

      1 Reply Last reply Reply Quote 1
      • T
        tag
        last edited by

        @Quazz - Thanks for the reply.

        You’d be correct in assuming that next-server is set as per default by the FOG installation script.

        If i understand you correctly, your suggestion of trunking would enable the client to connect to the TFTP server on either link? I’d rather not, as the other link is only 100Mbps on some cheap Cisco 2960 SI series.

        Ideally the clients would choose the correct link matching the network ID of the next-server.

        Q Wayne WorkmanW 2 Replies Last reply Reply Quote 0
        • Q
          Quazz Moderator @tag
          last edited by

          @tag You can define wich NIC to use in FOG, so no, it would only use that NIC. Everything else will depend a lot on your network setup so I can’t comment on that.

          1 Reply Last reply Reply Quote 0
          • T
            tag
            last edited by

            @Quazz - Thanks again.

            How do you mean define which NIC to use in FOG? I see only options for setting the server side NIC… Am I missing something here?

            Q 1 Reply Last reply Reply Quote 0
            • Q
              Quazz Moderator @tag
              last edited by

              @tag Sorry, it’s still morning, things got mixed up in my head.

              I think this can only be solved by directing traffic through network control, but I don’t really know enough about it to comment.

              T 1 Reply Last reply Reply Quote 0
              • T
                tag @Quazz
                last edited by

                @Quazz said in Dual NIC clients:

                Sorry, it’s still morning, things got mixed up in my head.

                LOL, tank up on your morning stimulant of choice…

                1 Reply Last reply Reply Quote 0
                • T
                  tag
                  last edited by

                  OK - did some thinking. It times out because there is no default gateway set on the secondary link. Setting that it will connect. The problem is, how do I know which network it chooses? I’m getting inconsistent transfer speeds now, average of 5GB/min versus 225MB/min - apparently depending on which NIC it connects through.

                  I should mention that inter-VLAN routing is enabled on the layer 3 switch of the primary network. Removing the secondary network from the static route list or pulling the physical link kills it again - this time at trying to send an inventory before deploying.

                  If I pull the power on the secondary network they will all deploy at high speeds.
                  With the secondary network on (and inter-VLAN routing), some will deploy normally, others slowly - apparently arbitrarily, as the same machines will act differently from task to task.
                  It would seem the kernel arbitrarily sets which NIC is eth0 from boot to boot? That would perhaps explain why it would appear to use different NICs.

                  If I pull the plug on the secondary network while deploying it stops deploying until plugged back in. So it’s using the “wrong” NIC…

                  Anyone ever see something like this?

                  Q 1 Reply Last reply Reply Quote 0
                  • Q
                    Quazz Moderator @tag
                    last edited by Quazz

                    @tag Is it arbitrarily? If you try the same PC over and over does it report different speeds?

                    I think it has to do with the order your system reports the NICs in. If it reports the slower NIC first it will use that. Perhaps that’s something you can alter on your end?

                    1 Reply Last reply Reply Quote 0
                    • T
                      tag
                      last edited by tag

                      @Quazz
                      Yes, sometimes an image will deploy at 5GB/min - a few minutes later when trying again with the same client it will only deploy at a fraction of that speed…

                      Otherwise I agree; I too believe it has to do with the order of the NICs.

                      I tried swapping the cables at first to see if it just chose one specific hardware ID first, but that was not the case.

                      Since then I’ve done quite a few test deployments on the same eigth machines. Mostly they’ll deploy slowly, but every now and again one will run on the faster NIC, which can be verified by pulling the cables and seeing which one makes it pause.

                      I’m not saying it’s arbitrary, but I don’t see a pattern so it seems arbitrary to me. 😉

                      Q 1 Reply Last reply Reply Quote 0
                      • Q
                        Quazz Moderator @tag
                        last edited by

                        @tag Are you using quick image?

                        Might be possible to tell it to use the faster NIC by registering them, assigning the faster NIC as primary NIC and deploying in that manner, but I really can’t be certain on that, I was kind of hoping someone else would chime on in on this, heh.

                        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                        • T
                          tag
                          last edited by tag

                          @Quazz
                          No, they are registered and deployed through tasks. Actually it’s not a question of one NIC being faster than the other - they’re more or less identical mobo dual NICs - as it is the link speed. They’re 100Mbps switch ports on a 100Mbps trunk to the layer 3 switch. It was never intended for large data transfers - just remote access and so on.

                          The primary MAC in the host registration is the faster link, so that has no effect, I’m afraid. These are 1Gbps switch ports for the clients and two ports in ether channel for the server.

                          1 Reply Last reply Reply Quote 0
                          • Wayne WorkmanW
                            Wayne Workman @tag
                            last edited by

                            @tag said in Dual NIC clients:

                            If i understand you correctly, your suggestion of trunking would enable the client to connect to the TFTP server on either link?

                            No, the developmental version of fog is called “fog trunk”.

                            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!
                            Daily Clean Installation Results:
                            https://fogtesting.fogproject.us/
                            FOG Reporting:
                            https://fog-external-reporting-results.fogproject.us/

                            1 Reply Last reply Reply Quote 1
                            • Wayne WorkmanW
                              Wayne Workman @Quazz
                              last edited by Wayne Workman

                              @Quazz do we know of any linux kernel arguments that specify only using a particular nic, or disabling a particular nic?

                              Maybe even a custom kernel could be an answer? Or custom init?

                              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!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

                              Q 1 Reply Last reply Reply Quote 0
                              • Q
                                Quazz Moderator @Wayne Workman
                                last edited by

                                @Wayne-Workman The problem is, what arguments can we use to differentiate? It sounds like they’re basically identical NICs connecting to different network outlets, probably getting inconsistent names as well. (based on his results)

                                https://www.kernel.org/doc/Documentation/kernel-parameters.txt

                                Scroll down to grcan.enable0

                                Looks like those options are useful?

                                Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                                • Wayne WorkmanW
                                  Wayne Workman @Quazz
                                  last edited by

                                  @Quazz very nice. I read it’s description, but the one below it caught my eye:

                                  grcan.select= [HW] Select which physical interface to use. Format: 0 | 1 Default: 0

                                  So perhaps try this for the host’s kernel arguments (web gui -> host management -> desired host -> kernel arguments)

                                  grcan.select=1

                                  See what happens?

                                  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!
                                  Daily Clean Installation Results:
                                  https://fogtesting.fogproject.us/
                                  FOG Reporting:
                                  https://fog-external-reporting-results.fogproject.us/

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tag
                                    last edited by

                                    @Quazz and @Wayne-Workman

                                    Thanks for the suggestions.

                                    I tried playing around with grcan.enable0=[0|1] and grcan.enable1=[0|1] as well as grcan.select=[0|1] but none had any effect. The kernel continues to choose the slower link in most cases. Seemed promising, though…

                                    What I do notice for the first time, though, is that whatever NIC is not chosen is disabled. I hadn’t noticed as I can’t see the backs of the boxes very well. Here it is also obvious that the active NIC changes on occasion, as the LEDs die on the disabled NIC.

                                    Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                                    • Wayne WorkmanW
                                      Wayne Workman @tag
                                      last edited by Wayne Workman

                                      @tag I think you’re going to have to build a custom init. You can change the fog.upload and fog.download scripts. The idea would be to use shell script to determine which interface is on the right network, and then disable the other interface (or enable it). It should be pretty simple.

                                      How experienced are you with shell scripting?

                                      Also, here’s a link on how to unpack and re-pack the inits:
                                      https://wiki.fogproject.org/wiki/index.php?title=Build_FOG_file_system_with_BuildRoot

                                      I’m willing to help do this - but I wouldn’t have time until tonight to mess with 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!
                                      Daily Clean Installation Results:
                                      https://fogtesting.fogproject.us/
                                      FOG Reporting:
                                      https://fog-external-reporting-results.fogproject.us/

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        tag
                                        last edited by tag

                                        @Wayne-Workman

                                        Thanks for the reply.

                                        Seems kind of inflexible, though… The same init is used for all, right? We even have some clients with three NICs at other locations… If it has to take various hw scenarios into account, it might take some fancy scripting.

                                        I know some basic scripting but nothing really fancy.

                                        The only way to determine the correct interface would be to filter on IP, as I see it.

                                        So maybe a list of interfaces and then for each ethX in the list:

                                        #!/bin/csh
                                        
                                        set nwid = X.X.X
                                        set list = (eth0 eth1)
                                        
                                        foreach eth ($list)
                                          set ip = `ifconfig $eth | grep inet | awk '{print $2}' | sed 's/addr://' | cut -c-10 `
                                          if ($ip == $nwid) then
                                              ifup $eth else
                                              ifdown $eth
                                          endif
                                        end
                                        

                                        That would in my case get the network ID of the correct network and other disimilar outputs from the other interfaces in the list which could then be compared to a set value of the correct network ID. Based on that comparison you could then turn on or off the interfaces.

                                        I’m sure someone else could do something a lot niftier.

                                        I haven’t tested any of this and it might screw up if the number of interfaces actually present is different from the number in the list.

                                        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                                        • Wayne WorkmanW
                                          Wayne Workman @tag
                                          last edited by

                                          @tag You’ve got the right idea - but that specific code is inflexible.

                                          Tonight I’ll put something together that will take the IPs, and the subnet mask, and calculate the subnet ID and use that for comparison.

                                          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!
                                          Daily Clean Installation Results:
                                          https://fogtesting.fogproject.us/
                                          FOG Reporting:
                                          https://fog-external-reporting-results.fogproject.us/

                                          1 Reply Last reply Reply Quote 0
                                          • T
                                            tag
                                            last edited by

                                            @Wayne-Workman
                                            Thanks again.

                                            Yes, that code will only work on the specific network defined in $nwid and if the kernel names the interfaces ethX and probably only if the number of interfaces match that particular piece of hw…

                                            Mighty nice of you to help me out here… Appreciate it.

                                            Thanks.

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

                                            247

                                            Online

                                            12.1k

                                            Users

                                            17.3k

                                            Topics

                                            155.3k

                                            Posts
                                            Copyright © 2012-2024 FOG Project