리눅스 - Scope, DHCP Relay Agent, Reservation
Build UP.
결과
네트워크 하나에 다중의 Scope
방법
결과
Ex. 리눅스
DHCP Reservation
DHCP Relay Agent
# mount /dev/hdc /cdrom
# cd /cdrom/CentOS
# rpm -ivh dhcp-3? (tap)
# rpm -ivh dhcp-devel(tap)
# vi /etc/sysconfig/dhcrelay
DHCPSERVER=”192.168.20.1”
# service dhcrelay restart
결과
CentOs 7 cdrom으로 yum 설치 구성
# df (-h)
# umount “/run/media/root/CentOS 7 x86)64” ← 안 해도 상관 없음.
# mkdir /cdrom
# mount /dev/sr0 /cdrom
# cd /etc/yum.repos.d
# mv *.repo /tmp/
# vi /etc/yum.repos.d/local.repo
[LocalRepo]
baseurl=file:///cdrom
gpgcheck=0
# yum clean all
# vi /etc/fstab
/dev/sr0 /cdrom iso 9660 defaults 1 2
DHCP Server
# mount /dev/sr0 /cdrom
# yum -y install dhcp*
# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example t 2./etc/dhcp/dhcpd.conf
# vi/etc/dhcp/dhcpd.conf
-필수-
default-lease-time 6000;
max-lease-time 72000;
subnet 172.19.0.0 netmask 255.255.0.0 {
range 172.19.0.1 172.19.10.253;
option routers 172.19.0.254;
option broadcast-address 172.19.255.255.;
option subnet-mask 255.255.0.0;
option domain-name-servers 8.8.8.8;
}
-나머진 전부 주석 처리 하기-
# systemctl restart dhcpd
# systemctl enable dhcpd
# firewall-cmd —zone=public —add-service=dhcp —permanent
or
# service firewalld stop
# vi /var/lib/dhcpd/dhcpd.lease
DHCP Client
# ifdown
# ifup
# ifconfig
“IP주소 할당 확인”
Ex.
결과
ping이 간다 ? <- 고치기