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.
-
- Posts: 4511
- Joined: Thu Jan 24, 2013 8:43 am
Re: My Wifi is gone after plug in ethernet cable.
have a look on /etc/network/interfaceslilzz 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.
man interfaces will help.
Re: My Wifi is gone after plug in ethernet cable.
Look at the configuration for ifplugd (man ifplugd for details), as it is that program that disables WiFi when the cable is connected.
-
- Posts: 4277
- Joined: Sun Jan 15, 2012 1:11 pm
Re: My Wifi is gone after plug in ethernet cable.
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?
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)
(One of the best lines I've seen on this board lately)
- DougieLawson
- Posts: 40534
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: My Wifi is gone after plug in ethernet cable.
+1000Joe 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?
sudo apt-get purge ifplugd
is the way I configure it the way I like it.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
-
- Posts: 4277
- Joined: Sun Jan 15, 2012 1:11 pm
Re: My Wifi is gone after plug in ethernet cable.
Something we can agree on. Actually, the first thing I do upon setting up a new Pi is:
Which disables ifplugd as well.
Code: Select all
update-rc networking disable
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)
(One of the best lines I've seen on this board lately)
-
- Posts: 1
- Joined: Sun Nov 23, 2014 4:39 pm
Re: My Wifi is gone after plug in ethernet cable.
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.
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.
Re: My Wifi is gone after plug in ethernet cable.
If I understand what you are saying correctly, then I believe the opposite is true.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.
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.
Re: My Wifi is gone after plug in ethernet cable.
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.
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.
Re: My Wifi is gone after plug in ethernet cable.
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.
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.
- Davespice
- Forum Moderator
- Posts: 1665
- Joined: Fri Oct 14, 2011 8:06 pm
- Location: The Netherlands
- Contact: Twitter
Re: My Wifi is gone after plug in ethernet cable.
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.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.
Code: Select all
sudo apt-get remove ifplugd
Re: My Wifi is gone after plug in ethernet cable.
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.
- alexeames
- Forum Moderator
- Posts: 2874
- Joined: Sat Mar 03, 2012 11:57 am
- Location: UK
- Contact: Website
Re: My Wifi is gone after plug in ethernet cable.
How do you connect an ethernet cable to a wifi signal?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
--------
Alex Eames RasPi.TV, RasP.iO
-
- Posts: 4277
- Joined: Sun Jan 15, 2012 1:11 pm
Re: My Wifi is gone after plug in ethernet cable.
Very carefully…How do you connect an ethernet cable to a wifi signal?
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)
(One of the best lines I've seen on this board lately)
Re: My Wifi is gone after plug in ethernet cable.
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?
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?
Re: My Wifi is gone after plug in ethernet cable.
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?
Re: My Wifi is gone after plug in ethernet cable.
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.
Re: My Wifi is gone after plug in ethernet cable.
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
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
-
- 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.
FTFYDavespice wrote:There is a littlelilzz 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.daemondemon 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 thisdaemondemon will annoy the hell out of you. Best option is to just remove it.Code: Select all
sudo apt-get remove ifplugd
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
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