resolver problem with os 11.2 and wireless or 3g modem (pppd)

Hi

If I connect with a 3g modem or with wireless sometimes the resolving does not work. This happens on opensuse 11.2.
nslookup and dig works but nor ping nor ssh nor any other network application does work…
If I modify the /etc/resolv.conf after connecting to a wireless network for example it does not work even the dns are known …
And more strange if the resolver works and I modify /etc/resolv.conf with known dns the resolver does not work anymore.
BTW: the dns entry from the wireless is 192.168.1.1 and I do not have any idea how the wireless ap is configured… so it could be in this case that dns is not forwared only allowed to use 192.168.1.1 but the other case is a 3g modem which not even the propagated dns entries works in the bad case :frowning:
What could be the problem? Is there a known bug?

Beat

/etc/resolv.conf is overwritten every time you renew a connection over dhcp. This is normal behaviour. Static DNS should be defined in /etc/sysconfig/network/config by setting the variable NETCONFIG_DNS_STATIC_SERVERS … or in YaST.

You can always edit /etc/resolv.conf and add a DNS. It will be used ‘on the fly’.

I have huawei E1550 modem and it has the same problem!

That can not work with 3g. 192.168.1.1 is a local IP (all Ips starting with 192.168 are local. It is NOT a DNS). It is the IP of your router, running dhcpd. Depending on your router configuration, it automatically forwards DNS entries to your computer (which in this case get written in /etc/resolv.conf) or it runs a name server itself and uses your ISP DNS.

While connecting with 3g, your modem device should send a dhcp request, obtaining and IP and maybe a DNS (if configured to obtain it from dhcp)

You can do as follows for testing:

  • connect over 3g
  • ping a computer by IP (in the following example abcnews.com)
    ping -c 3 199.181.132.250
  • If it works, try to ping it by name:
    ping -c 3 abcnews.com
  • It it doesn’t work add a DNS to /etc/resolv.conf (in this example one of openDNS)
  • echo “nameserver 208.67.222.222” >> /etc/resolv.conf

However … if your using the Network-manager, that may be a different story.

I finanly managed to established connection with huawei E1550 modem by wvdial, but still firefox doesn’t open any page. Ping doesn’t work too.
Adding DNS to /etc/resolv.conf gives no help.

What is actually needed ?

  • a connection to be able to reach the other end (ISP)
  • a default route (gateway) to be able to reach computers by IPs
  • a DNS to be able to reach computers by names

Normally gateway and DNS should be set for you by your ISP while establishing a connection through dhcp. However it depends on your device configuration (in this case your modem). I haven’t used dial up for years and I don’t know what’s your device name (like eth0 if it were an ethernet NIC) . Neither do I know how to set up wvdial to obtain gateway and DNS automatically (that’s what you need).

Editing /etc/resolv.conf won’t help if you don’t have the correct route ( = cannot even ping computers by IPs). You’re missing one step. If you happen to know the router of you 3g provider, you can also set/reset the default route manually:

**route del default
route add default gw xxx.xxx.xxx.xxx
**
xxx.xxx.xxx.xxx = IP of your ISP router

please_try_again, thank you very much for help!
Is it possible to establish connection on windows(as it works on windows perfectly) and chech out the gateway and then aply it on linux(route add default gw)?
I just don’t know where to search gateway on windows. ISP’s support service seems doen’t know too:).

Yes, it is the same gateway.
Since you probably get gateway and DNS automatically set when you received your IP, I doubt you can read their IPs anywhere in Windows settings. If it were somewhere, that would be in the TCPIP properties of your device or whatever dial up configuration.

Windows has some TCP/IP commands too. The syntax is slightly different, but they work the same way and display the same informations. I only remember that Unix “traceroute” is (or used to be) “tracert”. … Just google for “Windows TCP/IP commands” . I do not provide Windows support. Sorry. :frowning:

However it would be easier to configure pppd (or whatever dialup method) under Linux to obtain gateway and DNS automatically. I’m sure it is just one line in a script.

Try man pppd and have a look in /etc/ppp/options.

In TCPIP properties of Modem and from ipconfig command output under windows the default gateway is 0.0.0.0 after establishing conection.
After conection with Network-manager firefox doesn’t open pages too. I tried to use MobilePartner(program that comes with modem, linux version) and it’s all the same. After connection astablished no internet trafic.

wvdial outpit:
ATZ
OK
→ Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
→ Sending: AT+CGDCONT=1,“IP”,“internet”
AT+CGDCONT=1,“IP”,“internet”
OK
→ Modem initialized.
→ Idle Seconds = 300, disabling automatic reconnect.
→ Sending: ATDT99#
→ Waiting for carrier.
ATDT
99#
CONNECT
→ Carrier detected. Starting PPP immediately.
→ Starting pppd at Mon Feb 22 13:27:42 2010
→ Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
→ --> PAP (Password Authentication Protocol) may be flaky.
→ Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
→ --> CHAP (Challenge Handshake) may be flaky.
→ Pid of pppd: 4451
→ Using interface ppp0
→ pppd: x�[06][08]8�[06][08]
→ pppd: x�[06][08]8�[06][08]
→ pppd: x�[06][08]8�[06][08]
→ pppd: x�[06][08]8�[06][08]
→ pppd: x�[06][08]8�[06][08]
→ pppd: x�[06][08]8�[06][08]
→ local IP address 10.229.0.86
→ pppd: x�[06][08]8�[06][08]
→ remote IP address 10.64.64.64
→ pppd: x�[06][08]8�[06][08]
→ primary DNS address 83.149.19.125
→ pppd: x�[06][08]8�[06][08]
→ secondary DNS address 83.149.19.126
→ pppd: x�[06][08]8�[06][08]
→ Script /etc/ppp/ip-up run successful
→ Default route Ok.
→ 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

default route on windows:

open a command prompt:

ipconfig /all

example:

Windows IP Configuration



        Host Name . . . . . . . . . . . . : *****

        Primary Dns Suffix  . . . . . . . : ***.local

        Node Type . . . . . . . . . . . . : Unknown

        IP Routing Enabled. . . . . . . . : No

        WINS Proxy Enabled. . . . . . . . : No

        DNS Suffix Search List. . . . . . : ****.local



Ethernet adapter Local Area Connection:



        Connection-specific DNS Suffix  . : 

        Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet

        Physical Address. . . . . . . . . : 00-1C-C4-9F-75-01

        Dhcp Enabled. . . . . . . . . . . : No

        IP Address. . . . . . . . . . . . : 10.0.50.81

        Subnet Mask . . . . . . . . . . . : 255.0.0.0

        Default Gateway . . . . . . . . . : 10.0.0.90

        DNS Servers . . . . . . . . . . . : 10.0.0.2

                                            10.0.0.3

Take a look at wvdial documentation!
Also I might be wrong, but that looks weird :

-> local IP address 10.229.0.86
--> pppd: x�[06][08]8�[06][08]
--> remote IP address 10.64.64.64

None of these two is an Internet IP. They are both in the private IP range. (?)

Hil Folks

I don’t know if you really understood what is my problem.
Resolver works with nslookup!!! but you cannot reach world
with names for example ping, ssh BUT it works with ip addresses.
It seems that there is a cache or something that is not updated
with the namsersers which use the progs in some layers …
i.e.
ping Google # doent work
BUT
nslookup Google
give
Server: 201.10.128.3
Address: 201.10.128.3#53

Non-authoritative answer:
Google canonical name = Google.
Name: Google
Address: 64.233.163.104

ping 64.233.163.104 # DOES WORK!!

Greetings

Then it is NOT a router issue

what’s the ouput of
cat /etc/resolv.conf ?

It depends…
In the case of wireless it’s 192.168.1.1 which is teh default gw
and has a caching nameserver running it seems. Sometimes if you connect to the wireless it works, sometimes not :frowning:
I’m using the network manager but if i modify the /etc/resolv.conf
with well known dns servers it does not work …
In the 3g modem case the pppd does not insert the received namservers even the option userpeerdns is used.
I try to edit /etc/resolv.conf but it does not work…
Can this be w network manager issue?

Yes. I’v seen that already. I think when the network manager is running (I never use it), modifying /etc/resolv.conf has no effect. Would it not be possible to set DNS with the network manager applet … or a similar tool ?