�����Ȥ�DHCP�Ķ����ۤ��Ƥߤ���

Cisco��DHCP�����дĶ����ۤ���ˤ�
����°ʲ�������򤤤�Ƥ���OK����

---host��Router_2514_B
ip dhcp pool TEST
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
---
��������ǥͥåȥ�����ϰϤȥǥե���ȥ����ȥ�������
�ͤ���³����PC�����ꤹ�뤳�Ȥ��Ǥ��롣
TEST��Ǥ�ա�
�ޤ���ʣ���񤯤��Ȥ��ǽ��

---show run���
ip dhcp pool TEST
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
ip dhcp pool TEST2
!
ip dhcp pool TEST3
!
!
---

���ΤȤ��Υ��󥿥ե�������IP�ϰʲ���
---
Router2514_B#show ip int brief
Interface      IP-Address      OK? Method Status Protocol
Ethernet0     192.168.0.1     YES NVRAM  up     up
Ethernet1     192.168.11.100  YES manual up       up
---
Ethernet0����192.168.0.0/24�ξ�������ۤ���褦�ˤʤäƤ��롣
---
interface Ethernet0
 ip address 192.168.0.1 255.255.255.0
---
Ethernet1�ϥ֥����ɥХ�ɥ롼������¦�ͥåȥ����
�Ȥ���IP���ɥ쥹�����dz�����Ƥ���
�̤�DHCP�����ۤ����IP���ɥ쥹��������ɬ�פϤʤ���
���Υͥåȥ����ǻȤ���IP��񤤤Ƥ�����Ф��������Τ��ȡ�

DHCP�����ۤ�������DNS��WINS��꡼�����֤�դ�����
�ʲ��Τ褦������ˤʤ롣

---host��Router_2514_B
ip dhcp pool TEST
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
   dns-server 192.168.11.1
   netbios-name-server 192.168.11.1
   lease 10
---
���ΤȤ�PC B�Υ��ޥ�ɥץ���ץȤ�ipconfig /renew�򤷤�DHCP��ͳ��
IP�������ä�ipconfig /all���ǤĤ�ipconfig_renew_to_DHCP
���ޤΤ褦��DHCP����IP������餦���Ȥ��Ǥ��롣
���ΤȤ���lease�δ��֤��ѹ������
"Lease Expires"���ͤ��Ѥ�롣



DNS������WINS�����������
�֥����ɥХ�ɥ롼���ˤ���ΤǤ�����IP�������äƤ��롣

��������Ǥ��ޤ������ʤ��ʤ餽�⤽��Cisco�롼��¦��
DHCP�Υ����ӥ������������äƤ��ʤ���ǽ�������롣

no server dhcp�ȥ���ե����˰�Խñ¤¤¤Æ¤ï¿½ï¿½ï¿½È¥ï¿½ï¿½á¡£
Router_2504_B(config)# service dhcp
�Ȥ����Ƥ����ʤ���Ф����ʤ���
�ʤȡ��ǥե���ȤǤ�ɽ������ʤ���礬����Τ����ա�

Cisco�롼��¦�dz�ǧ��
---
Router2514_B#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address          Client-ID/              Lease expiration        Type
                    Hardware address/
                    User name
192.168.0.2         0100.xxxx.yyyy.zzzz       Mar 11 1993 10:30 AM    Automatic
---
�����ȳ�ǧ����ʤ�MAC���ɥ쥹�򸫤�Ф�����
�����MAC���ɥ쥹���������Ƥ���ΤǤ��ޤ껲�ͤˤʤ�ʤ����ɡ�

�����ǡ�PC B����ʲ���IP���ɥ쥹��Ping�����֤���ǧ���롣

�� 192.168.0.1 ... Cisco�롼������¦IP(PC B¦)
�� 192.168.11.100 ... Cisco�롼���γ�¦IP(�֥����ɥХ�ɥ롼��¦)
�� 192.168.11.1 ... �֥����ɥХ�ɥ롼������¦IP

���ΤȤ�192.168.11.1�ؤϤ������ȤФʤ���
�ʤ��ʤ�192.168.0.0/24�Υ֥����ɥ��㥹�ȥɥᥤ�󳰤����顣

���Cisco�롼��¦�ˤ�arp�ϤΤä��롣
---
Router2514_B#show arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.11.100          -   00xy.xxxx.zzza  ARPA   Ethernet1
Internet  192.168.11.1            5   00xy.xxxx.zzzb  ARPA   Ethernet1
Internet  192.168.0.1             -   00xy.xxxx.zzzc  ARPA   Ethernet0
Internet  192.168.0.2             3   00xy.xxxx.zzzd  ARPA   Ethernet0
---
���㤢���ɤ�����Ρ��Ȥʤ�櫓����

���ơ����β����ˡ����
�����Cisco�롼��¦��NAT�����ꤷ��
�֥����ɥХ�ɥ롼������¦���ɥ쥹(192.168.11.1)��
��ã����褦����ˤ��Ƥߤ롣

³����


�㻲�͡�
---
Router2514_B#show ip dhcp server statistics
Memory usage         15092
Address pools        3
Database agents      0
Automatic bindings   1
Manual bindings      0
Expired bindings     0
Malformed messages   0
Secure arp entries   0

Message              Received
BOOTREQUEST          0
DHCPDISCOVER         5
DHCPREQUEST          7
DHCPDECLINE          0
DHCPRELEASE          0
DHCPINFORM           2

Message              Sent
BOOTREPLY            0
DHCPOFFER            1
DHCPACK              7
DHCPNAK              0
---���줾��Υ��ޥ�ɤΥإ��
Router2514_B(config)#ip dhcp ?
  excluded-address           Prevent DHCP from assigning certain addresses
  pool                       Configure DHCP address pools
Router2514_B(config)#ip dhcp pool ?
  WORD  Pool name
Router2514_B(config)#ip dhcp pool TEST
Router2514_B(dhcp-config)#?
  default-router       Default routers
  dns-server           DNS servers
  network              Network number and mask
  lease                Address lease time
  netbios-name-server  NetBIOS (WINS) name servers
Router2514_B(dhcp-config)#default-router 192.168.0.1
Router2514_B(dhcp-config)#lease ?
  <0-365>   Days
  infinite  Infinite lease
Router2514_B(dhcp-config)#lease 10
---Router2514_B�Υ���ե���
�� �ʲ��������cisco2514��ή����Ʊ������ˤʤ롣
!
conf t
!
!
service dhcp
!
hostname Router2514_B
!
!
no logging console
!
clock timezone JST 9
no aaa new-model
!
ip dhcp pool TEST
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
   dns-server 192.168.11.1
   netbios-name-server 192.168.11.1
   lease 10
!
interface Ethernet0
 ip address 192.168.0.1 255.255.255.0
 no shut
!
interface Ethernet1
 ip address 192.168.11.100 255.255.255.0
 no shut
!
no ip http server
ip classless
!
line con 0
 exec-timeout 0 0
line aux 0
line vty 0 4
 exec-timeout 0 0
 no login
!
end
!
wr mem