# rpm -qa | grep ftp ntsysv wget ftp gcc net-tools
# dnf -y install dhcp*
# cp /usr/share/doc/dhcp-server/dhcpd.conf.example /etc/dhcp/dhcpd.conf
cp: overwrite '/etc/dhcp/dhcpd.conf'? y
#
# vi /etc/dhcp/dhcpd.conf //아래 내용 외 나머지는 주석처리하기 "#'
default-lease-time 6000;
max-lease-time 7200;
log-facility local7;
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.100 192.168.100.200;
option broadcast-address 192.168.100.255;
option routers 192.168.100.254;
option subnet-mask 255.255.255.0;
option domain-name-servers 168.126.63.1;
}
:wq!
# systemctl enable dhcpd
# systemctl status dhcpd
# systemctl start dhcpd
확인
windows또는 linux에서 dhcp로 선택후 reload 확인
error 시 dhcpd.conf 에서 ; 빠진 건지 확인 아니면 컨피그 수정 잘못 되었는지 확인
# systemctl start dhcpd
Job for dhcpd.service failed because the control process exited with error code.
See "systemctl status dhcpd.service" and "journalctl -xe" for details.
'linux' 카테고리의 다른 글
centos 8 - fuser (0) | 2020.12.21 |
---|---|
centos 8 ntp (=chrony) 설정 (0) | 2020.12.20 |
centos6 이하 nat 설정 (0) | 2020.12.13 |
centos NAT 설정 (0) | 2020.12.13 |
linux - 기본II (0) | 2020.12.07 |