私有云落地解决方案之网络篇-关键技术-DHCP地址-2
来源:互联网 发布:中信网络 财新网 编辑:程序博客网 时间:2024/05/22 10:16
作者:【吴业亮】
博客:http://blog.csdn.net/wylfengyujiancheng
华为交换机&路由器&防火墙DHCP常用操作
一、排除不参与自动分配的IP地址
1、采用全局地址池时的配置:
<switch> system-view[switch] ip pool pool1[switch-ip-pool-pool1] network 10.10.10.0 mask 24[switch-ip-pool-pool1] gateway-list 10.10.10.1[switch-ip-pool-pool1] excluded-ip-address 10.10.10.200 10.10.10.200
2、采用接口地址池时的配置:
<switch> system-view[switch] dhcp enable[switch] interface vlanif 200[switch-Vlanif200] ip address 10.10.10.1 24[switch-Vlanif200] dhcp select interface[switch-Vlanif200] dhcp server excluded-ip-address 10.10.10.200 10.10.10.200
二、修改租期
缺省情况下,设备作为DHCP服务器的缺省租期是1天;设备作为DHCP客户端时未配置缺省租期。
1、采用全局地址池时的配置:
<switch> system-view[switch] ip pool pool1[switch-ip-pool-pool1] lease day 10
2、采用接口地址池时的配置:
<switch> system-view[switch] interface vlanif 200[switch-Vlanif200] dhcp server lease day 10
3、在作为DHCP客户端的设备上,修改租期为10天(即864000秒)。
<switch> system-view[switch] interface vlanif 200[switch-Vlanif200] dhcp client expected-lease 864000
三、为客户端分配固定的IP地址
1、采用全局地址池时的配置:
<switch> system-view[switch] ip pool pool1[switch-ip-pool-pool1] static-bind ip-address 10.10.10.200 mac-address add1-fd91-e9a0
2、采用接口地址池时的配置:
<switch> system-view[switch] interface vlanif 200[switch-Vlanif200] dhcp server static-bind ip-address 10.10.10.200 mac-address add1-fd91-e9a0
四、取消为客户端分配固定的IP地址
1、采用全局地址池时的配置:
回收IP地址10.10.10.5
<switch> reset ip pool name pool1 10.10.10.5
解除静态绑定关系
<switch> system-view[switch] ip pool pool1[switch-ip-pool-pool1] undo static-bind ip-address 10.10.10.5
2、采用接口地址池时的配置:
回收IP地址10.10.10.5
<switch> reset ip pool interface vlanif200 10.10.10.5
解除静态绑定关系
<switch> system-view[switch] interface vlanif 200[switch-Vlanif200] undo dhcp server static-bind ip-address 10.10.10.5
五、查看已使用的IP地址
<switch> display ip pool name pool1 used
六、清除冲突地址
1、采用全局地址池时的配置:
<switch> reset ip pool name pool1 conflict
2、采用接口地址池时的配置:
<switch> reset ip pool interface vlanif200 conflict
七、扩大地址池范围
1、如果没有分配出去
1.1、采用全局地址池时的配置:
<switch> system-view[switch] ip pool pool1[switch-ip-pool-pool1] undo network[switch-ip-pool-pool1] network 10.10.10.0 mask 24 //调整掩码长度
1.2、采用接口地址池时的配置:
<switch> system-view[switch] interface vlanif 200[switch-Vlanif200] ip address 10.10.10.1 24 //调整掩码长度[switch-Vlanif200] dhcp select interface //重新使能接口地址池功能
2、如果已经分配出去
2.1、采用全局地址池时的配置:
<switch> reset ip pool name pool1 all //回收所有的IP地址<switch> system-view[switch] dhcp server ping packet 3 //配置防止IP地址重复分配功能[switch] dhcp server ping timeout 200 //配置防止IP地址重复分配功能[switch] ip pool pool1[switch-ip-pool-pool1] undo network[switch-ip-pool-pool1] network 10.10.10.0 mask 24 //调整掩码长度
2.2、采用接口地址池时的配置:
<switch> system-view[switch] dhcp server ping packet 3 //配置防止IP地址重复分配功能[switch] dhcp server ping timeout 200 //配置防止IP地址重复分配功能[switch] interface vlanif 200[switch-Vlanif200] ip address 10.10.10.1 24 //调整掩码长度[switch-Vlanif200] dhcp select interface //重新使能接口地址池功能
八、缩小地址池范围
1、如果没有分配出去
1.1、采用全局地址池时的配置:
<switch> system-view[switch] ip pool pool1[switch-ip-pool-pool1] undo network[switch-ip-pool-pool1] network 10.10.10.0 mask 25 //调整掩码长度
1.2、采用接口地址池时的配置:
<switch> system-view[switch] interface vlanif 200[switch-Vlanif200] ip address 10.10.10.1 25 //调整掩码长度[switch-Vlanif200] dhcp select interface //重新使能接口地址池功能
2、如果已经分配出去
2.1、采用全局地址池时的配置:
<switch> reset ip pool name pool1 all //回收所有的IP地址<switch> system-view[switch] dhcp server ping packet 3 //配置防止IP地址重复分配功能[switch] dhcp server ping timeout 200 //配置防止IP地址重复分配功能[switch] ip pool pool1[switch-ip-pool-pool1] undo network[switch-ip-pool-pool1] network 10.10.10.0 mask 25 //调整掩码长度
2.2、采用接口地址池时的配置:
<switch> system-view[switch] dhcp server ping packet 3 //配置防止IP地址重复分配功能[switch] dhcp server ping timeout 200 //配置防止IP地址重复分配功能[switch] interface vlanif 200[switch-Vlanif200] ip address 10.10.10.1 25 //调整掩码长度[switch-Vlanif200] dhcp select interface //重新使能接口地址池功能
九、防止从仿冒的DHCP服务器获取IP地址
1.全局下的配置。
<switch> system-view[switch] dhcp enable[switch] dhcp snooping enable
2.连接DHCP客户端侧接口的配置。所有连接DHCP客户端的接口都需要配置,以接口GE 1/0/1为例。
[switch] interface gigabitethernet 1/0/1[switch-GigabitEthernet1/0/1] dhcp snooping enable[switch-GigabitEthernet1/0/1] quit
3.连接DHCP服务器侧接口的配置。
[switch] interface gigabitethernet 1/0/2[switch-GigabitEthernet1/0/2] dhcp snooping trusted[switch-GigabitEthernet1/0/2] quit
十、关闭DHCP服务
<switch> system-view[switch] undo dhcp enable
- 私有云落地解决方案之网络篇-关键技术-DHCP地址-2
- 私有云落地解决方案之网络篇-关键技术-DHCP地址-1
- 私有云落地解决方案之网络篇-关键技术-VRRP
- 私有云落地解决方案之网络篇-关键技术-NAT
- 私有云落地解决方案之网络篇-关键技术-GRE
- 私有云落地解决方案之网络篇-关键技术-链路聚合
- 私有云落地解决方案之网络篇-关键技术-vlan间通信
- 私有云落地解决方案之网络篇-关键技术-安全类1
- 私有云落地解决方案之网络篇-关键技术-快速重路由FRR
- 私有云落地解决方案之网络篇-网络架构
- 私有云落地解决方案之openstack高可用(pike版本)-配置ovs的vxlan网络
- 私有云落地解决方案之openstack高可用(pike版本)-架构
- 私有云落地解决方案之openstack高可用(pike版本)-环境配置
- 私有云落地解决方案之openstack高可用(pike版本)-数据库
- 私有云落地解决方案之openstack高可用(pike版本)-消息队列
- 私有云落地解决方案之openstack高可用(pike版本)-集群配置
- 私有云落地解决方案之openstack高可用(pike版本)-haproxy
- 私有云落地解决方案之openstack高可用(pike版本)-keystone
- 基于Markdown的部分常用语法总结
- Java基础-BigDecimal的使用
- JMS两种模型的介绍和ActiveMQ的简单实例
- eclipse快捷键摘要
- 电子组装的可制造性设计技术-1
- 私有云落地解决方案之网络篇-关键技术-DHCP地址-2
- yum 安装环境笔记
- wglUseFontBitmaps/wglUseFontOutlines
- bootstrap hello word
- 我想学编程
- 改进版的冒泡排序(O(n2))
- Storm详解
- opencv morphologyEX 图像数学形态学
- 正则表达式-基础