Router>en
Router#
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#int f0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#ex
Router(config)#ip dhcp
Router(config)#ip dhcp ?
excluded-address Prevent DHCP from assigning certain addresses
pool Configure DHCP address pools
Router(config)#ip dhcp pool ?
WORD Pool name
Router(config)#ip dhcp pool wyg
Router(dhcp-config)#?
default-router Default routers
dns-server Set name server
exit Exit from DHCP pool configuration mode
network Network number and mask
no Negate a command or set its defaults
option Raw DHCP options
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#ex
Router(config)#ip dhcp excluded-address ?
A.B.C.D Low IP address
Router(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
Router(config)#
在客户端上设置从DHCP获取ip地址,然后在命令行界面输入ipconfig /all查看配置!!
本题仅作了DHCP配置,大家还可以结合Server做更多的配置;如:DNS、HTTP等