华为交换机在vlanif下绑定IP地址和MAC

news/2024/7/24 12:45:49

首先,我是在vlanif下启用dhcp的。

[2#-1F-Core1-Vlanif2]display this 
#
interface Vlanif2
 ip address 172.16.15.1 255.255.254.0
 dhcp select interface
 dhcp server excluded-ip-address 172.16.15.80 172.16.15.254
 dhcp server static-bind ip-address 172.16.15.69 mac-address 040e-3c22-3de2
 dhcp server static-bind ip-address 172.16.15.70 mac-address f439-0929-07ac
 dhcp server static-bind ip-address 172.16.15.75 mac-address c051-7e6b-68f5
 dhcp server static-bind ip-address 172.16.15.77 mac-address c051-7e72-665e
 dhcp server static-bind ip-address 172.16.15.78 mac-address c051-7e6b-5b7f
 dhcp server static-bind ip-address 172.16.15.79 mac-address c051-7e72-58a0
 dhcp server dns-list 172.16.128.5 172.16.128.6
#

 

 

 

 

 

 

 

 

 

除了在在vlanif下要启用dhcp,还需要在配置模式下输入dhcp enable。

我在vlanif 2下面要绑定一个MAC地址的IP,命令如下,
[2#-1F-Core1-Vlanif2]dhcp server static-bind ip-address 172.16.15.69 mac-address 040e-3c22-3de2

结果报以下错误
error: This IP address is conflicting, and only idle or expired IP addresses can be statically bound.
意思是说:IP地址冲突,只能静态绑定空闲或过期的IP地址。

用命令quit退回到视频模式,就是输入帐号和密码后的模式,到了视频模式下输入下面的命令清一下IP地址。
<2#-1F-Core1>reset ip pool interface Vlanif2 172.16.15.69

再输入sys进入管理模式,
输入interface Vlanif2进入Vlanif2的接口模式,
再次输入绑定命令,成功了。
[2#-1F-Core1-Vlanif2]dhcp server static-bind ip-address 172.16.15.69 mac-address 040e-3c22-3de2

 

下面这个命令可以统计Vlanif2下的DHCP信息。

[2#-1F-Core1]disp ip pool interface Vlanif2 all
 ----------------------------------------------------------------------------------------------
  Index                     IP                    Client-ID       Type        Left     Status           
 ----------------------------------------------------------------------------------------------

    321    172.16.15.66        2cc5-463b-8e4e    DHCP      75972   Used             
    322    172.16.15.67        1062-e503-9407    DHCP              -   Expired          
    323    172.16.15.68                     -       -        -   Idle             
    324    172.16.15.69        040e-3c22-3de2    DHCP              -   Static-bind      
    325    172.16.15.70        f439-0929-07ac     DHCP              -   Static-bind used 
    326    172.16.15.71                     -                      -                 -   Idle             
    327    172.16.15.72                     -                      -                 -   Idle             
    328    172.16.15.73                     -                      -                 -   Conflict  


http://www.niftyadmin.cn/n/1527300.html

相关文章

IP 报文格式大全

IP 报文格式大全 https://support.huawei.com/hedex/hdx.do?docidEDOC1000105967 报文格式查询&#xff1a; https://info.support.huawei.com/network/infofinder/openPacketFormatPage?module6&langzh

原型和原型链简述(prototype、_proto_)

原型链 __proto__ 原型 使用 __proto__ 串联起来的对象链状结构 从任何一个数据结构出发, 最终都能找到 Object.prototype 作用: 为了对象访问机制 > 当你需要访问一个对象的成员的时候 > 首先在自己身上查找, 自己身上有, 就直接使用, 停止查找 > 自己没有, 就会…

如何进入Microsoft 安全公告

首先打开这个URI https://docs.microsoft.com/ 打开以后&#xff0c;在里面随便输入一个已知的security bulletins&#xff08;安全公告&#xff09;编号&#xff0c;例如&#xff1a;ms17-010&#xff0c;这个就是大名鼎鼎的永恒之蓝的安全漏洞&#xff0c;Microsoft Window…

Git使用流程(超级详细,值得收藏!)

目录 git 安装 git 首次安装需要进行的配置 git 管理本地文件夹 git 仓库是什么样子的 ? 上传到远程 下载到本地 git 的分支 git 的冲突 和 git 相关的几个文件 git常用命令 1.$ git clone [address] # 复制代码库到本地2.$ git add [file] … # 添加文件到代码库中3.$…

在微软AD域环境下批量部署安装软件

第一步&#xff1a;要保证你的软件是MSI格式的。如果不是&#xff0c;请看第二步。 第二步&#xff1a;制作MSI安装包&#xff0c;我用了Advanced Installer 制作msi安装包 2.1 网上下载的exe的软件&#xff0c;请先将这个软件安装一次&#xff0c;安装好以后&#xff0c;会在…

Vue中的过滤器(filter)

过滤器的写法 首先&#xff0c;过滤器可在new Vue实例前注册全局的&#xff0c;也可以在组件上写局部。 全局过滤器&#xff1a; Vue.filter(globalFilter, function (value) {return value "!!!"}) 组件过滤器&#xff08;局部&#xff09;&#xff1a; filte…

Wireshark Limit each packet to 80 bytes

今天在winxp中安装了1.10.7 版本wireshark来做一个试验&#xff0c;试验中我只需要抓TCP和IP包&#xff0c;所以要在Wireshark: Capture Options的窗口中把每个数据包的大小&#xff08;就是Limit each packet to&#xff09;限制为80字节&#xff0c;按ctrlK调出Wireshark: Ca…

Vue中的scoped

什么是scoped 在vue文件中的 style 标签上&#xff0c;有一个特殊的属性&#xff1a;scoped。当一个 style 标签拥有 scoped 属性时&#xff0c;它的 CSS 样式就只能作用于当前的组件&#xff0c;也就是说&#xff0c;该样式只能适用于当前组件元素。通过该属性&#xff0c;可…