Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
получение hostname по dhcp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Wed Oct 19, 2005 12:38 pm    Post subject: получение hostname по dhcp Reply with quote

при настройке сервера dhcp обратил внимание на опцию option host-name "blablabla"
которая позволяет установить hostname для клиента.

какие необходимы телодвижения на стороне клиентов под управлением gentoo, чтобы они получали по dhcp свои hostname?
пример - у меня такая строчка в настройке dhcpd.conf
host wks44 { hardware ethernet 00:80:48:b6:ac:a3; fixed-address 192.168.0.44; option host-name "wks44";}

как сделать так, чтобы хост wks44 получил имя хоста "wks44"?
Back to top
View user's profile Send private message
GreenDragon
Guru
Guru


Joined: 31 Jul 2003
Posts: 319

PostPosted: Wed Oct 19, 2005 2:08 pm    Post subject: Re: получение hostname по dhcp Reply with quote

outs wrote:
при настройке сервера dhcp обратил внимание на опцию option host-name "blablabla"
которая позволяет установить hostname для клиента.

какие необходимы телодвижения на стороне клиентов под управлением gentoo, чтобы они получали по dhcp свои hostname?
пример - у меня такая строчка в настройке dhcpd.conf
host wks44 { hardware ethernet 00:80:48:b6:ac:a3; fixed-address 192.168.0.44; option host-name "wks44";}

как сделать так, чтобы хост wks44 получил имя хоста "wks44"?

Возможно в силу плохого английского, но я не нашел в dhcp такой возможности :)
тот host? который Вы имеете ввиду, по-моему несет другую смысловую нагрузку
Back to top
View user's profile Send private message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Thu Oct 20, 2005 10:24 am    Post subject: solved Reply with quote

да нет, как раз ту самую...
man dhcp-options говорит про неё прямо

option host-name string;

This option specifies the name of the client. The name may or may not be qualified with the local domain name (it is preferable to
use the domain-name option to specify the domain name). See RFC 1035 for character set restrictions. This option is only honored
by dhclient-script(8) if the hostname for the client machine is not set.

а вот это из man по dhcpcd

-H Forces dhcpcd to set hostname of the host to the hostname option supplied by DHCP server. By default dhcpcd will NOT set host-
name of the host to the hostname option received from DHCP server.


я изменил опции dhcpcd в файле /etc/conf.d/net на dhcpcd_eth0="-H" и у меня всё заработало :D
при этом также следует исключить загрузку скриптов hostname, domainname чтобы они не сбивали hostname и domainnanme полученные по dhcp
Back to top
View user's profile Send private message
|Bot|
n00b
n00b


Joined: 24 Jan 2005
Posts: 54

PostPosted: Thu Oct 20, 2005 11:11 am    Post subject: Reply with quote

у меня просто DHCP client принимает настройки от DHCP и выставляет host
без всяких гемороев :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian 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