WO2017219777A1 - Packet processing method and device - Google Patents
Packet processing method and device Download PDFInfo
- Publication number
- WO2017219777A1 WO2017219777A1 PCT/CN2017/083812 CN2017083812W WO2017219777A1 WO 2017219777 A1 WO2017219777 A1 WO 2017219777A1 CN 2017083812 W CN2017083812 W CN 2017083812W WO 2017219777 A1 WO2017219777 A1 WO 2017219777A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- dhcp
- arp
- processing method
- packet processing
- record
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a packet processing method and apparatus.
- the Dynamic Host Configuration Protocol is a protocol that a network host applies to the server to dynamically obtain an IP address and host configuration information that allows it to communicate normally.
- RFC 2131 details DHCP.
- DHCP uses the User Datagram Protocol (UDP) as the transport protocol.
- UDP User Datagram Protocol
- the host sends a message to port 67 of the DHCP server.
- the DHCP server sends a message back to port 68 of the host.
- the work of DHCP is mainly divided into the following steps:
- the host sends a DHCP packet (DHCP Discovery Packet) that requests the IP address and other configuration parameters.
- DHCP Discovery Packet DHCP Discovery Packet
- the DHCP server sends back a DHCP Offer (DHCP Response Packet) containing a valid IP address and configuration.
- DHCP Offer DHCP Response Packet
- the host selects the server of the DHCP Offer that arrives first, and sends a unicast message DHCP request (DHCP request message) to the user to accept the relevant configuration;
- the selected DHCP server sends back an acknowledged unicast packet DHCP Ack (DHCP response packet).
- the host can communicate using the IP address obtained from the DHCP server and related configuration.
- the effective use period of the address is the lease period. Before the lease expires, the host must request the server to continue to lease. The server accepts the request to continue to use, otherwise it will give up unconditionally.
- DHCP packets are broadcasted and cannot pass through multiple different subnets. If DHCP packets need to traverse multiple different subnets, you need to configure DHCP relay.
- DHCP relay can be configured on the router and can be configured on the DHCP client. Its main function The message is delivered to the DHCP server that is not on the same subnet as the client, and the return message of the DHCP server is sent back to the DHCP client to complete the allocation and management of the dynamic address of the DHCP client.
- the DHCP relay agent listens to all packets with the UDP destination port number 67 (that is, packets sent to the DHCP server). After receiving the request packet, the DHCP relay agent converts the broadcast request message into a unicast message according to the pre-defined DHCP server address, and fills in its own proxy address and sends it to the DHCP server.
- ARP address resolution protocol
- the technical problem to be solved by the embodiments of the present invention is to provide a packet processing method and apparatus, which are used to solve the problem that the cost of the network is high due to the limitation of the capacity of the ARP table of the existing DHCP relay.
- an embodiment of the present invention provides a packet processing method, which is applied to a packet processing apparatus, and includes:
- the ARP record is deleted when the timing time in the ARP record arrives.
- the packet processing method further includes:
- Control stops sending ARP probe packets to the DHCP client.
- the message processing method when receiving the DHCP response message sent by the DHCP server to the DHCP client, the message processing method further includes:
- the message processing method when receiving the DHCP response message sent by the DHCP server to the DHCP client, the message processing method further includes:
- timing time is 1000 milliseconds.
- An embodiment of the present invention provides a packet processing apparatus, including:
- a generating module configured to generate an address resolution protocol ARP record for the DHCP response message when receiving a DHCP response message sent by the dynamic host configuration protocol DHCP server to the DHCP client, where the ARP record is provided with a DHCP tag;
- the deleting module is set to delete the ARP record when the timing time in the ARP record arrives.
- the message processing apparatus further includes:
- the control module is configured to stop sending ARP probe packets to the DHCP client.
- the message processing apparatus further includes:
- the route establishing module is configured to establish a direct route between the packet processing device and the DHCP client.
- the message processing apparatus further includes:
- the sending module is configured to send the DHCP response message to the DHCP client.
- timing time is 1000 milliseconds.
- a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the implementation of the message processing method in the foregoing embodiment.
- FIG. 1 is a schematic flowchart of a packet processing method according to Embodiment 1 of the present invention.
- FIG. 2 is a schematic flowchart of processing a response packet by a DHCP relay
- Figure 3 is a scenario in which a common DHCP client obtains an IP address through a DHCP relay.
- Figure 5 is a scenario in which a DHCP client obtains an IP address through an IP RAN network.
- FIG. 6 is a schematic block diagram of a message processing apparatus according to Embodiment 2 of the present invention.
- the present invention provides a message processing method and apparatus for the problem of high network cost due to the limitation of the capacity of the existing DHCP relay ARP table.
- the packet processing method in the first embodiment of the present invention is applied to a message processing apparatus, including:
- Step 11 When receiving a DHCP response message sent by the dynamic host configuration protocol DHCP server to the DHCP client, generate an address resolution protocol ARP record for the DHCP response message, where the ARP record is provided with a DHCP tag;
- Step 12 Delete the ARP record when the timing time in the ARP record arrives.
- the aging time of the ARP record is the aging time of the ARP record.
- the aging time is 1000 milliseconds, and the aging time can be set according to the application.
- the ARP record related to the ARP record when the ARP record related to the ARP record is deleted, the ARP record related to the DHCP is deleted, and the dynamic update of the ARP table is implemented, thereby avoiding the problem that the network cost is high due to the limitation of the ARP table, and the present invention Reduced the cost of the network.
- the message processing device is called a DHCP relay. It is usually set in the router or on the DHCP client side.
- the ARP entries of the original DHCP packets are not automatically deleted. In this case, if too many DHCP clients are connected to the network, the number of ARP entries will be too large, and the DHCP relay will be used for each ARP entry.
- the ARP probe packet is always sent. In this application, the ARP entry is automatically deleted after the aging time of the ARP entry is reached. Therefore, the ARP probe packet will not be sent again. Therefore, the time is reached in the ARP record.
- the message processing method further includes:
- Control stops sending ARP probe packets to the DHCP client.
- the DHCP relay when receiving the DHCP response message sent by the DHCP server to the DHCP client, the DHCP relay needs to establish a direct connection between the DHCP relay and the DHCP client, and simultaneously set the DHCP response. The message is sent to the DHCP client.
- the specific working process of DHCP relay includes:
- the DHCP After receiving the DHCP Discover message, the DHCP relay replaces the source IP address of the packet and checks the route to forward the packet.
- the DHCP relay agent receives the unicast DHCP Offer message, and the DHCP platform (refers to the protocol at the DHCP level of the router and the DHCP relay agent at the same level) specifies that the packet is sent to the DHCP client.
- the DHCP relay agent receives the unicast DHCP Request message, and the same route is forwarded to the DHCP server.
- the DHCP relay process uses the method described in the present invention to process the received response message, as shown in FIG. 2, and the specific processing process includes:
- Step 21 The DHCP relay receives a response packet without a route.
- Step 22 it is determined whether the response message is a DHCP message; if it is not a DHCP message, step 23 is performed; otherwise, step 24 is performed;
- Step 23 generating a normal dynamic ARP entry
- Step 24 Generate an ARP entry with a D flag, so that the ARP entry is a DHCP ARP entry, and the D-flagged message is sent to the DHCP platform, that is, the DHCP platform receives the ARP response packet and finds that I learned the IP address with a special D mark, so I was born. D mark in the age item of the ARP entry;
- Step 25 Configure a timer. If the timer expires, determine whether the timeout ARP entry is marked with D. If the D flag is marked, go to step 27. Otherwise, go to step 28.
- the default aging time of the D-marked ARP entry is 1000 milliseconds, and the aging time can be configured.
- the router with the D-marked ARP entry has a shorter aging time configuration. The stronger the ability.
- Step 27 After the aging, the ARP detection packet is not sent, and the ARP entry is automatically deleted.
- Step 28 After the aging, the device sends a gratuitous ARP probe packet, and receives the response packet to update the aging time of the ARP entry.
- a common DHCP client obtains an IP address through a DHCP relay.
- the DHCP relay uses the method of the present invention to process a DHCP response message.
- the DHCP client obtains an IP address through N DHCP relays, wherein the DHCP relay 1 processes the DHCP response message by using the method of the present invention.
- the DHCP client traverses the IP RAN network to obtain an IP address.
- the Layer 2 and Layer 3 bridge device processes the DHCP response packet by using the method of the present invention.
- the dynamic update of the ARP table is implemented, and the problem of high network cost due to the limitation of the ARP table is avoided, and the present invention reduces the cost of the network.
- the packet processing apparatus of the second embodiment of the present invention includes:
- the generating module 61 is configured to: when receiving the DHCP response message sent by the dynamic host configuration protocol DHCP server to the DHCP client, generate an address resolution protocol ARP record for the DHCP response message, where the ARP record is set with a DHCP tag ;
- the deleting module 62 is configured to delete the ARP record when the timing time in the ARP record arrives.
- the packet processing device further includes:
- the control module is configured to stop sending ARP probe packets to the DHCP client.
- the packet processing device further includes:
- the route establishing module is configured to establish a direct route between the packet processing device and the DHCP client.
- the packet processing device further includes:
- the sending module is configured to send the DHCP response message to the DHCP client.
- the timing time is 1000 milliseconds.
- the packet processing apparatus of the present embodiment is the packet processing apparatus corresponding to the packet processing method of the first embodiment. All the implementation manners of the first embodiment are applicable to the embodiment, and can also be implemented and implemented. Example 1 has the same technical effect.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the foregoing technical solution provided by the embodiment of the present invention can be applied to a packet processing process.
- the ARP record related to the DHCP is deleted when the ARP recording time is reached, and the dynamic update of the ARP table is implemented to avoid
- the invention has a problem that the cost of the network is high due to the limitation of the ARP table, and the invention reduces the cost of the network.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本发明涉及通信技术领域,特别涉及一种报文处理方法及装置。The present invention relates to the field of communications technologies, and in particular, to a packet processing method and apparatus.
动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)是一种网络主机向服务器申请以动态获取一个可以让其正常通信的IP地址以及主机配置信息的协议。RFC2131详细描述了DHCP。DHCP采用用户数据报协议(User Datagram Protocol,UDP)作为传输协议,主机发送消息到DHCP服务器的67号端口,DHCP服务器回消息给主机的68号端口。The Dynamic Host Configuration Protocol (DHCP) is a protocol that a network host applies to the server to dynamically obtain an IP address and host configuration information that allows it to communicate normally. RFC 2131 details DHCP. DHCP uses the User Datagram Protocol (UDP) as the transport protocol. The host sends a message to port 67 of the DHCP server. The DHCP server sends a message back to port 68 of the host.
DHCP的工作主要分为如下几步:The work of DHCP is mainly divided into the following steps:
1、主机发送一个请求IP地址和其他配置参数的广播报文DHCP Discover(DHCP发现报文);1. The host sends a DHCP packet (DHCP Discovery Packet) that requests the IP address and other configuration parameters.
2、DHCP服务器回送一个包含有效IP地址及配置的单播报文DHCP Offer(DHCP响应报文);2. The DHCP server sends back a DHCP Offer (DHCP Response Packet) containing a valid IP address and configuration.
3、主机选择最先到达的DHCP Offer的那个服务器,并向他发送一个单播报文DHCP request(DHCP请求报文),表示接受相关配置;3. The host selects the server of the DHCP Offer that arrives first, and sends a unicast message DHCP request (DHCP request message) to the user to accept the relevant configuration;
4、选中的DHCP服务器回送一个确认的单播报文DHCP Ack(DHCP应答报文)。4. The selected DHCP server sends back an acknowledged unicast packet DHCP Ack (DHCP response packet).
通过上述步骤,主机就可以利用从DHCP服务器获得的IP地址和相关配置进行通信。地址的有效使用时间段为租用期,租用期满之前,主机必须向服务器请求继续租用,服务器接受请求才能继续使用,否则无条件放弃。Through the above steps, the host can communicate using the IP address obtained from the DHCP server and related configuration. The effective use period of the address is the lease period. Before the lease expires, the host must request the server to continue to lease. The server accepts the request to continue to use, otherwise it will give up unconditionally.
DHCP报文采用广播方式,无法穿越多个不同的子网,如果DHCP报文需要穿越多个不同的子网时,就需要配置DHCP中继(DHCP Relay)。DHCP中继可以在路由器上配置可以在DHCP客户端上配置,其主要功能 是把消息传递到与客户端不在同一子网的DHCP服务器,并将DHCP服务器的返回消息传回给DHCP客户端,完成对DHCP客户端的动态地址的分配和管理。DHCP packets are broadcasted and cannot pass through multiple different subnets. If DHCP packets need to traverse multiple different subnets, you need to configure DHCP relay. DHCP relay can be configured on the router and can be configured on the DHCP client. Its main function The message is delivered to the DHCP server that is not on the same subnet as the client, and the return message of the DHCP server is sent back to the DHCP client to complete the allocation and management of the dynamic address of the DHCP client.
DHCP中继工作方式:DHCP中继监听UDP目的端口号为67的所有报文(即发送给DHCP服务器的报文)。当DHCP中继收到请求报文后,将广播的该请求报文根据事先制定的DHCP服务器地址转换成单播报文,并填入自己的代理地址,发送给DHCP服务器。DHCP relay mode: The DHCP relay agent listens to all packets with the UDP destination port number 67 (that is, packets sent to the DHCP server). After receiving the request packet, the DHCP relay agent converts the broadcast request message into a unicast message according to the pre-defined DHCP server address, and fills in its own proxy address and sends it to the DHCP server.
随着技术的发展,DHCP服务器的容量越来越大,而实际的使用由于受到DHCP中继的地址解析协议(Address Resolution Protocol,ARP)表容量的限制,采用现有的技术不得不在实际的布网中采购昂贵的、大ARP表容量的路由器。With the development of technology, the capacity of the DHCP server is getting larger and larger, and the actual use is limited by the capacity of the address resolution protocol (ARP) table of the DHCP relay. A router that purchases expensive, large ARP table capacity in the network.
发明内容Summary of the invention
本发明实施例要解决的技术问题是提供一种报文处理方法及装置,用以解决因受现有的DHCP中继的ARP表容量的限制,造成布网成本高的问题。The technical problem to be solved by the embodiments of the present invention is to provide a packet processing method and apparatus, which are used to solve the problem that the cost of the network is high due to the limitation of the capacity of the ARP table of the existing DHCP relay.
为了解决上述技术问题,本发明实施例提供一种报文处理方法,应用于报文处理装置,包括:In order to solve the above technical problem, an embodiment of the present invention provides a packet processing method, which is applied to a packet processing apparatus, and includes:
在接收到动态主机配置协议DHCP服务器发送给DHCP客户端的DHCP应答报文时,生成针对所述DHCP应答报文的地址解析协议ARP记录,所述ARP记录中设置有DHCP标记;After receiving the DHCP response message sent by the dynamic host configuration protocol DHCP server to the DHCP client, generating an address resolution protocol ARP record for the DHCP response message, where the ARP record is provided with a DHCP tag;
在所述ARP记录中的定时时间到达时,删除所述ARP记录。The ARP record is deleted when the timing time in the ARP record arrives.
进一步地,在所述ARP记录中的定时时间到达时,所述报文处理方法还包括:Further, when the timing time in the ARP record arrives, the packet processing method further includes:
控制停止向DHCP客户端发送ARP探测报文。Control stops sending ARP probe packets to the DHCP client.
进一步地,在接收到DHCP服务器发送给DHCP客户端的DHCP应答报文时,所述报文处理方法还包括: Further, when receiving the DHCP response message sent by the DHCP server to the DHCP client, the message processing method further includes:
建立所述报文处理装置与所述DHCP客户端的直连路由。Establishing a direct route between the packet processing device and the DHCP client.
进一步地,在接收到DHCP服务器发送给DHCP客户端的DHCP应答报文时,所述报文处理方法还包括:Further, when receiving the DHCP response message sent by the DHCP server to the DHCP client, the message processing method further includes:
将所述DHCP应答报文发送给所述DHCP客户端。Sending the DHCP response message to the DHCP client.
进一步地,所述定时时间为1000毫秒。Further, the timing time is 1000 milliseconds.
本发明实施例提供一种报文处理装置,包括:An embodiment of the present invention provides a packet processing apparatus, including:
生成模块,设置为在接收到动态主机配置协议DHCP服务器发送给DHCP客户端的DHCP应答报文时,生成针对所述DHCP应答报文的地址解析协议ARP记录,所述ARP记录中设置有DHCP标记;a generating module, configured to generate an address resolution protocol ARP record for the DHCP response message when receiving a DHCP response message sent by the dynamic host configuration protocol DHCP server to the DHCP client, where the ARP record is provided with a DHCP tag;
删除模块,设置为在所述ARP记录中的定时时间到达时,删除所述ARP记录。The deleting module is set to delete the ARP record when the timing time in the ARP record arrives.
进一步地,所述报文处理装置,还包括:Further, the message processing apparatus further includes:
控制模块,设置为控制停止向DHCP客户端发送ARP探测报文。The control module is configured to stop sending ARP probe packets to the DHCP client.
进一步地,所述报文处理装置,还包括:Further, the message processing apparatus further includes:
路由建立模块,设置为建立所述报文处理装置与所述DHCP客户端的直连路由。The route establishing module is configured to establish a direct route between the packet processing device and the DHCP client.
进一步地,所述报文处理装置,还包括:Further, the message processing apparatus further includes:
发送模块,设置为将所述DHCP应答报文发送给所述DHCP客户端。The sending module is configured to send the DHCP response message to the DHCP client.
进一步地,所述定时时间为1000毫秒。Further, the timing time is 1000 milliseconds.
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的报文处理方法的实现。In the embodiment of the present invention, a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the implementation of the message processing method in the foregoing embodiment.
本发明实施例的有益效果是:The beneficial effects of the embodiments of the present invention are:
上述方案,通过在ARP记录的定时时间到达时,将与DHCP相关的ARP记录删除,实现了ARP表的动态更新,避免了因ARP表的限制而造成布网成本高的问题,本发明降低了布网成本。 In the above solution, when the ARP record related to the ARP record is deleted, the ARP record related to the DHCP is deleted, and the dynamic update of the ARP table is realized, thereby avoiding the problem that the network cost is high due to the limitation of the ARP table, and the present invention is reduced. Distribution cost.
图1为本发明实施例一的报文处理方法的流程示意图;1 is a schematic flowchart of a packet processing method according to Embodiment 1 of the present invention;
图2为DHCP中继对应答报文的处理的流程示意图;2 is a schematic flowchart of processing a response packet by a DHCP relay;
图3为常见的DHCP客户端通过一个DHCP中继获取IP地址的场景;Figure 3 is a scenario in which a common DHCP client obtains an IP address through a DHCP relay.
图4为DHCP客户端通过N个DHCP中继获取IP地址的场景;4 is a scenario in which a DHCP client obtains an IP address through N DHCP relays;
图5为DHCP客户端穿越IP RAN组网获取IP地址的场景;Figure 5 is a scenario in which a DHCP client obtains an IP address through an IP RAN network.
图6为本发明实施例二的报文处理装置的模块示意图。FIG. 6 is a schematic block diagram of a message processing apparatus according to Embodiment 2 of the present invention.
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图及具体实施例对本发明进行详细描述。The present invention will be described in detail below with reference to the drawings and specific embodiments.
本发明针对因受现有的DHCP中继的ARP表容量的限制,造成布网成本高的问题,提供一种报文处理方法及装置。The present invention provides a message processing method and apparatus for the problem of high network cost due to the limitation of the capacity of the existing DHCP relay ARP table.
实施例一Embodiment 1
如图1所示,本发明实施例一的报文处理方法,应用于报文处理装置,包括:As shown in FIG. 1, the packet processing method in the first embodiment of the present invention is applied to a message processing apparatus, including:
步骤11,在接收到动态主机配置协议DHCP服务器发送给DHCP客户端的DHCP应答报文时,生成针对所述DHCP应答报文的地址解析协议ARP记录,所述ARP记录中设置有DHCP标记;Step 11: When receiving a DHCP response message sent by the dynamic host configuration protocol DHCP server to the DHCP client, generate an address resolution protocol ARP record for the DHCP response message, where the ARP record is provided with a DHCP tag;
步骤12,在所述ARP记录中的定时时间到达时,删除所述ARP记录。Step 12: Delete the ARP record when the timing time in the ARP record arrives.
需要说明的是,该ARP记录中的定时时间即为ARP记录的老化时间,通常情况下,该老化时间是1000毫秒,且该老化时间可以根据应用情况进行设置。It should be noted that the aging time of the ARP record is the aging time of the ARP record. Generally, the aging time is 1000 milliseconds, and the aging time can be set according to the application.
本发明实施例,通过在ARP记录的定时时间到达时,将与DHCP相关的ARP记录删除,实现了ARP表的动态更新,避免了因ARP表的限制而造成布网成本高的问题,本发明降低了布网成本。In the embodiment of the present invention, when the ARP record related to the ARP record is deleted, the ARP record related to the DHCP is deleted, and the dynamic update of the ARP table is implemented, thereby avoiding the problem that the network cost is high due to the limitation of the ARP table, and the present invention Reduced the cost of the network.
需要说明的是,通常情况下,该报文处理装置被称之为DHCP中继, 它通常设置在路由器中或者是DHCP客户端侧。因原有的DHCP报文的ARP条目(即ARP记录)不会自动删除,此时若网络中接入过多的DHCP客户端会导致ARP条目数量过多,且DHCP中继针对每个ARP条目会一直发送ARP探测报文,本申请中因在ARP条目的老化时间到达后会自动删除ARP条目,因此也就不会再继续发送ARP探测报文,因此,在所述ARP记录中的定时时间到达时,所述报文处理方法还包括:It should be noted that, in general, the message processing device is called a DHCP relay. It is usually set in the router or on the DHCP client side. The ARP entries of the original DHCP packets are not automatically deleted. In this case, if too many DHCP clients are connected to the network, the number of ARP entries will be too large, and the DHCP relay will be used for each ARP entry. The ARP probe packet is always sent. In this application, the ARP entry is automatically deleted after the aging time of the ARP entry is reached. Therefore, the ARP probe packet will not be sent again. Therefore, the time is reached in the ARP record. The message processing method further includes:
控制停止向DHCP客户端发送ARP探测报文。Control stops sending ARP probe packets to the DHCP client.
还需要说明的是,该DHCP中继在收到DHCP服务器发送给DHCP客户端的DHCP应答报文时,还需建立所述DHCP中继与所述DHCP客户端的直连路由,同时将所述DHCP应答报文发送给所述DHCP客户端。It should be noted that, when receiving the DHCP response message sent by the DHCP server to the DHCP client, the DHCP relay needs to establish a direct connection between the DHCP relay and the DHCP client, and simultaneously set the DHCP response. The message is sent to the DHCP client.
DHCP中继的具体工作过程包括:The specific working process of DHCP relay includes:
DHCP中继收到广播DHCP Discover报文之后,替换报文的源IP地址并查路由将报文转发出去;After receiving the DHCP Discover message, the DHCP relay replaces the source IP address of the packet and checks the route to forward the packet.
DHCP中继收到单播DHCP Offer报文,DHCP平台(指的是路由器DHCP层面的协议,与DHCP中继位于同一层面)指定将报文下发给DHCP客户端;The DHCP relay agent receives the unicast DHCP Offer message, and the DHCP platform (refers to the protocol at the DHCP level of the router and the DHCP relay agent at the same level) specifies that the packet is sent to the DHCP client.
DHCP中继收到单播DHCP Request报文,同样的查路由将报文转发给DHCP服务器;The DHCP relay agent receives the unicast DHCP Request message, and the same route is forwarded to the DHCP server.
之后DHCP中继会采用本发明所述的方法对接收到的应答报文进行处理,如图2所示,具体地处理过程包括:Then, the DHCP relay process uses the method described in the present invention to process the received response message, as shown in FIG. 2, and the specific processing process includes:
步骤21,DHCP中继收到没有路由的应答报文;Step 21: The DHCP relay receives a response packet without a route.
步骤22,判断该应答报文是否为DHCP报文;若不为DHCP报文则执行步骤23,否则执行步骤24;
步骤23,生成普通的动态ARP条目;
步骤24,生成带D标记的ARP条目,以此表明该ARP条目为DHCP的ARP条目,并将打D标记的报文上送给DHCP平台,即DHCP平台收到ARP的回应报文并且发现是有特殊D标记的IP地址学习到的,于是生 成的ARP条目的age项中打D标记;Step 24: Generate an ARP entry with a D flag, so that the ARP entry is a DHCP ARP entry, and the D-flagged message is sent to the DHCP platform, that is, the DHCP platform receives the ARP response packet and finds that I learned the IP address with a special D mark, so I was born. D mark in the age item of the ARP entry;
步骤25,配置定时器,若定时器超时,则判断超时的ARP条目是否为带D标记的,若带D标记,则执行步骤27,否则,执行步骤28;Step 25: Configure a timer. If the timer expires, determine whether the timeout ARP entry is marked with D. If the D flag is marked, go to step 27. Otherwise, go to step 28.
需要说明的是,带D标记的ARP条目的默认老化时间是1000毫秒,且老化时间可以配置,例如,ARP表容量越小的路由器,带D标记的ARP条目的老化时间配置的越短,其中继的能力越强。It should be noted that the default aging time of the D-marked ARP entry is 1000 milliseconds, and the aging time can be configured. For example, the router with the D-marked ARP entry has a shorter aging time configuration. The stronger the ability.
步骤27,老化后不发送ARP探测报文,且自动删除ARP条目;Step 27: After the aging, the ARP detection packet is not sent, and the ARP entry is automatically deleted.
步骤28,老化后发送免费ARP探测报文,收到应答报文则更新该ARP条目的老化时间。Step 28: After the aging, the device sends a gratuitous ARP probe packet, and receives the response packet to update the aging time of the ARP entry.
下面对本发明的具体应用场景进行具体说明如下:The specific application scenarios of the present invention are specifically described below as follows:
如图3所示,常见的DHCP客户端通过一个DHCP中继获取IP地址的场景,DHCP中继采用本发明的方法处理DHCP的应答报文。As shown in Figure 3, a common DHCP client obtains an IP address through a DHCP relay. The DHCP relay uses the method of the present invention to process a DHCP response message.
如图4所示,DHCP客户端通过N个DHCP中继获取IP地址的场景,其中,DHCP中继1采用本发明的方法处理DHCP的应答报文。As shown in FIG. 4, the DHCP client obtains an IP address through N DHCP relays, wherein the DHCP relay 1 processes the DHCP response message by using the method of the present invention.
如图5所示,DHCP客户端穿越IP RAN组网获取IP地址的场景,二三层桥接设备(L2L3bridge)采用本发明的方法处理DHCP的应答报文。As shown in FIG. 5, the DHCP client traverses the IP RAN network to obtain an IP address. The Layer 2 and Layer 3 bridge device (L2L3bridge) processes the DHCP response packet by using the method of the present invention.
本发明实施例,实现了ARP表的动态更新,避免了因ARP表的限制而造成布网成本高的问题,本发明降低了布网成本。In the embodiment of the present invention, the dynamic update of the ARP table is implemented, and the problem of high network cost due to the limitation of the ARP table is avoided, and the present invention reduces the cost of the network.
实施例二Embodiment 2
如图6所示,本发明实施例二的报文处理装置,包括:As shown in FIG. 6, the packet processing apparatus of the second embodiment of the present invention includes:
生成模块61,设置为在接收到动态主机配置协议DHCP服务器发送给DHCP客户端的DHCP应答报文时,生成针对所述DHCP应答报文的地址解析协议ARP记录,所述ARP记录中设置有DHCP标记;The generating
删除模块62,设置为在所述ARP记录中的定时时间到达时,删除所述ARP记录。The deleting
可选地,所述报文处理装置,还包括:Optionally, the packet processing device further includes:
控制模块,设置为控制停止向DHCP客户端发送ARP探测报文。 The control module is configured to stop sending ARP probe packets to the DHCP client.
可选地,所述报文处理装置,还包括:Optionally, the packet processing device further includes:
路由建立模块,设置为建立所述报文处理装置与所述DHCP客户端的直连路由。The route establishing module is configured to establish a direct route between the packet processing device and the DHCP client.
可选地,所述报文处理装置,还包括:Optionally, the packet processing device further includes:
发送模块,设置为将所述DHCP应答报文发送给所述DHCP客户端。The sending module is configured to send the DHCP response message to the DHCP client.
具体地,所述定时时间为1000毫秒。Specifically, the timing time is 1000 milliseconds.
需要说明的是,本实施例的报文处理装置是与实施例一的报文处理方法对应的报文处理装置,实施例一的所有实现方式均适用于该实施例中,也能达到与实施例一相同的技术效果。It is to be noted that the packet processing apparatus of the present embodiment is the packet processing apparatus corresponding to the packet processing method of the first embodiment. All the implementation manners of the first embodiment are applicable to the embodiment, and can also be implemented and implemented. Example 1 has the same technical effect.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. Within the scope of protection of the invention.
本发明实施例提供的上述技术方案,可以应用于报文处理过程中,上述方案,通过在ARP记录的定时时间到达时,将与DHCP相关的ARP记录删除,实现了ARP表的动态更新,避免了因ARP表的限制而造成布网成本高的问题,本发明降低了布网成本。 The foregoing technical solution provided by the embodiment of the present invention can be applied to a packet processing process. In the foregoing solution, the ARP record related to the DHCP is deleted when the ARP recording time is reached, and the dynamic update of the ARP table is implemented to avoid The invention has a problem that the cost of the network is high due to the limitation of the ARP table, and the invention reduces the cost of the network.
Claims (10)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610473552.3A CN107547667A (en) | 2016-06-24 | 2016-06-24 | A kind of message processing method and device |
| CN201610473552.3 | 2016-06-24 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017219777A1 true WO2017219777A1 (en) | 2017-12-28 |
Family
ID=60783190
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/083812 Ceased WO2017219777A1 (en) | 2016-06-24 | 2017-05-10 | Packet processing method and device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107547667A (en) |
| WO (1) | WO2017219777A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112261173A (en) * | 2020-10-20 | 2021-01-22 | 四川天邑康和通信股份有限公司 | DHCP server allocation address conflict detection method relating to convergence gateway |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111225080B (en) * | 2020-01-06 | 2022-11-08 | 博为科技有限公司 | Method for acquiring gateway down-hanging equipment information |
| CN115987611B (en) * | 2022-12-20 | 2025-06-20 | 新华三技术有限公司 | Information updating method, device, electronic device and storage medium |
| CN116260766B (en) * | 2022-12-28 | 2025-01-17 | 中国银联股份有限公司 | DHCP message response method and device based on OpenFlow protocol |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1941722A (en) * | 2006-08-29 | 2007-04-04 | 杭州华为三康技术有限公司 | Method and device for maintaining DHCP safety property list by detecting customer terminal |
| CN101106512A (en) * | 2007-09-03 | 2008-01-16 | 华为技术有限公司 | A processing method and device for QinQ termination configuration |
| US7343485B1 (en) * | 2003-09-03 | 2008-03-11 | Cisco Technology, Inc. | System and method for maintaining protocol status information in a network device |
| CN101175080A (en) * | 2007-07-26 | 2008-05-07 | 杭州华三通信技术有限公司 | Method and system for preventing ARP message attack |
| US20100191839A1 (en) * | 2009-01-28 | 2010-07-29 | Juniper Networks, Inc. | Synchronizing resource bindings within computer network |
| CN101834870A (en) * | 2010-05-13 | 2010-09-15 | 中兴通讯股份有限公司 | Method and device for preventing deceptive attack of MAC (Medium Access Control) address |
| CN102325202A (en) * | 2011-10-31 | 2012-01-18 | 杭州华三通信技术有限公司 | Method and equipment for managing customer address table |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8230484B1 (en) * | 2007-05-01 | 2012-07-24 | Emc Corporation | Control of resource access privileges via agent authentication |
-
2016
- 2016-06-24 CN CN201610473552.3A patent/CN107547667A/en active Pending
-
2017
- 2017-05-10 WO PCT/CN2017/083812 patent/WO2017219777A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7343485B1 (en) * | 2003-09-03 | 2008-03-11 | Cisco Technology, Inc. | System and method for maintaining protocol status information in a network device |
| CN1941722A (en) * | 2006-08-29 | 2007-04-04 | 杭州华为三康技术有限公司 | Method and device for maintaining DHCP safety property list by detecting customer terminal |
| CN101175080A (en) * | 2007-07-26 | 2008-05-07 | 杭州华三通信技术有限公司 | Method and system for preventing ARP message attack |
| CN101106512A (en) * | 2007-09-03 | 2008-01-16 | 华为技术有限公司 | A processing method and device for QinQ termination configuration |
| US20100191839A1 (en) * | 2009-01-28 | 2010-07-29 | Juniper Networks, Inc. | Synchronizing resource bindings within computer network |
| CN101834870A (en) * | 2010-05-13 | 2010-09-15 | 中兴通讯股份有限公司 | Method and device for preventing deceptive attack of MAC (Medium Access Control) address |
| CN102325202A (en) * | 2011-10-31 | 2012-01-18 | 杭州华三通信技术有限公司 | Method and equipment for managing customer address table |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112261173A (en) * | 2020-10-20 | 2021-01-22 | 四川天邑康和通信股份有限公司 | DHCP server allocation address conflict detection method relating to convergence gateway |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107547667A (en) | 2018-01-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20150326524A1 (en) | Address resolution in software-defined networks | |
| CN102859973B (en) | Method, apparatus and system for address resolution | |
| CN106412142B (en) | Resource equipment address obtaining method and device | |
| CN105634956B (en) | A kind of message forwarding method, device and system | |
| US9825861B2 (en) | Packet forwarding method, apparatus, and system | |
| CN107800625B (en) | Message forwarding method and device | |
| CN106878288B (en) | message forwarding method and device | |
| US9756148B2 (en) | Dynamic host configuration protocol release on behalf of a user | |
| US11606333B1 (en) | Synchronizing dynamic host configuration protocol snoop information | |
| CN101179515B (en) | A method and device for suppressing black hole routing | |
| US8887237B2 (en) | Multimode authentication | |
| CN110224942A (en) | A kind of message processing method, device and storage medium | |
| WO2017219777A1 (en) | Packet processing method and device | |
| US20150271086A1 (en) | Reducing Network Traffic By Intercepting Address Resolution Messages | |
| CN115695374A (en) | IPv6 subnet prefix advertisement implementation method, device, equipment and storage medium | |
| US20200267116A1 (en) | Internet protocol version six address management | |
| CN104426759B (en) | Host routes acquisition methods, apparatus and system | |
| CN104468467A (en) | Dynamic host configuration protocol (DHCP) message transmitting method and device | |
| US10999379B1 (en) | Liveness detection for an authenticated client session | |
| CN105657078A (en) | Data transmission method, data transmission device and multi-layer network manager | |
| WO2017219816A1 (en) | Data transmission method and network address translation device | |
| CN106878485B (en) | Message processing method and device | |
| US8260942B2 (en) | Cluster view performance | |
| JP2009253578A (en) | Network load distribution device, network load distribution method, and program | |
| WO2024222010A1 (en) | Method and apparatus for proxying a response to address request message, electronic device, and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17814515 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17814515 Country of ref document: EP Kind code of ref document: A1 |