Veyon Community Forum

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

    Little WOL issue

    Help & Troubleshooting
    2
    9
    211
    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.
    • B
      Bug91 last edited by

      Hi,

      I think I've found a little bug with the WOL implementation/I would like to suggest a little improvement :).

      I'm currently testing veyom for a classroom where PCs have two network interfaces. The classroom data are imported from our Microsoft AD. I have configured a script to add all MAC-addresses from our DHCP server to a AD-attribute (extensionData). The AD shows me the data as follows.
      2f024b18-35f3-4f3c-832b-cabdf2930e43-image.png

      If I now try to wake those PCs, only the first MAC address in this attribute gets a magic packet send. All other MAC addresses get ignored:
      5d93c9e2-d3b8-4d87-b908-1dcc92ee11d5-image.png
      In addition it seems that the AD stores the different MAC addresses in descending order. Therefore the WOL works only, if the LAN interface has the higher MAC address.

      Would it be possible to extend Veyon to send magic packets to all MAC addresses stored in AD? If so can I help somewhere?

      I 1 Reply Last reply Reply Quote 0
      • I
        ITGuy @Bug91 last edited by

        @bug91

        Two wired network interfaces?

        1 Reply Last reply Reply Quote 0
        • B
          Bug91 last edited by

          No: I'm getting the MAC-Adresses from our DHCP server for the import into the AD. Ad I have only the machine name I cannot distinguish between wired and wireless IPs. Therefore sometimes I have two MAC addresses.

          I 1 Reply Last reply Reply Quote 0
          • I
            ITGuy @Bug91 last edited by

            @bug91

            AD doesn’t normally store MAC address info.

            You could pull the IP from DHCP and query each machine directly using the Win32_NetworkAdapter class to determine the adapter’s NetConnectionID. Probably best to use a GP startup script though so you obtain the MAC address at power on.

            Have the script populate the AD attribute only if the connection ID is Ethernet and not Wi-Fi.

            As a test use Notepad to create a .vbs file with the following code:

            strComputer = "."
            Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
            Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter")

            For Each objItem in colItems
            If objItem.NetConnectionID <> "" Then
            Wscript.Echo "Name: " & objItem.Name
            Wscript.Echo "Description: " & objItem.Description
            Wscript.Echo "AdapterType: " & objItem.AdapterType
            Wscript.Echo "MACAddress: " & objItem.MACAddress
            Wscript.Echo "NetConnectionID: " & objItem.NetConnectionID
            End If
            Next

            Double-click to run the .vbs file.

            B 1 Reply Last reply Reply Quote 0
            • B
              Bug91 @ITGuy last edited by

              @itguy

              Hi,

              at first: thank you for sharing your ideas.
              I've run the script but the there is no markable difference between wired, wireless or e.g. Blutooth or VM-Networks:

              e.g.:
              Name: Intel(R) Ethernet Connection (2) I219-LM
              Description: Intel(R) Ethernet Connection (2) I219-LM
              AdapterType: Ethernet 802.3
              MACAddress: D8:9E:F3:...
              NetConnectionID: Ethernet

              Name: Realtek PCIe GbE Family Controller
              Description: Realtek PCIe GbE Family Controller
              AdapterType: Ethernet 802.3
              MACAddress: 00:13:3B:...
              NetConnectionID: Ethernet 2

              Name: Realtek PCIe GbE Family Controller
              Description: Realtek PCIe GbE Family Controller
              AdapterType:
              MACAddress:
              NetConnectionID: Ethernet 3

              Name: Intel(R) Wireless-AC 9260 160MHz
              Description: Intel(R) Wireless-AC 9260 160MHz
              AdapterType: Ethernet 802.3
              MACAddress: B4:6B:FC:...
              NetConnectionID: WLAN

              Name: PANGP Virtual Ethernet Adapter #2
              Description: PANGP Virtual Ethernet Adapter
              AdapterType: Ethernet 802.3
              MACAddress: 02:50:41:...
              NetConnectionID: Ethernet 4

              Name: Bluetooth Device (Personal Area Network)
              Description: Bluetooth Device (Personal Area Network)
              AdapterType: Ethernet 802.3
              MACAddress: B4:6B:FC:...
              NetConnectionID: Bluetooth-Netzwerkverbindung

              I tried by myself using this script (this is powershell):

              $leases = Get-DhcpServerv4Lease -ScopeId 192.168.100.0;
              Foreach ($lease in $leases)
              {
              Get-AdObject -LdapFilter ("(dNSHostName="+($lease.HostName)+")") | Set-ADObject -add @{"extensionData"=($lease.ClientID)}
              }

              I run this script every night on our Domain-Controller which is also our DHCP server. For PCs which have/had more than one interface on our DHCP-Server I get the issue described above.

              I 1 Reply Last reply Reply Quote 0
              • I
                ITGuy @Bug91 last edited by

                @bug91

                If I remember correctly VMs will likely not show Wi-Fi.

                The machine you referenced seems to have two wired and one wireless network interfaces.

                If I understand correctly you wish to have the AD attribute ‘extensionData’ populated with the MAC address of the wired connection only. This information is being pulled from DHCP but the problem is more than one MAC address is being retrieved and for WoL purposes you would prefer receiving only the MAC address for the wired interface.

                As a workaround you suggested the developer accommodate your situation by modifying Veyon to broadcast WoL packets for all MAC addresses stored in LDAP/AD.

                My suggestion is to not use DHCP but instead a GP startup script that stores the MAC address of each computer interface having a NetConnectionID of ‘Ethernet’ into the ‘extensionData’ attribute of the machine account. This way you get the single MAC address you require for Wake-on-LAN.

                If you’re using a multi-homed setup across networks or VLANs then things get more complicated.

                B 1 Reply Last reply Reply Quote 0
                • B
                  Bug91 @ITGuy last edited by

                  @itguy

                  If I remember correctly VMs will likely not show Wi-F

                  Unfortunately this is not correct for at least VirtualBox interfaces.

                  As a workaround you suggested the developer accommodate your situation by modifying Veyon to broadcast WoL packets for all MAC addresses stored in LDAP/AD.

                  My suggestion is to not use DHCP but instead a GP startup script that stores the MAC address of each computer interface having a NetConnectionID of ‘Ethernet’ into the ‘extensionData’ attribute of the machine account. This way you get the single MAC address you require for Wake-on-LAN.

                  I had this ides, as I was not sure if this is an easy-to-implement feature or if this requires more work.
                  I usually try to avoid using startup scripts as more and more scripts slow down the system-startup and I try to have the systems as fast as I can. Therefore I had the idea of asking our DHCP server.
                  Another scenario I came across is that some docking stations we are currently using have a different mac to the inbuild lan-port of our laptops. In this scenario I need to find a way to differenciate between the dock and the internal lan-port and additionally have to determine for which connection I require WOL-functionality more.

                  I use a multi-homed environment but that's a thing the login-script must deal with.

                  Thank you for your support.

                  I 1 Reply Last reply Reply Quote 0
                  • I
                    ITGuy @Bug91 last edited by

                    @bug91

                    I believe VMWare by default uses a NetConnectionID different from ‘WiFi’, it depends on how the VM is networked. For that matter the connection ID could be set manually as is sometimes done for the MAC address. For scripting purposes you would want to find the connection name being used or set a name of your own.

                    Newer port extenders (USB-C) often provide network support and will have their own MAC address. Vendors are providing BIOS updates that allow overriding the dock MAC address with a system specific MAC address. As long as the PCs and docks are from the same manufacturer you stand a good chance of providing a single MAC address to the network irrespective of the extender being connected.

                    I assume you make use of Group Policy processing so extracting the preferred MAC address does not need to be implemented as a startup script. This could be done by a GP scheduled task or an immediate task at the set refresh interval. This could also be accomplished by “tapping” an existing scheduled task running a common script from a shared network folder.

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      Bug91 @ITGuy last edited by

                      @itguy
                      Hi,

                      the idea of a background task sounds good to me. I'll give this a try.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | Contributors