Cisco - DHCP_Static_Binding

Situation

# 固定分配某一個IP給Router介面
Assign a fixed IP address to a router interface.

Configuration - DHCP Server

# 確認client的hardware address,預設有發DHCP的情況下
[1]
show ip dhcp binding
> "172.16.1.100"  > "01aa.bbcc.0001.10" > "Lease expiration"

# 在POOL裡面設定靜態Binding
[2]
en
conf t
  ip dhcp pool "NAME"
    host "IP" "MASK"
    client-identifier "01aa.bbcc.0001.10"
    default-router 172.16.1.254
    dns-server 8.8.8.8

    end

Configuration - DHCP Client

# 測試
[1]
en
conf t
  inter ether 0/1
    ip address dhcp client-id Ethernet 0/1
    
    end

# 手動釋放再申請
[2]
en
conf t
  # 釋放
  release dhcp ethernet 0/1

  # 申請
  renew dhcp ethernet 0/1

Check

# Server端確認分配的IP
show ip dhcp binding

# Server端確認設定的POOL
show ip dhcp pool

# Server端DEBUG DHCP
debug ip dhcp server events

# Client端確認分配的IP
show dhcp lease

# Client端DEBUG DHCP
debug ip dhcp client events