Relay communication method and device
The boundary gateway uses a specified dedicated port number to obtain forwarded table entries, which solves the problem that DHCP relay devices cannot generate bound table entries in distributed gateway networking, ensuring network security and saving IP addresses.
Patent Information
- Application Number
- CN202510749437.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-06-05
AI Technical Summary
In distributed gateway networking, DHCP relay devices cannot correctly generate binding entries, resulting in network security being affected because request messages and response messages from DHCP clients may be processed by different DHCP relay devices.
Receive response packets from the DHCP server through the boundary gateway, and use the specified dedicated port number to obtain forwarded table entries to ensure that the response packets are forwarded to the same DHCP relay device, and generate bound table entries to ensure network security.
It realizes that the DHCP relay device correctly generates binding table entries, which improves network security and avoids IP address waste and performance degradation.
Smart Images

Figure CN120455348A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a relay communication method and device. Background Art
[0002] The Dynamic Host Configuration Protocol (DHCP) uses a client / server model, where a DHCP server dynamically assigns network configuration parameters, such as IP addresses, to DHCP clients. When a DHCP client and server are on different physical network segments or outside the same link range, a DHCP relay device is required to forward messages.
[0003] Currently, distributed gateway networking can be used to support DHCP relay requirements, such as Figure 1 As shown in the figure, in a distributed gateway network, the spine is the border gateway, and Leaf 1, Leaf 2, and Leaf 3 all serve as DHCP relay devices. Leaf 1, Leaf 2, and Leaf 3 all have the same IP address. DHCP client 1 connects to Leaf 1, and DHCP client 2 connects to Leaf 3. DHCP client request messages sent to any leaf are processed and responded to. From a service perspective, there is no primary or backup distinction between leaf nodes. To the DHCP server, Leaf 1, Leaf 2, and Leaf 3 are considered a single device. For example, if DHCP client 1 sends a request message to Leaf 1 and the DHCP server receives the request message forwarded by Leaf 1, the spine may forward the response message to Leaf 2 or Leaf 3. Therefore, the request and response messages may not be processed by the same leaf.
[0004] However, while forwarding messages between DHCP clients and servers, DHCP relay agents also need to generate binding entries. These binding entries are used as binding entries for IP Source Guard (IP Source Guard) or Address Resolution Protocol (ARP) detection to protect against unauthorized user messages. If the DHCP client's request and response messages are not processed by the same DHCP relay agent, the DHCP relay agent will not be able to correctly generate binding entries, thus affecting network security. Summary of the Invention
[0005] The purpose of the embodiments of the present application is to provide a relay communication method and apparatus to enable a DHCP relay device to receive request messages and response messages for the same DHCP client, generate binding entries, and ensure network security. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a relay communication method, the method being applied to a border gateway, the border gateway being in a distributed gateway network, the distributed gateway network further comprising a plurality of DHCP relay devices, the plurality of DHCP relay devices being connected to the border gateway, the plurality of DHCP relay devices having different dedicated port numbers, the method comprising:
[0007] Receive a response message sent by the DHCP server, where the destination port number of the response message is a designated dedicated port number, the designated dedicated port number is a dedicated port number of a designated DHCP relay device, and the designated DHCP relay device is the DHCP relay device that sends a request message corresponding to the response message to the border gateway;
[0008] Obtain a forwarding table entry that matches the designated dedicated port number, and forward the response message to the designated DHCP relay device based on the forwarding table entry.
[0009] In a possible implementation, before receiving the response message sent by the DHCP server, the method further includes:
[0010] receiving, through an inbound interface, a request message sent by the designated DHCP relay device, wherein the request message includes an IP address and the designated dedicated port number, wherein the IP address is the IP address of the interface on the designated DHCP relay device connected to the DHCP client;
[0011] Obtain a forwarding table entry that matches the IP address and the inbound interface, and add the designated dedicated port number to the forwarding table entry.
[0012] In a possible implementation, the designated dedicated port number is a source port number included in the request message.
[0013] In a possible implementation, the request message includes a designated option, and the designated option is used to instruct the DHCP server to use the dedicated port number carried in the request message as the destination port number.
[0014] In a possible implementation, when the designated DHCP relay device is a DHCPv4 relay device, the designated option is a suboption included in option 82 of the request message;
[0015] In the case that the designated DHCP relay device is a DHCPv6 relay device, the designated option is a sub-option included in the relay message option of the request message, and the designated option includes the designated dedicated port number.
[0016] In a possible implementation, when the designated DHCP relay device is a DHCPv4 relay device, the IP address is the IP address carried in the gateway IP address giaddr field of the request message;
[0017] In the case where the designated DHCP relay device is a DHCPv6 relay device, the IP address is the source IP address of the request message.
[0018] In a second aspect, an embodiment of the present application provides a relay communication device, the device being applied to a border gateway, the border gateway being in a distributed gateway network, the distributed gateway network further comprising a plurality of DHCP relay devices, the plurality of DHCP relay devices being connected to the border gateway, the plurality of DHCP relay devices having different dedicated port numbers, the device comprising:
[0019] a receiving module, configured to receive a response message sent by a DHCP server, wherein the destination port number of the response message is a designated dedicated port number, the designated dedicated port number is a dedicated port number of a designated DHCP relay device, and the designated DHCP relay device is a DHCP relay device that sends a request message corresponding to the response message to the border gateway;
[0020] The forwarding module is configured to obtain a forwarding entry that matches the designated dedicated port number, and forward the response message to the designated DHCP relay device based on the forwarding entry.
[0021] In a possible implementation, the apparatus further includes: an adding module;
[0022] The receiving module is further configured to receive a request message sent by the designated DHCP relay device through an inbound interface, wherein the request message includes an IP address and the designated dedicated port number, wherein the IP address is the IP address of the interface on the designated DHCP relay device connected to the DHCP client;
[0023] The adding module is used to obtain a forwarding table entry that matches the IP address and the inbound interface, and add the designated dedicated port number to the forwarding table entry.
[0024] In a possible implementation, the designated dedicated port number is a source port number included in the request message.
[0025] In a possible implementation, the request message includes a designated option, and the designated option is used to instruct the DHCP server to use the dedicated port number carried in the request message as the destination port number.
[0026] In a possible implementation, when the designated DHCP relay device is a DHCPv4 relay device, the designated option is a suboption included in option 82 of the request message;
[0027] In the case that the designated DHCP relay device is a DHCPv6 relay device, the designated option is a sub-option included in the relay message option of the request message, and the designated option includes the designated dedicated port number.
[0028] In a possible implementation, when the designated DHCP relay device is a DHCPv4 relay device, the IP address is the IP address carried in the gateway IP address giaddr field of the request message;
[0029] In the case where the designated DHCP relay device is a DHCPv6 relay device, the IP address is the source IP address of the request message.
[0030] In a third aspect, an embodiment of the present application provides a border gateway, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0031] Memory for storing computer programs;
[0032] The processor is configured to implement the method described in the first aspect above when executing the program stored in the memory.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0034] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect.
[0035] Using the above technical solution, a border gateway receives a response message sent by a DHCP server. The response message includes a designated dedicated port number of a designated DHCP relay device. The designated DHCP relay device is the DHCP relay device that sent the request message corresponding to the response message to the border gateway. The border gateway can then obtain a forwarding table entry that matches the designated dedicated port number. Because the designated dedicated port number is the dedicated port number of the designated DHCP relay device, even if the destination IP addresses included in the forwarding table entries are the same, the border gateway can forward the response message to the designated DHCP relay device based on the obtained forwarding table entry. This ensures that the DHCP relay device that receives the response message and the DHCP relay device that forwards the request message corresponding to the response message are the same DHCP relay device, allowing the DHCP relay device to correctly generate binding table entries, thereby ensuring network security.
[0036] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0038] Figure 1 A schematic diagram of a distributed gateway network in the background art;
[0039] Figure 2 A schematic diagram of an EVPN VXLAN network provided in an embodiment of the present application;
[0040] Figure 3 A schematic diagram of an EVPN VXLAN centralized gateway network provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of an EVPN VXLAN distributed gateway network provided in an embodiment of the present application;
[0042] Figure 5 A schematic diagram illustrating the relationship between a distributed gateway and a border gateway in a distributed gateway network provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of a DHCP network provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of a DHCPv4 relay network provided in an embodiment of the present application;
[0045] Figure 8 A flow chart of communication between a DHCPv6 client and a DHCPv6 server provided in an embodiment of the present application;
[0046] Figure 9 A schematic diagram of a DHCPv6 relay network provided in an embodiment of the present application;
[0047] Figure 10 A schematic diagram of an IP Source Guard function provided in an embodiment of the present application;
[0048] Figure 11 A flowchart of a relay communication method provided in an embodiment of the present application;
[0049] Figure 12 A schematic diagram of sub-option 19 included in option 82 provided in an embodiment of the present application;
[0050] Figure 13 A schematic diagram of option 135 included in the relay message options provided in an embodiment of the present application;
[0051] Figure 14 A schematic diagram of sub-option 11 included in option 82 provided in an embodiment of the present application;
[0052] Figure 15 A schematic structural diagram of a relay communication device provided in an embodiment of the present application;
[0053] Figure 16 A schematic diagram of the structure of a border gateway provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0055] To facilitate understanding, the relevant technical terms involved in the embodiments of this application are first introduced.
[0056] Ethernet Virtual Private Network (EVPN VXLAN) is a Layer 2 virtual private network (VPN) technology. The control plane of network devices uses the Multiprotocol Border Gateway Protocol (MP-BGP) to advertise Ethernet Virtual Private Network (EVPN) routing information. The data plane uses Virtual Extensible Local Area Network (VXLAN) encapsulation to transcapsulate and forward packets. In EVPN VXLAN technology, VXLAN networks are identified by VXLAN IDs, and a separate MAC address table is maintained for each VXLAN network. This enables Layer 2 interoperability within the same VXLAN network and Layer 2 isolation between different VXLAN networks. By deploying an EVPN VXLAN gateway within a VXLAN network, Layer 3 interoperability between different VXLAN networks and Layer 3 communication between a VXLAN network and external networks can also be achieved.
[0057] An EVPN VXLAN network consists of a virtual extended LAN tunnel endpoint (VTEP), a VXLAN tunnel, and an attachment circuit (AC). VTEPs are edge devices in the Ethernet Virtual Private Network (EVPN), a VXLAN tunnel is a point-to-point logical connection between two VTEPs, and an AC is a physical or virtual circuit, such as an Ethernet link or a VLAN link, that connects a site to a VTEP.
[0058] like Figure 2 As shown, Figure 2This is a diagram of an EVPN VXLAN network. The EVPN VXLAN network includes servers 1, 2, 3, and 4, as well as VTEPs 1, 2, and 3. Servers 1 and 3 belong to VXLAN 4, while servers 2 and 4 belong to VXLAN 5. Server 1 and VTEP 1 are connected via an AC, while server 2 and VTEP 2 are connected via an AC. Servers 3 and 4 are each connected to VTEP 3 via an AC. VXLAN tunnels exist between VTEP 1 and VTEP 2, between VTEP 1 and VTEP 3, and between VTEP 2 and VTEP 3.
[0059] EVPN VXLAN networking has the following advantages:
[0060] (1) Network configuration is simplified. In EVPN VXLAN networking, VTEP uses the Multiprotocol Border Gateway Protocol (MP-BGP) to achieve automatic VTEP discovery and VXLAN tunnel establishment, eliminating the need for manual configuration by the user, which can reduce the difficulty of network deployment. In addition, by deploying a Border Gateway Protocol (BGP) route reflector in the network, when a new VTEP is added, the VTEP only needs to establish a connection with the route reflector to automatically establish a VXLAN tunnel between the new VTEP and the existing VTEP, making network upgrades simple.
[0061] (2) It can reduce flooding traffic. After the VTEP learns the local MAC address, Address Resolution Protocol (ARP) information, and Neighbor Discovery Protocol (ND) information, it notifies the remote VTEP of these MAC addresses, ARP information, and ND information through BGP EVPN routing, so that the remote VTEP generates forwarding entries. Compared with the method where the VTEP dynamically learns forwarding entries through messages, this method reduces flooding traffic on the backbone network.
[0062] (3) Support multi-homing access to servers. By forming a redundant backup group with multiple VTEPs, it can not only solve the network interruption problem caused by a single point of failure of VTEP, but also share the traffic load among multiple VTEPs.
[0063] (4) Support for Layer 3 intercommunication. EVPN VXLAN networking can not only provide Layer 2 interconnection for physical sites distributed in different locations, but also provide Layer 3 intercommunication between different physical sites through EVPN gateways, providing users with a more flexible networking method.
[0064] The following describes Layer 2 connectivity between EVPN VXLAN sites.
[0065] VXLAN tunnels can be automatically established between VTEPs. Specifically, a VTEP uses Inclusive Multicast Ethernet Tag (IMET) routing or MAC / IP advertising routing to advertise its VXLAN network information (such as the VXLAN ID) to a remote VTEP. If the local VTEP and the remote VTEP belong to the same VXLAN network, the two VTEPs automatically establish a VXLAN tunnel between them and associate the tunnel with the VXLAN network.
[0066] The VTEP learns MAC addresses as follows: After receiving a Layer 2 data frame from the local site, the VTEP learns the source MAC address into the MAC address table of the AC's VXLAN network and advertises the MAC address to a remote VTEP using a MAC / IP advertisement route. The remote VTEP then learns the MAC address based on the received MAC / IP advertisement route.
[0067] The Layer 2 frame forwarding process is as follows: After receiving a Layer 2 frame from an AC, a VTEP searches the MAC address table of the VXLAN network to which the AC belongs for the destination MAC address. It then forwards the Layer 2 frame to the local site based on a matching MAC address entry, or forwards the frame to a remote VTEP via a VXLAN tunnel. The remote VTEP then searches the MAC address table of the VXLAN network for a matching MAC address entry and forwards the frame to the local site connected to the remote VTEP. If no matching MAC address entry is found, the VTEP broadcasts the Layer 2 frame to all ACs and VXLAN tunnels within the VXLAN.
[0068] The following describes the Layer 3 interconnection method for EVPN VXLAN site networks.
[0069] To achieve Layer 3 connectivity between EVPN VXLAN site networks, an EVPN VXLAN gateway must be deployed in the site network. A virtual switch interface (VSI) must be configured on the EVPN VXLAN gateway. This VSI serves as the gateway interface, and its IP address serves as the gateway address. The Layer 3 connectivity process for EVPN VXLAN site networks is as follows:
[0070] VXLAN tunnels can be automatically established between VTEPs. A VTEP uses IMET routing, MAC / IP advertisement routing, or IP prefix routing to advertise its VXLAN network information (such as the VXLAN ID) to a remote VTEP. If the local VTEP and the remote VTEP belong to the same VXLAN network, the two VTEPs automatically establish a VXLAN tunnel between them and associate the tunnel with the VXLAN network.
[0071] The VTEP learns MAC addresses as follows: Hosts within the EVPN VXLAN site network send ARP requests to obtain the MAC address corresponding to the gateway IP address. VTEP then forwards Layer 3 traffic to the gateway based on this MAC address.
[0072] The gateway forwards Layer 3 traffic as follows: After receiving a Layer 3 packet, the gateway searches the routing table to determine the destination VXLAN network for the Layer 3 packet, and then forwards the Layer 3 packet within the destination VXLAN network.
[0073] EVPN VXLAN networking modes include centralized gateway networking and distributed gateway networking.
[0074] Centralized gateway networking means that in an EVPN VXLAN network, there is only one VTEP device serving as the EVPN gateway, i.e., the centralized gateway. Traffic between different VXLANs and traffic from VXLANs to external networks are all processed by the centralized gateway. Figure 3 As shown, Server 1 and Server 2 are connected to VTEP 1, Server 3 and Server 4 are connected to VTEP 2. Server 1 and Server 3 belong to VXLAN 4, Server 2 and Server 4 belong to VXLAN 5. VTEP 3 serves as a centralized gateway and is connected to the Internet. A VXLAN tunnel exists between VTEP 1 and VTEP 2, a VXLAN tunnel exists between VTEP 1 and VTEP 3, and a VXLAN tunnel exists between VTEP 2 and VTEP 3.
[0075] When Server 1 and Server 4 need to communicate, VTEP 1 forwards the traffic from Server 1 to VTEP 3, which then forwards it to VTEP 2, which then forwards it to Server 4.
[0076] When Server 1 needs to communicate with the external network, VTEP 1 forwards the traffic from Server 1 to VTEP 3, which then forwards it to the Internet.
[0077] This networking approach is simple to configure, but as network scale continues to expand and business needs become increasingly complex, centralized gateways have gradually exposed numerous problems. For example, all traffic must be processed by a single gateway device, which can easily become a bottleneck for network performance. Limited hardware resources make it difficult to support the expansion needs of large-scale networks. A failure of a centralized gateway can affect the entire network, resulting in a lack of high availability. Furthermore, as network scale expands, the configuration and management of centralized gateways becomes increasingly complex.
[0078] The aforementioned issues with centralized gateways have driven the development of distributed gateways. Distributed gateway networking involves multiple VTEP devices acting as EVPN gateways to perform Layer 3 forwarding of local site traffic, alleviating gateway pressure. In a distributed gateway network, a border gateway device is typically deployed to communicate with the external network, and a VSI interface is configured on the border gateway.
[0079] like Figure 4 As shown, Figure 4 and Figure 3 The structure is the same, the difference is Figure 4 VTEP1 and VTEP2 are distributed gateways, and VTEP3 is a border gateway.
[0080] When Server 1 and Server 4 need to communicate, VTEP 1 can directly forward the traffic from Server 1 to VTEP 2, and then VTEP 2 forwards it to Server 4.
[0081] When Server 1 needs to communicate with the external network, VTEP 1 forwards the traffic from Server 1 to VTEP 3, which then forwards it to the Internet.
[0082] like Figure 5 As shown, Figure 5 This is a diagram showing the relationship between the distributed gateway and the border gateway in a distributed gateway network, where the border gateway acts as the spine and the distributed gateway acts as the leaf. Figure 5 The spine node is connected to Leaf 1 through interface 1, to Leaf 2 through interface 2, and to Leaf 3 through interface 3. Equal-cost routes are configured on the spine node.
[0083] In an IPv4 network, the IP address of the interfaces on Leaf 1, Leaf 2, and Leaf 3 used to connect to clients is 10.0.0.1. The equivalent-cost routes on the spine nodes are:
[0084] 10.0.0.1 32 10.0.0.1 interface 1
[0085] 10.0.0.1 32 10.0.0.1 interface 2
[0086] 10.0.0.1 32 10.0.0.1 interface 3.
[0087] In an IPv6 network, the IP addresses of the interfaces on Leaf 1, Leaf 2, and Leaf 3 used to connect to clients are all 2001::1. The equivalent-cost routes on the spine nodes are:
[0088] 2001::1 128 2001::1 Interface 1
[0089] 2001::1 128 2001::1 Interface 2
[0090] 2001::1 128 2001::1 Interface 3.
[0091] The following introduces the basic principles of DHCP.
[0092] like Figure 6 As shown, Figure 6 This is a schematic diagram of a DHCP network, which includes a DHCP client and a DHCP server. The DHCP network can be a DHCPv4 network or a DHCPv6 network.
[0093] In a DHCPv4 network scenario, the DHCPv4 client is specifically a DHCPv4 client, and the DHCPv4 server is specifically a DHCPv4 server. When the DHCPv4 client and the DHCPv4 server are on the same physical network segment, the process for the DHCPv4 client to request an IPv4 address is as follows:
[0094] The DHCPv4 client broadcasts a Discover message, which reaches the DHCPv4 server. The DHCPv4 server searches the address pool for the same network segment based on the address of the interface that received the Discover message. It selects an IPv4 address from the pool as the IPv4 address to be assigned to the DHCPv4 client. The server then responds with an Offer message to the DHCPv4 client. The Offer message includes the selected IPv4 address and may also include information such as the default gateway address and the Domain Name System (DNS) server address. A DHCPv4 network may contain multiple DHCPv4 servers, each of which may respond to the DHCPv4 client with Offer messages. Therefore, the DHCPv4 client may receive multiple Offer messages. The DHCPv4 client selects an Offer message and broadcasts a Request message containing the address of the selected DHCPv4 server. After receiving the Request message, the selected DHCPv4 server responds with an Acknowledgement (ACK) message to the DHCPv4 client. This completes the DHCPv4 interactive allocation process.
[0095] When the DHCPv4 client and the DHCPv4 server are in different physical network segments, the messages between the DHCPv4 client and the DHCPv4 server are forwarded by a DHCPv4 relay device, such as Figure 7 As shown, Figure 7 This is a diagram of a DHCPv4 relay network. The DHCPv4 client is connected to the DHCPv4 relay device, and both the DHCPv4 relay device and the DHCPv4 server are connected to the IPv4 network.
[0096] When a DHCPv4 relay forwards a message from a DHCPv4 client to a DHCPv4 server, it encapsulates the gateway address (giaddr) in the message's Gateway IP Address field. The gateway address is the IP address of the interface on the DHCPv4 relay that connects to the DHCPv4 client. Furthermore, the DHCPv4 relay can carry the DHCPv4 client's access information via option 82.
[0097] In this scenario, the DHCPv4 server preferentially searches for an address pool in the same network segment based on the address encapsulated in the giaddr field, and selects an address from the address pool to assign to the DHCPv4 client.
[0098] In a DHCPv6 network scenario, the DHCP client is specifically referred to as the DHCPv6 client, and the DHCP server is specifically referred to as the DHCPv6 server. When the DHCPv6 client and DHCPv6 server are in the same physical network segment, such as Figure 8 As shown in the figure, the process for a DHCPv6 client to obtain an IPv6 address and other network configuration parameters is as follows:
[0099] (1) The DHCPv6 client sends a Solicit message to the DHCPv6 server. The Solicit message is a multicast message used to locate an available DHCPv6 server.
[0100] (2) The DHCPv6 server sends an Advertise message to the DHCPv6 client. The Advertise message includes the IPv6 address / IPv6 prefix assigned to the DHCPv6 client and other network configuration parameters.
[0101] There are multiple DHCPv6 servers in a DHCPv6 network. Therefore, a DHCPv6 client can receive multiple Advertise messages. The DHCPv6 client selects one Advertise message and sends a subsequent request to the DHCPv6 server that sent it.
[0102] (3) The DHCPv6 client sends a request message. The request message is a multicast message that carries the server's DHCP unique identifier (DUID). The DUID is used to indicate the selected DHCPv6 server.
[0103] (4) The DHCPv6 server sends a reply message to the DHCPv6 client. The reply message includes the IPv6 address / IPv6 prefix assigned to the DHCPv6 client and other network configuration parameters.
[0104] In the preceding process, because the DHCPv6 client and the DHCPv6 server are in the same link scope, the DHCPv6 client communicates with the DHCPv6 server through the multicast address in the link-local scope.
[0105] When the DHCPv6 client and the DHCPv6 server are not in the same link range, the messages between the DHCPv6 client and the DHCPv6 server are forwarded by a DHCPv6 relay device, such as Figure 9 As shown, Figure 9This is a diagram of a DHCPv6 relay network. The DHCPv6 client is connected to the DHCPv6 relay device, and both the DHCPv6 relay device and the DHCPv6 server are connected to the IPv6 network.
[0106] In a DHCPv6 relay network, the process by which a DHCPv6 client obtains an IPv6 address and other network configuration parameters is as follows:
[0107] (1) The DHCPv6 client sends a Solicit message with the multicast address FF02::1:2. FF02::1:2 is the multicast address of each DHCPv6 server and DHCPv6 relay device.
[0108] (2) After receiving the Solicit message, the DHCPv6 relay device encapsulates the Solicit message in the Relay Message Option of the Relay-forward message, and encapsulates the global unicast address of the interface connected to the DHCPv6 client on the DHCPv6 relay device in the link-address field of the Relay forward message. It then sends a Relay-forward message to the DHCPv6 server.
[0109] (3) The DHCPv6 server parses the Solicit message from the Relay forward message, selects the IPv6 address and other network parameters in the same network segment based on the link-address, constructs an Advertise message, encapsulates the Advertise message in the Relay message option of the Relay reply message, and then sends a Relay reply message to the DHCPv6 relay device.
[0110] (4) The DHCPv6 relay device parses the Advertise message from the Relay reply message and forwards the Advertise message to the DHCPv6 client so that the DHCPv6 client can perform network configuration based on the IPv6 address and other network parameters carried in the Advertise message.
[0111] (5) The process of the DHCPv6 relay device forwarding subsequent Request and Reply messages is similar to the above process and is not repeated here.
[0112] The distributed gateway networking described above can support the relay networking requirements of DHCPv4 and DHCPv6. For more information on applying distributed gateway networking to DHCPv4 or DHCPv6 relay networking, see Figure 1 . Figure 1In the example, Leaf1, Leaf2, and Leaf3 all function as DHCP relay agents and have the same IP address.
[0113] In a DHCPv4 scenario, the value of the giaddr field in the messages forwarded by Leaf1, Leaf2, and Leaf3 to the DHCPv4 server is the same, which is the common IP address of the online port of Leaf1, Leaf2, and Leaf3. The online port refers to the interface on the leaf used to connect to the DHCPv4 client. Furthermore, the destination address of the message replied by the DHCPv4 server is the IP address carried in the giaddr field, and the reply message may be replied to any of Leaf1, Leaf2, and Leaf3. That is, in Figure 1 After the message from DHCP client 1 is forwarded to the DHCP server, the destination address used by the DHCP server in its reply message is the IP address carried in the giaddr field. The spine node may forward the reply message from the DHCP server to Leaf 2.
[0114] In a DHCPv6 scenario, the source address of the message forwarded by Leaf1, Leaf2, and Leaf3 to the DHCPv6 server is the same, which is the common IP address of the online port of Leaf1, Leaf2, and Leaf3. The online port refers to the interface on the leaf used to connect to the DHCPv6 client. After receiving the message, the DHCPv6 server uses the source address of the message as the destination address of the reply message. The reply message may be sent to any of Leaf1, Leaf2, and Leaf3. Figure 1 In the example, after the message from DHCP client 1 is forwarded to the DHCP server, the destination address used by the DHCP server in its reply message is the common IP address of the online ports of Leaf 1, Leaf 2, and Leaf 3. The spine node may forward the reply message from the DHCP server to Leaf 2.
[0115] Similar to DHCP Snooping, a DHCP relay agent can generate binding entries for IP Source Guard or ARP Detection while forwarding messages between DHCP clients and servers.
[0116] The IP Source Guard function filters and controls packets received by an interface. This function is typically configured on user-side interfaces to prevent unauthorized packets from passing through, thereby restricting unauthorized users from illegally using network resources. For example, it prevents unauthorized hosts from impersonating authorized users' IP addresses to access the network, thereby improving interface security. IP Source Guard is interface-specific. When configured on an interface, only packets received by that interface are restricted; other interfaces are not affected.
[0117] like Figure 10 As shown, Figure 10 The router in the network is configured with binding table entries, and the interface on the router used to connect to the host is configured with the IP Source Guard function. After the router receives a message from the interface, it matches the message information with the binding table entries. If the message information matches any binding table entry, the message is forwarded to the IP network; if the message information does not match any binding table entry, the message is discarded. In this way, the message sent by the legitimate host can be forwarded to the IP network by the router, and the message sent by the illegal host will be discarded by the router.
[0118] Specifically, packets can be filtered based on information such as the source IP address, source MAC address, and VLAN tag. These characteristic features can be bound to interfaces individually or in combination to form IP Source Guard binding entries. IP Source Guard binding entries can be generated manually or dynamically. Dynamic retrieval involves obtaining binding entries generated by a DHCP relay agent.
[0119] The ARP Detection function is primarily used on access devices. It verifies the validity of ARP packets from unauthorized users and discards them, thereby preventing attacks from spoofed users and gateways. The ARP Detection function verifies that the user is a legitimate user on the interface of the VLAN to which they belong, based on the source IP address and source MAC address in the ARP packet. Binding entries generated by the DHCP relay agent can be used as a source of legitimate users. If the source IP address and source MAC address of an ARP packet match a binding entry, the user sending the ARP packet is considered legitimate. Other sources of legitimate users include IP Source Guard static binding entries and 802.1X security entries. If an ARP packet matches any of these entries, the ARP packet is considered legitimate and can be forwarded.
[0120] DHCP snooping is a DHCP security feature used to shield unauthorized DHCP servers. While forwarding messages between DHCP clients and authorized DHCP servers, a DHCP relay agent obtains the mapping between the client's MAC address and IP address and then creates a binding entry for the client's MAC address, IP address, and the client's online port on the DHCP device. Generating this binding entry requires that a DHCP relay agent first processes messages sent from a DHCP client to a DHCP server and then processes messages replied to by the DHCP server. In a distributed gateway network, the leaf nodes that receive messages from DHCP clients may not be the same as the leaf nodes that receive replies from DHCP servers. This can prevent the leaf nodes from generating binding entries.
[0121] To address the aforementioned issues, embodiments of the present application provide a relay communication method, which is applied to a border gateway. The border gateway is located in a distributed gateway network, which also includes multiple DHCP relay devices. Each of the multiple DHCP relay devices is connected to the border gateway, and each of the multiple DHCP relay devices has different dedicated port numbers. The dedicated port numbers are different from the standard port numbers specified in the DHCP protocol.
[0122] like Figure 11 As shown, the method includes:
[0123] S1101: Receive a response message sent by a DHCP server, where the destination port number of the response message is a designated dedicated port number.
[0124] The designated dedicated port number is a dedicated port number of a designated DHCP relay device, and the designated DHCP relay device is a DHCP relay device that sends a request message corresponding to the response message to the border gateway.
[0125] S1102: Obtain a forwarding table entry that matches the designated dedicated port number, and forward a response message to a designated DHCP relay device based on the forwarding table entry.
[0126] The border gateway can obtain a forwarding entry that matches the specified dedicated port number from the local Forward Information Base (FIB). Each forwarding entry in the FIB includes the destination address, mask, dedicated port number, next-hop address, and outgoing interface. Specifically, the border gateway can obtain a forwarding entry from the FIB that matches the destination address and specified dedicated port number of the response message, and forward the response message to the designated DHCP relay device indicated by the next-hop address through the outgoing interface in the forwarding entry.
[0127] Using this method, a border gateway receives a response message sent by a DHCP server. The response message includes a designated dedicated port number of a designated DHCP relay device. The designated DHCP relay device is the DHCP relay device that sent the request message corresponding to the response message to the border gateway. The border gateway can then obtain a forwarding table entry that matches the designated dedicated port number. Because the designated dedicated port number is the dedicated port number of the designated DHCP relay device, even if the destination IP addresses included in the forwarding table entries are the same, the border gateway can forward the response message to the designated DHCP relay device based on the obtained forwarding table entry. In this way, the DHCP relay device that receives the response message and the DHCP relay device that forwards the request message corresponding to the response message are the same DHCP relay device, allowing the DHCP relay device to correctly generate binding table entries, thereby ensuring network security.
[0128] Furthermore, during the above process, multiple DHCP relay devices can be distinguished by dedicated port numbers, eliminating the need to set a unique IP address for each DHCP relay device, thus avoiding wasted IP addresses. Furthermore, during the above message forwarding process, the border gateway can directly forward the response message to the designated DHCP relay device, eliminating the need for forwarding by other DHCP relay devices. This can avoid message detours and performance degradation. Therefore, the embodiments of the present application not only generate binding table entries, but also balance performance and IP address savings.
[0129] In the embodiment of the present application, before the above S1101, receiving the response message sent by the DHCP server, the method further includes:
[0130] The border gateway receives a request message from a designated DHCP relay agent through its inbound interface. This request message includes an IP address and a designated dedicated port number. The IP address is the IP address of the interface on the designated DHCP relay agent connected to the DHCP client. The designated dedicated port number is the source port number included in the request message. In addition to forwarding the request message to the DHCP server as normal, the border gateway obtains a forwarding table entry that matches the IP address and inbound interface and adds the designated dedicated port number to this forwarding table entry.
[0131] It should be noted that the above IP address is the destination address used by the DHCP server when replying to the request message. When the designated DHCP relay device is a DHCPv4 relay device, the above IP address is the IP address carried in the giaddr field of the request message; when the designated DHCP relay device is a DHCPv6 relay device, the above IP address is the source IP address of the request message.
[0132] It can be understood that the designated DHCP relay device is one of the multiple DHCP relay devices included in the distributed gateway network, and the designated dedicated port number is the dedicated port number of a port on the designated DHCP relay device, which is the port on the designated DHCP relay device connected to the border gateway. The designated dedicated port number is the destination port number used when the DHCP server is expected to reply to the message.
[0133] The request message is a message from a DHCP client that is forwarded by a DHCP relay agent during DHCP communication. For example, in DHCPv4 scenarios, the request message can be a Discover message or a Request message. In DHCPv6 scenarios, the request message can be a Relay-forward message, which contains a Solicit message or a Request message encapsulated in the Relay Message option of the Relay-forward message.
[0134] After receiving the request message, the border gateway can search the local FIB table for the forwarding entry that matches the input interface. Each forwarding entry in the FIB table includes the destination address, mask, next hop address and output interface. The border gateway can match the above IP address included in the request message with the destination address and mask in the FIB table, and match the input interface with the output interface in the FIB table, thereby determining the forwarding entry that matches the IP address and input interface, and adding the specified dedicated port number to the forwarding entry.
[0135] In this embodiment of the present application, the request message includes a designated option that instructs the DHCP server to use the dedicated port number carried in the request message as the destination port number. According to the DHCP protocol, a DHCP server typically uses a standard port number as the destination port number. However, in this embodiment of the present application, after the DHCP server recognizes the designated option, it can use the dedicated port number as the destination port number.
[0136] When the designated DHCP relay device is a DHCPv4 relay device, the designated option is a sub-option included in option 82 of the request message. The sub-option may specifically be sub-option 19, such as Figure 12 As shown, it includes the sub-option code (SubOpt Code) field and the length (Len) field.
[0137] The value of the sub-option code field can be 19, and the value of the length field can be 0.
[0138] When a DHCPv4 server recognizes this sub-option, it obtains the source port number from the request message and uses it as the destination port number in the response message instead of the standard port number 67.
[0139] In the case that the DHCP relay device is a DHCPv6 relay device, the specified option is a sub-option included in the relay message option of the request message, and the specified option includes specifying a dedicated port number. Figure 13 As shown, it includes the relay port option (Option Relay Port) field, the option length (Option Len) field and the downstream source port (Downstream Source Port) field.
[0140] The value of the trunk port option field is 135, the value of the Option Len field is 2, and the downstream source port field carries the specified dedicated port number.
[0141] When the DHCPv6 server recognizes this sub-option, it obtains the source port number from the request message, that is, the designated dedicated port number, and uses the designated dedicated port number as the destination port number in the response message instead of the standard port number 547.
[0142] The following combination Figure 1 The scenario shown illustrates the relay communication method of an embodiment of the present application.
[0143] exist Figure 1 In DHCP, each leaf node is configured with a dedicated port number, which is used as the source port number when the leaf node sends a request message to the DHCP server.
[0144] For example, in a DHCPv4 scenario, the dedicated port number of Leaf 1 is 50001, the dedicated port number of Leaf 2 is 50002, and the dedicated port number of Leaf 3 is 50003.
[0145] After receiving the request message from DHCPv4 client 1, Leaf 1 changes the source port number of the request message to 50001 and adds Option 82 to the request message, which includes sub-option 19. Leaf 1 then forwards the request message to the spine.
[0146] After receiving the request message through interface 1, the spine obtains the source port number 50001 of the request message and the IP address 10.0.0.1 carried in the giaddr field of the request message. Based on interface 1 and the IP address 10.0.0.1, it searches the FIB table for a matching forwarding entry "10.0.0.1 32 10.0.0.1 interface 1". It then sends the source port number 50001 to the forwarding entry in the FIB table and forwards the request message to the DHCPv4 server. Assuming that the spine has already received the request message forwarded by Leaf 2 and Leaf 3, the forwarding entries on the spine are updated as follows:
[0147] 10.0.0.1 32 10.0.0.1 interface 1 port 50001
[0148] 10.0.0.1 32 10.0.0.1 interface 2 port 50002
[0149] 10.0.0.1 32 10.0.0.1 interface 3 port 50003
[0150] After receiving the request message, the DHCPv4 server recognizes sub-option 19, obtains the source port number 50001 in the request message, and sends a response message to the spine with the destination port number 50001.
[0151] The spine receives the response message and, based on the destination address 10.0.0.1 and destination port number 50001 carried in the response message, matches the first forwarding entry "10.0.0.1 32 10.0.0.1 interface 1 port 50001" and forwards the response message to the leaf at 10.0.0.1 (Leaf 1) through interface 1.
[0152] At this point, Leaf 1 has received the request message sent by DHCPv4 client 1 and the response message sent by the DHCPv4 server to DHCPv4 client 1. Leaf 1 can create a DHCP relay binding entry based on the above request message and response message. Then, Leaf 1 strips Option 82 from the response message and forwards it to DHCPv4 client 1.
[0153] After the DHCPv4 client obtains an IPv4 address from the DHCPv4 server, subsequent renewal messages and release messages are sent directly to the DHCPv4 server without passing through the DHCPv4 relay device. In the embodiment of the present application, in order to enable the DHCPv4 relay device to still receive the renewal message and release message from the DHCPv4 client, the DHCPv4 relay device also adds sub option 11 to Option 82 of the above request message. Sub option 11 is as follows: Figure 14 As shown, it includes a Code field, a Len field, and an Overrinding Server Identifier Address field, wherein the Code field has a value of 11, and the Overrinding Server Identifier Address field carries the address of the interface on the DHCPv4 relay device connected to the DHCPv4 client.
[0154] Sub-option 11 instructs the DHCPv4 server to include the address of the DHCPv4 relay device in Option 54 when encapsulating the response message. After receiving the response message, the DHCPv4 client uses the address carried in Option 54 to communicate with the DHCPv4 server. Subsequent renewal and release messages are sent to the DHCPv4 relay device indicated by this address. The DHCPv4 relay device then encrypts the renewal and release messages and forwards them to the DHCPv4 server.
[0155] In the above process, after receiving the response message from the DHCPv4 server, the DHCPv4 relay device needs to check whether the address in Option 54 is its own address. If not, it will change it to its own address.
[0156] Still combined Figure 1 In the DHCPv6 scenario, the dedicated port number of Leaf 1 is 60001, the dedicated port number of Leaf 2 is 60002, and the dedicated port number of Leaf 3 is 60003.
[0157] After receiving the request message from DHCPv6 client 1, Leaf 1 encapsulates the message in the relay message options of a relay message, which also carries Option 135. Leaf 1 then sends the relay message to the spine. The source IP address of the relay message is the IP address of the interface on Leaf 1 connected to DHCPv6 client 1, 2001::1, and the source port number is 60001.
[0158] After receiving the relay forwarding message through interface 1, the spine obtains the source port number 60001 and source IP address 2001::1 of the relay forwarding message. Based on interface 1 and source IP address 2001::1, it searches the FIB table for a matching forwarding entry "2001::1 1282001::1 interface 1". It then sends the source port number 60001 to the forwarding entry in the FIB table and forwards the relay forwarding message to the DHCPv6 server. Assuming that the spine has already received the relay forwarding message forwarded by Leaf 2 and Leaf 3, the forwarding entries on the spine are updated as follows:
[0159] 2001::1 128 2001::1 Interface 1 Port 60001
[0160] 2001::1 128 2001::1 Interface 2 Port 60002
[0161] 2001::1 128 2001::1 Interface 3 Port 60003
[0162] After receiving the relay message, the DHCPv6 server identifies Option 135, obtains the source port number 60001 in the relay message, and sends a response message to the spine with the destination port number 60001.
[0163] The spine receives the response message and, based on the destination address 2001::1 and destination port number 60001 carried in the response message, matches the first forwarding entry "2001::1 128 2001::1 interface 1 port 60001" and forwards the response message to the leaf with address 2001::1 (Leaf 1) through interface 1.
[0164] At this point, Leaf 1 has received the request message from DHCPv6 client 1 and the response message from the DHCPv6 server. Leaf 1 can create a DHCP relay binding entry based on the request message and response message. Leaf 1 then removes the reply header from the response message and forwards it to DHCPv6 client 1.
[0165] Corresponding to the above method embodiment, the embodiment of the present application further provides a relay communication device, which is applied to a border gateway. The border gateway is in a distributed gateway network. The distributed gateway network also includes multiple DHCP relay devices. The multiple DHCP relay devices are all connected to the border gateway. The multiple DHCP relay devices have different dedicated port numbers, such as Figure 15 As shown, the device includes:
[0166] A receiving module 1501 is configured to receive a response message sent by a DHCP server, wherein the destination port number of the response message is a designated dedicated port number, the designated dedicated port number is a dedicated port number of a designated DHCP relay device, and the designated DHCP relay device is the DHCP relay device that sends a request message corresponding to the response message to the border gateway;
[0167] The forwarding module 1502 is configured to obtain a forwarding entry that matches the designated dedicated port number, and forward the response message to the designated DHCP relay device based on the forwarding entry.
[0168] Optionally, the device further includes: an adding module;
[0169] The receiving module 1501 is further configured to receive a request message sent by the designated DHCP relay device through an inbound interface, wherein the request message includes an IP address and the designated dedicated port number, where the IP address is the IP address of the interface on the designated DHCP relay device connected to the DHCP client;
[0170] An adding module is used to obtain a forwarding table entry that matches the IP address and the inbound interface, and add the designated dedicated port number to the forwarding table entry.
[0171] Optionally, the designated dedicated port number is the source port number included in the request message.
[0172] Optionally, the request message includes a specified option, and the specified option is used to instruct the DHCP server to use the dedicated port number carried in the request message as the destination port number.
[0173] Optionally, when the designated DHCP relay device is a DHCPv4 relay device, the designated option is a suboption included in option 82 of the request message;
[0174] In the case that the designated DHCP relay device is a DHCPv6 relay device, the designated option is a sub-option included in the relay message option of the request message, and the designated option includes the designated dedicated port number.
[0175] Optionally, when the designated DHCP relay device is a DHCPv4 relay device, the IP address is the IP address carried in the gateway IP address giaddr field of the request message;
[0176] In the case where the designated DHCP relay device is a DHCPv6 relay device, the IP address is the source IP address of the request message.
[0177] Corresponding to the above method embodiment, the present application embodiment also provides a border gateway, such as Figure 16 As shown, it includes a processor 1601 , a communication interface 1602 , a memory 1603 and a communication bus 1604 , wherein the processor 1601 , the communication interface 1602 , and the memory 1603 communicate with each other via the communication bus 1604 .
[0178] Memory 1603, used for storing computer programs;
[0179] The processor 1601 is configured to implement the method steps in the above method embodiment when executing the program stored in the memory 1603 .
[0180] The communication bus mentioned above for the border gateway can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, and control buses. For ease of illustration, the figure uses only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0181] The communication interface is used for communication between the above-mentioned border gateway and other devices.
[0182] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0183] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0184] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned relay communication methods are implemented.
[0185] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the relay communication methods in the above embodiments.
[0186] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0187] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0188] Each embodiment in this specification is described in a related manner. Similar portions between the embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so their description is relatively simple. For related portions, refer to the description of the method embodiments.
[0189] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A relay communication method, characterized in that: The method is applied to a border gateway, the border gateway being in a distributed gateway network, the distributed gateway network further comprising a plurality of DHCP relay devices, the plurality of DHCP relay devices being connected to the border gateway, the plurality of DHCP relay devices having different dedicated port numbers, the method comprising: Receive a response message sent by the DHCP server, where the destination port number of the response message is a designated dedicated port number, the designated dedicated port number is a dedicated port number of a designated DHCP relay device, and the designated DHCP relay device is the DHCP relay device that sends a request message corresponding to the response message to the border gateway; Obtain a forwarding table entry that matches the designated dedicated port number, and forward the response message to the designated DHCP relay device based on the forwarding table entry.
2. The method according to claim 1, characterized in that Before receiving the response message sent by the DHCP server, the method further includes: receiving, through an inbound interface, a request message sent by the designated DHCP relay device, wherein the request message includes an IP address and the designated dedicated port number, wherein the IP address is the IP address of the interface on the designated DHCP relay device connected to the DHCP client; Obtain a forwarding table entry that matches the IP address and the inbound interface, and add the designated dedicated port number to the forwarding table entry.
3. The method according to claim 2, characterized in that The designated dedicated port number is the source port number included in the request message.
4. The method according to any one of claims 1 to 3, characterized in that The request message includes a designated option, and the designated option is used to instruct the DHCP server to use the dedicated port number carried in the request message as the destination port number.
5. The method according to claim 4, characterized in that When the designated DHCP relay device is a DHCPv4 relay device, the designated option is a suboption included in option 82 of the request message; In the case that the designated DHCP relay device is a DHCPv6 relay device, the designated option is a sub-option included in the relay message option of the request message, and the designated option includes the designated dedicated port number.
6. The method according to claim 2, characterized in that When the designated DHCP relay device is a DHCPv4 relay device, the IP address is the IP address carried in the gateway IP address giaddr field of the request message; In the case where the designated DHCP relay device is a DHCPv6 relay device, the IP address is the source IP address of the request message.
7. A relay communication device, characterized in that: The device is applied to a border gateway, the border gateway is in a distributed gateway network, the distributed gateway network further includes multiple DHCP relay devices, the multiple DHCP relay devices are all connected to the border gateway, the multiple DHCP relay devices have different dedicated port numbers, and the device includes: a receiving module, configured to receive a response message sent by a DHCP server, wherein the destination port number of the response message is a designated dedicated port number, the designated dedicated port number is a dedicated port number of a designated DHCP relay device, and the designated DHCP relay device is a DHCP relay device that sends a request message corresponding to the response message to the border gateway; The forwarding module is configured to obtain a forwarding entry that matches the designated dedicated port number, and forward the response message to the designated DHCP relay device based on the forwarding entry.
8. The device according to claim 7, characterized in that The device further comprises: an adding module; The receiving module is further configured to receive a request message sent by the designated DHCP relay device through an inbound interface, wherein the request message includes an IP address and the designated dedicated port number, wherein the IP address is the IP address of the interface on the designated DHCP relay device connected to the DHCP client; The adding module is used to obtain a forwarding table entry that matches the IP address and the inbound interface, and add the designated dedicated port number to the forwarding table entry.
9. The device according to claim 8, characterized in that The designated dedicated port number is the source port number included in the request message.
10. The device according to any one of claims 7 to 9, characterized in that: The request message includes a designated option, and the designated option is used to instruct the DHCP server to use the dedicated port number carried in the request message as the destination port number.
Citation Information
Patent Citations
Method and device for updating stream forward table content based on the stream forward
CN101009661A
Mechanism to support multiple-writer / multiple-reader concurrency for software flow / packet classification on general purpose multi-core systems
CN108353038A
Message forwarding method and apparatus
CN109495369A
Message forwarding method and equipment
CN113726632A
Method and system for auto-provisioning network devices in a data center using network device location in network topology
US20150074246A1