当前位置:网站首页>DHCP principle and configuration
DHCP principle and configuration
2022-07-24 05:15:00 【LEE_ September】
DHCP Principle and configuration
List of articles
1.DHCP summary
DHCP(Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol )
from Internet Designed and developed by the task force
Used exclusively for TCP/IP Computers in the network automatically assign TCP/IP Protocol of parameters
2. Use DHCP The benefits of
Reduce the workload of Administrators
Avoid the possibility of input errors
avoid IP Address conflict
When changed IP Address segment , There is no need to reconfigure each user's IP Address
Improved IP Address utilization
Facilitate client configuration
3.DHCP The way of distribution
Automatically assigned : Assigned to a IP Permanent use after address
Manually assign : from DHCP The server administrator specifically specifies IP Address
Dynamic allocation : Release the after use IP, For other clients
4.DHCP Lease process
Client from DHCP Server get IP The process of addressing is called DHCP Lease process
There are four steps :



5. Use DHCP Dynamically configure the host address
■ DHCP service
● Automatically assign addresses to a large number of clients , Provide centralized management
● Reduce management and maintenance costs 、 Improve network configuration efficiency
■ The assignable address information mainly includes
● NIC IP Address 、 Subnet mask
● Corresponding network address 、 Broadcast address
● Default gateway address
● DNS Server address
6. To configure

[[email protected] ~]# yum install -y dhcp
install DHCP service
[[email protected] ~]# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
Copy a more detailed configuration file , Naming dhcpd.conf, Ask whether to overwrite the selection yes
[[email protected] ~]# vim /etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0{
range 192.168.1.10 192.168.1.20;
option routers 192.168.1.2;
}
subnet 192.168.2.0 netmask 255.255.255.0{
range 192.168.2.10 192.168.2.20;
option routers 192.168.2.2;
}
subnet 192.168.100.0 netmask 255.255.255.0{
range 192.168.100.10 192.168.100.20;
option routers 192.128.100.2;
}
Modify the configuration file , Set up the resource pool
[[email protected] ~]# systemctl start dhcpd
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0
start-up dhcpd
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=1dc2aa9d-9273-42d2-87a5-762b3b46ed5e
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.100.131
NETMASK=255.255.255.0
GATEWAY=192.168.100.2
[[email protected] ~]#systemctl restart network
Modify network card information
Modify the virtual machine network adapter mode

eNSP Zhongyun configuration

Configure the layer 2 switch
<Huawei>sys
[Huawei]sys SW1
[SW1]undo info-center enable
Info: Information center is disabled.
[SW1] vlan batch 10 20 100
[SW1-Ethernet0/0/1]port link-type access
[SW1-Ethernet0/0/1]port default vlan 100
[SW1-Ethernet0/0/1]undo shut
Info: Interface Ethernet0/0/1 is not shutdown.
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 10
[SW1-Ethernet0/0/2]undo shut
Info: Interface Ethernet0/0/2 is not shutdown.
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]p l a
[SW1-Ethernet0/0/3]p d v 20
[SW1-Ethernet0/0/3]undo shut
Info: Interface Ethernet0/0/3 is not shutdown.
[SW1-Ethernet0/0/3]int e0/0/4
[SW1-Ethernet0/0/4]p l a
[SW1-Ethernet0/0/4]p d v 100
[SW1-Ethernet0/0/4]undo shut
Info: Interface Ethernet0/0/4 is not shutdown.
[SW1-Ethernet0/0/4]int e0/0/5
[SW1-Ethernet0/0/5]p l t
[SW1-Ethernet0/0/5]p t a v a
[SW1-Ethernet0/0/5]undo shut
Info: Interface Ethernet0/0/5 is not shutdown.
Configure layer 3 switch
<Huawei>sys
[Huawei]sys SW2
[SW2]undo info-center enable
Info: Information center is disabled.
[SW2]v b 10 20 100
[SW2-GigabitEthernet0/0/1]p l t
[SW2-GigabitEthernet0/0/1]p t a v a
[SW2-GigabitEthernet0/0/1]undo shut
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW2]int v10
[SW2-Vlanif10]ip add 192.168.1.2 24
[SW2-Vlanif10]int v20
[SW2-Vlanif20]ip add 192.168.2.2 24
[SW2-Vlanif20]int v100
[SW2-Vlanif100]ip add 192.168.100.2 24
[SW2]dhcp enable
Turn on dhcp, Otherwise, it will report an error later
[SW2]int v10
[SW2-Vlanif10]dhcp select relay
[SW2-Vlanif10]dhcp relay server-ip 192.168.100.2
[SW2-Vlanif10]int v20
[SW2-Vlanif20]dhcp select relay
[SW2-Vlanif20]dhcp relay server-ip 192.168.100.2
[SW2-Vlanif20]int v100
[SW2-Vlanif100]dhcp select relay
[SW2-Vlanif100]dhcp relay server-ip 192.168.100.2
Three stations PC Of IPv4 Configuration options DHCP

Enter... On the command line
ipconfig /release
ipconfig /renew
Results appear IP The address is complete

边栏推荐
- Summary of common errors in wechat applet cloud development
- Do you want to have a robot that can make cartoon avatars in three steps?
- [database connection] - excerpt from training
- )To feed back to the application layer or into multiple format documents:
- The difference between statement and Preparedstatement and how to use placeholders
- 口叫SC 或者 pb 文件为读写控制ensor为
- Crazy God redis notes 09
- PSO and mfpso
- Kingbase V8R6集群安装部署案例---脚本在线一键扩容
- Mysq Database Constraints
猜你喜欢

Heavy! The 2022 China open source development blue book was officially released

Scikit learn -- steps of machine learning application development

Update C language notes
![[Huang ah code] Introduction to MySQL - 3. I use select *, and the boss directly rushed me home by train, but I still bought a station ticket](/img/60/23fc79cf0e399265b4bd75159ad4d1.png)
[Huang ah code] Introduction to MySQL - 3. I use select *, and the boss directly rushed me home by train, but I still bought a station ticket

Chiitoitsu(期望dp)

HCIA NAT experiment

Kingbase V8R6集群安装部署案例---脚本在线一键缩容

Teach you how to weld CAD design board bottom (for beginners) graphic tutorial

Sort - quicksort

智能指针、左值引用右值引用、lambda表达式
随机推荐
[machine learning] - [traditional classification problem] - naive Bayesian classification + logistic regression classification
[database connection] - excerpt from training
Embedded system transplantation [2] - Construction of cross development environment
Kingbase v8r6 cluster installation and deployment case - script online one click capacity reduction
472-82 (22, 165, 39, sword finger offer II 078, 48. Rotate image)
Foreign key operation of MySQL_ Cascade operation
)的低字节来反馈给应用层或者成多种格式文档:
IDEA:SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder“.
Memorandum 2022
Chapter 7 other neural network types
Recursive cascade network: medical image registration based on unsupervised learning
13. Write a program, in which a user-defined function is used to judge whether an integer is a prime number. The main function inputs a number and outputs whether it is a prime number.
Learning pyramid context encoder network for high quality image painting paper notes
Update C language notes
Fiddler抓包工具的使用
What are the core strengths of a knowledge base that supports customers quickly?
HCIA NAT experiment
Problems and solutions of QT (online installation package) crash in win10 installation
[Huang ah code] Introduction to MySQL - 3. I use select *, and the boss directly rushed me home by train, but I still bought a station ticket
编译型语言和解释型语言的区别