当前位置:网站首页>Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol
2022-06-28 02:26:00 【ZhuMou】
One . Two tools for describing protocols
1.1 MSC(Message Sequence Chart)
Message sequence diagrams include : Entity 、 Messages and actions , And the timeline . Its function is to describe the function of the protocol from the overall interaction . The reason is that on the whole , Because it covers all entities in the protocol implementation , The difference in STD Describe only one entity . Interaction by message and action To embody .
When calling by telephone MSC chart :
It can be seen that ,entity produce action,action produce message,message And often bring other entity Of action.
How to draw a picture MSC? First, identify all the entities in the agreement . For every entity , Determine what they can do action And what can be sent message. Then it is to determine the interaction relationship between entities .
1.2 STD(State Transition Diagram)
STD It is also used to introduce the protocol functions , It's just that compared to MSC Focus on the whole ,STD Focus on one entity in the agreement . STD Contained in the :event,message,state.event and state All belong to STD The entity described , and incoming message From other entities , and outgoing message From this entity .
It can be seen from the figure above , Draw a picture STD chart We need to first list all the... That the entity may be in under the agreement state. And then we'll make it clear state Transformation conditions between (incoming message or event) And transformation results (outgoing message).
1.3 TLV
We know message There are many field, It corresponds to different functions . such as TCP packet This message There is one of them. Source IP Address Of field, Its function is to store and send the TCP packet Of the source host IP Address . For the purpose of realizing specific functions , There are some field It's indefinite (variable length), such as TFTP message Medium Error Domain , In order to store the variable length string of error prompt ,Error The domain itself is of indefinite length .
So the question is how do we deal with message Medium variable length field Well ?TLV Format ( Or coding style ).
TLV yes type-length-value Abbreviation , It represents variable length field The information stored in should be organized so that it can be decoded : Store fixed length type, Indication type ( For example, different error types ); Store fixed length length, instructions value The length of ; Store variable length value, Its length consists of length Given .
Two .IP address allocation --- DHCP Introduce
DHCP Dynamic host configuration protocol , The function is to configure relevant information for the host that wants to access the network , The main one is IP Address . There are two ways to allocate network related configuration information : Static allocation ( That is, it is manually entered by the user ) And dynamic allocation ( By a server Distribute ). There are two commonly used dynamic configuration protocols :BOOTstrap Protocol and DHCP. The differences and similarities between the two are :
DHCP | BOOTP | |
function | For the host ( There is a hard disk and boot file Of ) Configure relevant network information | The host can use BOOTP obtain IP Address , But the most important function is that the diskless workstation uses this protocol and TFTP obtain boot file. |
Transport layer | UDP, DHCP client Of port by 67. | UDP |
Validity period of the configuration | The network configuration information has a valid period . Reallocate after expiration . | The term of validity is unlimited , That is, it will not rebind or update the network configuration |
message Format | The two are the same |
3、 ... and .DHCP The entities involved and the period of validity
3.1 DHCP server
3.2 DHCP client
3.3 DHCP lease
Four .DHCP message
Focus on the domains to be introduced (field) yes OPTIONS. Its variable length , follow TLV Format . We introduce when type by 53 when ( Express OPTIONS Stored DHCP message Type information for ) The case when .
here length and type Each occupies one byte ,type = 53 and length = 1.value It also takes one byte , It can be for :
value = 1; DHCPDISCOVER value = 2; DCHPOFFER value = 3;DHCPREQUEST value = 4; DHCPDECLINE value = 5; DHCPACK value = 6;DHCPNAK value = 7; DHCPRELEASE value = 8;DHCPINFORM
5、 ... and .DHCP operation
DHCP It mainly includes three operations , When we parted IP address Acquisition , release sb. before the sentence expires IP Address , to update IP The lease term of the address . Each operation corresponds to different functions , We can draw MSC chart .
5.1 IP The address for
From the above to IP Description of the address acquisition process , We can extract three entity:DHCP host, DHCP server and other DHCP server(offer Not accepted server).
5.2 Early Lease Termination( Give up early IP Address )
5.3 Lease Renewal
IP The lease term of the address has expired and needs to be updated .
Be careful ,client By selected server After refusing (DHCPNAK), It will not enter the third or fourth picture . These four figures are in parallel ( This is a combination STD It is obvious that ).
边栏推荐
- Figure out the difference between MIT, BSD and Apache open source protocols
- 系统管理员设置了系统策略,禁止进行此安装。解决方案
- Cesium 多边形增加文字标签(polygon 加 label)多边形中心点偏移问题解决
- Locust performance test - parameterization, no repetition of concurrent cyclic data sampling
- How to handle computer security certificate errors
- Prometeus 2.35.0 新特性
- Embedded must learn, detailed explanation of hardware resource interface -- Based on arm am335x development board (Part 1)
- Jenkins - 访问 Jenkins 自定义参数变量,处理变量值中含有空格
- Adding text labels to cesium polygons the problem of polygon center point offset is solved
- Ionic4 realizes half star scoring
猜你喜欢
Appium自动化测试基础 — ADB常用命令(一)
A set of sai2 brushes is finally finished! Share with everyone!
类的初始化与回调的用法
SQL injection Bypass (2)
Jenkins - access the Jenkins user-defined parameter variable, and handle the variable value containing spaces
CVPR22收录论文|基于标签关系树的层级残差多粒度分类网络
Cesium 多边形增加文字标签(polygon 加 label)多边形中心点偏移问题解决
frp实现内网穿透
王心凌、谭维维 - 山海(副歌加长版) 在线试听无损FLAC下载
Self supervised learning and drug discovery
随机推荐
Use code binding DataGridView control to display tables in program interface
Jenkins - Pipeline syntax
简单文件传输协议TFTP
基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
Prometeus 2.35.0 new features
[Yocto RM]1 - System Requirements
Machine learning notes - time series as features
1382. balancing binary search tree - General method
指南针股票开户是会有什么风险吗?指南针开户安全吗
Hi, you have a code review strategy to check!
Locust 性能测试 - 参数化,并发循环数据采样不重复
SQL 注入绕过(二)
《低代码解决方案》——覆盖工单、维修和财务全流程的数字化售后服务低代码解决方案
ionic4实现半星评分
嵌入式必学,硬件资源接口详解——基于ARM AM335X开发板 (上)
mysql面试百题集
Ten MySQL locks, one article will give you full analysis
Class initialization and callback usage
Numpy----np.tile()函数解析
Geojson format description (detailed format)