2

My computer has two NICs, each one connects to a different network. The primary one is the gateway 192.168.1.1 that receives one internet connection. The second one is a WiFi Adapter that is connected to ANOTHER network, and that Wireless Connection has a Windows Server 2019 connected to it. The gateway is 192.168.31.254.

When i need to connect to Windows Server 2019 i have to DEACTIVATE the Ethernet adapter and leave only the WiFi on... Then i am able to connect to the server. But then if both of them are enabled when i connect via Remote Desktop Connection it uses the Ethernet adapter as default and i get the error message:

Error code: 0x516 
Extended error code: 0x0 
Activity Id: ID {9ed47227-be64-436e-ac2f-d85f30fe0000}

How can i connect to my server using the gateway wireless instead of using the ethernet gateway? I would like to access without needing to deactivate the Ethernet Adapter every time.

Its very annoying... Can someone help me?

Edit - Output of route print

Tabela de rotas IPv4
===========================================================================
Rotas ativas:
Endereço de rede          Máscara   Ender. gateway       Interface   Custo
          0.0.0.0          0.0.0.0         25.0.0.1    192.168.137.1   9256
          0.0.0.0          0.0.0.0   192.168.31.254    192.168.31.86     50
          0.0.0.0          0.0.0.0      192.168.1.1    192.168.1.100     25
        127.0.0.0        255.0.0.0      No vínculo         127.0.0.1    331
        127.0.0.1  255.255.255.255      No vínculo         127.0.0.1    331
  127.255.255.255  255.255.255.255      No vínculo         127.0.0.1    331
      192.168.1.0    255.255.255.0      No vínculo     192.168.1.100    281
    192.168.1.100  255.255.255.255      No vínculo     192.168.1.100    281
    192.168.1.255  255.255.255.255      No vínculo     192.168.1.100    281
     192.168.31.0    255.255.255.0      No vínculo     192.168.31.86    306
    192.168.31.86  255.255.255.255      No vínculo     192.168.31.86    306
   192.168.31.255  255.255.255.255      No vínculo     192.168.31.86    306
    192.168.137.0    255.255.255.0      No vínculo     192.168.137.1   9256
    192.168.137.1  255.255.255.255      No vínculo     192.168.137.1   9256
  192.168.137.255  255.255.255.255      No vínculo     192.168.137.1   9256
        224.0.0.0        240.0.0.0      No vínculo         127.0.0.1    331
        224.0.0.0        240.0.0.0      No vínculo     192.168.137.1   9256
        224.0.0.0        240.0.0.0      No vínculo     192.168.31.86    306
        224.0.0.0        240.0.0.0      No vínculo     192.168.1.100    281
  255.255.255.255  255.255.255.255      No vínculo         127.0.0.1    331
  255.255.255.255  255.255.255.255      No vínculo     192.168.137.1   9256
  255.255.255.255  255.255.255.255      No vínculo     192.168.31.86    306
  255.255.255.255  255.255.255.255      No vínculo     192.168.1.100    281
===========================================================================
4
  • 1
    Can you please print the routing table? Ie, running route print in cmd.exe. I'm right to assume that your client is also a windows PC (not just the server)?
    – jvda
    Commented Apr 8, 2021 at 13:26
  • 1
    Does it help to create a host-name for the Windows Server 2019 server in C:\Windows\System32\drivers\etc\hosts, adding a line like myserver 192.168.31.x, where x is used by the server?
    – harrymc
    Commented Apr 8, 2021 at 14:02
  • Hey @harrymc You mean in the hosts file of my computer or the hosts file of Windows Server? Commented Apr 8, 2021 at 14:24
  • @jvda I edited my question with the route print command output Commented Apr 8, 2021 at 14:24

1 Answer 1

1

From the command line, if you type

mstsc /?

it will list a whole bunch of options. mstsc is the command line name for remote desktop (Microsoft Terminal Server Client). The ones you are interested in are /v and /g. So if you wish to connect to soci it would be

mstsc /v:soci /g:192.168.31.254
9
  • Hi. That command actually makes me try to connect to 192.168.31.254 I dont want to connect to that IP. That IP is the gateway of my modem I want to connect to a server that is connected to the same SUBNET of 192.168.31.254 Commented Apr 8, 2021 at 19:51
  • So what is the IP of the windows server?
    – jvda
    Commented Apr 8, 2021 at 20:21
  • Use the address of your wireless server in the /g
    – cup
    Commented Apr 9, 2021 at 4:54
  • @jvda W Server is 192.168.31.25. Commented Jun 14, 2021 at 16:59
  • @cup Ill try this right now and mark as solved if it works! Bro, thanks. Commented Jun 14, 2021 at 17:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .