0

I have 2 powerline units that let me access the internet over my electrical network. However, I sometimes lose connection, and I have to unplug/replug the ethernet cable to get it back.

I want to know what happens when I unplug/replug the cable, so I can do it remotely, instead of going all the way to the router. Is there a new IP address assigned? Or is there more to that? Can I make a simple script to automate it?

1
  • One might say this is an A-B problem, you may be trying to find a fix for something that isn't the problem. I have a set of Powerline adapters in my home, never lose connection unless we lose power... which is only once or maybe twice per year, and when they come back up (along with everything else), everything just works. Perhaps the issue is a problem with your PL adapters and not the equipment connected to it.
    – acejavelin
    Commented Feb 24, 2020 at 23:44

1 Answer 1

-1

When you unplug/replug the Ethernet cable, what happens is that your network adapter is disabled/reenabled.

The same can be done via a script run as admin: Create a text file called something.bat and containing the following lines:

netsh interface set interface "network adapter name" admin=disable
netsh interface set interface "network adapter name" admin=enable

The .bat file needs to be run as administrator. You may either right-click on it and choose "Run as administrator", or you may set it to always run as administrator by creating a shortcut to the file and setting this in the Properties of the shortcut, Shortcut tab, Advanced button.

9
  • This works nicely but it only restarts my PC's network adapter. I need to act on my router instead, restarting its internet access. How can I do that? And Is there a way to do it on OSX too?
    – seven11
    Commented Jun 28, 2017 at 15:15
  • I didn't understand that the problem was with the router. Do you unplug the router's network plug or the one with the Internet?
    – harrymc
    Commented Jun 28, 2017 at 16:40
  • My setup is peculiar. It goes like this: ISP --> router --> powerline unit --> electrical network --> 2nd powerline unit --> 2nd router --> devices. Sometimes the powerline units lose connection, and unplugging one of them from a router wakes them up. I want to find a way to simulate an unplug/replug of my 2nd router from my 2nd powerline unit.
    – seven11
    Commented Jun 28, 2017 at 18:33
  • (1) You could try to upgrade the powerline firmware (if possible). (2) Check if the adapters are not placed where they get too hot like behind the computer's air-vent or near an interference source. (3) You should pay attention as to when this happens, for example if some big electrical device starts up. (4) Does it happen after a long period without using the internet (powerline in power-saving mode)? (5) Is it possible that the powerline lost its DHCP lease after enough time has passed? (6) Try other electrical sockets (hope they are directly plugged?)
    – harrymc
    Commented Jun 28, 2017 at 18:54
  • I haven't figured out why they disconnect, only that unplugging/re-plugging the ethernet cable fixes it. They are directly plugged into the wall socket ofc, and in well ventilated areas. How often is the DHCP lease renewed? They typically disconnect two or three times a week.
    – seven11
    Commented Jun 29, 2017 at 0:32

You must log in to answer this question.

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