你好,如果说对应MAC获取IP地址的话,可以参考如下配置:
Example: Configuring Manual Bindings
The following example shows how to create a manual binding for a client named example1.abc.com that sends a client identifier in the DHCP packet. The MAC address of the client is 02c7.f800.0422 and the IP address of the client is 172.16.2.254.
ip dhcp pool pool1
host 172.16.2.254
client-identifier 01b7.0813.8811.66
client-name example1
The following example shows how to create a manual binding for a client named example2.abc.com that does not send a client identifier in the DHCP packet. The MAC address of the client is 02c7.f800.0422 and the IP address of the client is 172.16.2.253.
ip dhcp pool pool2
host 172.16.2.253
hardware-address 02c7.f800.0422 ethernet
client-name example1
Because attributes are inherited, the two preceding configurations are equivalent to the following:
ip dhcp pool pool1
host 172.16.2.254 255.255.255.0
hardware-address 02c7.f800.0422 ieee802
client-name client1
default-router 172.16.2.100 172.16.2.101
domain-name abc.com
dns-server 172.16.1.102 172.16.2.102
netbios-name-server 172.16.1.103 172.16.2.103
netbios-node-type h-node
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/xe-3se/3650/dhcp-xe-3se-3650-book/config-dhcp-server.html#GUID-C1DE449D-3B56-4832-AE3F-7F82E94E5510
如果需要做DHCP的安全话,可以参考DHCP Snooping
3. ip dhcp snooping
4. ip dhcp snooping vlan vlan-range
5. ip dhcp snooping information option
6. ip dhcp snooping information option allow-untrusted
7. interface interface-id
8. ip dhcp snooping vlan vlan information option format-type circuit-id [override] string ASCII-string
9. ip dhcp snooping trust
10. ip dhcp snooping limit rate rate
11. exit
12. ip dhcp snooping verify mac-address
13. end
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3650/software/release/3se/security/configuration_guide/b_sec_3se_3650_cg/b_sec_3se_3650_cg_chapter_01100.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rps-Cheers | If it solves your problem, please mark as answer. Thanks !