NetworkManager & gprs/ppp DNS: after using wlan/eth0, DNS for ppp doesn't work
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.
Any help (or hint) is greatly appreciated.
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!
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.
|All times are GMT -5. The time now is 02:01 AM.|