CN108270826B - Point-to-point communication method of mobile terminal and negotiation node - Google Patents
Point-to-point communication method of mobile terminal and negotiation node Download PDFInfo
- Publication number
- CN108270826B CN108270826B CN201611265516.4A CN201611265516A CN108270826B CN 108270826 B CN108270826 B CN 108270826B CN 201611265516 A CN201611265516 A CN 201611265516A CN 108270826 B CN108270826 B CN 108270826B
- Authority
- CN
- China
- Prior art keywords
- mac address
- terminal
- virtual network
- network card
- receiving terminal
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1042—Peer-to-peer [P2P] networks using topology management mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a point-to-point communication method of a mobile terminal and a negotiation node, wherein the method comprises the following steps: a pre-established negotiation node receives a communication message which is sent by a sending terminal and carries a source MAC address and a destination MAC address, wherein the source MAC address is an MAC address of a TAP virtual network card of the sending terminal, and the destination MAC address is an MAC address of a TAP virtual network card of a receiving terminal; looking up a port corresponding to the destination MAC address in a pre-stored forwarding information table, and sending the communication message to a receiving terminal through the port; the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network. The invention can realize the function of the APN special for the enterprise by utilizing the common SIM card, realizes the mutual communication among different mobile terminals, does not need to carry out any setting on the network side, and does not need to add a router on the client side like the APN special for the enterprise.
Description
Technical Field
The present invention relates to the field of mobile communication technologies, and in particular, to a point-to-point communication method for a mobile terminal and a negotiation node.
Background
Because the Address of IPV4 of the fourth version of the existing public Internet Protocol (IP) is limited, the IP Address allocated to the mobile terminal by the operator mobile communication Network is an intranet Address after Network Address Translation (NAT), for example, 10. x.x.x.x. Generally, a mobile terminal usually accesses the internet through a public Access Point (Access Point Name, APN) (such as china mobile CMNET, etc.), and for security reasons, an operator usually prohibits the mobile terminal using the public APN from accessing each other. Therefore, mobile terminals equipped with a general SIM card cannot communicate with each other.
At present, in order to meet the requirements of enterprise users, such as wireless meter reading, wireless point-of-sale (POS) services and the like, operators propose special APN services, and data cards belonging to the same special APN can communicate with each other through a mobile terminal by means of a forwarding function of a client router.
However, in the existing method for implementing mutual access between different mobile terminals by using a dedicated APN, a user must apply for a dedicated APN service and open a data card belonging to the APN to an operator in advance through a mobile terminal carried by the user, and the operator must complete data configuration in advance on a network side before implementing mutual communication between different mobile terminals belonging to the same dedicated APN.
In view of this, how to implement mutual communication between different mobile terminals, so as to solve the problem that in the prior art, a user must apply for a dedicated APN service to an operator in advance through a mobile terminal carried by the user and open a data card belonging to the APN, and the operator must complete data configuration in advance on a network side to implement mutual communication between different mobile terminals belonging to the same dedicated APN.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a point-to-point communication method for a mobile terminal and a negotiation node, which solve the problem that in the prior art, a user must apply for a dedicated APN service to an operator in advance and open a data card belonging to the APN through a mobile terminal carried by the user, and the operator must complete data configuration in advance on a network side before realizing mutual communication between different mobile terminals belonging to the same dedicated APN.
In a first aspect, the present invention provides a point-to-point communication method for a mobile terminal, applied to a pre-established negotiation node, including:
a pre-established negotiation node receives a communication message sent by a sending terminal, wherein the information carried in the communication message comprises: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal;
the negotiation node searches a port corresponding to the destination MAC address in a pre-stored forwarding information table and sends the communication message to the receiving terminal through the port;
the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network.
Optionally, before the pre-established negotiation node receives a communication message sent by a sending terminal, the method further includes:
the negotiation node receives a registration request sent by the sending terminal, and the information carried in the registration request comprises: and the MAC address and the preset IP address of the TAP virtual network card of the sending terminal establish the mapping relation between the MAC address of the TAP virtual network card of the sending terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table and send a registration confirmation message to the sending terminal.
Optionally, before the pre-established negotiation node receives a communication message sent by a sending terminal, the method further includes:
the negotiation node receives a registration request sent by the receiving terminal, and the information carried in the registration request comprises: and the MAC address of the TAP virtual network card of the receiving terminal and the preset IP address establish the mapping relation between the MAC address of the TAP virtual network card of the receiving terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table, and send a registration confirmation message to the receiving terminal.
Optionally, the negotiation node communicates with the sending terminal and the receiving terminal through UDP tunnels.
Optionally, the negotiation node is pre-established in the public network and has a fixed public network IP address.
In a second aspect, the present invention provides a pre-established negotiation node, including:
a receiving module, configured to receive, by a pre-established negotiation node, a communication message sent by a sending terminal, where information carried in the communication message includes: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal;
a sending module, configured to search a pre-stored forwarding information table for a port corresponding to the destination MAC address, and send the communication message to the receiving terminal through the port;
the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network.
Optionally, the negotiating node further includes:
a first registration module, configured to receive a registration request sent by the sending terminal, where information carried in the registration request includes: and the MAC address and the preset IP address of the TAP virtual network card of the sending terminal establish the mapping relation between the MAC address of the TAP virtual network card of the sending terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table and send a registration confirmation message to the sending terminal.
Optionally, the negotiating node further includes:
a second registration module, configured to receive a registration request sent by the receiving terminal, where information carried in the registration request includes: and the MAC address of the TAP virtual network card of the receiving terminal and the preset IP address establish the mapping relation between the MAC address of the TAP virtual network card of the receiving terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table, and send a registration confirmation message to the receiving terminal.
Optionally, the negotiation node communicates with the sending terminal and the receiving terminal through UDP tunnels.
Optionally, the negotiation node is pre-established in the public network and has a fixed public network IP address.
According to the technical scheme, the mobile terminal point-to-point communication method and the negotiation node receive the communication message which is sent by the sending terminal and carries the active MAC address and the target MAC address through the pre-established negotiation node, wherein the active MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the target MAC address is the MAC address of the TAP virtual network card of the receiving terminal; looking up a port corresponding to the destination MAC address in a pre-stored forwarding information table, and sending the communication message to a receiving terminal through the port; the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the virtual network card of the sending terminal TAP and the preset IP address of the virtual network card of the receiving terminal TAP are in the same local area network, so that the function of the special APN for enterprises can be realized by using a common SIM card, the intercommunication among different mobile terminals is realized, no setting is needed on the network side, no router needs to be added on the client side like the special APN for enterprises, and the method and the device have wide application in the fields of Internet of things and the like.
Drawings
Fig. 1 is a flowchart illustrating a point-to-point communication method of a mobile terminal according to an embodiment of the present invention;
fig. 2 is a schematic diagram of peer-to-peer communication of a mobile terminal according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a working principle of the TAP virtual network card according to the embodiment of the present invention;
fig. 4 is a schematic diagram of a point-to-point VPN (virtual private network) communication tunnel of a mobile terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a pre-established negotiation node according to an embodiment of the present invention;
fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a point-to-point communication method of a mobile terminal according to an embodiment of the present invention, and as shown in fig. 1, the point-to-point communication method of the mobile terminal according to this embodiment is as follows.
101. A pre-established negotiation node receives a communication message sent by a sending terminal, wherein the information carried in the communication message comprises: a source MAC (media access control) address and a destination MAC address, the source MAC address being the MAC address of the TAP virtual network card of the transmitting terminal, the destination MAC address being the MAC address of the TAP virtual network card of the receiving terminal.
In a specific application, the negotiation node in this embodiment is pre-established in a public network, and has a fixed public network IP address.
In a specific application, before the step 101, the method further includes a step S1 not shown in the figure:
s1, the negotiation node receives a registration request sent by the sending terminal, where information carried in the registration request includes: and the MAC address and the preset IP address of the TAP virtual network card of the sending terminal establish the mapping relation between the MAC address of the TAP virtual network card of the sending terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table and send a registration confirmation message to the sending terminal.
In a specific application, before the step 101, the method further includes a step S2 not shown in the figure:
s2, the negotiation node receives a registration request sent by the receiving terminal, where information carried in the registration request includes: and the MAC address of the TAP virtual network card of the receiving terminal and the preset IP address establish the mapping relation between the MAC address of the TAP virtual network card of the receiving terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table, and send a registration confirmation message to the receiving terminal.
It is understood that the sending terminal and the receiving terminal in this embodiment access the Internet network through the public land mobile network PLMN, and the dynamic intra-operator IP address (e.g. 10.x.x.x) is allocated.
The embodiment is applied to a mobile terminal (comprising: the transmitting terminal and the receiving terminal described above) employs a TAP virtual ethernet card technology (referred to as a TAP device in a Linux system to put in a tunnel for point-to-point communication, a virtual network card driver provided by the TAP device is not different from a real network card driver from the viewpoint of a TCP/IP (transmission control protocol/internet protocol) protocol stack, and referring to fig. 3, it is different from a real network card from the viewpoint of a driver in that data acquired by the TAP virtual network card is not from a physical link but from a user space, and the TAP virtual network card driver realizes acquisition of data from the user space by a character device file, the TAP virtual network card does not transmit data to a physical link either, but is sent to the user space through the character device and then sent by the user area program through the physical network card.
In a specific application, the negotiation node in this embodiment may listen to a message through preset different UDP ports, respectively receive registration requests sent by a sending terminal and a receiving terminal, and receive a communication message sent by the sending terminal.
102. And the negotiation node searches a port corresponding to the destination MAC address in a pre-stored forwarding information table and sends the communication message to the receiving terminal through the port.
The sending terminal and the receiving terminal are both mobile terminals (such as 4G terminals provided with 4G USIM cards), and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network. For example, as shown in fig. 2 and fig. 4, the sending terminal is a first mobile terminal, and the receiving terminal is a second mobile terminal; or, the sending terminal is a second mobile terminal, and the receiving terminal is a first mobile terminal.
In a specific application, referring to fig. 2 and fig. 4, the negotiation node of this embodiment communicates with the sending terminal and the receiving terminal through a User Datagram Protocol (UDP) tunnel.
The method described in this embodiment is equivalent to constructing a two-layer VPN tunnel between two mobile terminals, and realizes point-to-point communication between the mobile terminals, as shown in fig. 4. It can be understood that, in the embodiment, by introducing the TAP virtual network card and the UDP tunnel, two-layer network communication between different mobile terminals in the network mobile communication network can be implemented.
In the point-to-point communication method for the mobile terminal of this embodiment, a communication message sent by a sending terminal is received through a pre-established negotiation node, where the information carried in the communication message includes: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal; looking up a port corresponding to the destination MAC address in a pre-stored forwarding information table, and sending the communication message to the receiving terminal through the port; the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network, so that the function of the enterprise-specific APN can be realized by using a common SIM card, the mutual communication among different mobile terminals is realized, no setting is needed on a network side, a router is not needed to be newly added on a client side like the enterprise-specific APN, and the method and the device have wide application in the fields of Internet of things and the like.
Fig. 5 is a schematic structural diagram of a pre-established negotiation node according to an embodiment of the present invention, where the apparatus in this embodiment is applied to, as shown in fig. 5, the pre-established negotiation node in this embodiment, and includes: a receiving module 51 and a transmitting module 52; wherein:
a receiving module 51, configured to receive, by a pre-established negotiation node, a communication message sent by a sending terminal, where information carried in the communication message includes: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal;
a sending module 52, configured to search a pre-stored forwarding information table for a port corresponding to the destination MAC address, and send the communication message to the receiving terminal through the port;
the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network. For example, as shown in fig. 2 and fig. 4, the sending terminal is a first mobile terminal, and the receiving terminal is a second mobile terminal; or, the sending terminal is a second mobile terminal, and the receiving terminal is a first mobile terminal.
In a specific application, the negotiation node in this embodiment is pre-established in a public network, and has a fixed public network IP address.
In a specific application, the negotiation node in this embodiment may further include, not shown in the figure:
a first registration module, configured to receive a registration request sent by the sending terminal, where information carried in the registration request includes: and the MAC address and the preset IP address of the TAP virtual network card of the sending terminal establish the mapping relation between the MAC address of the TAP virtual network card of the sending terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table and send a registration confirmation message to the sending terminal.
In a specific application, the negotiation node in this embodiment may further include, not shown in the figure:
a second registration module, configured to receive a registration request sent by the receiving terminal, where information carried in the registration request includes: and the MAC address of the TAP virtual network card of the receiving terminal and the preset IP address establish the mapping relation between the MAC address of the TAP virtual network card of the receiving terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table, and send a registration confirmation message to the receiving terminal.
It can be understood that the sending terminal and the receiving terminal in this embodiment access the Internet network through the PLMN, and the dynamic intra-operator IP address (e.g., 10.x.x.x) is allocated.
In the embodiment, the TAP virtual Ethernet card technology (called TAP equipment in a Linux system to establish a tunnel for point-to-point communication, and a virtual network card driver provided by the TAP equipment is not different from a real network card driver from the perspective of a TCP/IP protocol stack) is adopted in the mobile terminal (comprising the transmitting terminal and the receiving terminal).
In a specific application, the negotiation node in this embodiment may listen to a message through preset different UDP ports, respectively receive registration requests sent by a sending terminal and a receiving terminal, and receive a communication message sent by the sending terminal.
In a specific application, referring to fig. 2 and fig. 4, the negotiation node and the sending terminal and the receiving terminal both communicate through UDP tunnels in this embodiment.
The apparatus in this embodiment is equivalent to constructing a two-layer VPN tunnel between two mobile terminals, and implements point-to-point communication between the mobile terminals, as shown in fig. 4. It can be understood that, in the embodiment, by introducing the TAP virtual network card and the UDP tunnel, two-layer network communication between different mobile terminals in the network mobile communication network can be implemented.
The mobile terminal point-to-point communication device of the embodiment can realize the function of the APN special for enterprises by using the common SIM card, realizes the mutual communication among different mobile terminals, does not need to carry out any setting on a network side, does not need to add a router on a client side like the APN special for enterprises, and has wide application in the fields of Internet of things and the like.
The mobile terminal peer-to-peer communication device of this embodiment may be configured to execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar and will not be described herein again.
Fig. 6 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor)61, a communication Interface (Communications Interface)62, a memory (memory)63, and a bus 64;
the processor 61, the communication interface 62 and the memory 63 complete mutual communication through the bus 64;
the communication interface 64 may be used for information transmission with mobile terminals (including the sending mobile terminal and the receiving mobile terminal described above);
the processor 61 may call the logic instructions of the memory 63 to perform the methods provided by the above-described method embodiments, including, for example: a pre-established negotiation node receives a communication message sent by a sending terminal, wherein the information carried in the communication message comprises: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal; the negotiation node searches a port corresponding to the destination MAC address in a pre-stored forwarding information table and sends the communication message to the receiving terminal through the port; the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network.
An embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, the method includes: a pre-established negotiation node receives a communication message sent by a sending terminal, wherein the information carried in the communication message comprises: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal; the negotiation node searches a port corresponding to the destination MAC address in a pre-stored forwarding information table and sends the communication message to the receiving terminal through the port; the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network.
Embodiments of the present invention provide a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to perform the methods provided by the above method embodiments, for example, the methods include: a pre-established negotiation node receives a communication message sent by a sending terminal, wherein the information carried in the communication message comprises: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal; the negotiation node searches a port corresponding to the destination MAC address in a pre-stored forwarding information table and sends the communication message to the receiving terminal through the port; the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network.
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, 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.
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.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The terms "upper", "lower", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description of the present invention, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description. Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present invention is not limited to any single aspect, nor is it limited to any single embodiment, nor is it limited to any combination and/or permutation of these aspects and/or embodiments. Moreover, each aspect and/or embodiment of the present invention may be utilized alone or in combination with one or more other aspects and/or embodiments thereof.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
Claims (6)
1. A point-to-point communication method for a mobile terminal is characterized by comprising the following steps:
a pre-established negotiation node receives a communication message sent by a sending terminal, wherein the information carried in the communication message comprises: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal;
the negotiation node searches a port corresponding to the destination MAC address in a pre-stored forwarding information table and sends the communication message to the receiving terminal through the port;
the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network;
before the pre-established negotiation node receives a communication message sent by a sending terminal, the method further comprises:
the negotiation node receives a registration request sent by the sending terminal, and the information carried in the registration request comprises: the MAC address and the preset IP address of the TAP virtual network card of the sending terminal establish the mapping relation between the MAC address of the TAP virtual network card of the sending terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table and send a registration confirmation message to the sending terminal;
the negotiation node receives a registration request sent by the receiving terminal, and the information carried in the registration request comprises: and the MAC address of the TAP virtual network card of the receiving terminal and the preset IP address establish the mapping relation between the MAC address of the TAP virtual network card of the receiving terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table, and send a registration confirmation message to the receiving terminal.
2. The method of claim 1, wherein the negotiation node communicates with both the sending terminal and the receiving terminal via UDP tunnels.
3. The method of claim 2, wherein the negotiation node is pre-established in a public network with a fixed public network IP address.
4. A pre-established negotiation node, comprising:
a receiving module, configured to receive, by a pre-established negotiation node, a communication message sent by a sending terminal, where information carried in the communication message includes: a source MAC address and a destination MAC address, wherein the source MAC address is the MAC address of the TAP virtual network card of the sending terminal, and the destination MAC address is the MAC address of the TAP virtual network card of the receiving terminal;
a sending module, configured to search a pre-stored forwarding information table for a port corresponding to the destination MAC address, and send the communication message to the receiving terminal through the port;
the sending terminal and the receiving terminal are both mobile terminals, and the preset IP address of the TAP virtual network card of the sending terminal and the preset IP address of the TAP virtual network card of the receiving terminal are in the same local area network;
the negotiation node further comprises:
a first registration module, configured to receive a registration request sent by the sending terminal, where information carried in the registration request includes: the MAC address and the preset IP address of the TAP virtual network card of the sending terminal establish the mapping relation between the MAC address of the TAP virtual network card of the sending terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table and send a registration confirmation message to the sending terminal;
a second registration module, configured to receive a registration request sent by the receiving terminal, where information carried in the registration request includes: and the MAC address of the TAP virtual network card of the receiving terminal and the preset IP address establish the mapping relation between the MAC address of the TAP virtual network card of the receiving terminal and the port for receiving the registration request in the negotiation node, store the mapping relation in a forwarding information table, and send a registration confirmation message to the receiving terminal.
5. The negotiation node of claim 4, wherein the negotiation node communicates with both the sending terminal and the receiving terminal over UDP tunnels.
6. The negotiation node of claim 5, wherein the negotiation node is pre-established in a public network with a fixed public network IP address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611265516.4A CN108270826B (en) | 2016-12-30 | 2016-12-30 | Point-to-point communication method of mobile terminal and negotiation node |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611265516.4A CN108270826B (en) | 2016-12-30 | 2016-12-30 | Point-to-point communication method of mobile terminal and negotiation node |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108270826A CN108270826A (en) | 2018-07-10 |
CN108270826B true CN108270826B (en) | 2021-06-01 |
Family
ID=62770263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611265516.4A Active CN108270826B (en) | 2016-12-30 | 2016-12-30 | Point-to-point communication method of mobile terminal and negotiation node |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108270826B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114666787A (en) * | 2020-12-23 | 2022-06-24 | 华为技术有限公司 | Equipment network distribution method, mobile terminal and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065125A (en) * | 2010-11-18 | 2011-05-18 | 广州致远电子有限公司 | Method for realizing embedded secure socket layer virtual private network (SSL VPN) |
CN102447749A (en) * | 2010-10-15 | 2012-05-09 | 中兴通讯股份有限公司 | Centralized P2P system supporting NAT traversal and NAT traversal method |
CN102469004A (en) * | 2010-10-29 | 2012-05-23 | 中国科学院计算技术研究所 | Virtual machine network system and creation method thereof |
CN104579879A (en) * | 2014-12-05 | 2015-04-29 | 上海斐讯数据通信技术有限公司 | Virtual private network communication system, connection method and data packet transmission method |
US9110605B2 (en) * | 2010-04-23 | 2015-08-18 | Huawei Device Co., Ltd. | Wireless internet access module, communication method for host and wireless internet access module, and data card |
CN105491098A (en) * | 2015-06-09 | 2016-04-13 | 哈尔滨安天科技股份有限公司 | Virtual private network (VPN) data distribution method and system based on peer-to-peer (P2P) technology |
-
2016
- 2016-12-30 CN CN201611265516.4A patent/CN108270826B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9110605B2 (en) * | 2010-04-23 | 2015-08-18 | Huawei Device Co., Ltd. | Wireless internet access module, communication method for host and wireless internet access module, and data card |
CN102447749A (en) * | 2010-10-15 | 2012-05-09 | 中兴通讯股份有限公司 | Centralized P2P system supporting NAT traversal and NAT traversal method |
CN102469004A (en) * | 2010-10-29 | 2012-05-23 | 中国科学院计算技术研究所 | Virtual machine network system and creation method thereof |
CN102065125A (en) * | 2010-11-18 | 2011-05-18 | 广州致远电子有限公司 | Method for realizing embedded secure socket layer virtual private network (SSL VPN) |
CN104579879A (en) * | 2014-12-05 | 2015-04-29 | 上海斐讯数据通信技术有限公司 | Virtual private network communication system, connection method and data packet transmission method |
CN105491098A (en) * | 2015-06-09 | 2016-04-13 | 哈尔滨安天科技股份有限公司 | Virtual private network (VPN) data distribution method and system based on peer-to-peer (P2P) technology |
Also Published As
Publication number | Publication date |
---|---|
CN108270826A (en) | 2018-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3544246B1 (en) | Multipath data transmission method and device | |
US9838261B2 (en) | Method, apparatus, and system for providing network traversing service | |
US9253636B2 (en) | Wireless roaming and authentication | |
CN112584393B (en) | Base station configuration method, device, equipment and medium | |
CN114124618B (en) | Message transmission method and electronic equipment | |
KR101640209B1 (en) | Apparatus and method for supporting portable mobile VPN service | |
CN103052064B (en) | Method, the equipment and system of the own business of a kind of access operator | |
US10404760B2 (en) | Providing network connectivity to at least one client device connected to a telecommunications network via an access gateway device and an internet protocol edge function | |
CN105430059A (en) | Smart client routing | |
EP3614649A1 (en) | Ip address allocation method and device | |
CN103688516B (en) | There is provided the method for public accessibility and in relation to system and device | |
CN107135499A (en) | Data transmission method, the network equipment and terminal | |
KR20140099598A (en) | Method for providing service of mobile vpn | |
CN102546407B (en) | File transmitting method and device | |
US10952228B2 (en) | Traffic scheduling and processing method, user side translator and core translator | |
US10171418B2 (en) | Method and apparatus for accessing demilitarized zone host on local area network | |
CN108270826B (en) | Point-to-point communication method of mobile terminal and negotiation node | |
CN114650290B (en) | Network communication method, processing device, terminal and storage medium | |
CN113067910B (en) | NAT traversal method and device, electronic equipment and storage medium | |
CN105516121B (en) | The method and system that AC is communicated with AP in WLAN | |
CN103179229B (en) | A kind of data service communications method, equipment and system | |
US10505892B2 (en) | Method for transmitting at least one IP data packet, related system and computer program product | |
CN101572729B (en) | Processing method of node information of virtual private network, interrelated equipment and system | |
EP3220584A1 (en) | Wifi sharing method and system, home gateway and wireless local area network gateway | |
CN104753888A (en) | Message handling method and device |
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 |