DHCP-learn from scratch

Overview

DHCP is a LAN network protocol. The server controls a section of address pool. When the client logs in to the server, it will automatically assign an IP address and subnet mask.

Features of DHCP

  • Reduce administrator workload
  • Avoid mistakes
  • Avoid IP conflicts [will cause you to be online for a while and I can for a while]
  • Improve IP utilization

DHCP service process

Renew the lease when the lease period reaches 50% [Request package]
Huawei DHCP assigns IP address pool from large to small
Column: 192.168.1.254

DHCP interface mode

Dynamic | IP network segment

dhcp enable //开启dhcp
dhcp select int //基于接口配置
dhco server lease day [num] //设置租约期
/*默认租约期为1天*/
dhcp server excluded-ip-address [IP] [IP]
/*保留地址池*/
dhcp server dns-list [DNS-IP] //设置自动分配的DNS

DHCP dynamic mode

There can be multiple address pools | defined pools | multiple network segments

dhcp enable
ip pool [name] //创建地址池的名字
gateway-list [IP] //DHCP出口网关
network [IP] mask [掩码] //可分配网段
dns-list [DNS-IP]
exclude-ip-address [IP] [IP]
static-bind ip address [IP] mac-address [MAC]
/*固定分配MAC(需要地址池中的IP)*/
lease day [num]
dhcp select global

DHCP relay agent

Communication between client and server in different network segments

/*首先进与客户但相连的接口*/
ip add [IP] [掩码]
dhcp select relay
dhcp relay server-ip [IP]
/*根据条件设置静态路由*/

Guess you like

Origin blog.csdn.net/qq_42427971/article/details/112212860
Recommended