LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   wvdial/ppp problem using 3G mobile phone to connect PC to internet. (http://www.linuxquestions.org/questions/linux-networking-3/wvdial-ppp-problem-using-3g-mobile-phone-to-connect-pc-to-internet-868239/)

aal 03-13-2011 12:12 AM

wvdial/ppp problem using 3G mobile phone to connect PC to internet.
 
Hi all,

I had for some time been using wvdial to use my mobile phone as a modem connected to my PC on a usb port for internet access.

I just upgraded from openSUSE 10.1 (where things worked fine) to openSUSE 11.3 (where they do not).

I did the upgrade with internet access on ethernet. Then tested wvdial functionality (foolishly) without removing the cable. The result is:


andrew@linux-wrpw:~> sudo wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1, "IP" , "telstra.internet" , ""
AT+CGDCONT=1, "IP" , "telstra.internet" , ""
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Mar 13 16:17:08 2011
--> Pid of pppd: 7594
--> Using interface ppp0
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> local IP address 10.167.18.217
--> pppd: ��[06][08]
--> remote IP address 10.64.64.64
--> pppd: ��[06][08]
--> primary DNS address 139.130.4.4
--> pppd: ��[06][08]
--> secondary DNS address 203.50.2.71
--> pppd: ��[06][08]
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect
--> pppd: ��[06][08]

All of which looked fine, similar to before upgrading to the new OS. I did not remove the ethernet cable to test internet browsing was really functional using only the mobile phone so I thought all was well until I tried to use wvdial without the ethernet cable plugged in and this is what happened:

andrew@linux-wrpw:~> sudo wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1, "IP" , "telstra.internet" , ""
AT+CGDCONT=1, "IP" , "telstra.internet" , ""
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Mar 13 16:17:35 2011
--> Pid of pppd: 8034
--> Using interface ppp0
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> pppd: ��[06][08]
--> local IP address 10.192.2.74
--> pppd: ��[06][08]
--> remote IP address 10.64.64.64
--> pppd: ��[06][08]
--> primary DNS address 139.130.4.4
--> pppd: ��[06][08]
--> secondary DNS address 203.50.2.71
--> pppd: ��[06][08]
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.

So far so good. At this point there is a long pause with no activity and then:

--> warning, can't find address for `www.suse.de`
--> warning, address lookup does not work
--> Nameserver (DNS) failure, the connection may not work.
--> Connected... Press Ctrl-C to disconnect
--> pppd: ��[06][08]


The connection does not work - browser is not functioning.

To test this further, I have plugged the ethernet cable back in, run wvdial, got a successful connection with (apparently) good DNS then removed the ethernet cable to attempt to browse sites.

The connection does not work - browser is not functioning.



The file /etc/ppp/peers/wvdial includes the option usepeerdns so I think ppp is run with that option. I am assured by the telephone company that the DNS adresses above are valid.

I have tried disabling the firewall, No difference.


What is the problem?

Regards....

andrew.

aal 03-13-2011 04:32 PM

Hi all,

Solved, but ugly. I uninstalled the network card. I'd like to know how to fix this without uninstalling the network card. I believe the source of the problem was a DNS conflict between the DNS being used by the network card and the DNS assigned by the telephone provider.

I ran ~> cat on the file /etc/resolv.conf with the following results (only the last lines are relevant):

With the network card installed and the mobile phone not connected:

andrew@linux-wrpw:~> cat /etc/resolv.conf
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
nameserver 10.0.0.138

With the Mobile phone connected and the network card uninstalled:

andrew@linux-wrpw:~> cat /etc/resolv.conf
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
nameserver 10.0.0.138
nameserver 139.130.4.4
nameserver 203.50.2.71

Which is the same as what it was with network card installed and working and mobile phone connected.

So I thought there was some kind of DNS conflict going on?

In summary, uninstalling the network card worked, and this is sent via the phone but I'd still like to understand how to fix this better.

TIA

Andrew.

Fabio Paolini 03-13-2011 08:39 PM

It may be your route table together with your ethernet dns. I mean, if you have a route to the network
10.0.0.0 (or something like that) directed to the ethernet card and the first dns address of your resolv.conf are pointing to 10.0.0.138, then your network system may be trying to access a unplugged network.

You may try just to remove this first address from your resolv.conf

JZL240I-U 03-16-2011 07:54 AM

For USB-modems / connections I'd suggest you use KNetworkManager. Simple easy and fast.

ferrari 04-25-2011 01:41 AM

Code:

--> Nameserver (DNS) failure, the connection may not work.
This is usually due to dhcpcd not running before dialling with wvdial.


All times are GMT -5. The time now is 07:52 AM.