# Wired Network has DNS issues (openRC)

## rahulthewall

OK, I do not know what is going on here. I plug in my ethernet cable and connect to the network using wicd. I can ping any host I want. But when I try to run traceroute or browse the web, I get the "Server not Found" message. If I go to the website using IP address, I can access it. 

What more info should I provide?

----------

## DONAHUE

using dhcp or fixed ip?

contents of /etc/conf.d?

contents of /etc/resolv.conf?

anything in wicd using ( "something" ) formatting?

----------

## rahulthewall

 *DONAHUE wrote:*   

> using dhcp or fixed ip?
> 
> 

 

dhcp (dhcpcd)

 *DONAHUE wrote:*   

> 
> 
> contents of /etc/conf.d?
> 
> 

 

/etc/conf.d/net is empty (thus defaults to dhcpcd)

 *DONAHUE wrote:*   

> 
> 
> contents of /etc/resolv.conf?
> 
> 

 

nameserver 192.168.1.1 (router IP)

 *DONAHUE wrote:*   

> 
> 
> anything in wicd using ( "something" ) formatting?

 

I have now removed wicd and tried with /etc/init.d/net.eth0 start. This basically starts dhcpcd on eth0 - I get an IP. As I said before, I can ping any host. However, while I try to browse the web, or run traceroute to any host, I get a host not found error.

Help would be appreciated. Might I add that it works in the (U/K)buntu live CD (and Windows) but fails in Gentoo and SysRescue Live CD (same problems in both - name resolution failure)

----------

## DONAHUE

suggest in /etc/resolv.conf: *Quote:*   

> nameserver 8.8.8.8
> 
> nameserver 192.168.1.1

 

```
nslookup google.com
```

should see  *Quote:*   

> nslookup google.com
> 
> Server:		8.8.8.8
> 
> Address:	8.8.8.8#53
> ...

 If this works but after 

```
/etc/init.d/net.eth0 restart
```

, nslookup gives a different answer, evidence would suggest that you will have to write /etc/conf.d/net to specify dhcp: *Quote:*   

> config_eth0="dhcp"
> 
> dhcp_eth0="-t 1" # Timeout after 10 seconds
> 
> dhcp_eth0="nodns" # do not write/overwrite /etc/resolv.conf

 guessing the default blank /etc/conf.d/net script may be presenting ( "something" ) format to openrc

edit to put  *Quote:*   

> config_eth0="dhcp"

  in openrc compatible format.Last edited by DONAHUE on Sat Nov 13, 2010 2:13 pm; edited 1 time in total

----------

## rahulthewall

 *DONAHUE wrote:*   

> suggest in /etc/resolv.conf: *Quote:*   nameserver 8.8.8.8
> 
> nameserver 192.168.1.1 
> 
> ```
> ...

 

Yes, I see this ...

 *DONAHUE wrote:*   

> If this works but after 
> 
> ```
> /etc/init.d/net.eth0 restart
> ```
> ...

 

After restarting, I get a different answer (namely 192.168.1.1) because resolv.conf is overwritten by dhcpcd with the nameserver now being 192.168.1.1. nslookup still works with 8.8.8.8 just being replaced by 192.168.1.1.

Also, with 8.8.8.8 as the primary nameserver, HTTP browsing works, but name lookup is so slow that it might as well not work.

I am confused here, what is going wrong?

----------

## DONAHUE

if you have changed /etc/conf.d/net to: *Quote:*   

> config_eth0="dhcp" #sorry, screwed this up first time, writing on a non-openrc machine
> 
> dhcp_eth0="-t 1" # Timeout after 10 seconds 
> 
> dhcp_eth0="nodns" # do not write/overwrite /etc/resolv.conf

 put *Quote:*   

>  nameserver 192.168.1.1
> 
> nameserver 8.8.8.8 

 in /etc/resolv.conf

```
/etc/init.d/net.eth0 restart
```

and try browsing. If that works reasonably well, reboot and try browsing to see if openrc  starts networking efficiently.

----------

## rahulthewall

 *DONAHUE wrote:*   

> if you have changed /etc/conf.d/net to: *Quote:*   config_eth0="dhcp" #sorry, screwed this up first time, writing on a non-openrc machine
> 
> dhcp_eth0="-t 1" # Timeout after 10 seconds 
> 
> dhcp_eth0="nodns" # do not write/overwrite /etc/resolv.conf put *Quote:*    nameserver 192.168.1.1
> ...

 

Does not work.  :Sad: 

----------

## DONAHUE

Put

```
nameserver 156.154.70.1
```

in /etc/resolv.conf

```
/etc/init.d/net.eth0 restart
```

try nslookup and browsing

alternate: look up your ISP's name servers and substitute in the above and test

no firewalls or proxies?

----------

## rahulthewall

 *DONAHUE wrote:*   

> Put
> 
> ```
> nameserver 156.154.70.1
> ```
> ...

 

Does not work, again! I just don't get it, XP reports the following and it works ...

```

C:\Documents and Settings\Rahul Jain>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : googly

        Primary Dns Suffix  . . . . . . . :

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

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

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

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :

        Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Controller

        Physical Address. . . . . . . . . : 00-15-C5-1B-5D-92

        Dhcp Enabled. . . . . . . . . . . : Yes

        Autoconfiguration Enabled . . . . : Yes

        IP Address. . . . . . . . . . . . : 192.168.1.34

        Subnet Mask . . . . . . . . . . . : 255.255.255.0

        Default Gateway . . . . . . . . . : 192.168.1.1

        DHCP Server . . . . . . . . . . . : 192.168.1.1

        DNS Servers . . . . . . . . . . . : 192.168.1.1

        Lease Obtained. . . . . . . . . . : 14 November 2010 01:04:14

        Lease Expires . . . . . . . . . . : 15 November 2010 01:04:14

```

This is what Gentoo shows, and it does not work!

```

eth0      Link encap:Ethernet  HWaddr 00:15:c5:1b:5d:92  

          inet addr:192.168.1.34  Bcast:255.255.255.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:278 errors:0 dropped:0 overruns:0 frame:0

          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:20684 (20.1 KiB)  TX bytes:1613 (1.5 KiB)

          Interrupt:17 

```

----------

## DONAHUE

ping an ip is still working?

what is nslookup doing now? post result please

nameserver 8.8.8.8 is totally failing also now?

----------

## rahulthewall

It is an ipv6 issue. As soon as I disable ipv6 in firefox everything works perfectly. Now how do I go about disabling ipv6 for a particular network? Or to have it prefer ipv4?

----------

## DONAHUE

Does removing ipv6 support from firefox sound like a right answer for you? Does emerge still work?

```
echo "www-client/firefox -ipv6" >> /etc/portage/package.use

emerge firfefox
```

Just found this: https://forums.gentoo.org/viewtopic-p-6097666.html?sid=1005d48d8adc339ebf83da84c513c658

if you are/were trying to ipv6: http://www.gentoo.org/doc/en/ipv6.xml

----------

## rahulthewall

 *DONAHUE wrote:*   

> Does removing ipv6 support from firefox sound like a right answer for you? Does emerge still work?
> 
> ```
> echo "www-client/firefox -ipv6" >> /etc/portage/package.use
> 
> ...

 

I can remove ipv6 support from firefox in about:config and make it work. The problem is that everything else - wget/ftp/etc. also fail which means I can not use anything on my gentoo box right now.

I tried commenting out ipv6 in /etc/modprobe.d/alias.conf (to disable ipv6 from loading). I can see that ipv6 module is not loaded. The system still does not work.What more do I need to do?

----------

## DONAHUE

if not needing ipv6,

USE="-ipv6" in /etc/make.conf followed by emerge -uND world, recompile kernel after removing ipv6 support

if needing ipv6, try redoing the ipv6 guide

Just for info I have ipv6 use flag and default ipv6 kernel choices in my gentoo-sources kernel-2.6.34-r10 and have no problem with dns.

```
equery hasuse ipv6
```

 might be of interest

----------

## rahulthewall

 *DONAHUE wrote:*   

> if not needing ipv6,
> 
> USE="-ipv6" in /etc/make.conf followed by emerge -uND world, recompile kernel after removing ipv6 support
> 
> if needing ipv6, try redoing the ipv6 guide
> ...

 

I removed ipv6 support and everything seems to work. However, I don't see it as a solution. Why should having support for ipv6 not make ipv4 work?

----------

## DONAHUE

I'm just guessing that somehow you got just enough ipv6 configured to make it a problem but not enough to make it work. With sysresccd having the same problem it can't be anything you did wrong; some kind of bad interaction between the gentoo defaults, your nic, and your router.

----------

