switching to direct LAN instead of using WLAN?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
eidam655
Junior Member
Junior Member
Posts: 3
Joined: 2014-06-18, 21:24 UTC

switching to direct LAN instead of using WLAN?

Post by *eidam655 »

hi,

i frequently synchronize my laptop with my desktop using total commander. all of my machines are set up in a local WLAN, but since i sync moderate amounts of data i tend to tie those two PCs together with a LAN cable.

the problem i'm having is that even after connecting the LAN cable TC still uses the slower WLAN connection; when i want to use the LAN i have to turn off the wifi at least on one of the machines.

is there a way of resolving this isssue? windows' ping naturally switches to LAN when trying to ping.

thanks for any info.
i'm using Win7 64bit & TC7.50a.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think both computers must have addresses in both networks, WLAN and LAN, and you can access your laptop via any of these addresses, so try to use LAN's address to access your laptop and network packets should go via LAN.
seb-
Senior Member
Senior Member
Posts: 276
Joined: 2011-11-15, 06:14 UTC
Location: DE\BN - only part time TC user after switching to Linux ;)

Post by *seb- »

from my experience i think windows chooses the interface which is used. and it seems windows prefers wireless connections.

when i sync my laptop with my pc i usually just deactivate wifi to force windows to use the gigabit ethernet. takes 5 seconds ;)

hth
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There has been a discussion about this before - the LAN interface must somehow be given higher priority than the WiFi interface.

Unfortunately I never got this to work, so I have added two buttons to Total Commander to turn WiFi on and off. The buttons call two cmd files containing:

wifienable.cmd:
netsh interface set interface name="WiFi" admin=ENABLED

wifidisable.cmd:
netsh interface set interface name="WiFi" admin=DISABLED

On the buttons, put a "*" in front of the command to ensure that it is run with elevated administrative rights, e.g.:
Command: *wifienable.cmd
Author of Total Commander
https://www.ghisler.com
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You have to lower the interface metric of the LAN adapter.

See here e.g.

If that doesn't work you have the edit the metrics of your routing table.

CMD -> "route print" and so on.
eidam655
Junior Member
Junior Member
Posts: 3
Joined: 2014-06-18, 21:24 UTC

Post by *eidam655 »

thanks for the quick answers.

MVV: the LAN cable doesn't connect the PCs to another network, it's a direct connection.

seb-: windows does seem to perform some kind of choosing. for example, when i try 'ping theothermachine' in the command line, while both connections are active, i'm getting <1ms pings (which means it uses the cable connection, otherwise i would be getting pings around 30ms). that's why i was curious how TC handles this and whether it's a windows issue or not.

ghisler & ZoSTeR: thanks for the tips. so it looks like i'll have to decide whether there is any case of WLAN being faster than LAN, and if not, set the network priorities. turning off the wifi by TC buttons seems not to solve the problem, as i can do the same just with the hardware switch.

or do the buttons disable the wifi for TC only? so the network doesn't drop?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

eidam655,
Even in case of direct Ethernet connection there is a LAN between computers, and both of them must have addresses in it in order to communicate (in such case you have to assign such addresses manually because there is no DHCP server). And if you access laptop via such network-specific IP-address, OS shouldn't be able to find another way via another network interface.
eidam655
Junior Member
Junior Member
Posts: 3
Joined: 2014-06-18, 21:24 UTC

Post by *eidam655 »

MVV: i see what you mean now, but how do i tell TC to connect to the other pc through that address specifically? if i just use the 'network' windows icon to get to computers, i'm stuck with computer names and the resolving stays OS voodoo to me.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

You could put the LAN connection in a different subnet.

Let's say your standard WLAN has the subnet 192.168.10.0 / 255.255.255.0.
Computer A has 192.168.10.1
Computer B has 192.168.10.2

Now you have to define a different subnet for the LAN connection
e.g. 192.168.50.0 / 255.255.255.0
Computer A has 192.168.50.1
Computer B has 192.168.50.2

Now you can enter "cd \\192.168.50.1" in the TC command line or Explorer to connect.
Post Reply