You are not logged in.

#1 2009-04-12 17:41:56

ren0
Member
Registered: 2009-04-12
Posts: 22

DNS problem. Arch can't connect on the internet

Hi,

I've got a little problem with the network of Arch ^^

I first explain what occurred to me, then the problem, to make sure you've got all the elements.

I installed, 6 days ago, the base of Archlinux. Naturally, I wanted to go on by installing a graphical server and gnome or KDE, for example.
To succeed in this installation, I needed an operationnal network, and there began the problems...Impossible  to synchronize the package databases...By searching why it didn't work, I found that it was probably a DNS problem.
Because when I was trying such commands like for example

wget 209.85.227.147

The download proceeded very well...But when trying such commands like for example

wget http://repo.archlinux.fr/all.xml

It failed all the time...

After several days spent on trying to understand why, I finally dit not understand. Of course, I checked the rc.conf, resolv.conf, pacman.d/mirrorlist files, and they all seemed correct. But when changing of network(connecting somewhere else)what a surprise, it was working very well, without any change on the configuration files...

But this morning, still being connected on the "working" network, I wanted to upgrade my system...But It failed, same error messages appeared on the screen...

I checked if it was a DNS problem, and it is, because if I'm writing such an URL in my navigator

http://64.233.169.103/

It opened the page without any problem, but if I'm writing a "classic" URL, it failed...

So, I'm nearly sure it's a DNS problem, and I don't know how to solve it...

I must precise that I'm virtualizing Archlinux from Ubuntu 8.10 on virtualbox, and that the router which is connecting the host system to the internet(therefore Ubuntu) is a Dlink, because I've read that some DNS problem can occur with such router

I would be pleased if anyone could help me to solve this problem.

Thank you !!

PS : there is no problem for me to write here resolv.conf, rc.conf files or whatever, just ask me.

PS2 : I really am sorry if there are any language mistakes, I'm not english native speaker

Offline

#2 2009-04-12 18:56:48

hauntergeist
Member
From: Vienna
Registered: 2008-10-11
Posts: 56

Re: DNS problem. Arch can't connect on the internet

Hello ren0. Welcome to the Arch Linux Forums! smile
First of all, what's the exact error message you get when you run command xyz? What's your router's ipadress and yea, rc.conf, resolv.conf and /etc/hosts would be very helpful.
Do you try to connect per ethernet or per wireless. When you chose the latter than plz provide your wireless config files (e.g. wpa_supplicant or so) but be sure to delete your personal information!!

Offline

#3 2009-04-12 19:11:46

ren0
Member
Registered: 2009-04-12
Posts: 22

Re: DNS problem. Arch can't connect on the internet

Hello smile

I try to connect by ethernet, using the eth0 interface, with dhcp

I'm sorry, but the error message will be in french...

bash-3.2# pacman -Syu
:: Synchronisation des bases de données de paquets...
Erreur: échec de récupération du fichier 'archlinuxfr.db.tar.gz' depuis repo.archlinux.fr : Transient resolver failure
Erreur: la mise à jour de archlinuxfr a échoué (Transient resolver failure)
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis ftp.archlinux.org : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis locke.suu.edu : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis archlinux.unixheads.org : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis ftp.gtlib.gatech.edu : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis mirror.cs.vt.edu : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis mirrors.easynews.com : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis ftp.ibiblio.org : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis archlinux.umflint.edu : Transient resolver failure
Erreur: échec de récupération du fichier 'core.db.tar.gz' depuis mirror.neotuli.net : Transient resolver failure
^C
Interrupt signal received

the rc.conf file

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="fr_BE.utf8"
HARDWARECLOCK="local"
USEDIRECTISA="no"
TIMEZONE="Europe/Brussels"
KEYMAP="be-latin1"
CONSOLEFONT="lat9w-16"
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="dhcp"
INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng @hal network @gdm netfs crond @alsa)

The resolv.conf file

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search teledisnet.be
nameserver 192.36.156.1
nameserver 0.0.0.0
# /etc/resolv.conf.tail can replace this line

And finally the /etc/hosts file

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1        localhost.localdomain    localhost myhost
# End of file

Last edited by ren0 (2009-04-12 19:16:59)

Offline

#4 2009-04-12 21:38:58

hauntergeist
Member
From: Vienna
Registered: 2008-10-11
Posts: 56

Re: DNS problem. Arch can't connect on the internet

Try the following:
- Is a route to your router established? (Try the "route" command)
- Ping your router's ip.
- Can you reach your nameservers? Ping them.
- If you can't reach them, then try to add your router as a nameserver and try to reach a URL.

Offline

#5 2009-04-13 06:10:52

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: DNS problem. Arch can't connect on the internet

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search teledisnet.be
nameserver 192.36.156.1
nameserver 0.0.0.0
# /etc/resolv.conf.tail can replace this line

the nameserver 0.0.0.0 line is wrong. remove that line.
If your dhcp server is offering that, it is something you should fix.

Last edited by cactus (2009-04-13 06:11:23)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2009-04-13 07:52:48

ren0
Member
Registered: 2009-04-12
Posts: 22

Re: DNS problem. Arch can't connect on the internet

To cactus: the nameserver 0.0.0.0 is now removed

To hauntergeist : I'm connecting from Arch by ethernet to the host OS(ubuntu) which is connected to the internet wirelessly with a Dlink router
The result of route -n command

user@user-laptop:~$ route -n
Kernel IP routing table
Destination     Gateway      Genmask         Flags Metric Ref    Use Iface
10.0.2.0        0.0.0.0      255.255.255.0   U     0      0      0   eth0
0.0.0.0         10.0.2.2     0.0.0.0         UG    0      0      0   eth0

Now the result of route command

user@user-laptop:~$ route
Kernel IP routing table
Destination     Gateway      Genmask         Flags Metric Ref    Use Iface
10.0.2.0        *            255.255.255.0   U     0      0      0   eth0
default         10.0.2.2     0.0.0.0         UG    0      0      0   eth0

The ping of my ip router works...

To ping my nameservers works...I've pinged those two ones
nameserver 192.36.156.1(which, of course, has changed, due to dhcp)
nameserver 0.0.0.0
So, I managed to reach them...

Question: what is the difference between route and route -n, the results given by those two commands is different...

Last edited by ren0 (2009-04-13 08:14:00)

Offline

#7 2009-04-13 07:55:39

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: DNS problem. Arch can't connect on the internet

ren0 wrote:

I must precise that I'm virtualizing Archlinux from Ubuntu 8.10 on virtualbox ...

This makes a big difference.  The problems you have might be caused by how VirtualBox is setup.  How do you have the the network adapter in VirtualBox setup?  Is it attached to "NAT" or "Host Interface"?  NAT was automatically set for me when I briefly used VirtualBox and it seemed to work fine, for my simple needs.

The resolv.conf you showed does not show the default nameserver provided by NAT, by the way.  Which leads me to believe you are not using NAT... or something... I don't know how to setup Host Interface.

edit:
Actually, I'm thinking backwards, VirtualBox assigns the guest os default IP's, not default nameservers.  Ignore that last paragraph, its wrong.

Last edited by juster (2009-04-13 08:01:09)

Offline

#8 2009-04-13 07:58:09

ren0
Member
Registered: 2009-04-12
Posts: 22

Re: DNS problem. Arch can't connect on the internet

Yeah, I'm using NAT as as a network card

Offline

#9 2009-04-13 08:23:18

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: DNS problem. Arch can't connect on the internet

I tried to google virtualbox dns problems but couldn't find a definite answer, though I got many results.  I vaguely remember having to use IP numbers to connect to my host box (only thing I used network for).

The only decent suggestion I found was to manually set the nameserver.  You can do this by changing the line in resolv.conf:

nameserver 192.36.156.1

to the following

nameserver 10.0.2.3

which should point back to virtualbox.

You might try some DNS command line utilities like:

host google.com 10.0.2.3
nslookup google.com 10.0.2.3

in your shell to test if you get a response from the virtual dns server.

Last edited by juster (2009-04-13 08:23:57)

Offline

#10 2009-04-13 08:35:56

ren0
Member
Registered: 2009-04-12
Posts: 22

Re: DNS problem. Arch can't connect on the internet

Ok, I'm gonna try this and edit this post, to show the outcome...

But what I really do not understand, is why it has worked for two days, and why it's now failing...Without any change to the configuration files...

First EDIT: sometimes, when I'm writing "pacman -Sy" appeared the following message...

If you are sure that no package manager is running, you can remove /var/lib/pacman/db.lck

second EDIT: with the nameserver you gave me, juster, it works normally, so I thank you smile

But now, I would be pleased to understand why it failed before, because I want to install Archlinux on my computer for real in the future, and I don't want this network problem to happen again !!

Last edited by ren0 (2009-04-13 08:44:20)

Offline

#11 2009-04-13 12:29:35

ren0
Member
Registered: 2009-04-12
Posts: 22

Re: DNS problem. Arch can't connect on the internet

It does not work anymore...

If I'm writing such a command

pacman -Sy

here is the answer

:: Synchronisation package databases...
 archlinuxfr is up to date
  Error : updating of core failed (unpreviewed error)
  Error : updating of extra failed (unpreviewed error)
  Error : updating of community failed (unpreviewed error)

(the error message has been translated by myself, because it's written in french in my prompt)

I've just pinged google.com, it works normally

Last edited by ren0 (2009-04-13 12:30:45)

Offline

#12 2009-04-13 20:01:02

stream303
Member
Registered: 2009-03-18
Posts: 23

Re: DNS problem. Arch can't connect on the internet

You might find that placing your isp's primary and backup dns nameservers in the routers setup page, rather than manually editing any other files the most convenient.  By setting your dns addresses in the router first, you'll find your resolv.conf populated properly for any machine that attaches to the router.

If  you don't know your isp's primary and backup dns nameservers, you can use an alternate such as OpenDNS.com's:

208.67.222.222
208.67.220.200

Since DNS addresses are a security issue, (they can be altered easily in web-caches) be sure to verify these for yourself by going to opendns.com and looking at the bottom right hand of the page.  You'll also find instructions on how to access and set these values in a wide variety of popular routers, whether you use opendns.com addresses or not.

After making this change in the router, just restart your machines networking, or reboot.  (Don't forget to remove your previous custom additions before trying this)

This also helps bypass the router's own internal dns cacheing routines, which at one time were designed to work just for Windows and Mac, which didn't always follow the internet rfc guidelines.

Last edited by stream303 (2009-04-13 20:07:52)

Offline

#13 2009-04-14 15:40:42

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: DNS problem. Arch can't connect on the internet

ren0 wrote:

But now, I would be pleased to understand why it failed before, because I want to install Archlinux on my computer for real in the future, and I don't want this network problem to happen again !!

The 10.0.2.3 address I gave you is the address of VirtualBox's built in dns server.  VirtualBox also has a built in dhcp server, who gives the guest OS all the settings for the virtual network.  I don't know why the virtual dhcp server was not giving the guest OS the proper address for the builtin virtual DNS server.  I don't know that much about VirtualBox, you should ask someone who does.

I would recommend reading the manual for VirtualBox, look on their forums to find anyone having the same problem, or asking on the VirtualBox forum for advice.  It really seems more like a VirtualBox issue than a problem with Archlinux.  I doubt these problems would happen if you installed/ran archlinux without virtualization.

edit:
I forgot, as far as pacman is concerned:  The error message isn't very helpful and I'm not sure what's wrong.  One thing you can try is to to comment out mirrors that aren't nearby in /etc/pacman.d/mirrorlist.  At least, I comment out ftp.archlinux.org.  You might try pinging a mirror's address instead of google if pacman fails, to make sure you can connect to it.

Last edited by juster (2009-04-14 15:54:25)

Offline

#14 2009-04-17 07:23:21

kapz
Member
Registered: 2009-03-26
Posts: 88
Website

Re: DNS problem. Arch can't connect on the internet

Hi ren0.. I am not so sure but  you can give it a try smile....I think the the problem is with the nameserver(DNS) address in your resolv.conf file. And from your rc.conf it seems that the dhcpcd is not allowed to write DNS address in your resolv.conf because of the code in your rc.conf file:

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

It should be:

gateway="default gw 192.168.0.1"
ROUTES=(gateway).....without the exclamation mark.

hope this helps you..


I wonder how it would be like to use the rest 99% of my brain..:P

Registered Linux User: 487155

Offline

#15 2009-05-09 03:50:43

NeedCoffee2
Member
From: California
Registered: 2009-05-04
Posts: 9

Re: DNS problem. Arch can't connect on the internet

ren0,

I just solved my problem which seems like yours. I have been having a very similar scenario to yours except for my host is Ubuntu 9.04 using wireless and guest is Arch Linux. 

My solution.

1. I made kapz's suggested changes immediately above

gateway="default gw 192.168.0.1"
ROUTES=(gateway).....without the exclamation mark.

2. shutdown the guest

3. In the virtualbox GUI I selected bridged network then clicked on the screwdriver symbol which opened a pop up box that offered the choice to change the adapter from eth0 to wlan0 so I selected wlan0.

4. Rebooted the guest...and it worked!.

Hope this helps and works for you too.

Offline

Board footer

Powered by FluxBB