dhcp¼¹ö ±¸Ãà
https://www.ehostidc.co.kr/ (503)https://www.ehostidc.co.kr/hosting/domestic.php (484)
1) dhcp설치 |
[root@localhost ~]# yum R11;y install dhcp* |
2-1) dhcp설1221; |
[root@localhost ~]# vi /etc/dhcp/dhcpd.conf # # DHCP Server Configuration file. # 160; see /usr/share/doc/dhcp*/dhcpd.conf.sample #샘플 config 참1312; # 160; see 'man 5 dhcpd.conf' #man 6168;1060;1648; 참1312; |
2-2) dhcp설1221; |
root@localhost:[~]: cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf #샘플 config복사 root@localhost:[~]: vi /etc/dhcp/dhcpd.conf # dhcpd.conf # # Sample configuration file for ISC dhcpd # default-lease-time 6000; #IP기본 사용 시간 max-lease-time 72000; #IP최대 사용 시간 subnet 192.168.126.0 netmask 255.255.255.0 { #dhcp서버 IP대역 160;range 192.168.126.201 192.168.126.253; #client IP할NJ17; 대역 160;option routers 192.168.126.2; #,172;1060;트웨1060; 160;option subnet-mask 255.255.255.0; #서브넷마스크 160;option domain-name-servers 8.8.8.8; #dns서버 ##샘플 config에서 필요한 설1221;만 수1221;해도 .104;1648;만 위와 같1060; 1204;체 삭1228; 0143; 필요설1221; 추가 |
3) dhcp서비스 시1089; 0143; 확1064; |
root@localhost:[~]: systemctl start dhcpd root@localhost:[~]: netstat -lnp | grep dhcp |
4) client IP설1221; |
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 [root@localhost ~]# service network restart |
5) client IP 0143; mac address 확1064; |
[root@localhost ~]# service network restart [root@localhost ~]# ip a |
6) dhcp서버 IP할NJ17; 내역 확1064; |
root@localhost:[~]: cat /var/lib/dhcpd/dhcpd.leases |
7) 실습환ᅆ1; |
dhcp서버: CentOS7 dhcp client: CentOS6.5 네트워크 구성: NAT (서버/client) |