wiki:TipAndDoc/network/dhcpd

Version 4 (modified by mitty, 15 years ago) (diff)

--

DHCPd

  • 標準はISC DHCPd
  • Ubuntuでは「udhcpd」という組み込み機器向け由来のDHCPdも選択できる。

logging

  • log-facility でsyslogへのログ出力を変更できる
  • Ubuntu:/etc/dhcp3/dhcpd.conf
    # Use this to send dhcp log messages to a different log file (you also
    # have to hack syslog.conf to complete the redirection).
    log-facility local7;
    
  • syslog.conf
    local7.* -/var/log/dhcpd.log
    
  • CentOSでは、local7はデフォルトでbootログ用に使われているようなので、変えた方が良いかもしれない。
    • /etc/syslog.conf
      # Save boot messages also to boot.log
      local7.*                                                /var/log/boot.log
      
    • /var/log/boot.log
      Jul  1 16:43:03 VM-centos5 NET[3471]: /sbin/dhclient-script : updated /etc/resolv.conf
      Jul  1 16:43:08 VM-centos5 NET[3562]: /sbin/dhclient-script : updated /etc/resolv.conf
      Jul  1 16:47:13 VM-centos5 NET[3692]: /sbin/dhclient-script : updated /etc/resolv.conf
      (snip)
      

Ubuntu

  • aptitude install dhcp3-server
    • clientは標準ではdhcp3-client

configure

  • /etc/default/dhcp3-server
    # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
    #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
    INTERFACES=""
    
    • ListenするIFを指定
  • /etc/dhcp3/dhcpd.conf についてはman dhcpd.conf

CentOS

  • yum install dhcp
    • clientは標準ではdhclient

configure

  • /etc/sysconfig/dhcpd
    # Command line options here
    DHCPDARGS=
    
  • /etc/dhcpd.conf についてはman dhcpd.conf

Attachments (5)

Download all attachments as: .zip