如何从 Cisco 设备获取 DHCP 范围信息?(IOS 12)

如何从 Cisco 设备获取 DHCP 范围信息?(IOS 12)

我正在尝试追踪一个相当大的网络上的设备和网络信息,该网络包含大量子网和 VLAN 等,其中大多数都由 Cisco [企业级] 交换机或路由器提供 DHCP。出于这个原因,我想找出各种 DHCP 池/作用域是什么,但我能找到的所有信息都是关于如何使用 Cisco IOS 配置 DHCP,这没有帮助,因为我不想更改作用域,只想显示它们当前是什么。

我可以执行show ip dhcp binding获取 DHCP 客户端列表及其 IP,并猜测 DHCP IP 的有效范围,但这是相当不可取的...那么命令是什么展示这些信息(不改变现有配置)?

答案1

从相关设备尝试show ip dhcp pool。要显示排除项,请尝试show run | i excluded-addresses

以下输出来自 Cisco 4507 交换机。

CORE#show ip dhcp pool

Pool VOICE :
 Utilization mark (high/low)    : 100 / 0
 Subnet size (first/next)       : 0 / 0 
 Total addresses                : 254
 Leased addresses               : 42
 Excluded addresses             : 101
 Pending event                  : none
 1 subnet is currently in the pool :
 Current index        IP address range                    Leased/Excluded/Total
 192.168.122.234      192.168.122.1    - 192.168.122.254   42    / 101   / 254  


Pool GUEST :
 Utilization mark (high/low)    : 100 / 0
 Subnet size (first/next)       : 0 / 0 
 Total addresses                : 254
 Leased addresses               : 9
 Excluded addresses             : 103
 Pending event                  : none
 1 subnet is currently in the pool :
 Current index        IP address range                    Leased/Excluded/Total
 192.168.111.165      192.168.111.1    - 192.168.111.254   9     / 103   / 254  

除外情况:

CORE#show run | i excluded-addresses
ip dhcp excluded-address 192.168.122.1 192.168.122.50
ip dhcp excluded-address 192.168.122.100 192.168.122.150
ip dhcp excluded-address 192.168.111.1 192.168.111.50
ip dhcp excluded-address 192.168.111.100 192.168.111.150

相关内容