6: 2009-08-05 (水) 10:35:26 s09081 |
7: 2009-10-03 (土) 12:02:23 s09081 |
| | | |
| **** 各種設定 めどいから明日・・・ [#m0364390] | | **** 各種設定 めどいから明日・・・ [#m0364390] |
| + | |
| + | **DHCPdne [#aff0d64c] |
| + | ぷららでやりました |
| + | ***こうやったぜ! [#bcbe7bf8] |
| + | [root@centos ~]# /bin/cp /usr/share/doc/dhcp-*/dhcpd.conf.sample /etc/dhcpd.conf |
| + | ← DHCPサーバー設定ファイルをサンプルより作成 |
| + | |
| + | [root@centos ~]# vi /etc/dhcpd.conf ← DHCPサーバー設定ファイル編集 |
| + | ddns-update-style interim; |
| + | ignore client-updates; |
| + | not authoritative; ← 追加(以下のような警告メッセージがログに出力場合の対処) |
| + | |
| + | If this DHCP server is authoritative for that subnet, |
| + | please write an `authoritative;' directive either in the |
| + | subnet declaration or in some scope that encloses the |
| + | subnet declaration - for example, write it at the top |
| + | of the dhcpd.conf file. |
| + | |
| + | subnet 192.168.1.0 netmask 255.255.255.0 { ← 自身の環境にあわせて編集 |
| + | |
| + | # --- default gateway |
| + | option routers 192.168.1.1; ← ルーター経由接続環境の場合はルーターのIPアドレスを指定 |
| + | PPPoE接続環境の場合はサーバーのIPアドレスを指定 |
| + | option subnet-mask 255.255.255.0; |
| + | |
| + | #option nis-domain "domain.org"; ← コメントアウト |
| + | #option domain-name "domain.org"; ← コメントアウト |
| + | option domain-name-servers 192.168.1.1; |
| + | ← ルーター経由接続環境の場合はルーターのIPアドレスを指定 |
| + | option domain-name-servers XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX; |
| + | ← PPPoE接続環境の場合はプロバイダから通知されたDNSサーバーのIPアドレス(プライマリ,セカンダリ)を指定 |
| + | |
| + | option time-offset -18000; # Eastern Standard Time |
| + | # option ntp-servers 192.168.1.1; |
| + | # option netbios-name-servers 192.168.1.1; |
| + | # --- Selects point-to-point node (default is hybrid). Don't change this unless |
| + | # -- you understand Netbios very well |
| + | # option netbios-node-type 2; |
| + | |
| + | range dynamic-bootp 192.168.1.2 192.168.1.254; ← 割当てるIPアドレスを指定(192.168.1.2~192.168.1.254) |
| + | default-lease-time 21600; |
| + | max-lease-time 43200; |
| + | |
| + | # we want the nameserver to appear at a fixed address |
| + | #host ns { |
| + | # next-server marvin.redhat.com; |
| + | # hardware ethernet XX:XX:XX:XX:XX:XX; |
| + | # fixed-address 207.175.42.254; |
| + | #} |
| + | } |
| + | } |
| + | 以下はホストwin-client1にプライベートIPアドレスを固定で割当てる場合追加 |
| + | host win-client1 { ← ホスト名 |
| + | hardware ethernet XX:XX:XX:XX:XX:XX; ← win-client1に装着しているネットワークアダプタのMACアドレス※ |
| + | fixed-address 192.168.1.10; ← win-client1に固定で割当てるIPアドレス |
| + | } |