10. DHCP
<<DHCP>>
================================================================================
R1(config)#int e0
R1(config-if)#ip add 192.168.1.254 255.255.255.0
R1(config-if)#no sh
R1(config)#ip dhcp excluded-address 192.168.1.11
R1(config)#ip dhcp excluded-address 192.168.1.12
R1(config)#ip dhcp excluded-address 192.168.1.20 192.168.1.50
R1(config)#ip dhcp pool CCNA
R1(dhcp-config)#network 192.168.1.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.1.254
R1(dhcp-config)#lease 10 (=> enfinity or [day hour min])
R1(config)#service dhcp
- 확인 하기
R2(config)#int e0/0
R2(config-if)#ip add dhcp
R2(config-if)#no sh
R2#sh ip int br
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.1.2 YES DHCP up up
Serial0/0 unassigned YES NVRAM administratively down down
Serial0/1 unassigned YES NVRAM administratively down down
================================================================================