次は LS-GL/HS-DHGL ハックキットの dhcp サーバに準じて LS-HGL に dhcp サーバをインストールする。
hackkit:~# apt-get install dhcp Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: dhcp 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 114kB of archives. After unpacking 340kB of additional disk space will be used. Get:1 http://ftp2.jp.debian.org etch/main dhcp 2.0pl5-19.5etch2 [114kB] Fetched 114kB in 0s (397kB/s) Selecting previously deselected package dhcp. (Reading database ... 14420 files and directories currently installed.) Unpacking dhcp (from .../dhcp_2.0pl5-19.5etch2_arm.deb) ... Setting up dhcp (2.0pl5-19.5etch2) ... Generating /etc/default/dhcp... Please note that if you are installing the DHCP server for the first time you need to configure it first. Please stop (/etc/init.d/dhcp stop) the DHCP server daemon, edit /etc/dhcpd.conf to suit your needs and particular configuration, and restart the DHCP server daemon (/etc/init.d/dhcp start). You also need to edit /etc/default/dhcp to specify the interfaces dhcpd should listen to. By default it listens to eth0. NOTE: dhcpd's messages are being sent to syslog. Look there for diagnostics messages. Starting DHCP server: dhcpd failed to start - check syslog for diagnostics. hackkit:~#
hackkit:~# /etc/init.d/dhcp stop Stopping DHCP server: dhcp. hackkit:~#
hackkit:~# cd /etc/
hackkit:/etc# mv dhcpd.conf dhcpd.conf.orig
hackkit:/etc# cp dhcpd.conf.orig dhcpd.conf
hackkit:/etc# vi dhcpd.conf
	:
	:
hackkit:/etc# diff -c dhcpd.conf.orig dhcpd.conf
*** dhcpd.conf.orig     Sat Oct 27 08:58:39 2007
--- dhcpd.conf  Sat Aug 16 13:19:24 2008
***************
*** 5,22 ****
  #
  # option definitions common to all supported networks...
! option domain-name "fugue.com";
! option domain-name-servers toccata.fugue.com;
! option subnet-mask 255.255.255.224;
  default-lease-time 600;
  max-lease-time 7200;
! #subnet 204.254.239.0 netmask 255.255.255.224 {
! #  range 204.254.239.10 204.254.239.20;
! #  option broadcast-address 204.254.239.31;
! #  option routers prelude.fugue.com;
! #}
  # The other subnet that shares this physical network
  #subnet 204.254.239.32 netmask 255.255.255.224 {
--- 5,22 ----
  #
  # option definitions common to all supported networks...
! option domain-name "yamasita.jp";
! option domain-name-servers ns.yamasita.jp;
! option subnet-mask 255.255.255.0;
  default-lease-time 600;
  max-lease-time 7200;
! subnet 192.168.2.0 netmask 255.255.255.0 {
!   range 192.168.2.200 192.168.2.220;
!   option broadcast-address 192.168.2.255;
!   option routers 192.168.2.1;
! }
  # The other subnet that shares this physical network
  #subnet 204.254.239.32 netmask 255.255.255.224 {
hackkit:/etc#
hackkit:/etc# cat /etc/default/dhcp # Defaults for dhcp initscript # sourced by /etc/init.d/dhcp # installed at /etc/default/dhcp by the maintainer scripts # # This is a POSIX shell fragment # # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". INTERFACES="" hackkit:/etc#
hackkit:/etc# /etc/init.d/dhcp start Starting DHCP server: dhcpd. hackkit:/etc#
hackkit:/etc# tail -f /var/log/daemon.log : : Aug 16 13:34:11 hackkit dhcpd: DHCPREQUEST for 192.168.2.67 from 00:0c:96:c0:42:b8 via eth0OK
    
  | 
| 
← 標準ファーム Ver.1.04 でハックキット(8)ftp サーバ  | 
ハックの記録 LinkStation/玄箱 をハックしよう  | 
→ LinkStation Mini (LS-WS500GL/R1) 入手  |