lilzz
Posts: 410
Joined: Sat Nov 30, 2013 5:27 pm

My Wifi is gone after plug in ethernet cable.

Mon Sep 29, 2014 1:13 am

Is there a way to make both wifi and ethernet cable both working? let's say I have 2 applications.
I like to have application 1 to use eth0 or ethernet connection. and application 2 to use wlan0 or wifi.

totoharibo
Posts: 4018
Joined: Thu Jan 24, 2013 8:43 am

Re: My Wifi is gone after plug in ethernet cable.

Mon Sep 29, 2014 8:19 am

lilzz wrote:Is there a way to make both wifi and ethernet cable both working? let's say I have 2 applications.
I like to have application 1 to use eth0 or ethernet connection. and application 2 to use wlan0 or wifi.
have a look on /etc/network/interfaces

man interfaces will help.

User avatar
rpdom
Posts: 13155
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: My Wifi is gone after plug in ethernet cable.

Mon Sep 29, 2014 9:47 am

Look at the configuration for ifplugd (man ifplugd for details), as it is that program that disables WiFi when the cable is connected.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: My Wifi is gone after plug in ethernet cable.

Mon Sep 29, 2014 10:48 am

Are you saying that your wifi left you - and now you're all alone?

Anyway, yes, something called "ifplugd" is the villain here. I don't understand what the point of ifplugd is. When would you ever want it? Can someone explain it to me?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
DougieLawson
Posts: 34412
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: My Wifi is gone after plug in ethernet cable.

Mon Sep 29, 2014 11:00 am

Joe Schmoe wrote:Are you saying that your wifi left you - and now you're all alone?

Anyway, yes, something called "ifplugd" is the villain here. I don't understand what the point of ifplugd is. When would you ever want it? Can someone explain it to me?
+1000

sudo apt-get purge ifplugd
is the way I configure it the way I like it.
Note:Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: My Wifi is gone after plug in ethernet cable.

Mon Sep 29, 2014 12:13 pm

Something we can agree on. Actually, the first thing I do upon setting up a new Pi is:

Code: Select all

update-rc networking disable
Which disables ifplugd as well.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

pifordummies
Posts: 1
Joined: Sun Nov 23, 2014 4:39 pm

Re: My Wifi is gone after plug in ethernet cable.

Sun Nov 23, 2014 4:47 pm

I think the prevention of joining two networks at the same time is a security thing. Joining two networks could create a bridge between them, functioning as a router. Can be used to subvert someone's network security.

This is prevented by disabling routing between the two adapters; hopefully this would be the default.

This would also not be an issue when both adapters are connecting to the same network.

User avatar
rpdom
Posts: 13155
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: My Wifi is gone after plug in ethernet cable.

Sun Nov 23, 2014 6:33 pm

pifordummies wrote:I think the prevention of joining two networks at the same time is a security thing. Joining two networks could create a bridge between them, functioning as a router. Can be used to subvert someone's network security.

This is prevented by disabling routing between the two adapters; hopefully this would be the default.

This would also not be an issue when both adapters are connecting to the same network.
If I understand what you are saying correctly, then I believe the opposite is true.

Bridging between networks is not enabled unless you specifically set it up.

The Pi can be connected to two different subnets at the same time. There is no problems with that.

Having both wired and wireless interfaces on the same subnet at the same time will cause problems without special configuration and it is not possible to decide on a program by program basis as to what uses which interface in that case.

h_ramus
Posts: 10
Joined: Tue Feb 17, 2015 6:21 pm

Re: My Wifi is gone after plug in ethernet cable.

Tue Feb 17, 2015 7:18 pm

I’ve been trying to get my TV to connect to the internet using an ethernet cable. However, everytime I connect the ethernet cable the Wifi shuts down. I’ve seen on other pages that purging ifplugd or including eth0 allow-hotplug would solve those issues. I have allow-hotplug eth0 and purged ifplugd as well and still everytime I connect the ethernet cable the wifi shuts down. Removing the ethernet cable brings back the wifi so this seems to be an automated process. Also, I have a 2A power supply, some people suggested lack of power which is not the case.

I’m new to Linux and the raspberry pi so this is a strange behaviour which I can’t seem to pinpoint the cause.

Any clues on how to manage the automatic disconnection of wifi when ethernet cable is connected? I'm running alpha4 OSMC on a raspberry pi 2

Thanks

EDIT: Sam Nazarko helped out. There's a connection manager file which has specified this as a 'SinglePreferredTechnology'. In /etc/connman.conf, changed the instruction to 'false' and it's working fine.

EDIT2: when rebooting the wifi doesn't come on. Also, the ethernet IP address does not seem to be static and using the one inputted in /etc/network/interfaces.

h_ramus
Posts: 10
Joined: Tue Feb 17, 2015 6:21 pm

Re: My Wifi is gone after plug in ethernet cable.

Mon Feb 23, 2015 3:00 pm

I'm using OSMC Alpha4 on a Pi 2. OSMC uses connection manager instead of the typical interfaces file in /etc/network and IP tables. They key is to edit the connman.conf file in /etc.

Opening this file up I’ve changed the following:
SinglePreferredTechnology=false
PreferredTechnologies=wifi,ethernet

This solved all my issues with keeping both the wifi and ethernet on when both are connected. It should sort it out for you as well. I also wanted to route internet traffic from wifi to the ethernet port.

I then created an ethernet.config file in /var/lib/connman to include the following:
[service_ethernet]
Type=ethernet
IPv4=192.168.2.2/255.255.255.0

This created static IP to the ethernet port.

However, I don’t think this was really necessary. The way that ConnMan routes traffic from wifi to ethernet is by using tethering, completely different approach to using interfaces file in /etc/network.

Editing the connman.conf file in /etc I included the following lines:

TetheringTechnologies=wifi,ethernet
PersistentTetheringMode=true

I ran the the command ‘connmanctl tether ethernet on’ to turn on the tethering for ethernet and getting internet through it. On my next reboot the Pi was routing internet traffic from wifi to the ethernet.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: My Wifi is gone after plug in ethernet cable.

Mon Feb 23, 2015 3:14 pm

lilzz wrote:Is there a way to make both wifi and ethernet cable both working? let's say I have 2 applications.
I like to have application 1 to use eth0 or ethernet connection. and application 2 to use wlan0 or wifi.
There is a little daemon which runs in the background called ifplugd, its designed to give you that laptop like behaviour where you default to Ethernet if a cable is plugged in. If you want to use wlan0 and eth0 at the same time this daemon will annoy the hell out of you. Best option is to just remove it.

Code: Select all

sudo apt-get remove ifplugd

3corey2
Posts: 85
Joined: Sun Feb 15, 2015 2:59 am

Re: My Wifi is gone after plug in ethernet cable.

Mon Feb 23, 2015 3:36 pm

i suggest connecting the ethernet cable to one wifi signal (assuming you have several) and then go specifically into your dongle settings and tell it to connect to a different wifi signal. im not entirely sure what your saying here so iiii :?: :?: hope this helps
--------
ras pi 2, gotta love it.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2827
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: My Wifi is gone after plug in ethernet cable.

Mon Feb 23, 2015 6:04 pm

3corey2 wrote:i suggest connecting the ethernet cable to one wifi signal (assuming you have several) and then go specifically into your dongle settings and tell it to connect to a different wifi signal. im not entirely sure what your saying here so iiii :?: :?: hope this helps
--------
How do you connect an ethernet cable to a wifi signal?
Alex Eames RasPi.TV, RasP.iO

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: My Wifi is gone after plug in ethernet cable.

Thu Feb 26, 2015 5:03 am

How do you connect an ethernet cable to a wifi signal?
Very carefully…
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Maikoule
Posts: 12
Joined: Sun Apr 03, 2016 3:34 pm

Re: My Wifi is gone after plug in ethernet cable.

Tue Apr 05, 2016 2:32 pm

I configured my WIFI on my RPi3 then plugged my ethernet wire.

Now the RPi3 doesn't want to turn the wifi on as if it was unable to reach the hardware.

Is there a way of fixing it? Reinstalling the hardware's drivers?

Mrgrupp
Posts: 2
Joined: Thu Apr 21, 2016 11:21 pm

Re: My Wifi is gone after plug in ethernet cable.

Thu Apr 21, 2016 11:33 pm

I was having the same problem as the original post. I ran the command to remove ifplugd, however it replied that it wasn't installed, so it wasn't removed. What else could be the issue?

Mrgrupp
Posts: 2
Joined: Thu Apr 21, 2016 11:21 pm

Re: My Wifi is gone after plug in ethernet cable.

Fri Apr 22, 2016 12:45 am

Ok. I think I figured out my problem. I used SSH to connect to my RPi, but accidently connected to the wifi IP and therefore my RPi couldn't connect to the internet (via wifi). However, when I use the eth0 IP ,my connection is dropped or refused. It won't connect.

Aeca
Posts: 2
Joined: Thu May 05, 2016 8:19 pm

Re: My Wifi is gone after plug in ethernet cable.

Sat Jun 25, 2016 8:13 pm

Hi, did you manage to work out what the problem was? I have roughly the same issue however I can't get it to go from ethernet to wifi. I worked out that I needed to make sure that the dns address in the dhcpd.conf file was 8.8.8.8 instead of 192.168.1.1 and then the wifi worked again, however I still can't get the ethernet to work with the wifi. Any thoughts?

I'm trying to use a RPi3 to connect a SKY box (which only has ethernet) with the wifi.

Any help on this matter would be really appreciated.

Regards,
Henrik

hello world :-)
Posts: 121
Joined: Sat Nov 14, 2015 7:12 am
Location: England, in an insecure cloud, ie. The Interwebs
Contact: Website Yahoo Messenger AOL

Re: My Wifi is gone after plug in ethernet cable.

Sun Jun 26, 2016 4:29 pm

Davespice wrote:
lilzz wrote:Is there a way to make both wifi and ethernet cable both working? let's say I have 2 applications.
I like to have application 1 to use eth0 or ethernet connection. and application 2 to use wlan0 or wifi.
There is a little daemon demon which runs in the background called ifplugd, its designed to give you that laptop like behaviour where you default to Ethernet if a cable is plugged in. If you want to use wlan0 and eth0 at the same time this daemon demon will annoy the hell out of you. Best option is to just remove it.

Code: Select all

sudo apt-get remove ifplugd
FTFY

On-topic, I can see why this could be useful, but maybe an option could be added in raspi-config to disable/enable it? Just my opinion...
I do moral support. Here: https://www.raspberrypi.org/forums/search.php?search_id=egosearch
I know I use too many parentheses. Problem?
Topics I have posted in: http://bit.ly/1NbDdr5
My topics: http://bit.ly/1ObnKqQ
All my posts: http://bit.ly/1OHzje7

Return to “General discussion”