SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello friends at LinuxQuestions, I have a question for you.
I have set up my wireless connection to my router perfectly. (Thanks to the forums here) But:
Whenever I am connected to the router wirelessly and then I put a cable in my ethernet port, it is as if my wireless connection dissapears. My internet access gets terminated. The cable is connected to a switch on a separate (soon-to-be)network with nothing else connected to it
I have the same situation: Wireless to the router to the outside world. Ethernet cable just to my printer. Same happens here: When I plug in the cable, that network (192.168.3.0/24) takes over, and "supersedes" the wireless 192.168.2.0/24. (In my case it's the collaboration of CNC (Constant Network Connection, the primary agent) with wpa_supplicant and dhclient that achieves this.)
In particular, when I plug in the cable, the wireless connection is still fine (as, e.g., ifconfig and iwconfig confirm), but DNS and default routing get redirected to the 192.168.3.0.
Only root can route and overwrite /etc/resolv.conf.
I assume there must be a more elegant way. (Like bringing the wired interface up manually with ifconfig? Running as DHCP and DNS server on that interface instead of client?)
blackhole54, I don't know about any such configuration file. My box comes from EmperorLinux, so I use EmpTool->Wireless Scan. I talked to EmperorLinux support, and they said by having more than one interface, I'm more sophisticated than most normal users, and the tool doesn't support it.
First I click "start networking" to establish the wireless connection wlan0.
Then I click "stop networking" so CNC leave it alone.
Finally I bring up the cable connection eth0 (which takes over), and fix it as above.
I suspect ifup messes with resolv (DNS) and route. Probably I could use ifconfig instead, maybe together with dhclient. Also, as I hinted above, it might be better to be the DHCP server instead of client on the wired interface, and make this machine the gateway for everything on the 192.168.3.0/24 network. But I don't have this all figured out.
Quigi, I had a few more thoughts after my last post (middle of the night sort of thing ) ...
It's possible I have no idea what I am talking about, so make sure you make backup copies of any existing config files before you change any.
dhclient's config file seems to be able to support different options for different interfaces, or even disabling DHCP on arbitrary interfaces entirely. The following sample file is from the config file's man page:
I am looking in particular at the request and require lines. I am thinking perhaps if you remove domain-name-servers and routers from these lines for ethernet (but not wireless) your problems would go away. I have only just perused the man pages and I don't know what your existing config file (assuming one even exists) looks like, so you need to do your own due diligence.
Thanks blackhole54 for the excellent pointers. I will experiment a bit and see what changing these two options can do for me. E.g., if I instruct dhclient not to request domain-name-servers, will it leave /etc/resolv.conf alone? By the way, my config file as supplied looks like this,
I believe your config file treats all interfaces identically, where the sample file I quoted (I believe) shows how to break it out by interface.
I would imagine the best thing is to break it out by interface and leave your wireless with the existing options. I would then expect that removing the router and domain-name-servers from the options for ethernet would prevent that interface from mucking with your /etc/resolv.conf file and your routing table.
Good luck.
Last edited by blackhole54; 11-02-2006 at 03:20 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.