H O M E > ネットワークのおべんきょしませんか? Cisco CCNA/CCNP/CCIE、ネットワークスペシャリスト試験の勉強にピッタリ > 2011年4月
(所属カテゴリー:シスコ---投稿日時:2011年4月29日)
HOST1、HOST2はDHCPサーバであるR1と別サブネットなので、R3でDHCPリレーエ ージェントの設定を行います。
R3
---------------------------------------------------------------------- interface Ethernet0/1 ip helper-address 192.168.13.1 ----------------------------------------------------------------------
R1で192.168.3.0/24のサブネットに対するDHCPプールを設定します。また、HOST2をDHCPクライアントとして設定します。
R1
---------------------------------------------------------------------- ip dhcp pool 192.168.3.0 network 192.168.3.0 255.255.255.0 default-router 192.168.3.3 ----------------------------------------------------------------------
HOST2
---------------------------------------------------------------------- interface Ethernet0/0 ip address dhcp ----------------------------------------------------------------------
HOST1に192.168.3.101を固定的に割り当てるためにMACアドレスを利用して、 マニュアルバインディングの設定を行います。また、R2に192.168.12.2を固定 的に割り当てるためにクライアントIDを利用して、マニュアルバインディング の設定を行います。
※HOST1のMACアドレス:cc-03-1d-8c-00-00
※R2のMACアドレス:cc-01-1d-8c-00-00
R1
---------------------------------------------------------------------- ip dhcp pool HOST1 host 192.168.3.101 255.255.255.0 client-identifier 01cc.031d.8c00.00 default-router 192.168.3.3 ! ip dhcp pool R2 host 192.168.12.2 255.255.255.0 client-identifier 01cc.011d.8c00.00 ----------------------------------------------------------------------
HOST1
---------------------------------------------------------------------- interface Ethernet0/0 ip address dhcp client-id Ethernet0/0 ----------------------------------------------------------------------
R2
---------------------------------------------------------------------- interface Ethernet0/0 ip address dhcp client-id Ethernet0/0 ----------------------------------------------------------------------
ここまで作成したプールにDNSサーバとドメイン名の情報を継承させるために、 DNSサーバとドメイン名を指定したプールを作成します。
R1
---------------------------------------------------------------------- ip dhcp pool DNS_DOMAIN network 192.168.0.0 255.255.0.0 domain-name n-study.com dns-server 1.1.1.1 ----------------------------------------------------------------------
Step4までのDHCPの設定を確認します。DHCPサーバのR1ではshow ip dhcp pool/show ip dhcp bindingsコマンドでDHCPプールと割り当てているIPアドレスを確認します。
DHCPクライアントのHOST1、HOST2、R2ではshow ip interface brief/show dhcp server
でDHCPによって配布された設定を確認します。
R1
----------------------------------------------------------------------
R1#show ip dhcp pool
Pool HOST1 :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 1
Leased addresses : 1
Pending event : none
0 subnet is currently in the pool :
Current index IP address range Leased addresses
192.168.3.101 192.168.3.101 - 192.168.3.101 1
Pool 192.168.3.0 :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 1
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
192.168.3.5 192.168.3.1 - 192.168.3.254 1
Pool DNS_DOMAIN :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 65534
Leased addresses : 0
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
192.168.0.3 192.168.0.1 - 192.168.255.254 0
Pool R2 :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 1
Leased addresses : 1
Pending event : none
0 subnet is currently in the pool :
Current index IP address range Leased addresses
192.168.12.2 192.168.12.2 - 192.168.12.2 1
R1#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.3.4 0063.6973.636f.2d63. Mar 02 2002 01:47 AM Automatic
6330.342e.3164.3863.
2e30.3030.302d.4574.
302f.30
192.168.3.101 01cc.031d.8c00.00 Infinite Manual
192.168.12.2 01cc.011d.8c00.00 Infinite Manual
----------------------------------------------------------------------
R2
----------------------------------------------------------------------
R2#show ip int brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.12.2 YES DHCP up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
R2#show dhcp server
DHCP server: ANY (255.255.255.255)
Leases: 6
Offers: 6 Requests: 6 Acks : 6 Naks: 0
Declines: 0 Releases: 15 Query: 0 Bad: 0
DNS0: 1.1.1.1, DNS1: 0.0.0.0
Subnet: 255.255.255.0 DNS Domain: n-study.com
----------------------------------------------------------------------
HOST1
----------------------------------------------------------------------
HOST1#show ip int brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.3.101 YES DHCP up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
HOST1#show dhcp server
DHCP server: ANY (255.255.255.255)
Leases: 2
Offers: 2 Requests: 2 Acks : 2 Naks: 0
Declines: 0 Releases: 3 Query: 0 Bad: 0
DNS0: 1.1.1.1, DNS1: 0.0.0.0
Subnet: 255.255.255.0 DNS Domain: n-study.com
----------------------------------------------------------------------
HOST2
----------------------------------------------------------------------
HOST2#show ip int brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.3.4 YES DHCP up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
HOST2#show dhcp server
DHCP server: ANY (255.255.255.255)
Leases: 2
Offers: 2 Requests: 2 Acks : 2 Naks: 0
Declines: 0 Releases: 3 Query: 0 Bad: 0
DNS0: 1.1.1.1, DNS1: 0.0.0.0
Subnet: 255.255.255.0 DNS Domain: n-study.com
----------------------------------------------------------------------