View previous topic :: View next topic |
Author |
Message |
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Sun Sep 30, 2012 12:50 pm Post subject: [solved] resolv.conf always being set to wrong settings... |
|
|
I've got it configured like i always do. Ifconfig gives me the same addresses (altho not same result) both before and after i've successfully connected to the internet, my /etc/conf.d/net looks correctly set up and i've triple checked everything in it, but heres the deal, i use manual configurations, but even when i set this file to use dhcp (config_eth0="dhcp") it still wont connect to the internet on bootup, but if i run dhcpcd after booting up and logging in. (i specifically need to type just "dhcpcd", not "dhcpcd eth0" that wont work as it'll give me a dhcpcd already running....)
Heres my ifconfig on non-functional internet using the dhcpcd setting (i'm typing this)
Code: | eth0
inet addr: 192.168.1.68 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAst RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 (everything after this is 0)
TX packets:6 (everything after this is 0)
collisions:0 txqueuelen:1000
RX bytes: 871 TX bytes:577 |
Heres on a working one after running dhcpcd
Code: | Same...
RX packets 29
TX packets:18
RX bytes:3602 TX bytes:2048
|
Heres running on my manual configurations.
Code: | (same, except ip is now 192.168.1.69)
RX packets:5
collisions 0 txqueuelen:1000
RX bytes:3000 TX bytes:0 |
(note: on manual settings dhcpcd eth0 does work to get me connected)
Heres my /etc/conf.d/net
Code: | dns_domain_lo=THULE
config_eth0=192.168.1.69 netmask 255.255.255.0 brd 192.168.1.255"
routes_eth0="default via 192.168.1.254"
dns_servers_eth0="212.30.200.200 194.105.224.1" |
My only noteworthy difference is setup is that i connected the router to a switch, and the computer to the switch, internet works fine on windows aswell with these very same manual settings. however even if i plug the router directly into my pc it wont change a thing, so that is not the issue, i have ran out of ideas and i don't understand why this isn't working, and i find that my results are being rather strange too. _________________ This picture was my biggest reason for ever trying Gentoo <3
Last edited by rabcor on Mon Oct 01, 2012 12:31 am; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Sun Sep 30, 2012 4:00 pm Post subject: |
|
|
The "non-functional" case still shows received traffic. Please elaborate on the way in which the network does not work. What programs have you tried? What error messages do they print? |
|
Back to top |
|
|
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Sun Sep 30, 2012 4:51 pm Post subject: |
|
|
I noticed that too, thats why i thought things looked weird.
I used ping (gentoo.org and google.com)
just gives me unknown host (same as if my internet weren't even plugged in)
I at some point managed to get it to give me a different error tho, can't remember what it was but for now its irrelevant. _________________ This picture was my biggest reason for ever trying Gentoo <3 |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Sun Sep 30, 2012 7:02 pm Post subject: |
|
|
That suggests your name resolution is not working, but does not mean that your network connection does not work. Check that your /etc/resolv.conf is valid in the non-functional case. |
|
Back to top |
|
|
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Sun Sep 30, 2012 7:18 pm Post subject: |
|
|
Hu wrote: | That suggests your name resolution is not working, but does not mean that your network connection does not work. Check that your /etc/resolv.conf is valid in the non-functional case. |
It is not,
Code: | # Generated by net-scripts for interface lo
domain THULE |
how do i fix this? _________________ This picture was my biggest reason for ever trying Gentoo <3 |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Sun Sep 30, 2012 8:16 pm Post subject: |
|
|
rabcor wrote: | Hu wrote: | That suggests your name resolution is not working, but does not mean that your network connection does not work. Check that your /etc/resolv.conf is valid in the non-functional case. |
It is not,
Code: | # Generated by net-scripts for interface lo
domain THULE |
how do i fix this? |
My (standard) setup has the following resolv.conf format:
Code: |
# Generated by dhclient or interface eth0
search Home
nameserver 192.168.0.1
|
A possible workaround is to hard-code the Google nameserver, 8.8.8.8 into resolv conf
and see if routing then works.
Will |
|
Back to top |
|
|
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Mon Oct 01, 2012 12:29 am Post subject: |
|
|
thanks for your help, (after a little googling) i got it by using chattr +i /etc/resolv.conf that way it can't be deleted or modified after i set it right. _________________ This picture was my biggest reason for ever trying Gentoo <3 |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Mon Oct 01, 2012 12:41 am Post subject: |
|
|
rabcor wrote: | thanks for your help, (after a little googling) i got it by using chattr +i /etc/resolv.conf that way it can't be deleted or modified after i set it right. |
Nominated for nonsense of month. Learn how to configure your DHCP client (or DHCP server if you have access to it). In case it is not a mobile device just use static configuration. Even if DHCP client consumes only 1 MB of RAM it is still odd if it is not needed. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Mon Oct 01, 2012 9:47 am Post subject: |
|
|
Jaglover wrote: | rabcor wrote: | thanks for your help, (after a little googling) i got it by using chattr +i /etc/resolv.conf that way it can't be deleted or modified after i set it right. |
Nominated for nonsense of month. Learn how to configure your DHCP client (or DHCP server if you have access to it). In case it is not a mobile device just use static configuration. Even if DHCP client consumes only 1 MB of RAM it is still odd if it is not needed. |
Using dhcp at boot increases the time it takes to boot i noticed, by longer than most other things i used at statrtup when i had my system set up.
instead of throwing shit at me maybe you could say "learn how to configure your dhcp client here" (giving a link) but i just told you why i don't wanna use dhcp anyways so no need for that. _________________ This picture was my biggest reason for ever trying Gentoo <3 |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Tue Oct 02, 2012 2:32 am Post subject: |
|
|
Skipping DHCP is a valid choice. However, Jaglover did also suggest using a static configuration if you do not want to use DHCP. Using a static configuration implies setting /etc/conf.d/net such that it configures your network correctly. Based on the information provided, your /etc/conf.d/net is not set properly and you elected to use a very bad workaround instead of resolving the problem. |
|
Back to top |
|
|
pidsley Tux's lil' helper
Joined: 09 Jun 2012 Posts: 80
|
Posted: Tue Oct 02, 2012 2:55 am Post subject: |
|
|
Check out this section of the Gentoo Handbook. The /etc/conf.d/net file you posted does not look like the samples in this section. When /etc/conf.d/net is configured correctly and static networking is working properly, net-scripts write the correct nameservers into /etc/resolv.conf, so you really should not need to set it yourself and make it unwriteable.
Note that I essentially just repeated Quote: | Using a static configuration implies setting /etc/conf.d/net such that it configures your network correctly. Based on the information provided, your /etc/conf.d/net is not set properly and you elected to use a very bad workaround instead of resolving the problem. |
The short answer: try removing this line in your conf.d/net file: Code: | dns_domain_lo=THULE |
You might also want to think about being a little more patient with people with several thousand posts who are trying to help you, especially if you would like their help in the future. |
|
Back to top |
|
|
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Tue Oct 02, 2012 3:40 pm Post subject: |
|
|
Good advice, but i wouldn't care even if he was an admin, if he's being disrespectful towards me i will not allow that to just happen, thats just not how i do things (i'd rather get banned than swallow my pride, but i do try to ignore some things when i can bring myself to.) also, it didn't look like he was trying to help me... it does look like you are tho, so thanks a lot.
Quote: | Code Listing 2.2: Setting the domainname
# nano -w /etc/conf.d/net
(Set the dns_domain variable to your domain name)
dns_domain_lo="homenetwork" |
what i did was according to handbook, even if i didn't need it, nothing said it would be worse to do it. But as you said, removing that line did resolve my problem so i don't have to use a bad workaround... i just did that because thats what someone suggested, and it saved me some trouble until your reply came along. _________________ This picture was my biggest reason for ever trying Gentoo <3 |
|
Back to top |
|
|
pidsley Tux's lil' helper
Joined: 09 Jun 2012 Posts: 80
|
Posted: Tue Oct 02, 2012 4:18 pm Post subject: |
|
|
rabcor wrote: |
what i did was according to handbook, even if i didn't need it, nothing said it would be worse to do it. |
It's usually best to follow the Handbook exactly, rather than just adding things it doesn't mention, unless you have a really good reason. Maintaining a working Gentoo system often requires meticulous attention to detail.
rabcor wrote: | Good advice, but i wouldn't care even if he was an admin, if he's being disrespectful towards me i will not allow that to just happen, thats just not how i do things (i'd rather get banned than swallow my pride, but i do try to ignore some things when i can bring myself to.) also, it didn't look like he was trying to help me... |
He actually was, if you could read past the tone that upset you so much. You may need to learn to ignore a little more.
I'm glad you got your problem solved. I think if you had just taken a step back and read the Handbook and the replies you were given, you could have figured it out yourself. I'm a Gentoo noob myself, and I just figured this out while I was trying to answer your question. I noticed that your resolv.conf ended up with your domain_lo information in it, and that this wasn't mentioned in the Handbook. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue Oct 02, 2012 9:14 pm Post subject: |
|
|
rabcor wrote: | what i did was according to handbook, even if i didn't need it, nothing said it would be worse to do it... | Well, not exactly. Right before that little code listing, Gentoo Handbook wrote: | Second, if you need a domainname, set it in /etc/conf.d/net. You only need a domain if your ISP or network administrator says so, or if you have a DNS server but not a DHCP server. You don't need to worry about DNS or domainnames if your networking is setup for DHCP. | In my opinion, our documentation shouldn't be littered with warnings that, if you do something wrong, you'll make it worse. That kind of stands to reason without being explicitly stated, doesn't it? What you had in there wasn't a valid domain name, thus certainly wasn't your domain name.
Are you sure you're not a Help Vampire?
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
rabcor Apprentice
Joined: 05 Apr 2012 Posts: 200
|
Posted: Wed Oct 03, 2012 7:47 pm Post subject: |
|
|
I made a mistake. And i'll admit that. And i'm not ashamed of that because mistakes are exactly the best thing to learn from of course, but it was a very silly mistake i shouldn't have made, and is rather unlikely of me to make. (I just didn't want to have that "computername.unknown" at bootup, which is how this happened, but to get rid of that i just had to change it in the hostfile right?) and i'm pretty sure i'm not a help vampire. _________________ This picture was my biggest reason for ever trying Gentoo <3 |
|
Back to top |
|
|
Bones McCracker Veteran
Joined: 14 Mar 2006 Posts: 1611 Location: U.S.A.
|
Posted: Sun Oct 07, 2012 7:49 pm Post subject: |
|
|
Don't worry about it. But if you're going to seek help in Internet forums, you've got to try to be a little bit thicker skinned, not take offense if somebody points out that you're doing something silly, and learn to laugh at yourself. It's not like everybody else hasn't done similar things before. _________________
patrix_neo wrote: | The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it. |
|
|
Back to top |
|
|
|