CN107580079B - Message transmission method and device - Google Patents

Message transmission method and device Download PDF

Info

Publication number
CN107580079B
CN107580079B CN201710770629.8A CN201710770629A CN107580079B CN 107580079 B CN107580079 B CN 107580079B CN 201710770629 A CN201710770629 A CN 201710770629A CN 107580079 B CN107580079 B CN 107580079B
Authority
CN
China
Prior art keywords
message
address
ipv6 address
gateway
routing table
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.)
Active
Application number
CN201710770629.8A
Other languages
Chinese (zh)
Other versions
CN107580079A (en
Inventor
罗琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710770629.8A priority Critical patent/CN107580079B/en
Publication of CN107580079A publication Critical patent/CN107580079A/en
Application granted granted Critical
Publication of CN107580079B publication Critical patent/CN107580079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides a message transmission method and a device, and the method comprises the following steps: acquiring a data message to be sent, and determining a target IPv6 address of the data message; sending a first message carrying the destination IPv6 address, wherein the first message is used for enabling the gateway equipment to respond to a second message when determining that the destination IPv6 address is the IPv6 address of the gateway equipment directly connected with the operator network; receiving a second message sent by the gateway device, and analyzing a prefix network segment distributed by an operator network directly connected with the gateway device and a gateway address of the gateway device from the second message; and acquiring an IPv6 address corresponding to the prefix network segment, setting a source IPv6 address of the data message as the acquired IPv6 address, and sending the modified data message according to the gateway address. By the technical scheme, resources of the gateway equipment can be saved, the burden of the gateway equipment is reduced, the processing performance of the gateway equipment is improved, and the speed of the terminal equipment accessing the operator network is increased.

Description

Message transmission method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting a packet.
Background
When an enterprise user or a campus network user accesses the Internet, the enterprise user or the campus network user can access two operator networks, the two operator networks are backup to each other, and when one operator network fails, the other operator network can be accessed. Furthermore, the operator network may be configured with a URPF (Unicast Reverse Path Forwarding) to prevent source address spoofing attacks and distributed denial of service attacks. Based on this, when the terminal device accesses the operator network, it needs to use the address range allocated by the operator network.
When the terminal device accesses the operator network a through the gateway device a and accesses the operator network B through the gateway device B, the terminal device needs to access the server of the operator network a using the address range allocated by the operator network a and needs to access the server of the operator network B using the address range allocated by the operator network B.
In order to implement the above function, a Network Address Translation (NAT) function is configured in the gateway device. For example, the gateway device a is configured with an address range a allocated by the operator network a, and after receiving a message sent by the terminal device, the gateway device a performs NAT processing on the message, that is, converts a private network address of the message into a public network address in the address range a, and sends the converted message to the operator network a. Further, the processing of the gateway device B is similar to that of the gateway device a.
However, when the gateway device performs NAT processing on all messages, a large amount of resources of the gateway device are consumed, the load of the gateway device is increased, and the speed of accessing the operator network by the terminal device is reduced.
Disclosure of Invention
The application provides a message transmission method, which is applied to terminal equipment, wherein the terminal equipment accesses different operator networks through different gateway equipment, and the method comprises the following steps:
acquiring a data message to be sent, and determining a target IPv6 address of the data message;
sending a first message carrying the destination IPv6 address, wherein the first message is used for enabling the gateway equipment to respond to a second message when determining that the destination IPv6 address is the IPv6 address of the gateway equipment directly connected with the operator network;
receiving a second message sent by the gateway device, and analyzing a prefix network segment distributed by an operator network directly connected with the gateway device and a gateway address of the gateway device from the second message;
and acquiring an IPv6 address corresponding to the prefix network segment, setting a source IPv6 address of the data message as the acquired IPv6 address, and sending the modified data message according to the gateway address.
The application provides a message transmission method, which is applied to gateway equipment, wherein terminal equipment accesses different operator networks through different gateway equipment, and the method comprises the following steps:
receiving a first message which is sent by terminal equipment and carries a target IPv6 address of a data message;
if the target IPv6 address is an IPv6 address of the gateway device directly connected with the operator network, sending a second message to the terminal device, wherein the second message carries a prefix network segment distributed by the operator network directly connected with the gateway device and a gateway address of the gateway device;
and the second message is used for enabling the terminal equipment to set a source IPv6 address of the data message as an IPv6 address corresponding to the prefix network segment, and sending the modified data message according to the gateway address.
The application provides a message transmission device, is applied to terminal equipment, terminal equipment inserts different operator networks through different gateway equipment, the device includes:
the acquisition module is used for acquiring a data message to be sent and determining a target IPv6 address of the data message;
the sending module is used for sending a first message carrying the destination IPv6 address; the first message is used for enabling the gateway device to respond to the terminal device with a second message when determining that the target IPv6 address is an IPv6 address of the gateway device directly connected with the operator network;
the receiving module is used for receiving a second message sent by the gateway equipment and analyzing a prefix network segment distributed by an operator network directly connected with the gateway equipment and a gateway address of the gateway equipment from the second message;
the obtaining module is further configured to obtain an IPv6 address corresponding to the prefix network segment, and set a source IPv6 address of the data packet as an obtained IPv6 address;
and the sending module is also used for sending the modified data message according to the gateway address.
The application provides a message transmission device, which is applied to gateway equipment, wherein terminal equipment accesses different operator networks through different gateway equipment, and the method comprises the following steps:
the receiving module is used for receiving a first message which is sent by the terminal equipment and carries a target IPv6 address of the data message; a sending module, configured to send a second message to the terminal device when the destination IPv6 address is an IPv6 address of the gateway device directly connected to the operator network, where the second message carries a prefix network segment allocated to the operator network to which the gateway device is directly connected and a gateway address of the gateway device;
and the second message is used for enabling the terminal equipment to set a source IPv6 address of the data message as an IPv6 address corresponding to the prefix network segment, and sending the modified data message according to the gateway address.
Based on the above technical solution, in the embodiment of the present application, in an IPv6 dual-homed network, a terminal device may set a source IPv6 address of a data packet by using an IPv6 address within an address range allocated by an operator network, and send the data packet to a gateway device. After receiving the data message, the gateway device does not need to perform NAT processing on the data message, namely, the source IPv6 address of the data message does not need to be modified into an IPv6 address within the address range allocated by the operator network, so that the resources of the gateway device can be saved, the burden of the gateway device is reduced, the processing performance of the gateway device is improved, and the speed of the terminal device accessing the operator network is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 2 is a flowchart of a message transmission method according to an embodiment of the present application;
fig. 3 is a flowchart of a message transmission method according to another embodiment of the present application;
fig. 4 is a block diagram of a message transmission apparatus according to an embodiment of the present application;
FIG. 5 is a diagram of a hardware configuration of a terminal device in one embodiment of the present application;
fig. 6 is a block diagram of a message transmission apparatus according to another embodiment of the present application;
fig. 7 is a hardware configuration diagram of a gateway device according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Referring to fig. 1, an application scenario diagram of the embodiment of the present application is shown, and two operator networks are taken as an example for description, in an actual application, the number of the operator networks may be more, which is not limited to this. In addition, the number of terminal devices may be larger, and the processing flow of each terminal device is the same, and the following description will take the terminal device 101 as an example. Terminal device 101 accesses operator network 121 through gateway device 111 and accesses a server (e.g., server 131) within operator network 121 using the address range allocated by operator network 121; terminal device 101 accesses operator network 122 through gateway device 112 and accesses a server (e.g., server 132) within operator network 122 using the address range assigned by operator network 122.
In an IPv4(Internet Protocol Version 4) network, when a gateway device configures a NAT function and a terminal device 101 accesses a server 131, the gateway device 111 and the gateway device 112 may send messages respectively, where a source address of the message is a private network address of the terminal device 101 and a destination address is an address of the server 131. Gateway device 112, upon receiving the message, discards the message because the destination address is not the address of a server within carrier network 122. After receiving the message, the gateway device 111 performs NAT processing on the message because the destination address is the address of the server in the operator network 121.
For the process of performing NAT processing on a packet by the gateway device 111, an address range (for example, the address range 121 is used as an illustration) allocated by the operator network 121 may be configured in the gateway device 111, and the address range 121 may include a plurality of public network addresses. The gateway device 111 may select an idle public network address a from the address range 121, convert a source address of the packet (i.e., a private network address of the terminal device 101) into the public network address a, record a correspondence between the private network address of the terminal device 101 and the public network address a, mark the public network address a as non-idle, and send the converted packet to the operator network 121.
After receiving the message, the device in the operator network 121 may correctly process the message because the source address of the message is the public network address in the address range 121, and finally send the message to the server 131. When the server 131 sends a response message for the message to the terminal device 101, the destination address of the response message is the public network address a. After receiving the response message, the gateway device 111 queries the corresponding relationship by using the public network address a to obtain the private network address of the terminal device 101, converts the destination address of the response message into the private network address of the terminal device 101, and sends the response message to the terminal device 101.
Obviously, through the above processing, not only the NAT function can be implemented to solve the problem of limited IPv4 address resources, but also the source address of the message can be converted into an address within the address range 121, so that the operator network 121 can correctly process the message, and the problems of errors in inspection of the URPF and the like are avoided.
In an IPv6(Internet Protocol Version 6) network, the NAT function may also be implemented in the gateway device 111/the gateway device 112, and the source address of the packet is converted, so that the operator network 121/the operator network 122 may correctly process the packet, and the problem of error in inspection of the URPF is avoided. The implementation in the IPv6 network is similar to that in the IPv4 network, and the description thereof is not repeated here.
In the IPv4 network, since the resource of the IPv4 address is limited, the resource of the IPv4 address can be saved when the gateway device implements the NAT function. In the IPv6 network, since the resources of the IPv6 address are sufficient, the number of IPv6 addresses can satisfy the demand even if the NAT function is not implemented at the gateway device.
Based on this, the message transmission method provided in the embodiment of the present application may be applied to an IPv6 dual-homing network, that is, the terminal device accesses different operator networks through different gateway devices, and the terminal device, the gateway device, and the operator networks all use IPv6 addresses to implement message transmission. As shown in fig. 1, terminal apparatus 101, gateway apparatus 111, gateway apparatus 112, server 131, and server 132 all use IPv6 addresses.
Wherein, the terminal device 101 does not have an IPv6 address; the IPv6 address of the gateway device 111 is FE80::2, and the IPv6 address FE80::2 can also be called the gateway address of the gateway device 111; the IPv6 address of the gateway device 112 is FE80::3, and the IPv6 address FE80::3 can also be called the gateway address of the gateway device 112; the IPv6 address of server 131 is 80::1 and the IPv6 address of server 132 is 90:: 1.
The operator network 121 may allocate a prefix segment 10:, and send the prefix segment 10:tothe gateway device 111, and the gateway device 111 may locally store the prefix segment 10:allocatedby the operator network 121 directly connected to the gateway device 111, where the prefix segment 10:, that is, the address range allocated by the operator network 121, and when the source IPv6 address of the data message belongs to the prefix segment 10:, each device in the operator network 121 may normally process the data message and send the data message to the server 131.
The operator network 122 may allocate the prefix segment 20:, and send the prefix segment 20:tothe gateway device 112, and the gateway device 112 may locally store the prefix segment 20:allocatedby the operator network 122 directly connected to the gateway device 112, where the prefix segment 20:, that is, the address range allocated by the operator network 122, and when the source IPv6 address of the data message belongs to the prefix segment 20:, each device in the operator network 122 may normally process the data message and send the data message to the server 132.
In summary, the gateway device 111 may obtain the prefix segment 10:fromthe operator network 121, and record the corresponding relationship between the prefix segment 10:andthe operator network 121. The gateway device 112 may obtain the prefix segment 20:fromthe operator network 122 and record the correspondence of the prefix segment 20:withthe operator network 122.
In the application scenario, referring to fig. 2, which is a flowchart of a message transmission method provided in this embodiment, the message transmission method may be applied to a terminal device, and the method may include:
step 201, obtaining a data message to be sent, and determining a destination IPv6 address of the data message.
For example, when the terminal device 101 needs to access the server 131, the terminal device 101 may obtain a data packet to be sent, where the destination IPv6 address of the data packet is the IPv6 address 80::1 of the server 131.
In an example, after determining the destination IPv6 address of the data packet, it may be determined whether the terminal device records the source IPv6 address and the gateway address corresponding to the destination IPv6 address. If so, the source IPv6 address of the data message is set as the source IPv6 address corresponding to the destination IPv6 address, and the modified data message is sent according to the gateway address corresponding to the destination IPv6 address. If not, step 202 is performed.
For example, when the terminal device 101 accesses the server 131 for the first time, the destination IPv6 address of the data packet is the IPv6 address 80::1 of the server 131, and the terminal device 101 does not currently record the source IPv6 address and the gateway address corresponding to the destination IPv6 address 80::1, and step 202 is executed. When the terminal device 101 does not access the server 131 for the first time, the destination IPv6 address of the data packet is the IPv6 address 80::1 of the server 131, and the terminal device 101 has currently recorded the source IPv6 address and the gateway address corresponding to the destination IPv6 address 80::1, and the recording process and the data packet sending process will be described in the subsequent processes.
Step 202, sending a first message carrying the destination IPv6 address, where the first message is used to enable the gateway device to respond to the second message when determining that the destination IPv6 address is an IPv6 address of the gateway device directly connected to the operator network, and to refuse to respond to the second message when determining that the destination IPv6 address is not an IPv6 address of the gateway device directly connected to the operator network. The second packet may carry a prefix network segment allocated by an operator network to which the gateway device is directly connected, a gateway address (i.e., an IPv6 address) of the gateway device, and the destination IPv6 address.
In one example, the first message may include, but is not limited to, an RS (Router Solicitation) message, the RS message may include a source address selection request option (e.g., SASR option), and the source address selection request option is used to carry the destination IPv6 address. The second message may include, but is not limited to, an RA (Router Advertisement) message, where the RA message may include a source address selection Advertisement option (e.g., an SASA option), and the source address selection Advertisement option is used to carry a prefix network segment allocated by an operator network to which the gateway device is directly connected, a gateway address of the gateway device, and the destination IPv6 address.
For example, terminal device 101 sends a first message carrying destination IPv6 address 80::1 (i.e., IPv6 address of server 131) to gateway device 111 and gateway device 112, respectively. After the gateway device 111 receives the first message, because the destination IPv6 address 80::1 is the IPv6 address of the local gateway device 111 directly connected to the operator network 121, the gateway device 111 can respond to the terminal device 101 with a second message, where the second message can carry the prefix network segment 10:, the gateway address FE80::2 of the gateway device 111, and the destination IPv6 address 80::1 allocated to the operator network 121 directly connected to the local gateway device 111. After the gateway device 112 receives the first message, since the destination IPv6 address 80::1 is not the IPv6 address of the gateway device 112 directly connected to the operator network 122, the gateway device 112 may refuse to respond to the second message, and the procedure is ended.
Step 203, receiving a second message sent by the gateway device, and analyzing a prefix network segment allocated by an operator network directly connected to the gateway device, a gateway address of the gateway device, and a destination IPv6 address from the second message.
For example, after receiving the second packet sent by the gateway device 111, the terminal device 101 may parse the following content from the second packet: the prefix network segment 10:: 2 of the gateway address FE80 of the gateway device 111 and the destination IPv6 address 80::1 allocated to the operator network 121 directly connected to the gateway device 111.
And 204, acquiring the IPv6 address corresponding to the prefix network segment, setting the source IPv6 address of the data message as the acquired IPv6 address, and sending the modified data message according to the gateway address.
For example, after the terminal device 101 analyzes the prefix segment 10:, the gateway address FE80::2, and the destination IPv6 address 80::1 from the second message, it may obtain the corresponding IPv6 address of the prefix segment 10:, for example, 10::123, and query the data message corresponding to the destination IPv6 address 80::1 from the local cache, set the source IPv6 address of the data message as the prefix segment 10:: the corresponding IPv6 address 10::123, and send the modified data message according to the gateway address FE80::2, that is, send the data message to the gateway device 111. The source IPv6 address of the data packet is 10::123, the destination IPv6 address is 80::1, the gateway device 111 can send the data packet to the operator network 121 after receiving the data packet, and since the source IPv6 address 10::123 belongs to the prefix network segment 10:, each device in the operator network 121 can process the data packet normally without discarding the data packet, and finally the data packet is sent to the server 131.
In an example, before step 201, the terminal device may further send a third message (e.g., an RS message) in a broadcast manner, where the third message is used to enable the gateway device to respond to a fourth message (e.g., an RA message), and the fourth message may carry a prefix network segment allocated by an operator network to which the gateway device is directly connected, a gateway address (i.e., an IPv6 address) of the gateway device, and a dual-homing flag. Then, each gateway device may receive the third message, and therefore each gateway device may respond to the fourth message, that is, the terminal device may receive the fourth message sent by each gateway device, and analyze, from the fourth message, a prefix network segment allocated by an operator network directly connected to the gateway device, a gateway address of the gateway device, and a dual homing flag.
After receiving the fourth packet sent by each gateway device, the terminal device may generate an IPv6 address by using the prefix segment carried by each fourth packet, and store each generated IPv6 address in the terminal device.
After receiving the fourth packet sent by each gateway device, the terminal device may add a routing table entry to the routing table, where a destination IP address of the routing table entry is an assigned IP address, and a next hop address is a gateway address of each gateway device. Moreover, after the routing table entry is added to the routing table, the terminal device may also set a dual-homing flag for the routing table entry. Moreover, the above-mentioned designated IP address may include: an IP address that can match all IPv6 addresses, for example, specifies that the IP address is all 0's and the subnet mask is all 0's.
For example, the terminal device 101 sends a third message in a broadcast manner, and after receiving the third message, the gateway device 111 responds to the terminal device 101 with a fourth message, where the fourth message may carry the prefix network segment 10:: the gateway address FE80::2 of the gateway device 111, and the dual homing flag, which are allocated to the operator network 121 directly connected to the gateway device 111. After receiving the third message, the gateway device 112 responds to the terminal device 101 with a fourth message, where the fourth message may carry the prefix network segment 20:: 3: the gateway address FE80 of the gateway device 112, and the dual-homing flag, which are allocated by the operator network 122 directly connected to the gateway device 112.
Further, after receiving the fourth message sent by the gateway device 111, the terminal device may generate an IPv6 address, for example, an IPv6 address 10::123, by using the prefix segment 10:carriedby the fourth message, and store the IPv6 address 10::123 in the terminal device. In addition, after receiving the fourth message sent by the gateway device 112, the terminal device may utilize the prefix segment 20:carriedby the fourth message to generate an IPv6 address,
if the IPv6 address 20::123 is generated, and the IPv6 address 20::123 is stored in the terminal equipment.
In addition, after receiving the fourth message sent by the gateway device 111 and the gateway device 112, the terminal device may further add a routing table entry in the routing table, where a destination IP address of the routing table entry is a specified IP address, such as 0:0:0:0:0:0:0:0, and a next hop address is a gateway address FE80::2 of the gateway device 111 and a gateway address FE80::3 of the gateway device 112, and set a dual-homing flag for the routing table entry, as shown in table 1. The routing table entry has the lowest priority, and only when the destination IPv6 address of the data packet does not match with other routing table entries in the routing table, the data packet will be matched with the routing table entry, and forwarding is performed based on the routing table entry.
TABLE 1
Figure BDA0001394948870000091
In an example, for a process of "generating an IPv6 address using a prefix segment carried in the fourth packet", the terminal device may generate an IPv6 address according to the prefix segment and the interface identifier (i.e., the identifier of the receiving interface of the fourth packet), which is not limited to the IPv6 address generating process. For example, the first 64 bits of the IPv6 address are a prefix network segment, and the last 64 bits are an interface identifier, which may be generated based on a 48-bit MAC (Media Access Control) address. One example of a policy for generating a 64-bit interface identifier using a 48-bit MAC address may be: the hexadecimal number 0xFF-FE is inserted between the third and fourth bytes of the MAC address and the "global/local" bit (the second lowest bit of the starting byte of the MAC address) is negated and set to 0 if it is 1 and to 1 if it is 0. For example, for MAC address 00-60-08-52-F9-D8, the hexadecimal number 0xFF-FE is inserted between 0x08 (the third byte) and 0x52 (the fourth byte), forming 64-bit address 00-60-08-FF-FE-52-F9-D8; then, the "global/local" bit (i.e., the second least significant bit of 0x00 (the first byte)) is negated, which is 1 since the second least significant bit of 0x00 is 0, i.e., the first byte 0x00 is changed to 0x02, and in summary, the interface identifier corresponding to MAC address 00-60-08-52-F9-D8 is 02-60-08-FF-FE-52-F9-D8.
After the above processing, in step 204, the process of "obtaining the IPv6 address corresponding to the prefix network segment" may include: and inquiring the IPv6 address corresponding to the prefix network segment from each IPv6 address stored by the terminal device. For example, since the terminal device stores IPv6 address 10::123 and IPv6 address 20::123, the IPv6 address 10::123 corresponding to the prefix network segment 10:: is queried from the IPv6 address stored by the terminal device.
In step 202, in terms of the process of "sending the first packet carrying the destination IPv6 address", the terminal device may query a routing table entry matching the destination IPv6 address from the routing table, and send the first packet carrying the destination IPv6 address by using the next-hop address of the queried routing table entry. For example, the terminal device queries the routing table through the destination IPv6 address 80::1 to obtain a routing table entry (the last routing table entry in table 1) matching the destination IPv6 address 80::1, so that the next-hop address (i.e., FE80::2, FE80::3) of the routing table entry can be used to send the first packet carrying the destination IPv6 address 80::1, that is, the first packet is sent to the gateway device 111 corresponding to FE80::2 and the gateway device 112 corresponding to FE80:: 3.
In step 202, the process of "sending the first packet carrying the destination IPv6 address by using the next-hop address of the queried routing table entry" may include: and if the inquired routing table entry is provided with the dual-homing mark, sending a first message carrying the destination IPv6 address by using the next-hop address of the inquired routing table entry. If the queried routing table entry does not set the dual-homing flag, the data message is sent by directly using the next-hop address of the queried routing table entry, instead of sending the first message, and the processing flow is not repeated.
In the above process, the function of setting the dual-homing flag for the routing table entry is as follows: the dual-homing flag is used for enabling the terminal device to send a first message carrying a destination IPv6 address of the data message by using a next hop address of the routing table item when acquiring the data message matched with the routing table item. Therefore, after acquiring the data packet and determining the destination IPv6 address of the data packet, the terminal device sends a first packet carrying the destination IPv6 address by using the next-hop address of the routing table entry if the routing table entry corresponding to the destination IPv6 address is provided with the dual-homing flag. If the route table entry corresponding to the destination IPv6 address does not set the dual-homing flag, the first packet is not sent, but the data packet is sent by directly using the next-hop address of the route table entry.
In one example, for step 204, after sending the modified data packet according to the gateway address, the terminal device may further record a corresponding relationship between a destination IPv6 address of the data packet, a source IPv6 address of the data packet, and the gateway address. For example, the terminal device 101 may record the corresponding relationship between the destination IPv6 address 80::1, the source IPv6 address 10::123, and the gateway address FE80::2 in the forwarding table entry.
In step 201, when the terminal device 101 accesses the server 131 again, the terminal device 101 may obtain a data packet to be sent, where a destination IPv6 address of the data packet is the IPv6 address 80::1 of the server 131. Then, since the corresponding relationship of the destination IPv6 address 80::1, the source IPv6 address 10::123, and the gateway address FE80::2 has been recorded in the forwarding table entry of the terminal device, the terminal device 101 can directly set the source IPv6 address of the data packet as 10::123 in the forwarding table entry, and send the modified data packet according to the gateway address FE80::2 without performing the above steps 202-204.
Based on the above technical solution, in the embodiment of the present application, in an IPv6 dual-homed network, a terminal device may set a source IPv6 address of a data packet by using an IPv6 address within an address range allocated by an operator network, and send the data packet to a gateway device. After receiving the data message, the gateway device does not need to perform NAT processing on the data message, namely, the source IPv6 address of the data message does not need to be modified into an IPv6 address within the address range allocated by the operator network, so that the resources of the gateway device can be saved, the burden of the gateway device is reduced, the processing performance of the gateway device is improved, and the speed of accessing the operator network by the terminal device is improved.
In one example, for some protocols, such as the FTP protocol, the data payload of the data packet may also contain the IPv6 address, so that the terminal device may also add the source IPv6 address 10::123 to the data payload of the data packet before sending the data packet, without limitation.
Based on the same application concept as the above method, another message transmission method is also proposed in the embodiment of the present application, and as shown in fig. 3, which is a flowchart of another message transmission method proposed in the embodiment of the present application, the message transmission method may be applied to a gateway device, and the method may include:
step 301, receiving a first message carrying a destination IPv6 address of the data message sent by the terminal device.
Step 302, if the destination IPv6 address is an IPv6 address of the gateway device directly connected to the operator network, sending a second message to the terminal device, where the second message carries a prefix network segment allocated by the operator network directly connected to the gateway device and a gateway address of the gateway device; the second message is used for enabling the terminal device to set the source IPv6 address of the data message as the IPv6 address corresponding to the prefix network segment, and the modified data message is sent according to the gateway address. And if the destination IPv6 address is not the IPv6 address of the gateway device directly connected with the operator network, refusing to send the second message to the terminal device, and ending the processing flow.
In an example, before receiving a first message carrying a destination IPv6 address of a data message sent by a terminal device, the terminal device may further receive a third message sent by the terminal device in a broadcast manner, and send a fourth message to the terminal device, where the fourth message carries a prefix network segment allocated to an operator network directly connected to the gateway device and a gateway address of the gateway device; the fourth messages are used for enabling the terminal equipment to generate IPv6 addresses according to prefix network segments carried by each fourth message, and generating routing table items according to gateway addresses carried by each fourth message.
The following describes a message transmission method in the embodiment of the present application with reference to a specific application scenario.
Step 1, when the terminal device 101 is on line, a third message (RS message) is sent in a broadcast mode.
Step 2, after receiving the third message, the gateway device 111 responds to the terminal device 101 with a fourth message (RA message), where the fourth message may carry a prefix network segment 10:: 2, and a dual homing flag, which are allocated by the operator network 121 directly connected to the gateway device 111, and a gateway address FE80::2 of the gateway device 111.
Step 3, after receiving the third message, the gateway device 112 responds to the terminal device 101 with a fourth message (RA message), where the fourth message may carry a prefix network segment 20:: 3: a gateway address FE80 of the gateway device 112, and a dual-homing flag (SAMH), which are allocated by the operator network 122 directly connected to the gateway device 112.
And step 4, after receiving the fourth message sent by the gateway device 111 and the gateway device 112, the terminal device 101 generates an IPv6 address 10::123 by using the prefix segment 10:carriedby the fourth message, generates an IPv6 address 20::123 by using the prefix segment 20:carriedby the fourth message, and stores the IPv6 address 10::123 and 20:: 123.
And step 5, the terminal device 101 adds a routing table entry into the routing table, the destination IP address of the routing table entry is 0:0:0:0:0:0:0, the next hop address is the gateway address FE80::2 of the gateway device 111 and the gateway address FE80::3 of the gateway device 112, and sets a dual-homing flag for the routing table entry, as shown in table 1.
Step 6, when the terminal device 101 needs to access the server 131, the data packet to be sent can be obtained, and the destination IPv6 address of the data packet is determined to be the IPv6 address 80::1 of the server 131.
And 7, the terminal device 101 judges whether the terminal device 101 records the source IPv6 address and the gateway address corresponding to the destination IPv6 address 80:: 1. If yes, go to step 16; if not, go to step 8.
Step 8, the terminal device 101 inquires out a routing table item matched with the destination IPv6 address 80::1 from the routing table; if the routing table entry does not set a dual-homing flag, the data message is sent by using the routing table entry; if the routing table entry has the dual-homing flag, the data packet may be cached, and step 9 is performed.
And step 9, the terminal device 101 sends the first message carrying the destination IPv6 address by using the inquired next hop address of the routing table entry. Specifically, the terminal device 101 sends the first packet carrying the destination IPv6 address 80::1 by using the next-hop address (FE 80::2, FE80::3) of the routing table entry, that is, sends the first packet to the gateway device 111 corresponding to FE80::2 and the gateway device 112 corresponding to FE80:: 3.
The first message may include an RS message, the RS message may include a source address selection request option (e.g., SASR option), and the source address selection request option is used to carry the destination IPv6 address 80:: 1.
Step 10, after the gateway device 111 receives the first message, because the destination IPv6 address 80::1 is the IPv6 address of the gateway device 111 directly connected to the operator network 121, the gateway device 111 responds to the terminal device 101 with a second message, which can carry the prefix network segment 10:, the gateway address FE80::2 of the gateway device 111, and the destination IPv6 address 80: 1 allocated to the operator network 121 directly connected to the gateway device 111. After the gateway device 112 receives the first message, the gateway device 112 rejects to respond to the second message because the destination IPv6 address 80::1 is not the IPv6 address of the gateway device 112 directly connected to the operator network 122.
The second message may include, but is not limited to, an RA message, where the RA message may include a source address selection advertisement option (such as an SASA option), and the source address selection advertisement option is used to carry a prefix network segment allocated by an operator network to which the gateway device is directly connected, a gateway address of the gateway device, and the destination IPv6 address.
Step 11, after receiving the second packet sent by the gateway device 111, the terminal device 101 may parse the following content from the second packet: the prefix network segment 10:: 2 of the gateway address FE80 of the gateway device 111 and the destination IPv6 address 80::1 allocated to the operator network 121 directly connected to the gateway device 111.
Step 12, after the terminal device 101 parses the prefix segment 10:: from the second message, it queries the IPv6 address 10::123 corresponding to the prefix segment 10:: from each IPv6 address stored in the terminal device 101.
Step 13, the terminal device 101 queries the data packet corresponding to the destination IPv6 address 80::1 from the local cache, and sets the source IPv6 address of the data packet as the IPv6 address 10:: 123.
Step 14, the terminal device 101 sends the modified data packet according to the gateway address FE80::2, that is, the data packet can be sent to the gateway device 111 corresponding to the gateway address FE80:: 2. The source IPv6 address of the data packet is 10::123, the destination IPv6 address is 80::1, and the gateway device 111 can send the data packet to the operator network 121 after receiving the data packet, and because the source IPv6 address 10::123 belongs to the prefix network segment 10:, each device in the operator network 121 can normally process the data packet without discarding the data packet, and can finally send the data packet to the server 131.
Step 15, the terminal device 101 may record the corresponding relationship among the destination IPv6 address 80::1, the source IPv6 address 10::123, and the gateway address FE80::2 of the data packet in the forwarding table entry.
And step 16, since the terminal device 101 records the source IPv6 address 10::123 and the gateway address FE80::2 corresponding to the destination IPv6 address 80::1, the terminal device 101 sets the source IPv6 address of the data packet to 10::123, and sends the modified data packet according to the gateway address FE80:: 2.
Based on the same application concept as the above method, an embodiment of the present application provides a packet transmission apparatus, which is applied to a terminal device, where the terminal device accesses different operator networks through different gateway devices, as shown in fig. 4, and is a structure diagram of the packet transmission apparatus provided in the present application, where the apparatus includes:
an obtaining module 401, configured to obtain a data packet to be sent, and determine a destination IPv6 address of the data packet;
a sending module 402, configured to send a first packet carrying the destination IPv6 address; the first message may be used to enable the gateway device to respond to the terminal device with a second message when determining that the destination IPv6 address is an IPv6 address of the gateway device directly connected to the operator network;
a receiving module 403, configured to receive a second message sent by the gateway device, and analyze, from the second message, a prefix network segment allocated by an operator network directly connected to the gateway device and a gateway address of the gateway device;
the obtaining module 401 is further configured to obtain an IPv6 address corresponding to the prefix network segment, and set a source IPv6 address of the data packet as an obtained IPv6 address;
the sending module 402 is further configured to send the modified data packet according to the gateway address.
In one example, the message transmission device further includes (not shown in fig. 4):
a judging module, configured to judge whether the terminal device records a source IPv6 address and a gateway address corresponding to the destination IPv6 address after the obtaining module determines the destination IPv6 address of the data packet;
the sending module 402 is further configured to, if the determination result of the determining module is yes, set the source IPv6 address of the data packet to be a source IPv6 address corresponding to the destination IPv6 address, and send the modified data packet according to the gateway address corresponding to the destination IPv6 address; when the judgment result of the judgment module is negative, sending a first message carrying the destination IPv6 address;
the message transmission device further comprises (not shown in fig. 4): and the recording module is used for recording the corresponding relation among the destination IPv6 address of the data message, the source IPv6 address of the data message and the gateway address after the sending module sends the modified data message according to the gateway address.
The sending module 402 is further configured to send a third message in a broadcast manner before the obtaining module obtains the data message to be sent, where the third message is used to enable the gateway device to respond to a fourth message;
the receiving module 403 is further configured to receive a fourth message sent by each gateway device, where the fourth message carries a prefix network segment allocated by an operator network directly connected to the gateway device;
the message transmission device further comprises (not shown in the figure): the generating module is used for generating IPv6 addresses by using the prefix network segments carried by each fourth message received by the receiving module and storing each generated IPv6 address;
the obtaining module 401 is specifically configured to, in the process of obtaining the IPv6 addresses corresponding to the prefix network segment, query, from each IPv6 address stored in the terminal device, an IPv6 address corresponding to the prefix network segment.
The fourth message also carries a gateway address of the gateway device; the generating module is further configured to add a routing table entry in a routing table, where a destination IP address of the routing table entry is an assigned IP address, and a next hop address is a gateway address of a gateway device carried by each fourth packet received by the receiving module; wherein the specifying the IP address comprises: an IP address that can match all IPv6 addresses;
the sending module 402 is specifically configured to, in the process of sending the first packet carrying the destination IPv6 address, query a routing table entry matching the destination IPv6 address from the routing table, and send the first packet carrying the destination IPv6 address by using a next hop address of the queried routing table entry.
The generating module is further configured to set a dual-homing flag for the routing table entry after the routing table entry is added to the routing table; the dual-homing mark is used for enabling the sending module to send a first message carrying a target IPv6 address of the data message by using a next hop address of the routing table item when the sending module obtains the data message matched with the routing table item;
the sending module 402 is specifically configured to, in the process of sending the first packet carrying the destination IPv6 address by using the next hop address of the queried routing table entry, send the first packet carrying the destination IPv6 address by using the next hop address of the queried routing table entry if the queried routing table entry is provided with the dual homing flag.
In an example, the first message includes an RS message, the RS message includes a source address selection request option, and the source address selection request option is used to carry the destination IPv6 address;
the second message comprises an RA message, the RA message comprises a source address selection notification option, and the source address selection notification option is used for carrying the prefix network segment and the gateway address of the gateway device.
In terms of hardware, the hardware architecture diagram of the terminal device provided in the embodiment of the present application may specifically refer to fig. 5. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the message transmission operation disclosed in the above example of the present application is realized by communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same application concept as the above method, an embodiment of the present application provides a packet transmission apparatus, which is applied to a gateway device, and a terminal device accesses different operator networks through different gateway devices, as shown in fig. 6, which is a structure diagram of the packet transmission apparatus provided in the present application, where the apparatus includes:
a receiving module 601, configured to receive a first packet sent by a terminal device and carrying a destination IPv6 address of a data packet; a sending module 602, configured to send a second message to the terminal device when the destination IPv6 address is an IPv6 address of the gateway device directly connected to the operator network, where the second message carries a prefix network segment allocated by the operator network directly connected to the gateway device and a gateway address of the gateway device;
and the second message is used for enabling the terminal equipment to set a source IPv6 address of the data message as an IPv6 address corresponding to the prefix network segment, and sending the modified data message according to the gateway address.
The receiving module 601 is further configured to receive a third message sent by the terminal device in a broadcast manner; wherein, the third message is used for the gateway device to respond to the fourth message;
the sending module 602 is further configured to send a fourth message to the terminal device, where the fourth message carries a prefix network segment allocated by an operator network directly connected to the gateway device and a gateway address of the gateway device; and the fourth messages are used for enabling the terminal equipment to generate an IPv6 address according to the prefix network segment carried by each fourth message, and generating a routing table item according to the gateway address carried by each fourth message.
In terms of hardware, a schematic diagram of a hardware architecture of the gateway device provided in the embodiment of the present application may specifically refer to fig. 7. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the message transmission operation disclosed in the above example of the present application is realized by communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (14)

1. A message transmission method is applied to a terminal device, wherein the terminal device accesses different operator networks through different gateway devices, and the method comprises the following steps:
acquiring a data message to be sent, and determining a target IPv6 address of the data message;
sending a first message carrying the destination IPv6 address, wherein the first message is used for enabling the gateway equipment to respond to a second message when determining that the destination IPv6 address is the IPv6 address of the gateway equipment directly connected with the operator network;
receiving a second message sent by the gateway device, and analyzing a prefix network segment distributed by an operator network directly connected with the gateway device and a gateway address of the gateway device from the second message;
and acquiring an IPv6 address corresponding to the prefix network segment, setting a source IPv6 address of the data message as the acquired IPv6 address, and sending the modified data message according to the gateway address.
2. The method of claim 1,
after determining the destination IPv6 address of the data packet, the method further includes:
judging whether the terminal equipment records a source IPv6 address and a gateway address corresponding to the destination IPv6 address or not; if so, setting the source IPv6 address of the data message as the source IPv6 address corresponding to the destination IPv6 address, and sending the modified data message according to the gateway address corresponding to the destination IPv6 address; if not, executing the process of sending the first message carrying the destination IPv6 address;
after sending the modified data message according to the gateway address, the method further includes: and recording the corresponding relation of the destination IPv6 address of the data message, the source IPv6 address of the data message and the gateway address.
3. The method of claim 1,
before the obtaining of the data message to be sent, the method further includes: sending a third message in a broadcasting mode, wherein the third message is used for enabling the gateway equipment to respond to a fourth message; receiving a fourth message sent by each gateway device, wherein the fourth message carries a prefix network segment distributed by an operator network directly connected with the gateway device; generating an IPv6 address by using the prefix network segment carried by each fourth message, and storing each generated IPv6 address;
the process of acquiring the IPv6 address corresponding to the prefix network segment specifically includes: and querying an IPv6 address corresponding to the prefix network segment from each IPv6 address stored by the terminal device.
4. The method of claim 3,
the fourth message also carries a gateway address of the gateway device; after receiving the fourth packet sent by each gateway device, the method further includes: adding a routing table entry in a routing table, wherein the destination IP address of the routing table entry is an appointed IP address, and the next hop address is the gateway address of each gateway device;
wherein the specifying the IP address comprises: an IP address that can match all IPv6 addresses;
the process of sending the first packet carrying the destination IPv6 address specifically includes:
and inquiring a routing table item matched with the destination IPv6 address from the routing table, and sending a first message carrying the destination IPv6 address by using a next hop address of the inquired routing table item.
5. The method of claim 4, wherein after the adding of the routing table entry in the routing table, the method further comprises: setting a dual-homing flag for the routing table entry; the dual-homing mark is used for enabling the terminal equipment to send a first message carrying a target IPv6 address of the data message by using a next hop address of the routing table item when acquiring the data message matched with the routing table item;
the process of sending the first packet carrying the destination IPv6 address by using the queried next hop address of the routing table entry specifically includes: and if the inquired routing table entry is provided with the dual-homing mark, sending a first message carrying the destination IPv6 address by using the next-hop address of the inquired routing table entry.
6. A message transmission method is applied to gateway equipment, and terminal equipment accesses to different operator networks through different gateway equipment, and the method comprises the following steps:
receiving a first message which is sent by terminal equipment and carries a target IPv6 address of a data message;
if the target IPv6 address is an IPv6 address of the gateway device directly connected with the operator network, sending a second message to the terminal device, wherein the second message carries a prefix network segment distributed by the operator network directly connected with the gateway device and a gateway address of the gateway device;
and the second message is used for enabling the terminal equipment to set a source IPv6 address of the data message as an IPv6 address corresponding to the prefix network segment, and sending the modified data message according to the gateway address.
7. The method according to claim 6, wherein before receiving the first packet carrying the destination IPv6 address of the data packet sent by the terminal device, the method further comprises:
receiving a third message sent by the terminal equipment in a broadcasting mode; wherein, the third message is used for the gateway device to respond to the fourth message;
sending a fourth message to the terminal device, wherein the fourth message carries a prefix network segment distributed by an operator network directly connected with the gateway device and a gateway address of the gateway device;
and the fourth messages are used for enabling the terminal equipment to generate an IPv6 address according to the prefix network segment carried by each fourth message, and generating a routing table item according to the gateway address carried by each fourth message.
8. A message transmission device is applied to a terminal device, wherein the terminal device accesses different operator networks through different gateway devices, and the device comprises:
the acquisition module is used for acquiring a data message to be sent and determining a target IPv6 address of the data message;
the sending module is used for sending a first message carrying the destination IPv6 address; the first message is used for enabling the gateway device to respond to the terminal device with a second message when determining that the target IPv6 address is an IPv6 address of the gateway device directly connected with the operator network;
the receiving module is used for receiving a second message sent by the gateway equipment and analyzing a prefix network segment distributed by an operator network directly connected with the gateway equipment and a gateway address of the gateway equipment from the second message;
the obtaining module is further configured to obtain an IPv6 address corresponding to the prefix network segment, and set a source IPv6 address of the data packet as an obtained IPv6 address;
and the sending module is also used for sending the modified data message according to the gateway address.
9. The apparatus of claim 8, wherein the message transmission apparatus further comprises:
a judging module, configured to judge whether the terminal device records a source IPv6 address and a gateway address corresponding to the destination IPv6 address after the obtaining module determines the destination IPv6 address of the data packet;
the sending module is further configured to, if the determination result of the determining module is yes, set the source IPv6 address of the data packet to be the source IPv6 address corresponding to the destination IPv6 address, and send the modified data packet according to the gateway address corresponding to the destination IPv6 address; when the judgment result of the judgment module is negative, sending a first message carrying the destination IPv6 address;
the message transmission device further comprises: and the recording module is used for recording the corresponding relation among the destination IPv6 address of the data message, the source IPv6 address of the data message and the gateway address after the sending module sends the modified data message according to the gateway address.
10. The apparatus of claim 8,
the sending module is further configured to send a third message in a broadcast manner before the obtaining module obtains the data message to be sent, where the third message is used to enable the gateway device to respond to a fourth message;
the receiving module is further configured to receive a fourth message sent by each gateway device, where the fourth message carries a prefix network segment allocated by an operator network directly connected to the gateway device;
the message transmission device further comprises: a generating module, configured to generate an IPv6 address by using the prefix network segment carried by each fourth packet received by the receiving module, and store each generated IPv6 address;
the obtaining module is specifically configured to, in the process of obtaining the IPv6 addresses corresponding to the prefix network segment, query, from each IPv6 address stored in the terminal device, an IPv6 address corresponding to the prefix network segment.
11. The apparatus of claim 10,
the fourth message also carries a gateway address of the gateway device; the generating module is further configured to add a routing table entry in a routing table, where a destination IP address of the routing table entry is an assigned IP address, and a next hop address is a gateway address of a gateway device carried by each fourth packet received by the receiving module; wherein the specifying the IP address comprises: an IP address that can match all IPv6 addresses;
the sending module is specifically configured to, in a process of sending the first packet carrying the destination IPv6 address, query a routing table entry matching the destination IPv6 address from the routing table, and send the first packet carrying the destination IPv6 address by using a next hop address of the queried routing table entry.
12. The apparatus of claim 11, wherein the generating module is further configured to set a dual-homing flag for the routing table entry after adding the routing table entry in the routing table; the dual-homing mark is used for enabling the sending module to send a first message carrying a target IPv6 address of the data message by using a next hop address of the routing table item when the sending module obtains the data message matched with the routing table item;
the sending module is specifically configured to send the first packet carrying the destination IPv6 address by using the next hop address of the queried routing table entry if the queried routing table entry is provided with the dual homing flag during the process of sending the first packet carrying the destination IPv6 address by using the next hop address of the queried routing table entry.
13. A message transmission device is applied to gateway equipment, terminal equipment accesses different operator networks through different gateway equipment, and the device comprises:
the receiving module is used for receiving a first message which is sent by the terminal equipment and carries a target IPv6 address of the data message;
a sending module, configured to send a second message to the terminal device when the destination IPv6 address is an IPv6 address of the gateway device directly connected to the operator network, where the second message carries a prefix network segment allocated to the operator network to which the gateway device is directly connected and a gateway address of the gateway device;
and the second message is used for enabling the terminal equipment to set a source IPv6 address of the data message as an IPv6 address corresponding to the prefix network segment, and sending the modified data message according to the gateway address.
14. The apparatus of claim 13,
the receiving module is further configured to receive a third message sent by the terminal device in a broadcast manner; wherein, the third message is used for the gateway device to respond to the fourth message;
the sending module is further configured to send a fourth message to the terminal device, where the fourth message carries a prefix network segment allocated by an operator network directly connected to the gateway device and a gateway address of the gateway device; and the fourth messages are used for enabling the terminal equipment to generate an IPv6 address according to the prefix network segment carried by each fourth message, and generating a routing table item according to the gateway address carried by each fourth message.
CN201710770629.8A 2017-08-31 2017-08-31 Message transmission method and device Active CN107580079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710770629.8A CN107580079B (en) 2017-08-31 2017-08-31 Message transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710770629.8A CN107580079B (en) 2017-08-31 2017-08-31 Message transmission method and device

Publications (2)

Publication Number Publication Date
CN107580079A CN107580079A (en) 2018-01-12
CN107580079B true CN107580079B (en) 2020-12-29

Family

ID=61030137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710770629.8A Active CN107580079B (en) 2017-08-31 2017-08-31 Message transmission method and device

Country Status (1)

Country Link
CN (1) CN107580079B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450905B (en) * 2018-11-20 2021-05-04 郑州云海信息技术有限公司 Method, device and system for transmitting data
CN109831378B (en) * 2019-01-31 2021-03-19 新华三技术有限公司 Message timeout response method and device
CN112583705B (en) 2019-09-30 2023-07-11 华为技术有限公司 Communication method, equipment and system of hybrid network
CN110962778A (en) * 2019-11-28 2020-04-07 安徽江淮汽车集团股份有限公司 Gateway device of automobile and automobile
CN111988441B (en) * 2020-07-24 2023-05-12 下一代互联网关键技术和评测北京市工程研究中心有限公司 IPv 6-based networking access method and system
CN114765600B (en) * 2020-12-31 2023-10-20 华为技术有限公司 IPv6 address configuration method and routing equipment
CN114500258B (en) * 2021-12-14 2023-08-15 四川天邑康和通信股份有限公司 Automatic internet configuration method for ipv6 under wifi6 router under home intelligent gateway

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026547A (en) * 2006-02-22 2007-08-29 中兴通讯股份有限公司 Method and system for accessing Intranct IPv6 host into global IPv6 network
CN102932371A (en) * 2012-11-20 2013-02-13 杭州华三通信技术有限公司 Method for realizing communication between IPv6 private network node and public network node and routing forwarding equipment
CN104796333A (en) * 2015-03-31 2015-07-22 桂林电子科技大学 IPv6-based wireless sensor network and Internet multi-gateway interconnection scheme

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100408649B1 (en) * 2001-10-24 2003-12-06 주식회사 케이티 A method for summarizing default address of pnni lowest level node in atm switching system
US7443880B2 (en) * 2004-06-25 2008-10-28 Cisco Technology, Inc. Arrangement for reaching IPv4 public network nodes by a node in a IPv4 private network via an IPv6 access network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026547A (en) * 2006-02-22 2007-08-29 中兴通讯股份有限公司 Method and system for accessing Intranct IPv6 host into global IPv6 network
CN102932371A (en) * 2012-11-20 2013-02-13 杭州华三通信技术有限公司 Method for realizing communication between IPv6 private network node and public network node and routing forwarding equipment
CN104796333A (en) * 2015-03-31 2015-07-22 桂林电子科技大学 IPv6-based wireless sensor network and Internet multi-gateway interconnection scheme

Also Published As

Publication number Publication date
CN107580079A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
CN107580079B (en) Message transmission method and device
US20190116220A1 (en) Neighbor Discovery for IPV6 Switching Systems
CN108259347B (en) Message transmission method and device
US9154993B1 (en) Mobile-IPv6 encapsulation for wireless networks
CN110417657B (en) Method and device for processing multicast data message
EP2869515A1 (en) System and method for minimum path mtu discovery in content centric networks
US20090161576A1 (en) Methods And Systems For Sending Information To A Zone Included In An Internet Network
US20100124220A1 (en) Method And Systems For Incrementally Resolving A Host Name To A Network Address
US7421506B2 (en) Load balancer for multiprocessor platforms
CN109714274B (en) Method for acquiring corresponding relation and routing equipment
CN111988266B (en) Method for processing message
CN107317752B (en) Method and device for forwarding data message
CN106982163B (en) Method and gateway for acquiring route on demand
JP2019515555A (en) Anonymous Identification Information and Protocol of Identification Information Oriented Network
EP2869511A1 (en) Hash-based forwarding of packets with hierarchically structured variable-length identifiers over ethernet
EP2869510B1 (en) Express header for packets with hierarchically structured variable-length identifiers
CN107547346B (en) Message transmission method and device
US9819641B2 (en) Method of and a processing device handling a protocol address in a network
CN113411258A (en) Message processing method and device
CN107070719B (en) Equipment management method and device
CN107547687B (en) Message transmission method and device
CN108989173B (en) Message transmission method and device
TWI281804B (en) Packet forwarding method and system
US11516131B2 (en) Least common scope address selection systems and methods
CN113132230A (en) Method, device and computer storage medium for sending message

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant