设置pc端电脑自动获取IP地址
设置DHCP分组IP池
\
一、在三层交换机上设置三个vlan的ip池
销售部DHCP的ip池名字为xsbip
工程部部DHCP的ip池名字为gcbip
人事部DHCP的ip池名字为rsbip
conf t
ip dhcp pool xsbip
network 192.168.149.0 255.255.255.0
default-router 192.168.149.254
dns-server 192.168.152.1
简写
conf t
//设置dhcp的ip池名字
ip dhcp pool gcbip
//设置ip网络和子网掩码
network 192.168.150.0 255.255.255.0
//设置默认路由(default-gateway是默认网关)
def 192.168.150.254
//设置默认dns
dns 192.168.152.1
conf t
ip dhcp pool rsbip
network 192.168.151.0 255.255.255.0
def 192.168.151.254
dns 192.168.152.1
\
二、在各台PC机上设置获取IP模式为DHCP
在各台PC机上设置IP Configurationuration模式为DHCP
\
扩展
不知道命令的可以输入 ? 进行查询
ip池名字输错不能修改,只能删除后重新配置
no ip dhcp pool rsbip