Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot Resolve Hostnames
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Sun May 25, 2014 3:14 am    Post subject: Cannot Resolve Hostnames Reply with quote

I've been trying to install gentoo but cannot seem to resolve hostnames on any medium (most recently I've tried sysresccd) though both my wireless and my ethernet cards show up on ifconfig like the handbook says that they should. Experience tells me that there's something simple which I'm missing here, but I really am stumped. Cards are rtl8169 for ethernet and rtl8191se for the wireless. I don't really care about using the wireless right now though

I've tried doing modprobe r8169 and net-setup on the ethernet card, but nothing seems to change. Running dhcpcd gives me complaints about "ipv6_handlera: not found/unavailable" when it doesn't return "success" and then falls back to an ipv4 address. So far as I can tell the system has no problem seeing the cards nor does it have an issue describing them. I can also ping localhost. For some reason it just can't resolve host names.
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Sun May 25, 2014 5:17 am    Post subject: Reply with quote

It suddenly occurs to me that I've never even tried pinging a known good ip address. I'm getting a beer before I spend my whole Saturday in my frigging apartment...
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Sun May 25, 2014 7:39 am    Post subject: Reply with quote

necron wrote:
It suddenly occurs to me that I've never even tried pinging a known good ip address. I'm getting a beer before I spend my whole Saturday in my frigging apartment...



Yes indeed, first determine if the network works, only look at the DNS once it works using an IP address...

try both :
Code:
ping gentoo.org
ping 89.16.167.134


If this doesnt work, also try to ping you local router to see if you can reach that.

What does
Code:
cat /etc/resolv.conf


and
Code:
ifconfig
give?


Alex.


Last edited by lexflex on Sun May 25, 2014 4:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Sun May 25, 2014 4:12 pm    Post subject: Reply with quote

lexflex: did you mean to ask OP to run /etc/resolv.conf as a command or to ask for the contents of the file?

OP: failures like this fall into two major categories. You might have a bad or empty DNS selection from initial configuration or you might have a valid configuration outside the chroot, but no configuration inside the chroot.
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Sun May 25, 2014 4:30 pm    Post subject: Reply with quote

Hu wrote:
lexflex: did you mean to ask OP to run /etc/resolv.conf as a command or to ask for the contents of the file?


well, indeed, the following would be better ;-)

cat /etc/resolv.conf
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Sun May 25, 2014 11:34 pm    Post subject: Reply with quote

Pinging the IP address doesn't work either (network is down/unavailable error messages and such). /etc/resolve.conf is just a few commented lines. I'm installing gentoo on a different computer, so posting the output of commands is sort of a hassle. Is there something specific which you need from the ifconfig output?

To be clear, the disk on the machine which I'm trying to do the install on is freshly partitioned and I'm working from a liveusb. There was no working configuration on the computer before I decided to install gentoo. I had a gentoo installation running on it once upon a time, but damned if I know what happened to it. So far as I know there is not other configuration on the box.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Mon May 26, 2014 1:03 am    Post subject: Reply with quote

If the network is not up, that indicates there was a problem configuring it. What was the output when you configured the network interface (section 3 of the handbook)?
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Mon May 26, 2014 2:16 am    Post subject: Reply with quote

I'm a little unclear on what output you're looking for. Assuming you mean of cat /etc/resolv.conf, net-setup generates a blank configuration (unless I go manual, of course).

For the manual configuration I have 192.168.1.1 for the internal ip, 192.168.1.255 for the broadcast, the netmask is just 255.255.255.0 and the nameserver is set to 75.75.75.75 which is to say:
Code:
cat /etc/resolv.conf

nameserver 75.75.75.75


It is set that way because I do not have a local DNS server and I'm using what Comcast provides.


edit: My ethernet cable is busy doing other things right now and the wireless card is hard blocked for some reason (there is no hardware switch for the wireless card and this seems to be a pretty common issue), but route add default gw has solved this issue for others (I'll try it and then report back). I also installed openSUSE on the machine, just to see whether installing something on it would make a difference. They don't call me n00b for nothing, ya know. Then again I do get a sick satisfaction out of learning how to do this stuff correctly...
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Mon May 26, 2014 8:10 am    Post subject: Reply with quote

Hi,

necron wrote:

but route add default gw has solved this issue for others (I'll try it and then report back)....


Looking at the output of ifconfig might give a lot of information, like if the interface is 'up' but for example withwrong masks, or something else. ( so, if possible, try to give the information you get from ifconfig). Manual configuration is a good idea to check if the interface works that way.
You can also try to configure the network from the commandline using ifconfig (using something like ifconfig eth0 192.168.1.10 netmask 255.255.255.0 )

Maybe also try to manually restart the network and post any errors or output you get:
Code:
/etc/init.d/net.eth0 restart


Alex.
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Mon May 26, 2014 9:48 am    Post subject: Reply with quote

It looks like there are no net.* scripts in /etc/init.d, even for lo regardless of distro. As for the network specs, my above post gave the manual configuration which I set for the card. Aside from what I already told you were some statistics about the packets going through that interface. It's about 3AM here, so I'll let you know how the potential fix I mentioned works out tomorrow.
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Mon May 26, 2014 10:03 am    Post subject: Reply with quote

Greetings from that frigging computer.

I went through the openSUSE installation and used yast to configure the network, so it's working under an installation, though not the one which I necessarily want. I'm assuming that I want the working configuration under gentoo, so I'm putting it here for safe-keeping. I still have yet to verify that this will work under a gentoo base however, and I'm still not sure why there are no init scripts for any of my interfaces. I'm guessing that I just didn't know how to configure realtek cards?

Code:
enp2s0    Link encap:Ethernet  HWaddr C8:0A:A9:79:58:D9 
          inet addr:50.184.84.36  Bcast:50.184.85.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8135 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1443 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2946552 (2.8 Mb)  TX bytes:199865 (195.1 Kb)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Mon May 26, 2014 10:12 am    Post subject: Reply with quote

Hi,

Mmmm, it appears your computer has a public IP address, are you not behind some router on a local LAN? (you mentioned defining the default gateway, which suggests you are..).
Assuming you are on some local network with multiple computers this might not be the configuration you are looking for....
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Mon May 26, 2014 10:20 am    Post subject: Reply with quote

Just me and my modem. I just wanted to try something to see if it would work. I figured that I couldn't really do that much damage when things weren't working anyways.

edit: I think I see what's confusing. I do have multiple computer, but I have no router. What I can do is plug the ethernet cable into one computer is and use a public wifi network for the other. It was pretty silly of me to try and configure my computer as if there was anything between it and the modem, but like I said nothing was working anyways.
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Mon May 26, 2014 7:58 pm    Post subject: Reply with quote

I went back to the minimal install medium to see if I could get the card to work that way, with no luck (net.* did show up when I downloaded the iso again though). net-setup didn't want to overwrite the NIC configuration, I can set it with ifconfig and I still get the same complaint:

Code:
connect: Network is unreachable


Net.lo and net.enp2s0 are both running. I'm not sure what's making the network function under opensuse, but I'd rather not use opensuse....
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Tue May 27, 2014 2:37 am    Post subject: Reply with quote

Fixed the ethernet. For some reason the system clock in the BIOS was way off. I reset it to local time and my ethernet connection loaded automatically from the minimal image.
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Tue May 27, 2014 8:15 am    Post subject: Reply with quote

necron wrote:
Fixed the ethernet. For some reason the system clock in the BIOS was way off. I reset it to local time and my ethernet connection loaded automatically from the minimal image.


Strange that that makes a difference... So, the network is all working now ?

Alex.
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Wed May 28, 2014 2:29 am    Post subject: Reply with quote

It was. Now it's giving the exact same issue :?

At least it lasted long enough for me to emerge the kernel...
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Wed May 28, 2014 7:33 am    Post subject: Reply with quote

necron wrote:
It was. Now it's giving the exact same issue :?
At least it lasted long enough for me to emerge the kernel...


Mmm, this is strange. I would not expect the network to come up one time, but to fail to do so at some random other time.

It would help if you can post the exact output of some of the things you tried, like what if you start the network manually
(using /etc/init.d/net.eth0 start or /etc/init.d/net.eth0 restart ), and the exact output of ifconfig.
Maybe you can copy the output to some file, and then transfer that file to a working system to post the output...

Alse dmesg might provide some information regarding the drivers and networkadapter.

Alex.


PS: Make sure you test the network using IP adresses only: using domainnames is the next step, and you want to make sure the two issues don't get confused.
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Wed May 28, 2014 9:12 pm    Post subject: Reply with quote

Neither would I. Also, I notice that for some reason I kept calling the card rtl8169 though. It's an rtl8168 on a thinkpad x100e (according to lspci output). Theoretically the r8169 driver supports my card (and it did at one point, apparently). tail -f /var/log/messages gives me a bunch of ipv6nd_handlera: Resource temporarily unavailable messages. Disabling ipv6, the output halts at "solicitng aDHCP lease".
Back to top
View user's profile Send private message
necron
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 97

PostPosted: Fri May 30, 2014 3:10 am    Post subject: Reply with quote

One other point, there is traffic going through the interface, which is to say that RX and TX bytes are greater than zero and increase as time goes on (I assume that's because the computer is trying to find a network). So obviously I can drive the card. I also made sure to tell /etc/conf.d/net that I'm talking directly to the modem (dhcp_options="nogateway" is in there).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum