当前位置:网站首页>DHCP配置命令(DHCP配置命令)
DHCP配置命令(DHCP配置命令)
2022-08-01 14:38:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
#DHCP
动态主机配置协议,用来分配IP地址等网络参数。 用户上网需要条件:IP地址,网关,DNS… 注意:除非有特殊需求会采用静态配置(企业员工比较多的企业)
路由器、核心交换机、Linux、服务器上面都可以配置DHCP
DHCP配置实验:
[Huawei]dhcp enable:开启DHCP服务
[Huawei]ip pool aa:在路由器上创建IP地址池
[Huawei-ip-pool-aa]network 192.168.1.0 mask 24:给IP地址池 添加IP地址网段
[Huawei-ip-pool-aa]gateway-list 192.168.1.1:IP地址池设置网关
[Huawei-ip-pool-aa]dns-list 8.8.8.8 192.168.1.1:配置DNS
[Huawei-GigabitEthernet0/0/0]dhcp select global :选择DHCP配置方式
这个采用的是第一种配置方式:全局建立地址池的方式。[Huawei-ip-pool-aa]lease day 0 hour 20:修改IP地址的租用时间
通过地址绑定方式实现:固定IP
[Huawei-ip-pool-aa]static-bind ip-address 192.168.1.200 mac-address xxxx-xxxx-xxxx
DHCP 分配IP地址的过程:
1.源:0.0.0.0 ;目的:255.255.255.255称为DHCP Discover --DHCP 发现报文
[Huawei]dis ip pool name aa used:查看DHCP地址池分配IP地址的记录。PC>ipconfig / release:释放IP地址。 PC>ipconfig / renew :重新获取IP地址
#将部分IP地址排出地址池,用于静态IP配置
[Huawei-ip-pool-aa]excluded-ip-address 192.168.1.2 192.168.1.50
重置分配IP:reset ip pool name aa used.
查看:dis ip pool name aa#dhcp第二种分配IP地址的配置方式: interface方式:它是基于接口的DHCP配置方式。
在接口下配置:
[Huawei-GigabitEthernet0/0/0]dhcp select interface
[Huawei-GigabitEthernet0/0/0]dhcp server dns-list 8.8.8.8
这种方式分配的IP地址网段,是该接口所在的网段IP地址。网关就是这个接口的IP地址。#DHCP第三种分配IP地址的配置方式: DHCP relay(DHCP 中继)配置方式。
给模拟服务器配置网关:
[DHCP server]ip route-static 0.0.0.0 0 192.168.100.1
dhcp relay server-ip 192.168.100.2:中继到DHCP服务器的IP地址发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/126048.html原文链接:https://javaforall.cn
边栏推荐
- 【论文笔记】MiniSeg: An Extremely Minimum Network for Efficient COVID-19 Segmentation
- Longkou united chemical registration: through 550 million revenue xiu-mei li control 92.5% stake
- 解读selenium webdriver
- 长江欧拉生态创新中心成立,武汉数字经济再添坚实底座
- 龙口联合化学通过注册:年营收5.5亿 李秀梅控制92.5%股权
- 倪光南:openEuler已达国际同类社区水准
- 沃文特生物IPO过会:年营收4.8亿 养老基金是股东
- ECCV 2022|R2L: 用数据蒸馏加速NeRF
- 直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
- The soul asks: How does MySQL solve phantom reads?
猜你喜欢
随机推荐
Bloom filter bloom
Amperon IPO meeting: annual revenue of 500 million Tongchuang Weiye and China Mobile Innovation are shareholders
布隆过滤器bloom
AtCoder Beginner Contest 261 D - Flipping and Bonus
Row locks in MySQL
尾牙宴是什么
Inflation continues, Kenya's food security a concern
170页6万字智慧能源管理平台建设方案书
the direction i'm looking for
【论文笔记】MiniSeg: An Extremely Minimum Network for Efficient COVID-19 Segmentation
性能优化——资源优化笔记
只知道SQL数据库?又一国产数据库语言诞生了
Yann LeCun开怼谷歌研究:目标传播早就有了,你们创新在哪里?
性能优化——渲染优化笔记
分布式数据库难题(一):数据分区
对标丰田!蔚来又一新品牌披露:产品价格低于20万
win10+Qt5.15.2 realizes low-power bluetooth control
The little thing about Request reuse.The research is understood, and I will report it to you.
Pytorch - Distributed Model Training
gpio模拟串口通信









