※架設DHCP Server 安裝軟體
設定那些網卡要提供DHCP 伺服器
設定DHCP設定檔(先刪除原先的設定檔 /etc/dhcpd.conf)
重新啟動DHCP Server
用Client測試
※Client 資訊 /var/lib/dhcpcd/dhcpd-ethx.info 在Client 端電腦中依據使用的網卡可以查詢相關資料
※Server 資訊 /var/lib/dhcp/db/dhcpd.leases Server 端中保存的租約資訊
※使用tcpdump 觀察網路資訊 安裝dhcp-tools
yast -i dhcp-tools 查看封包前1500 bytes dhcp Client 以及dhcp server 的資訊
tcpdump -xlen -s 1500 port boots or port bootps | dhcpdump 觀察DHCP 封包資訊
tcpdump -xlen -s 1500 port boots or port bootps | dhcpdump > xxx.txt
修改Client 租約最大時間
vi /etc/sysconfig/network/dhcp
針對一台Client 設定固定IP
vi /etc/dhcpd.conf
host 主機名稱 {
hardware ethernet MAC;
fixed-address 固定IP;
}
安裝軟體
yast –i dhcp-server
設定那些網卡要提供DHCP 伺服器
vi /etc/sysconfig/dhcpd
DHCPD_INTERFACE =”eth0”
設定DHCP設定檔(先刪除原先的設定檔 /etc/dhcpd.conf)
vi /etc/dhcpd.conf
ddns-update-style none;
subnet 192.168.120.0 netmask 255.255.255.0 {
default-less-time 3600;
max-less-time 7200;
range 192.168.120.10 192.168.120.20;
option routes 192.168.120.1;
option domain-name-servers 10.0.0.254;
}
重新啟動DHCP Server
service dhcpd restart
用Client測試
service network rstart
※Server 資訊 /var/lib/dhcp/db/dhcpd.leases Server 端中保存的租約資訊
※使用tcpdump 觀察網路資訊 yast -i dhcp-tools
tcpdump -xlen -s 1500 port boots or port bootps | dhcpdump
tcpdump -xlen -s 1500 port boots or port bootps | dhcpdump > xxx.txt
vi /etc/sysconfig/network/dhcp
vi /etc/dhcpd.conf
host 主機名稱 {
hardware ethernet MAC;
fixed-address 固定IP;
}

























