一.配置DHCP服务
Router>enable<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname DHCP_Server
DHCP_Server(config)#ip dhcp pool AAA //配置地址池名称为AAA
DHCP_Server(dhcp-config)#network 192.168.10.0 255.255.255.0 //将要分配的网段
DHCP_Server(dhcp-config)#exit
DHCP_Server(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.2//需要排除的特定地址
DHCP_Server(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
DHCP_Server#conf t
Enter configuration commands, one per line. End with CNTL/Z.
二.端口地址分配
DHCP_Server(config)#interface fa 0/0
DHCP_Server(config-if)#ip add 192.168.10.1 255.255.255.0
DHCP_Server(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
DHCP_Server(config-if)#exit
DHCP_Server(config)#
转载于:https://blog.51cto.com/techcisco/82736