DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Installation and Upgrading

NetBSD Installation and Upgrading Have trouble getting NetBSD on your toaster?

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd December 2011
Franciscus Franciscus is offline
New User
 
Join Date: Dec 2011
Posts: 4
Thanked 0 Times in 0 Posts
Default Setting hostname

How can I set hostname permanently in NetBSD?

I have used:

Code:
#hostname myhostname.domain.com
logout & login > seems to work fine

but when I set one in /etc/rc.conf after first login and then boot
it gives me something weird:
dhcppc0 as hostname. That same comes as default when I setup debian system but I can change it when installing.

No matter if it's in /etc/myname or /etc/rc.conf. Seems fine in bootscripts that hostname is set ok but when it comes to login it's there again. Should I do some editing somewhere else like /etc/hosts or is it broken in my system?

Last edited by phoenix; 4th December 2011 at 02:50 AM.
Reply With Quote
  #2   (View Single Post)  
Old 3rd December 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,116
Thanked 182 Times in 149 Posts
Default

How do you get/set your IP address? If you are using DHCP then it is possible you also assingned a host name via DHCP.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 4th December 2011
Franciscus Franciscus is offline
New User
 
Join Date: Dec 2011
Posts: 4
Thanked 0 Times in 0 Posts
Default

Yep. DHCP is set on rc.conf and net is running. So I need dhclient.conf file? I have never done these. Just learning things. In linux just autoconf with DHCP. I have not set my IP address. I am using this box just as workstation and learning. So I don't really know if that hostname really matters? Just annoying.
Reply With Quote
  #4   (View Single Post)  
Old 4th December 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,834
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by Franciscus View Post
So I need dhclient.conf file?
As J65nko has already stated, DHCP can send down more than simply an IP address. DNS information is commonly sent too. All of this is defined on the server side which your ISP controls.

If you want to set the hostname yourself, you are correct in asking about dhclient.conf(5). The following may also given additional context:

http://www.netbsd.org/docs/network/d...configure-dhcp

send, supercede, & host-name may be options you may want to play with.

Is it necessary? No.
Reply With Quote
  #5   (View Single Post)  
Old 4th December 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,116
Thanked 182 Times in 149 Posts
Default

Usually, if you are using it as a workstation, the name does not matter much.

But if you want to learn have a look at the SAMPLE section of the NetBSD dhclient.conf man page or at http://netbsd.gw.com/cgi-bin/man-cgi...nf++NetBSD-5.0
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My domain name as my IRC hostname? guitarscn General software and network 6 15th September 2010 02:43 PM
Hostname problem, and others gaeilgeboy FreeBSD General 3 7th July 2008 11:30 PM
Setting Up MPD benjgvps FreeBSD General 0 21st May 2008 12:20 PM
Hostname / web hosting issues vitiate FreeBSD General 4 20th May 2008 02:23 PM
thanks for setting this up DraconianTimes Off-Topic 8 5th May 2008 08:14 AM


All times are GMT. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick