FreeBSD - cvsup can't get ip address of own host *solved - thx*

Booty

Senior member
Aug 4, 2000
977
0
0
So I just installed FreeBSD last night, and so far have had pretty good luck with setting it up (*knocks on wood*)... anyway, I'm trying to get my sound card up and running by following a guide on freebsd.org, which told me to check the device list in /usr/src/sys/... umm... whatever/LINT. Point is, that file's not there, so it pointed me to doing cvsup.

So I made my supfile, no problem. I run the command, and get "Cannot get IP address of my own host -- is its hostname correct?". So checking this against Google got me this:

"use ifconfig to find out your IP-adress, then nslookup to find out its hostname
and then, finally, use the hostname(1)-command to set this hostname.

That should make it work."

Easy enough... but nslookup isn't working properly... perhaps because I'm behind a D-Link DI-604 router/firewall? Anyway, also from a search on google...

"It was all a matter of putting hostname.localhost.localdomain in etc hosts. I hope this helps future newbies who come across this problem."

Basically, I was hoping for a little more specific directions... hostname is, what, the equivalent of your computer/share name in Windows? The network card's fine... I've been able to ping other machines on my network as well as surf the web, so I'm just wondering what information it is that I need here, why I can't get it, and where I have to put it using what syntax. Thanks in advance... let me know if more info is needed.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Make sure you have a line in /etc/hosts that points localhost to 127.0.0.1, like:

127.0.0.1 localhost

(ip, then hostname(s), seperated by spaces. Look in the file, should be self explanatory)
 

Booty

Senior member
Aug 4, 2000
977
0
0
Do you have your /etc/resolv.conf setup correctly?

I have absolutely no idea... in my searches I didn't find anything pointing me at that file.

Make sure you have a line in /etc/hosts that points localhost to 127.0.0.1, like:

127.0.0.1 localhost

(ip, then hostname(s), seperated by spaces. Look in the file, should be self explanatory)

Well, I haven't touched the file, but I've messed with the hosts file in Windows before... anyway, the only uncommented lines in it read..

::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain

and it says to replace 'my.domain'... with what? Would that be charterpipeline.net? Man... I hate being clueless!!

Here's something else, real quick... I can get on the net from my FreeBSD box (where I'm posting from, actually), but if I log out and reboot/log back on, I have to run dhclient to get the net back up and going again... so I'm sure there's something I need to set with that, but I haven't even gotten the chance to look up that, since I'm still trying to figure this out and get my sound up (which there will be another post for, in case you guys want to check it out ;) )... so if that's related or an easy fix, feel free to clue me in.

Thanks for the help guys... I'm trying to do this on my own the best I can, searching the web and all that, but I haven't found too many straight answers.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
If you don't have your own dns domain then you don't really need to change the my.domain (you can probably just delete it altogether but it won't hurt to leave it as it is).

There should be something in /etc/rc.conf you can set (dhclient=YES probably) to run dhclient at boot.
 

Booty

Senior member
Aug 4, 2000
977
0
0
Originally posted by: BingBongWongFooey
If you don't have your own dns domain then you don't really need to change the my.domain (you can probably just delete it altogether but it won't hurt to leave it as it is).

There should be something in /etc/rc.conf you can set (dhclient=YES probably) to run dhclient at boot.

So I feel pretty retarded, but anyway... all is well now with both issues. Thanks guys... all I had to do was edit rc.conf and put a line for my network card to use DHCP, like you said Bing (can I call you Bing? ;) ). The syntax was....

ifconfig_xl0="DHCP"

replacing xl0 with whatever your NIC uses... I had previously set that while reading through a networking guide on FreeBSD.org to something specifiying my local IP (since I'm behind a router) and netmask, which had then allowed me to communicate on the LAN but not outside the router. Anyway, cvsup is working now, as is the internet. Thanks for the help guys!