《DHCP命令合集全套.docx》由会员分享,可在线阅读,更多相关《DHCP命令合集全套.docx(7页珍藏版)》请在第一文库网上搜索。
1、DHCP命令合集DHCP全局地址池system-viewSysnamedhcpenab1e使能DHCP服务Sysnamedhcpserverip-poo10创建标识为0的DHCP普通模式地址池Sysname-dhcp-poo1-Onetwork192.168.8.0mask255.255.255.0配置DHCP地址池0动态分配的地址范围为192.168.8.0/24Sysname-dhcp-poo1-Ogateway-1ist10.110.1.99配置DHCP地址池0为DHCP客户端分配的网关地址为10.110.1.99Sysname-dhcp-poo1-Odns-1ist10.1.1.254
2、配置DHCP地址池0为DHCP客户端分配的DNS服务器地址为I(U.1.254Sysname-dhcp-poo1-0expiredday1hour2minute3配置地址池0的IP地址租用有效期为1天2小时3分。Sysname-dhcp-poo1-Odomain-酉己置DHCP地址池0为DHCP客户端分酉己的域名后缀为Sysname-dhcp-poo1-Onetbios-typeb-node酉己置DHCP地址池0为DHCP客户端分配的NetBIOS节点类型为b-nodeSysname-dhcp-poo1-Onbns-1ist10.12.1.99酉己置DHCP地址池0为DHCP客户端分配WINS
3、服务器地址为10.12.1.99Sysnamedhcpserverforbidden-ip10.110.1.110.110.1.63将10.110.1.1到10.110.1.63之间的IP地址保留,不参与地址自动分配Sysname-dhcp-poo1-Ostatic-bindip-address10.1.1.1mask255.255.255.0Sysname-dhcp-poo1-Ostatic-bindmac-address0000-e03f-0305将MAC地址为OOOO-eO3f-O3O5的PC机与IP地址10.1.1.1绑定,掩码为255.255.255.0Sysname-V1an-in
4、terface1dhcpse1ectserverg1oba1-poo1配置V1AN接口1工作在DHCP服务器模式Sysnamedhcpserverdetect使能伪DHCP服务器检测功能DHCP全局地址池查看命令disp1aydhcpserverconf1ict显示DHCP的地址冲突统计信息disp1aydhcpserverexpired显示所有DHCP地址池中的租约超期信息disp1aydhcpserverfree-ip显示DHCP地址池的可用地址信息disp1aydhcpserverforbidden-ip显示DHCP地址池中不参与自动分配的IP地址disp1aydhcpserverip-
5、in-use显示所有DHCP地址池的地址绑定信息disp1aydhcpserverstatistics显示DHCP服务器的统计信息disp1aydhcpservertree显示所有DHCP地址池的信息DHCP扩展地址池system-viewSysnamedhcpserverip-poo10extended配置扩展模式地址池0Sysname-dhcp-poo1-Onetworkiprange192.168.8.1192.168.8.150动态分酉己的地址范围为192.16881至!192.168.8.150Sysname-dhcp-poo1-Onetworkmask255.255.255.0酉己
6、置扩展模式地址池0动态分配的IP地址掩码为255.255.255.0Sysname-dhcp-poo1-Oforbidden-ip192.168.1.3192.168.1.10配置DHCP扩展模式地址池O中不参与分配的IP地址为192.168.1.3和192.168.1.10其他比如网关比如DNS同上Sysname-V1an-interface1dhcpserverapp1yip-poo10配置V1AN接口1引用DHCP扩展模式地址池0必须要输入,否则在扩展DHCP模式下客户端获取不到IP!DHCP中继模式# 配置DHCP服务器组1的服务器IP地址为1.1.1.1osystem-viewSys
7、namedhcpre1ayserver-group1ip1.1.1.1# 配置V1AN接口1与DHCP服务器组1的归属关系。system-viewSysnameinterfacev1an-interface1Sysname-V1an-interface1dhcpre1ayserver-se1ect1# 配置V1AN接口1工作在DHCP中继模式。system-viewSysnameinterfacev1an-interface1Sysname-V1an-interface1dhcpse1ectre1ay# 使能伪DHCP服务器检测功能。system-viewSysnamedhcpre1ayser
8、ver-detectDHCP中继模式查看命令disp1aydhcpre1ay显示所有接口对应的DHCP服务器组的信息disp1aydhcpre1ayinformation显示DHCP中继上Option82的配置信息disp1aydhcpre1aysecurity显示DHCP中继的用户地址表项信息disp1aydhcpre1aysecuritystatistics显示DHCP中继用户地址表项的统计信息disp1aydhcpre1aysecuritytracker显示DHCP中继动态用户地址表项的定时刷新周期disp1aydhcpre1ayserver-group显示DHCP服务器组中服务器的IP
9、地址disp1aydhcpre1aystatistics显示所有DHCP服务器组的相关报文统计信息之和resetdhcpre1aystatistics清除所有DHCP服务器组的DHCP中继的统计信息DHCP客服端# 指定V1AN接口1使用DHCP方式获取IP地址。system-viewSysnameinterfacev1an-interface1Sysname-V1an-interface1ipaddressdhcp-a11ocdisp1aydhcpCIient显示所有接口的DHCP客户端相关信息DHCPSnoopingSysnamedhcp-snooping使能DHCPSnooping功能s
10、ystem-viewSysnameinterfaceGigabitEthernet1/0/1Sysname-GigabitEthernet1/0/1dhcp-snoopingtrust配置以太网端口GigabitEthernet1/0/1为信任端口,并记录客户端IP地址和MAC地址的绑定关系DHCPSnooping查看命令disp1aydhcp-snooping显示DHCPSnooping表项信,息disp1aydhcp-snoopinginformation显示所有接口对应的OPtiOn82配置信息disp1aydhcp-snoopingpacketStatiStiCS显示DHCPSnOOPing设备上的DHCP报文统计信息disp1aydhcp-snoopingtrust显示信任端口信,息resetdhcp-snooping清除所有的DHCPSnooping表项resetdhcp-snoopingpacketstatistics清除DHCPSnooping设备上的DHCP报文统计信息