Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-25-2006, 06:37 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
Unhappy How to change DNS in Linux for ppp device

I'm trying to setup my RHEL 4 laptop to dial-up using my cellphone (Nokia 7610). The phone shows up as a standard serial modem on /dev/ttyACM0 when I plug it in via USB.

When I try to dial-in with pppd I think it connects, because it gives me an IP Address and DNS:

local  IP address
remote IP address
primary   DNS address
secondary DNS address
I can ping IP addresses, but I can't ping domain names. For example, I cannot ping, but I can ping its real IP address ( When I do a ./route I get the following:
Kernel IP routing table
Destination	Gateway         Genmask         Flags Metric Ref    Use Iface        *      UH    0      0        0 ppp0
default         UG    0      0        0 ppp0
Notice that it has as the gateway. Shouldn't it be - the primary DNS listed by pppd? I *can* ping the primary DNS IP (

Is there linux networking command I need to run to correct the DNS?

I really appreciate the help - I've been wrestling with this for weeks =(

More Details:
I know this can work because it works great under windows. In windows I go through the regular dialup settings except I leave the user/password blank, dial *99#, and put the following in as an init string (in advanced modem properties):

I know very little about pppd. I got the scripts I'm using from here:

To try to connect, I run /usr/sbin/pppd call tmobile

My pppd script located at /etc/ppp/peers/tmobile is as follows:
defaultroute  # use the cellular network for the default route
usepeerdns    # use the DNS servers from the remote network
nodetach      # keep pppd in the foreground
crtscts       # hardware flow control
lock          # lock the serial port
noauth        # don't expect the modem to authenticate itself
local         # don't use Carrier Detect or Data Terminal Ready
connect    "/usr/sbin/chat -v -f /etc/chatscripts/tmobile-connect"
My chat script located at /etc/chatscripts/tmobile-connect is as follows:
SAY     'Starting GPRS connect script\n'

# Get the modem's attention and reset it.
""      'ATZ'

# E0=No echo, V1=English result codes
OK      'ATE0V1'

# Set Access Point Name (APN)
SAY     'Setting APN\n'
OK      'AT+CGDCONT=1,"IP",""'

# Dial the number
SAY     'Dialing...\n'
OK      'ATD*99#'
Finally, the output is as follows:
[root@bobpete sbin]# ./pppd call tmobile
Starting GPRS connect script
Setting APN
Serial connection established.
using channel 6
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x89e96abe> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x1 <magic 0x89e96abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0>]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0>]
rcvd [LCP ConfReq id=0x0 <auth pap> <mru 1500> <asyncmap 0xa0000>]
No auth is possible
sent [LCP ConfRej id=0x0 <auth pap>]
rcvd [LCP ConfReq id=0x1 <mru 1500> <asyncmap 0xa0000>]
sent [LCP ConfAck id=0x1 <mru 1500> <asyncmap 0xa0000>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr> <ms-dns1> <ms-dns3>]
rcvd [IPCP ConfReq id=0x0 <addr>]
sent [IPCP ConfAck id=0x0 <addr>]
rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr> <ms-dns1> <ms-dns3>]
rcvd [IPCP ConfNak id=0x2 <addr> <ms-dns1> <ms-dns3>]
sent [IPCP ConfReq id=0x3 <addr> <ms-dns1> <ms-dns3>]
rcvd [IPCP ConfAck id=0x3 <addr> <ms-dns1> <ms-dns3>]
not replacing existing default route to eth0 []
local  IP address
remote IP address
primary   DNS address
secondary DNS address

Last edited by Juzzam; 02-25-2006 at 08:20 PM.
Old 02-25-2006, 10:59 PM   #2
LQ Newbie
Registered: Feb 2006
Posts: 5

Original Poster
Rep: Reputation: 0
It's working - I'm writing this reply via my cellphone connection. All I had to do was edit /etc/resolve.conf and replace nameserver with nameserver (Primary DNS given by pppd).

Anyone know of a way to script it so the resolve.conf file gets updated automatically?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
irda - GPRS - pppd - DNS problem, need help! lucastic Linux - Networking 2 11-02-2011 12:11 AM
Cannot find DNS on RedHat 8.0 dialup artemis Linux - Networking 3 06-01-2004 08:06 AM
ppp dialup dns problem (Slackware 9.1) johnMG Linux - Networking 8 05-06-2004 10:09 AM
DNS lookups not working on dialup connection foboldfky Linux - Networking 5 12-03-2003 09:53 AM
BTinternet DNS setting & pppd fin Linux - Networking 2 10-18-2002 02:08 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration