NetworkManager & gprs/ppp DNS: after using wlan/eth0, DNS for ppp doesn't work
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
NetworkManager & gprs/ppp DNS: after using wlan/eth0, DNS for ppp doesn't work
Hi there,
I am currently using a laptop (running fedora 8), with ethernet/wireless at work, and NetworkManager does a great job for switching from one to another. At home however, I use a gprs phone for my internet connection, and to connect I use pppd, the script works fine. But konqueror (or any other app) doesn't get the proper DNS addresses. I have to manually enter the DNS numbers given by the connect script into the Network settings, and restart my network using service network restart (which I suppose is *not* the right way since network settings seems to deal with ethernet connections only - however it works).
So my obvious question is: what can I do? I already have a shortcut for "pppd call provider", I guess I could add the information to change the DNS info before calling pppd, but I don't really understand how (since in ifconfig ppp and eth0 are quite separate entities). Where *is* the place in fedora where you set the "master" or "current" DNS address (to which konqueror etc refer)?
I looked around to see if ppp can be added to networkmanager, but although I found discussion about it, I didn't find any info about how to do that.
Again I'm glad to have a command line (as I'll just add it to the connect script) to set the DNS (which by the way is static) at each connection...but as I said earlier, I really don't understand where the DNS is set.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
You could add to the script the ability to change the /etc/resolv.conf file. this is where DNS is saved. I personally do not use NetworkManager but I have several places I connect. I simply bring networking down, replace the needed config files with the files with the correct contents and bring networking backup.
Thanks Brian for the info about /etc/resolv.conf - this is one mystery about networking on fedora that is solved
I created a resolv.conf file in my home dir containting the right dns info, and whenever I connect using my phone, this file gets copied into /etc/ and network is restarted, prior to calling pppd.
I still am puzzled about the need to restart the network (and that thing checking for eth0 (taking time)) just for updating dns info.
I wish there was a way of adding ppp connections to networkmanager, would make the whole thing easier!
By the way, when using service network restart, does it execute a couple of ifconfig eth0 up (etc) kind of commands? If yes, service network restart could be bypassed, and only the right command for updating dns info could be used...?
If anyone has some info about this, please let me know!
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
When I bring networking backup I have all files like /etc/sysconfig/network-scripts/ifcfg-eth0, ifcfg-ath0, ifup-wireless, /etc/wpa_supplicant/wpa_supplicant.conf, and /etc/resolv.conf edit to the stat they need to be for that connection. Seems overkill maybe but I know exactly what each file is at the point of restarting the network service. Here is an example of one of my scripts.
Note I added a line in /etc/init.d/network script to kill wpa_supplicant on stopping the service. Also once everything is setup, copied, and started I run a ping and post to the screen info related to certain files. Just helps to make sure I selected the correct script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.