When FreeBSD / NetBSD fresh install , the NIC is not enable dhcp in default, it’s different then other linux like system(config interface during installation).
so, how to enable ehcp clinet for the interface?
vi /etc/rc.conf
add or modify
dhcpcd=YES
dhcpcd=”wm0″
save ans exit
dhcpcd start
ifconfig check the setting.
(dhcpcd the last c means client.)
============
DHCP Server
vi /etc/dhcpd.conf
# Setting DHCPD global parameters
allow unknown-clients;
# Set parameters for the 192.168.0.0/24 subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.8; <=== Range of IP addresses
available for assignment.
default-lease-time 604800; <=== Default lease time in
seconds. This is the time
assigned if the client doesn’t
request one.
max-lease-time 604800; <=== Maximum time a lease will be
given.
option subnet-mask 255.255.255.0; <=== subnetmask given to clients
option domain-name-servers 1.2.3.4, 1.2.3.5; <=== put a list of name server IP
addresses here.
option domain-name “your.domain.name”;
option routers 192.168.0.1; <=== list of routers the clients should
use
}
save and exit;
vi /etc/rc.conf
add or modify
dhcpd=YES
decpd_flags=”-q ae1″
#dhcp lease interface
touch /var/db/dhcpd.leases
service dhcpd start
reference
1.NetBSD DHCP HOWTO
隨機文章
- ProxmoxVE 每日自動快照 終於發現這個神兵利器 (2020-01-16)
- twbbs.org掛點? (2012-10-16)
- ASUS Zenfone 送修之不愉快經驗 (2019-06-15)
- Acer Aspire M3100 驅動 (2009-06-22)
- 英特爾貝瑞特解釋:為何轉而支援百元筆記本 (2007-11-04)
![[chatGPT 測試] DSM 7 有什麼特色](https://chihping.aflypen.com/wp-content/uploads/2023/03/usb-ga13f61ece_1280-300x221.jpg)






![[chatGPT 測試] 剪映 文字成片 VS. Wondershare Filmora 13 AI 文字轉影片](https://chihping.aflypen.com/wp-content/uploads/2023/12/剪映_音樂-137x300.png)
