当前位置:网站首页>DHCP service
DHCP service
2022-07-28 07:03:00 【Peanut flavored peanuts】
Preface
DHCP(Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol ) Is a LAN network protocol , Use UDP Agreement work , There are two main uses : Automatically assign... To internal network or network service providers IP Address , For users or internal network administrators as a means of central management of all computers .
One . What is? DHCP
DHCP( Dynamic allocation IP Address )
from internet Working group design and development
Used exclusively for TCP/IP Computers in the network automatically assign IP Address
Two .DHCP The benefits of
Reduce the workload of Administrators
Avoid the possibility of input errors
avoid IP Address conflict
When the network changes IP Address segment , There is no need to reconfigure each user IP Address
Improved IP Address utilization
Facilitate client configuration
3、 ... and .DHCP The way of distribution
Automatically assigned : Assigned to a IP Permanent use after address ( You can directly do static )
Manually assign : from DHCP The server administrator specifically specifies IP Address
Dynamic allocation : Release the after use IP Address , For other customers and
Four .DHCP Lease process
Customers and from DHCP Server get IP The process of address is DHCP Lease project
discover 1. The client sends... By broadcast discover Request... From the server IP Address
offer 2. Server received discover message , Will find one ip, Plus the corresponding lease term ( gateway 、dns The server )
Form a offer message , Send to client , Inform the client that IP Address
resquest 3. The client will receive a lot of offer message , Select a reply message as your target server , To service
Device sending resquest Request message
ack 4. Server received resquest Ask for message , Send according to the message confirmation ack To the client
relocatio
When DHCP The server rents to the client IP The lease term of the address reaches 50% when , You need to renew the lease
The client sends directly to the server that provides the lease DHCPrequest package , Request to update the existing address lease
5、 ... and . Why use DHCP
DHCP Avoid manually setting the service ip The address photo is conflicting or wrong ,DHCP Provides security , Reliable and simple TCP/IP Network settings , Reduced configuration IP Address load .
A typical c/s Pattern
Set up a dedicated computer in the network DHCP The server , Responsible for the centralized allocation of various address parameters ( It mainly includes IP Address 、 Subnet mask 、 gateway 、 Broadcast address 、dns Server address ), Other hosts on DHCP The server communicates , Can get IP Address
Server operation DHCP Service monitoring 67 port
Client running DHCP Program monitoring 68 port
6、 ... and .DHCP To configure

1. Configuration steps


2. The network configuration
sw1 To configure
<Huawei>undo t m
<Huawei>system-view
[Huawei]vlan batch 10 20 100
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 100
[Huawei-Ethernet0/0/3]int e0/0/5
[Huawei-Ethernet0/0/5]port link-type access
[Huawei-Ethernet0/0/5]port default vlan 100
[Huawei-Ethernet0/0/5]int e0/0/4
[Huawei-Ethernet0/0/4]port link-type trunk
[Huawei-Ethernet0/0/4]port trunk allow-pass vlan all
sw2 To configure
<Huawei>undo t m
<Huawei>system-view
[Huawei]vlan batch 10 20 100
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.1.1 24
[Huawei-Vlanif10]int vlan 20
[Huawei-Vlanif20]ip add 192.168.2.1 24
[Huawei-Vlanif20]int vlan 100
[Huawei-Vlanif100]ip add 192.168.31.2 24
[Huawei-Vlanif100]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]q
[Huawei]dhcp enable
[Huawei]int vlan 10
[Huawei-Vlanif10]dhcp select relay
[Huawei-Vlanif10]dhcp relay server-ip 192.168.31.10
[Huawei-Vlanif10]int vlan 20
[Huawei-Vlanif20]dhcp select relay
[Huawei-Vlanif20]dhcp relay server-ip 192.168.31.10
[Huawei-Vlanif20]int vlan 100
[Huawei-Vlanif100]dhcp select relay
[Huawei-Vlanif100]dhcp relay server-ip 192.168.31.10



边栏推荐
- Clock tree analysis example
- ---Stack & queue---
- Test interview questions collection (I) | common required questions and procedures of software testing (with answers)
- SSH服务配置
- [learning notes] tool
- QGraphicsView提升为QChartView
- Blue Bridge Cup square filling number
- Esxi community nvme driver update v1.1
- [learning notes] drive
- What's a good gift for Tanabata? Niche and advanced product gift recommendation
猜你喜欢
随机推荐
Common models in software development
Applet custom components - data, methods, and properties
iptables防火墙
QGraphicsView提升为QChartView
Technology sharing | how to simulate real use scenarios? Mock technology to help you
Results fill in the blanks for beer and drinks
Icc2 analysis timing artifact analyze_ design_ violations
MySQL build database Series (I) -- download MySQL
Hdu-5783 divide the sequence (greedy water question)
VMware Workstation 配置net模式
Understanding of C language EOF
MySQL master-slave
MySQL主从
DNS域名解析服务
Hdu-2036-reform spring breeze blowing all over the ground (polygon area template)
shell脚本——编程条件语句(条件测试、if语句、case分支语句、echo用法、for循环、while循环)
Wechat applet custom compilation mode
MOOC翁恺C语言 第六周:数组与函数:1.数组2.函数的定义与使用3.函数的参数和变量4.二维数组
Pku-2739-sum of constructive prime numbers
Escape character notes







