0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CCNA DHCP問題の解き方|DORA・ip helper-address・excludedを暗算で攻略してみた

0
Posted at

CCNA DHCP問題の解き方|DORA・ip helper-address・excludedを暗算で攻略してみた

CCNA 200-301の勉強でDHCP問題に時間を取られている方向けに、暗算で解くコツをまとめます。実機で検証したCisco IOSコマンド付き。

DORAの4ステップ

DHCPの基本フローは DORA

  1. Discover:クライアントがブロードキャストで「IPちょうだい」
  2. Offer:DHCPサーバが「このIPあげる」と提案
  3. Request:クライアントが「これ使う」と正式申込
  4. Ack:サーバが「OK確定」
ステップ 送信元IP 宛先
Discover 0.0.0.0 255.255.255.255
Offer DHCPサーバ ブロードキャスト or ユニキャスト
Request 0.0.0.0 255.255.255.255
Ack DHCPサーバ ブロードキャスト

UDPポートはサーバが67、クライアントが68。

ip helper-addressの方向

最重要ポイント:DHCPサーバが別セグメントにあるとき、ip helper-addressは「クライアント側のSVI/インターフェース」に設定する。

サーバ側ではなくクライアント側。これだけで8割解ける。

SW1(config)# interface Vlan20
SW1(config-if)# ip address 192.168.20.1 255.255.255.0
SW1(config-if)# ip helper-address 192.168.10.254

ルータをDHCPサーバにする設定

R1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10
R1(config)# ip dhcp pool VLAN10
R1(dhcp-config)# network 192.168.10.0 255.255.255.0
R1(dhcp-config)# default-router 192.168.10.1
R1(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
R1(dhcp-config)# lease 7

ポイント:

  • excluded-addresspool定義より前 に書く
  • GW・DNSサーバなど静的IPは必ずexcludedに含める
  • leaseのデフォルトは1日(24時間)

動作確認コマンド

R1# show ip dhcp binding   # 配布済みIP一覧
R1# show ip dhcp pool      # プール利用状況

現場でハマる罠

  • 169.254.x.x が配られる → DHCPサーバから応答なし。helper-addressの方向ミスを疑う
  • IP重複が発生 → excluded-addressに静的IPが含まれていない
  • 特定VLANだけ取れない → 該当SVIのhelper-addressが抜けてる

詳しくはブログで

この記事の完全版(実機の出力例、トラブルシュート対応表、FAQまで)はブログにまとめてます。

👉 CCNA DHCP問題の解き方|DORA・リレー・excludedを暗算で攻略【200-301対応】

CCNAの暗算系シリーズも書いてます:VLAN/Trunk問題OSPF問題HSRP問題

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?