当前位置:网站首页>IP分配——DHCP(讲解+配置)
IP分配——DHCP(讲解+配置)
2022-08-08 17:26:00 【孤城286】
目录
一、DHCP协议简介:
- ——DHCP(动态主机配置协议)是一个局域网的网络协议。指的是由服务器控制一段IP地址范围,客户机登录服务器时就可以自动获得服务器分配的IP地址和子网掩码。默认情况下,DHCP作为Windows Server的一个服务组件不会被系统自动安装,还需要管理员手动安装并进行必要的配置。
- ——当内网有上百台的电脑,需要配置大量的ip地址,这时可以在服务器上安装一个微软的Windows server操作系统,安装后可以部署DHCP,为下面的PC自动分配一个ip地址,也可以部署FTP文件共享、DNS服务;Linux操作系统它是不基于web界面的,完全是由命令行来部署一些业务,功能,所以对大家来说有困难一般数据中心级别时用linux操作系统,而企业网中使用windows操作系统
- ——优点:安全
案列一:核心充当DHCP服务器为PC下发ip地址:
核心交换机:
3560(config)#ip dhcp pool vlan10 ——为地址池设置名称(一般一个vlan对于一个地址池)
3560(dhcp-config)#default-router 192.168.20.254 ——为下发的地址设置网关
3560(dhcp-config)#network 192.168.20.0 255.255.255.0 ——设置下发地址范围
3560(dhcp-config)#dns-server 8.8.8.8 设置DNS
ip dhcp excluded 192.168.100.254 ——excluded:排除其他的IP地址,防止冲突
ip dhcp excluded 192.168.100.1
ip dhcp excluded 192.168.100.2
3560(dhcp-config)#lease 1 (设备IP地址租期的时间默认24小时,单位为/天)
exit
终端:
int f0/0
ip add dhcp ——获取ip地址方式为dhcp
ex
show run int f0/0 ——查看接口详细信息
show ip int br ——查看接口ip
——————————————————————————————————————————————————
案例二:服务器开启dhcp服务:
核心交换机:
interface Vlan10
ip address 192.168.10.254 255.255.255.0
ip helper-address 192.168.30.1——ip helper-address 目的ip:将组播变成单播
exit
interface Vlan 20
ip address 192.168.20.254 255.255.255.0
ip helper-address 192.168.30.1
exit
边栏推荐
猜你喜欢
随机推荐
使用电脑通过VNC Viewer远程连接树莓派4B
The latest research from PNAS: 81% problem solving rate, neural network Codex opens the door to the world of advanced mathematics
How to set timed network disconnection to assist self-discipline in win10
laravel database: query builder
3531. 哈夫曼树
企业“数字化转型”成功的2个必备条件!
C人脸识别
L2-020 功夫传人 (25 分)
activemq 消息头、消息体、消息属性
The new version of squirrel as source change operation
LeetCode_Binary Tree_Medium_515. Find the maximum value in each tree row
L2-017 人以群分 (25 分)
4. S32K14X study notes: S32 Design Studio new and imported projects
C1. Pokémon Army (easy version)
【开源教程2】疯壳·开源编队无人机-硬件资源简介
leetcode:294.翻转游戏
How banner displays drawable images
中金证券股票开户流程是什么,我需要准备身份证吗,安全吗
目标检测、目标跟踪、图像分类最新进展
C#异步和多线程