Tom's Guide > Forum > Systèmes d'exploitation (Windows, Mac OS, Linux...) > Nom d'hôte DHCP et DDNS (dns dynamique)

Nom d'hôte DHCP et DDNS (dns dynamique)

Forum Systèmes d'exploitation (Windows, Mac OS, Linux...) : Nom d'hôte DHCP et DDNS (dns dynamique)

TomsGuide.com : 800 000 inscrits répondent à toutes vos questions high-tech et informatique. Pour obtenir de l'aide, inscrivez-vous gratuitement !
Mot :    Pseudo :           
 

Bonjour,

Voilà mon petit problème.

J'ai un petit réseau LAN de 3 ou 4 PC.
Toutes les adresses sont en 192.168.10/255.255.255.0.
Deux de ces quatre ont une adresse IP fixe 192.168.1.1 (helios) et
192.168.1.58 (sonic).
(Linux Mandrake 9.2, tous les deux)

J'ai mis un DNS et DHCP sur 192.168.1.1 pour qu'ils fournissent les adresses
IP (non fixes donc) au deux autres... Un sous Linux MDK 9.1 et l'autre sous
WinXP (portable de ma femme)...

Tout fonctionne : DHCP <--> DNS , le DNS est mis à jour avec les noms d'
hôtes
qu'ils fournissent... satellite et lune (Cela tourne bien !)

Mais j'aimerais que se soit le DHCP qui leur fournisse leur noms d' hôtes, et
que chacun récupère ce nom d' hôte à leur compte !
ex : dhcp-hosts-SLN-192-168-1-252-0-a0-24-e5-5a-83.nomdedomain.com
préfix commun adr IP adr MAC nom de domaine

Et ainsi chaque client tapant : hostname trouve :
dhcp-hosts-SLN-IP-MAC.nomdedomain.com

Je vous fournis la config de mon dhcp.... : dhcpd.conf
J'avoue qu'il est un peu long !

Merci

Code :
  1. key "rndc-key" {
  2. algorithm hmac-md5;
  3. secret "*********";
  4. };
  5. server-identifier helios.nomdedomain.com;
  6. ddns-update-style ad-hoc;
  7. default-lease-time 1800;
  8. max-lease-time 1800;
  9. option domain-name "nomdedomain.com";
  10. option domain-name-servers 192.168.1.1;
  11. option routers 192.168.1.1;
  12. DHCPD_INTERFACE = "eth0";
  13. allow booting;
  14. allow bootp;
  15. authoritative;
  16. option space PXE;
  17. option PXE.mtftp-ip code 1 = ip-address;
  18. option PXE.mtftp-cport code 2 = unsigned integer 16;
  19. option PXE.mtftp-sport code 3 = unsigned integer 16;
  20. option PXE.mtftp-tmout code 4 = unsigned integer 8;
  21. option PXE.mtftp-delay code 5 = unsigned integer 8;
  22. option PXE.discovery-control code 6 = unsigned integer 8;
  23. option PXE.discovery-mcast-addr code 7 = ip-address;
  24. option space pxelinux;
  25. option pxelinux.magic code 208 = string;
  26. option pxelinux.configfile code 209 = text;
  27. option pxelinux.pathprefix code 210 = text;
  28. option pxelinux.reboottime code 211 = unsigned integer 32;
  29. site-option-space "pxelinux";
  30. option pxelinux.magic f1:00:74:7e;
  31. option pxelinux.reboottime 30;
  32. if exists dhcp-parameter-request-list {
  33. append dhcp-parameter-request-list 208, 209, 210, 211;
  34. append dhcp-parameter-request-list 208,211;
  35. }
  36. class "Etherboot" {
  37. match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
  38. filename "/etherboot/nbgrub";
  39. option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
  40. option vendor-class-identifier "Etherboot";
  41. vendor-option-space PXE;
  42. option PXE.mtftp-ip 0.0.0.0;
  43. next-server 192.168.1.1;
  44. }
  45. class "PXE" {
  46. match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
  47. filename "/X86PC/linux/linux.0";
  48. option vendor-class-identifier "PXEClient";
  49. vendor-option-space PXE;
  50. option PXE.mtftp-ip 0.0.0.0;
  51. next-server 192.168.1.1;
  52. }
  53. class "known" {
  54. match hardware;
  55. one-lease-per-client on;
  56. ddns-updates on;
  57. ddns-domainname = "nomdedomain.com";
  58. option domain-name "nomdedomain.com";
  59. option domain-name-servers 192.168.1.1;
  60. ddns-hostname = pick-first-value(option host-name , ddns-hostname);
  61. option fqdn.no-client-update on;
  62. set vendor_class_identifier = option vendor-class-identifier;
  63. }
  64. # Univers de SLN
  65. subnet 192.168.1.0 netmask 255.255.255.0 {
  66. DHCPD_INTERFACE = "eth0";
  67. authoritative;
  68. allow client-updates;
  69. # ddns-hostname = binary-to-ascii (16,8, "-", substring (hardware, 1,
  70. 6));
  71. # ddns-hostname "dhcp-host";
  72. ddns-hostname = concat
  73. ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address),"-",binary-to-ascii
  74. (16,8, "-", substring (hardware, 1, 6)));
  75. ddns-hostname = option host-name ;
  76. option domain-name "nomdedomain.com";
  77. option domain-name-servers 192.168.1.1;
  78. option routers 192.168.1.1;
  79. next-server 192.168.1.1;
  80. range 192.168.1.200 192.168.1.252;
  81. send host-name = concat
  82. ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address),"-",binary-to-ascii
  83. (16,8, "-", substring (hardware, 1, 6)));
  84. pool {
  85. range dynamic-bootp 192.168.1.71 192.168.1.199;
  86. allow members of "PXE";
  87. allow members of "Etherboot";
  88. }
  89. }
  90. # zône a mettre à jours
  91. zone nomdedomain.com. {
  92. primary 192.168.1.1;
  93. key rndc-key;
  94. }
  95. # zône a mettre à jours
  96. zone 1.168.192.in-addr.arpa. {
  97. primary 192.168.1.1;
  98. key rndc-key;
  99. }
  100. # zône a mettre à jours
  101. zone xx.yy.zz.aa.in-addr.arpa. {
  102. primary 192.168.1.1;
  103. key rndc-key;
  104. }


Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.
Tom's Guide > Forum > Systèmes d'exploitation (Windows, Mac OS, Linux...) > Nom d'hôte DHCP et DDNS (dns dynamique)
Aller à :

Il y a 2629 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens