DHCPサーバを構築 202

/ LPIC / Comment[0]
# yum install dhcp
# vi /etc/dhcp/dhcpd.conf
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp/dhcpd.conf.example
# see dhcpd.conf(5) man page
#

#割り振り対象のネットワークを定義
subnet 10.0.0.0 netmask 255.0.0.0 {
option routers 10.255.0.1; #デフォルトゲートウェイ
option subnet-mask 255.0.0.0; #ゲートウェイのネットマスク
option domain-name-servers 10.255.0.1, 8.8.8.8; #DNSサーバ

range dynamic-bootp 10.10.0.1 10.10.0.10; #割り当て範囲
default-lease-time 7200; #デフォのリース時間
max-lease-time 86400; #最大リース時間
}

#MACアドレスを元にホストごとにIPアドレスを割り振る
host mainpc {
hardware ethernet bc:5f:f4:49:6d:35;
fixed-address 10.0.0.1;
}

host sibyl {
hardware ethernet 00:22:cf:6b:64:f2;
fixed-address 10.0.1.1;
}

host vmware {
hardware ethernet 08:00:27:e4:66:68;
fixed-address 10.0.1.10;
}

# chkconfig dhcpd on
# service dhcpd start
関連記事

コメント

:
:
:
:
:
管理人のみ表示を許可