Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
First day using linux and I can't get DNS to work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
handy
n00b
n00b


Joined: 13 Feb 2007
Posts: 3
Location: LA

PostPosted: Tue Feb 13, 2007 12:28 am    Post subject: First day using linux and I can't get DNS to work Reply with quote

Hi everyone, this is my first day using linux and I LOVE it. It took me a good 2-3 hours to get my USB Wireless working, but it finally did. Now I had to reinstall my OS for diff reasons, and I decided to set my IP manually. Unfortuantely DNS didn't work. I edited my /conf.d/net file to set to dhcp, but for whatever reason, my /etc/resolv.conf file is not getting anything in there! I add the info manually and it still just dissapeares when I stop and restart the network card. My DHCP server (router) is passing DNS info to all of my clients, except this gentoo box. Here are my questions:


1.) Where else besides /etc/resolv.conf do I need to worry about putting in my DNS servers if I am putting in a static IP?
2.) Where can I get a guide that will show me all the different files and procedures involved when I get a DHCP address?
3.) This is my first day using Linux and I am going to spend hours a day reading and researching, besides these cool forums, do you guys have any other suggestions?


Thanks.
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Tue Feb 13, 2007 12:51 am    Post subject: Reply with quote

i think you need to manually put the information in etc/resolve.conf. i always use dhcp, no need for static. actually i have static dhcp, meaning on the server i have ip's set by mac address.

if you need to find out what goes in /etc/resolve.conf, set up network with dhcp then look at /etc/resolve.conf

why do you want static ip's ?

matt
Back to top
View user's profile Send private message
handy
n00b
n00b


Joined: 13 Feb 2007
Posts: 3
Location: LA

PostPosted: Tue Feb 13, 2007 2:38 am    Post subject: Reply with quote

mattmatteh wrote:
i think you need to manually put the information in etc/resolve.conf. i always use dhcp, no need for static. actually i have static dhcp, meaning on the server i have ip's set by mac address.

if you need to find out what goes in /etc/resolve.conf, set up network with dhcp then look at /etc/resolve.conf

why do you want static ip's ?

matt



Hi Matt, I wanted static addresses so I could make sure my port forwarding always works with the intended ports reaching the right clients. Perhaps my router will let me force a certain IP to my mac tho. I was also just learning how to use it, so if I ever did need to configure a Gentoo server or something, I would know how.


It's also really odd, I went to \etc\resolve.conf and I made sure the right nameserver was in there, but I still cannot get DNS to work. I also went to\etc\resolv.conf and I made sure it was in there, no cigar. Iread somewhere it was resolv.conf so I just put it in there for redundancy. I stopped and restarted my wlan through the net command and I still cannot ping a domain name, but I can hit the IP. Very wierd.

I did a /etc/init.d/net.wlan0 stop
then I typed:
nano -w /etc/resolv.conf and I got a output of:
# generated by NetworkManager, do not edit!



nameserver 66.75.164.90
nameserver 66.75.164.89


Then I did a:
/etc/init.d/net.wlan0 start which got me:

starting wlan0
configuring wireless network for wlan0
wlan0 connected to ESSID "[H]" at oo:of:66:Lb1:79:9F
in managed mode on channel 6 (WEB disabled)
configuration not set for wlan0 - assuming dhcp
bringign up wlan0
dhcp
running dhcpcd ...
wlan receved address 192.168.1.100/24

I typed:
nano -w /etc/resolv.conf

and it was empty....
I typed:
/etc/resolve.conf and I got the same thing I typed in there previously which was:
nameserver 66.75.164.90




Just for shitts and giggles, I do a:
/etc/init.d/net.wlan0 stop

and I check:
nano -w /etc/resolv.conf

and once again, the 2 name servers are there!!


In short this is telling me whenever I run \etc\init.d\net.wlan0 stop my nameservers are generated by networkmanager (probably from my dhcp router which I have them manually put in), but when I start it, something overwrites it, maybe I have to add a "nodns" or something to my dhcp line...any suggs?

Btw, when I add the dns settings in \etc\resolv.conf manually, my name resolution works fine, so I guess my question is, why is sayabon linux overwriting my dns settings whenever I start the wlan through net? Thanks again.
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Tue Feb 13, 2007 3:16 am    Post subject: Reply with quote

\etc\resolve.conf is not the correct path. / is the directory delimiter, and \ is an escape character.
please avoid all the extra spaces in your post.

here is my resolve.conf (box on the lan, not the server):

matt@thing ~ $ cat /etc/resolv.conf
search home
nameserver 192.168.168.1
domain home
matt@thing ~ $

why does yours say "# generated by NetworkManager, do not edit!" ?

i have not done this on wireless so i might not be able to help with that.

can you post your /etc/conf.d/net ? (without the comments so it doenst take up all that space)

here is mine for example (gentoo server with eth0=isp and eth1=home_lan):

matt@fire ~ $ cat /etc/conf.d/net
iface_eth1=( "192.168.168.1 broadcast 192.168.168.255 netmask 255.255.255.0" )
iface_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"

what is sayabon linux ?

back to your question about dns for static, i read /etc/conf.d/net.example and think you can set it with: (replace with your dns server)
dns_servers_eth0="192.168.0.2 192.168.0.3"

likewise for wireless (/etc/conf.d/wireless.example):
dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )

did you read /etc/conf.d/net.example and /etc/conf,d/wireless.example ?

matt
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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