CN108848099A - A kind of port mapping system and its port mapping method based on reversed multi-connection - Google Patents

A kind of port mapping system and its port mapping method based on reversed multi-connection Download PDF

Info

Publication number
CN108848099A
CN108848099A CN201810670373.8A CN201810670373A CN108848099A CN 108848099 A CN108848099 A CN 108848099A CN 201810670373 A CN201810670373 A CN 201810670373A CN 108848099 A CN108848099 A CN 108848099A
Authority
CN
China
Prior art keywords
connection
reversed
tcp
module
reversed multi
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.)
Granted
Application number
CN201810670373.8A
Other languages
Chinese (zh)
Other versions
CN108848099B (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 Polytron Technologies Inc
Original Assignee
Hangzhou Polytron Technologies Inc
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 Polytron Technologies Inc filed Critical Hangzhou Polytron Technologies Inc
Priority to CN201810670373.8A priority Critical patent/CN108848099B/en
Publication of CN108848099A publication Critical patent/CN108848099A/en
Application granted granted Critical
Publication of CN108848099B publication Critical patent/CN108848099B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a kind of port mapping system and its port mapping method based on reversed multi-connection, a kind of port mapping system based on reversed multi-connection includes needing by the internal unit of port mapping, reversed multi-connection gateway, reversed multi-connection server, client;Wherein reversed multi-connection gateway includes connection management module, mobile network's module, data forwarding module, cable network module;Using technical solution of the present invention, effectively solve the problems, such as the port mapping of multiple NAT and multi-connection, the practical connection of TCP for establishing reversed multi-connection server by client, reversed multi-connection gateway establishes the practical connection of TCP of internal unit, and reversed multi-connection gateway is to (6) the two practical connections of the reversed TCP of redundancy backup of reversed multi-connection server, give client direct-connected TCP virtual link similar with internal unit offer, the final port mapping for realizing cable network and mobile network's redundancy backup and multiple NAT.

Description

A kind of port mapping system and its port mapping method based on reversed multi-connection
Technical field
The present invention relates to technical field of computer information processing, and in particular to a kind of port mapping based on reversed multi-connection System and its port mapping method.
Background technique
The method of the current equipment for solving access NAT is port mapping, i.e. a port of the IP address of borde gateway is reflected It is mapped to a machine in NAT Intranet, corresponding service is provided.Port mapping saves as problem in data from far-off regions acquisition, mainly Two aspects:First is that the multiple NAT situation of this scene is relatively more, across multiple networks, edge port mapping becomes infeasible;Second is that same When to improve reliability cable network and movement (4G) network redundancy backup simultaneously, cannot directly use port mapping.
Summary of the invention
For problem involved in above-mentioned background technique, the object of the present invention is to provide a kind of based on reversed multi-connection Port mapping system and its port mapping method solve the problems, such as the port mapping of multiple NAT and multi-connection.Opposite direction connection one kind by Server of the equipment to outside NAT network under NAT network initiates the NAT through method of TCP connection, reversed multi-connection creation The connection in Multi net voting path ensures reliability that NAT is passed through.
To achieve the above object, the present invention provides the following technical solutions:
A kind of port mapping system based on reversed multi-connection is reversed more including needing by the internal unit of port mapping Connect gateway, reversed multi-connection server, client;Wherein reversed multi-connection gateway includes connection management module, Mobile network's module, data forwarding module, cable network module;
Internal unit:Internal unit provides the TCP equipment of service for client, and internal unit and client be not in same net In network, internal unit finally provides clients with service by providing TCP connection to reversed multi-connection gateway;
Client:Client is the terminal device for needing to access internal unit service, and client is with internal unit not same In one network, client passes through TCP connection to reversed multi-connection server, the final TCP server for accessing internal unit;
Reversed multi-connection server:Reversed multi-connection server is the intermediate axle of client Yu reversed multi-connection gateway Equipment is connect, reversed multi-connection server is supplied to the TCP connection service of client Yu reversed multi-connection gateway, is responsible for simultaneously It forwards the TCP data message of client and reversed multi-connection gateway to forward to service;
Reversed multi-connection gateway:Reversed multi-connection gateway is in reversed multi-connection server and internal unit Between bridging device and management equipment, reversed multi-connection gateway is connected to reversed multi-connection server and internal unit simultaneously, The TCP data message for being responsible for the reversed multi-connection server of forwarding and internal unit simultaneously forwards service;Reversed multi-connection gateway is set TCP port mapping relations of the TCP port of standby management internal unit to reversed multi-connection server;
Connection management module:TCP port for managing TCP port to the reversed multi-connection server of internal unit maps Relationship, manage reversed multi-connection gateway to internal unit and reversed multi-connection server TCP connection;
Data forwarding module:For be responsible for management multi-connection gateway and internal unit between and multi-connection gateway TCP connection between equipment and reversed multi-connection server is responsible for management and forwards reversed multi-connection server and internal unit The forwarding service of TCP data message;
Mobile network's module:It is logical for realizing the movement between reversed multi-connection gateway and reversed multi-connection server News connection, respectively connection management module and data forwarding module provide network service;Movement can be used in mobile network's module Operator moves 4G, 3G, GPRS network, and network bandwidth is smaller, for connecting backup;
Cable network module:For realizing the cable modem between reversed multi-connection gateway and reversed multi-connection server News connection, respectively connection management module and data forwarding module provide network service;The network bandwidth of cable network module compared with Greatly, primary data communication channel;
The present invention also provides a kind of port mapping methods based on reversed multi-connection, include the following steps:
Step (1), connection management module establish reversed multi-connection server redundancy signaling connection, cable network module with Mobile network's module establishes the TCP signaling connection of reversed multi-connection server respectively;
Step (2), connection management module preferentially use cable network module and the TCP signaling of reversed multi-connection server to connect Connect news;After the TCP connection is interrupted, connection management module just uses mobile network's module and reversed multi-connection server The communication of TCP signaling connection;
Step (3), connection management module the port of internal unit (such as:192.168.29.12:4000) mapping request is sent out Give reversed multi-connection server;
Step (4), reversed multi-connection server receive mapping request, (such as the port of internal unit: 192.168.29.12:4000) it is being mapped to reversed multi-connection server mappings port (such as:10.2.3.4:12211), and handle reflects The relationship of penetrating is saved in Hash Map h1;
Step (5), reversed multi-connection server mappings port are (such as:10.2.3.4:12211) client TCP company is received It connects, inquiry Hash Map h1 obtains mapping relations, sends client connection request to connection management module;
Step (6), connection management module receive connection request, and notification data forwarding module establishes reverse data connection;
Step (7), data forwarding module selection establish the port of internal unit (such as:192.168.29.12:4000) TCP data connection;
Step (8), data forwarding module, which are established, connect process with reversed multi-connection server reverse data
(8.1), it when the TCP signaling connection connected state of cable network module and reversed multi-connection server, selects wired Network module is established TCP data with reversed multi-connection server and is connect;
(8.2), when the TCP signaling connection interrupt status of cable network module and reversed multi-connection server, selection movement Network module is established TCP data with reversed multi-connection server and is connect;
(8.3), when cable network module and the TCP signaling data failure of reversed multi-connection server, it is switched to movement Network module establishes TCP data connection to reversed multi-connection server (6);
(8.4), when mobile network's module and the TCP signaling data also failure of reversed multi-connection server, notice connection Management module disconnecting terminates this TCP mapping connection business;
(8.5), because being the reversed multi-connection server of data forwarding module active TCP connection, even if reversed connect more Gateway is connect still to be able to realize that NAT is penetrated in multiple NAT;
Internally equipment sends datagram process for step (9), client
(9.1), client sends the data message of reversed multi-connection server;
(9.2), reversed multi-connection server increases by eight byte packet headers after receiving the data packet text of client, forwards data Forwarding module;Eight byte packet headers include nybble length and nybble serial number, and nybble length is used for the TCP of data forwarding module Subpackage, nybble serial number are incremented by serial number, for cable network module, mobile network's module and reversed multi-connection server TCP data connection switching message resumes;
(9.3), the data packet that reversed multi-connection server is transmitted to data forwarding module saves in caching of giving out a contract for a project;It is reversed more Connection server receives serial number confirmation request, and the data for caching of giving out a contract for a project are understood according to serial number;
(9.4), data forwarding module receives the data packet text of reversed multi-connection server, removes eight byte packet headers, Data message forwarding is to internal unit;Data forwarding module takes out the nybble serial number of eight byte packet headers, passes through connection management mould The TCP signaling connection of block and reversed multi-connection server sends sequence number confirmation request, understands hair for reversed multi-connection server Wrap the data of caching;
(9.5), when the TCP signaling data failure of cable network module and reversed multi-connection server, mobile network's module TCP data connection is re-established to reversed multi-connection server (6);Reversed multi-connection server the message of caching of giving out a contract for a project again It is sent to data forwarding module, when guaranteeing connection switching, the data message that client is sent to internal unit is not lost;
Step (10), internal unit send datagram process to client
(10.1), internal unit sends the data message of data forwarding module;
(10.2), data forwarding module increases by eight byte packet headers after receiving the data packet text of internal unit, forwards data Forwarding module, eight byte packet headers include nybble length and nybble serial number;
(10.3), the data packet that data forwarding module is transmitted to reversed multi-connection server saves in caching of giving out a contract for a project;Reversely Data forwarding module receives serial number confirmation request, and the data for caching of giving out a contract for a project are understood according to serial number;
(10.4), reversed multi-connection server receives the data packet text of data forwarding module, removes eight byte packet headers, Data message forwarding is to client;Reversed multi-connection server takes out the nybble serial number of eight byte packet headers, passes through connection management The TCP signaling connection of module and reversed multi-connection server sends sequence number confirmation request;
(10.5), when the TCP signaling data failure of cable network module and reversed multi-connection server, mobile network's module TCP data connection is re-established to reversed multi-connection server (6);Data forwarding module retransmits the message for caching of giving out a contract for a project To reversed multi-connection server;When guaranteeing connection switching, the data message that internal unit is sent to client is not lost;
Step (11), the practical connection of TCP for establishing reversed multi-connection server (6) by client in this way, it is reversed to connect more Connect the practical connection of TCP that gateway establishes internal unit, and reversed multi-connection gateway is to reversed multi-connection server (6) two practical connections of the reversed TCP of redundancy backup give client direct-connected TCP virtual link similar with internal unit offer, most The port mapping of cable network and movement (4G) network redundancy backup and multiple NAT is realized eventually.
Compared with prior art, the beneficial effects of the invention are as follows:
Using technical solution of the present invention, effectively solves the problems, such as the port mapping of multiple NAT and multi-connection, pass through client The practical connection of TCP of reversed multi-connection server (6) is established, the TCP that reversed multi-connection gateway establishes internal unit is practical Connection, and reversed multi-connection gateway is to (6) the two practical connections of the reversed TCP of redundancy backup of reversed multi-connection server, Give client direct-connected TCP virtual link similar with internal unit offer, it is final to realize that cable network and mobile network's redundancy are standby The port mapping of part and multiple NAT.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of port mapping system allomeric function structural block diagram based on reversed multi-connection in the present invention.
Number mark in figure:Internal unit (1), connection management module (2), mobile network's module (3), data forwarding module (4), cable network module (5), reversed multi-connection server (6), client (7)
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1:The present invention provides a kind of specific embodiment of port mapping system based on reversed multi-connection, a kind of Port mapping system based on reversed multi-connection, including needing by the internal unit 1 of port mapping, reversed multi-connection gateway is set It is standby, reversed multi-connection server 6, client 7;Wherein reversed multi-connection gateway includes connection management module 2, mobile network Module 3, data forwarding module 4, cable network module 5;
Internal unit 1:Internal unit 1 is that client 7 provides the TCP equipment of service, and internal unit 1 and client 7 do not exist In consolidated network, internal unit 1 finally provides clothes to client 7 by providing TCP connection to reversed multi-connection gateway Business;
Client 7:Client 7 is the terminal device for needing to access the service of internal unit 1, and client 7 and internal unit 1 are not In consolidated network, client 7 passes through TCP connection to reversed multi-connection server 6, the final TCP service for accessing internal unit 1 Device;
Reversed multi-connection server 6:Reversed multi-connection server 6 is in client 7 and reversed multi-connection gateway Between bridging device, reversed multi-connection server 6 is supplied to the TCP connection service of client 7 Yu reversed multi-connection gateway, together When be responsible for forwarding the TCP data message forwarding of client 7 and reversed multi-connection gateway to service;
Reversed multi-connection gateway:Reversed multi-connection gateway is reversed multi-connection server 6 and internal unit 1 Intermediate bridging device and management equipment, reversed multi-connection gateway are connected to reversed multi-connection server 6 simultaneously and set with inside Standby 1, while the TCP data message forwarding for being responsible for the reversed multi-connection server 6 of forwarding and internal unit 1 services;Reversed multi-connection Gateway manages the TCP port of internal unit 1 to the TCP port mapping relations of reversed multi-connection server 6;
Connection management module 2:For managing the TCP port of internal unit 1 to the TCP port of reversed multi-connection server 6 Mapping relations, manage reversed multi-connection gateway to internal unit 1 and reversed multi-connection server 6 TCP connection;
Data forwarding module 4:For be responsible for management multi-connection gateway and internal unit 1 between and multi-connection net The TCP connection between equipment and reversed multi-connection server 6 is closed, is responsible for management and reversed multi-connection server 6 is forwarded to set with inside Standby 1 TCP data message forwards service;
Mobile network's module 3:For realizing the movement between reversed multi-connection gateway and reversed multi-connection server 6 Communication connection, respectively connection management module 2 and data forwarding module 4 provide network service;Mobile network's module 3 can be used Mobile operator moves 4G, 3G, GPRS network, and network bandwidth is smaller, for connecting backup;
Cable network module 5:For realizing wired between reversed multi-connection gateway and reversed multi-connection server 6 Communication connection, respectively connection management module 2 and data forwarding module 4 provide network service;The Netowrk tape of cable network module 5 Width is larger, primary data communication channel;
Based on a kind of above-mentioned port mapping system based on reversed multi-connection, the present invention also provides one kind to be connected more based on reversed The specific embodiment of the port mapping method connect, includes the following steps:
Step (1), connection management module 2 establish the redundancy signaling connection of reversed multi-connection server 6, cable network module 5 establish the TCP signaling connection of reversed multi-connection server 6 with mobile network's module 3 respectively;
Step (2), connection management module 2 are preferentially believed using the TCP of cable network module 5 and reversed multi-connection server 6 Enable connecting communication;After the TCP connection is interrupted, connection management module 2 is just using mobile network's module 3 and reversed multi-connection service The TCP signaling connection of device 6 communicates;
Step (3), connection management module 2 the port of internal unit 1 (such as:192.168.29.12:4000) mapping request It is sent to reversed multi-connection server 6;
Step (4), reversed multi-connection server 6 receive mapping request, (such as the port of internal unit 1: 192.168.29.12:4000) it is being mapped to reversed 6 mapped port of multi-connection server (such as:10.2.3.4:, and handle 12211) Mapping relations are saved in Hash Map h1;
Step (5), reversed 6 mapped port of multi-connection server are (such as:10.2.3.4:12211) client 7TCP is received Connection, inquiry Hash Map h1 obtain mapping relations, send client connection request to connection management module 2;
Step (6), connection management module 2 receive connection request, and notification data forwarding module 4 establishes reverse data company It connects;
Step (7), the selection of data forwarding module 4 establish the port of internal unit 1 (such as:192.168.29.12:4000) TCP data connection;
Step (8), data forwarding module 4, which are established, connect process with reversed 6 reverse data of multi-connection server
(8.1), when the TCP signaling connection connected state of cable network module 5 and reversed multi-connection server 6, selection has Line network module 5 is established TCP data with reversed multi-connection server 6 and is connect;
(8.2), when the TCP signaling connection interrupt status of cable network module 5 and reversed multi-connection server 6, selection is moved Dynamic network module 3 is established TCP data with reversed multi-connection server 6 and is connect;
(8.3), when cable network module 5 and the TCP signaling data failure of reversed multi-connection server 6, it is switched to shifting Dynamic network module 3 establishes TCP data connection to reversed multi-connection server (6);
(8.4), when mobile network's module 3 and the TCP signaling data also failure of reversed multi-connection server 6, notice connects 2 disconnecting of management module is connect, this TCP mapping connection business is terminated;
(8.5), because being the reversed multi-connection server 6 of 4 active TCP connection of data forwarding module, even if reversed more Connection gateway still is able to realize that NAT is penetrated in multiple NAT;
Internally equipment 1 sends datagram process for step (9), client 7
(9.1), client 7 sends the data message of reversed multi-connection server 6;
(9.2), reversed multi-connection server 6 receive client 7 data packet text after increase by eight byte packet headers, forwarding number According to forwarding module 4;Eight byte packet headers include nybble length and nybble serial number, and nybble length is used for data forwarding module 4 TCP subpackage, nybble serial number is incremented by serial number, takes for cable network module 5, mobile network's module 3 and reversed multi-connection The TCP data connection switching message of business device 6 resumes;
(9.3), the data packet that reversed multi-connection server 6 is transmitted to data forwarding module 4 saves in caching of giving out a contract for a project;Reversely Multi-connection server 6 receives serial number confirmation request, and the data for caching of giving out a contract for a project are understood according to serial number;
(9.4), data forwarding module 4 receives the data packet text of reversed multi-connection server 6, removes eight byte packet headers, Data message forwarding to internal unit 1;Data forwarding module 4 takes out the nybble serial number of eight byte packet headers, passes through connecting tube Reason module 2 and the TCP signaling connection of reversed multi-connection server 6 send sequence number confirmation request, are used for reversed multi-connection server 6 Clearly give out a contract for a project the data of caching;
(9.5), when the TCP signaling data failure of cable network module 5 and reversed multi-connection server 6, mobile network's mould Block 3 re-establishes TCP data connection to reversed multi-connection server (6);The message of reversed multi-connection 6 cachings of giving out a contract for a project of server It retransmits to data forwarding module 4, when guaranteeing connection switching, the data message that client 7 is sent to internal unit 1 is not lost It loses;
Step (10), internal unit 1 send datagram process to client 7
(10.1), internal unit 1 sends the data message of data forwarding module 4;
(10.2), data forwarding module 4 receive internal unit 1 data packet text after increase by eight byte packet headers, forwarding number According to forwarding module 4, eight byte packet headers include nybble length and nybble serial number;
(10.3), the data packet that data forwarding module 4 is transmitted to reversed multi-connection server 6 saves in caching of giving out a contract for a project;Instead Serial number confirmation request is received to data forwarding module 4, the data for caching of giving out a contract for a project are understood according to serial number;
(10.4), reversed multi-connection server 6 receives the data packet text of data forwarding module 4, removes eight byte packet headers, Data message forwarding to client 7;Reversed multi-connection server 6 takes out the nybble serial number of eight byte packet headers, passes through connection The TCP signaling connection of management module 2 and reversed multi-connection server 6 sends sequence number confirmation request;
(10.5), when the TCP signaling data failure of cable network module 5 and reversed multi-connection server 6, mobile network's mould Block 3 re-establishes TCP data connection to reversed multi-connection server (6);The message of 4 cachings of giving out a contract for a project of data forwarding module is again It is sent to reversed multi-connection server 6;When guaranteeing connection switching, the data message that internal unit 1 is sent to client 7 is not lost It loses;
Step (11), the practical connection of TCP for establishing reversed multi-connection server (6) by client 7 in this way, it is reversed to connect more Connect the practical connection of TCP that gateway establishes internal unit 1, and reversed multi-connection gateway is to reversed multi-connection server (6) two practical connections of the reversed TCP of redundancy backup provide similar direct-connected TCP virtual link with internal unit 1 to client 7, The final port mapping for realizing cable network and movement (4G) network redundancy backup and multiple NAT.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, this is practical
It is novel to be not intended to be limited to the embodiments shown herein, and be to fit to principles disclosed herein and The consistent widest scope of features of novelty.

Claims (2)

1. a kind of port mapping system based on reversed multi-connection, which is characterized in that including needing to be set by the inside of port mapping Standby (1), reversed multi-connection gateway, reversed multi-connection server (6), client (7);Wherein reversed multi-connection gateway Including connection management module (2), mobile network's module (3), data forwarding module (4), cable network module (5);
Internal unit (1):Internal unit (1) is that client (7) provide the TCP equipment of service, internal unit (1) and client (7) not in consolidated network, internal unit (1) finally gives client by providing TCP connection to reversed multi-connection gateway (7) service is provided;
Client (7):Client (7) is the terminal device for needing to access internal unit (1) service, and client (7) is set with inside Standby (1) not in consolidated network, by TCP connection to reversed multi-connection server (6), final access is internal to be set client (7) The TCP server of standby (1);
Reversed multi-connection server (6):Reversed multi-connection server (6) is client (7) and reversed multi-connection gateway Intermediate bridging device, reversed multi-connection server (6) are supplied to the TCP connection of client (7) Yu reversed multi-connection gateway Service, while the TCP data message forwarding for being responsible for forwarding client (7) and reversed multi-connection gateway services;
Reversed multi-connection gateway:Reversed multi-connection gateway is reversed multi-connection server (6) and internal unit (1) Intermediate bridging device and management equipment, reversed multi-connection gateway are connected to reversed multi-connection server (6) and inside simultaneously Equipment (1), while the TCP data message for being responsible for the reversed multi-connection server (6) of forwarding and internal unit (1) forwards service;Instead It maps and closes to the TCP port of TCP port to the reversed multi-connection server (6) of multi-connection gateway management internal unit (1) System;
Connection management module (2):For managing the TCP port of internal unit (1) to the end TCP of reversed multi-connection server (6) Mouthful mapping relations, manage reversed multi-connection gateway to internal unit (1) and reversed multi-connection server (6) TCP connection;
Data forwarding module (4):For be responsible for management multi-connection gateway and internal unit (1) between and multi-connection net Close the TCP connection between equipment and reversed multi-connection server (6), be responsible for the reversed multi-connection server (6) of management forwarding with it is interior The TCP data message of portion's equipment (1) forwards service;
Mobile network's module (3):For realizing the movement between reversed multi-connection gateway and reversed multi-connection server (6) Communication connection, respectively connection management module (2) and data forwarding module (4) provide network service;
Cable network module (5):For realizing wired between reversed multi-connection gateway and reversed multi-connection server (6) Communication connection, respectively connection management module (2) and data forwarding module (4) provide network service.
2. a kind of port mapping method based on reversed multi-connection, which is characterized in that include the following steps:
Step (1), connection management module (2) establish the redundancy signaling connection of reversed multi-connection server (6), cable network module (5) the TCP signaling connection of reversed multi-connection server (6) is established respectively with mobile network's module (3);
Step (2), connection management module (2) preferentially use the TCP of cable network module (5) and reversed multi-connection server (6) Signaling connection communication;After the TCP connection is interrupted, connection management module (2) is just connected using mobile network's module (3) with reversed more Connect the TCP signaling connection communication of server (6);
The port mapping requests of internal unit (1) are sent to reversed multi-connection server by step (3), connection management module (2) (6);
Step (4), reversed multi-connection server (6) receive mapping request, and the port of internal unit (1) is being mapped to reversely Multi-connection server (6) mapped port, and mapping relations are saved in Hash Map h1;
Step (5), reversed multi-connection server (6) mapped port receive client (7) TCP connection, inquire Hash Map H1 obtains mapping relations, sends client connection request to connection management module (2);
Step (6), connection management module (2) receive connection request, and notification data forwarding module (4) establishes reverse data company It connects;
Step (7), data forwarding module (4) selection establish the port of internal unit (1) (such as:192.168.29.12:4000) TCP data connection;
Step (8), data forwarding module (4), which are established, connect process with reversed multi-connection server (6) reverse data
(8.1), when the TCP signaling connection connected state of cable network module (5) and reversed multi-connection server (6), selection has Line network module (5) is established TCP data with reversed multi-connection server (6) and is connect;
(8.2), when the TCP signaling connection interrupt status of cable network module (5) and reversed multi-connection server (6), selection is moved Dynamic network module (3) are established TCP data with reversed multi-connection server (6) and are connect;
(8.3), when the TCP signaling data failure of cable network module (5) and reversed multi-connection server (6), it is switched to shifting Dynamic network module (3) establish TCP data connection to reversed multi-connection server (6);
(8.4), when the TCP signaling data also failure of mobile network's module (3) and reversed multi-connection server (6), notice connects Management module (2) disconnecting is connect, this TCP mapping connection business is terminated;
(8.5), because being the reversed multi-connection server (6) of data forwarding module (4) active TCP connection, even if reversed more Connection gateway still is able to realize that NAT is penetrated in multiple NAT;
Internally equipment (1) sends datagram process for step (9), client (7)
(9.1), client (7) sends the data message of reversed multi-connection server (6);
(9.2), reversed multi-connection server (6) receive client (7) data packet text after increase by eight byte packet headers, forwarding number According to forwarding module (4);Eight byte packet headers include nybble length and nybble serial number, and nybble length is used for data forwarding module (4) TCP subpackage, nybble serial number are incremented by serial number, for cable network module (5), mobile network's module (3) and reversed more The TCP data connection switching message of connection server (6) resumes;
(9.3), the data packet that reversed multi-connection server (6) is transmitted to data forwarding module (4) saves in caching of giving out a contract for a project;Reversely Multi-connection server (6) receives serial number confirmation request, and the data for caching of giving out a contract for a project are understood according to serial number;
(9.4), data forwarding module (4) receives the data packet text of reversed multi-connection server (6), removes eight byte packet headers, Internal unit (1) is given data message forwarding;Data forwarding module (4) takes out the nybble serial number of eight byte packet headers, passes through company The TCP signaling connection for connecing management module (2) and reversed multi-connection server (6) sends sequence number confirmation request, connects for reversed more Server (6) is connect clearly to give out a contract for a project the data of caching;
(9.5), when the TCP signaling data failure of cable network module (5) and reversed multi-connection server (6), mobile network's mould Block (3) re-establishes TCP data connection to reversed multi-connection server (6);Reversed multi-connection server (6) is caching of giving out a contract for a project Message, which retransmits, to be given data forwarding module (4), and when guaranteeing connection switching, client (7) is sent to the data of internal unit (1) Message is not lost;
Step (10), internal unit (1) send datagram process to client (7)
(10.1), internal unit (1) sends the data message of data forwarding module (4);
(10.2), data forwarding module (4) receive internal unit (1) data packet text after increase by eight byte packet headers, forwarding number According to forwarding module (4), eight byte packet headers include nybble length and nybble serial number;
(10.3), the data packet that data forwarding module (4) is transmitted to reversed multi-connection server (6) saves in caching of giving out a contract for a project;Instead Serial number confirmation request is received to data forwarding module (4), the data for caching of giving out a contract for a project are understood according to serial number;
(10.4), reversed multi-connection server (6) receives the data packet text of data forwarding module (4), removes eight byte packet headers, Client (7) are given data message forwarding;Reversed multi-connection server (6) takes out the nybble serial number of eight byte packet headers, passes through The TCP signaling connection of connection management module (2) and reversed multi-connection server (6) sends sequence number confirmation request;
(10.5), when the TCP signaling data failure of cable network module (5) and reversed multi-connection server (6), mobile network's mould Block (3) re-establishes TCP data connection to reversed multi-connection server (6);Message of the data forwarding module (4) caching of giving out a contract for a project It retransmits to reversed multi-connection server (6);When guaranteeing connection switching, internal unit (1) is sent to the data of client (7) Message is not lost;
Step (11), the practical connection of TCP for establishing reversed multi-connection server (6) by client (7) in this way, reversed multi-connection Gateway establishes the practical connection of TCP of internal unit (1), and reversed multi-connection gateway is to reversed multi-connection server (6) two practical connections of the reversed TCP of redundancy backup, it is virtual to client (7) direct-connected TCP similar with internal unit (1) offer Connection, the final port mapping for realizing cable network and mobile network's redundancy backup and multiple NAT.
CN201810670373.8A 2018-06-22 2018-06-22 Port mapping system based on reverse multi-connection and port mapping method thereof Active CN108848099B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810670373.8A CN108848099B (en) 2018-06-22 2018-06-22 Port mapping system based on reverse multi-connection and port mapping method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810670373.8A CN108848099B (en) 2018-06-22 2018-06-22 Port mapping system based on reverse multi-connection and port mapping method thereof

Publications (2)

Publication Number Publication Date
CN108848099A true CN108848099A (en) 2018-11-20
CN108848099B CN108848099B (en) 2020-11-03

Family

ID=64202451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810670373.8A Active CN108848099B (en) 2018-06-22 2018-06-22 Port mapping system based on reverse multi-connection and port mapping method thereof

Country Status (1)

Country Link
CN (1) CN108848099B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491591A (en) * 2020-11-10 2021-03-12 杭州萤石软件有限公司 Universal plug and play UPnP port mapping method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442224A (en) * 2013-09-09 2013-12-11 杭州巨峰科技有限公司 NAT penetration-based video monitoring access strategy and realization method
US20140115174A1 (en) * 2007-06-29 2014-04-24 Microsoft Corporation Network Address Translation Traversals for Peer-to-Peer Networks
CN104836863A (en) * 2015-04-08 2015-08-12 杭州威威网络科技有限公司 System and method for realizing TCP reverse port mapping
CN107343296A (en) * 2017-06-30 2017-11-10 合肥东芯通信股份有限公司 A kind of method and device for improving the downstream rate that the TCP numbers based on LTE pass
CN108173982A (en) * 2018-03-26 2018-06-15 深圳市风云实业有限公司 The NAT processing method and processing devices of straddle message

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115174A1 (en) * 2007-06-29 2014-04-24 Microsoft Corporation Network Address Translation Traversals for Peer-to-Peer Networks
CN103442224A (en) * 2013-09-09 2013-12-11 杭州巨峰科技有限公司 NAT penetration-based video monitoring access strategy and realization method
CN104836863A (en) * 2015-04-08 2015-08-12 杭州威威网络科技有限公司 System and method for realizing TCP reverse port mapping
CN107343296A (en) * 2017-06-30 2017-11-10 合肥东芯通信股份有限公司 A kind of method and device for improving the downstream rate that the TCP numbers based on LTE pass
CN108173982A (en) * 2018-03-26 2018-06-15 深圳市风云实业有限公司 The NAT processing method and processing devices of straddle message

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
白芳: "网络地址转换功能论述", 《互联网天地》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491591A (en) * 2020-11-10 2021-03-12 杭州萤石软件有限公司 Universal plug and play UPnP port mapping method and system

Also Published As

Publication number Publication date
CN108848099B (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN108833487B (en) TCP transmission protocol proxy method
Badrinath et al. Handling mobile clients: A case for indirect interaction
US5905872A (en) Method of transferring connection management information in world wideweb requests and responses
US7653075B2 (en) Processing communication flows in asymmetrically routed networks
WO2018133454A1 (en) Method for controlling remote service access path, and relevant apparatus
CN100452753C (en) Data transmission system and method
US20070136413A1 (en) Sip server sharing module and sip message relay system
US20040264463A1 (en) Method, apparatus and system for distributing multicast data
CN105376299B (en) Network communication method, equipment and network attached storage equipment
US6449284B1 (en) Methods and means for managing multimedia call flow
CN112437168B (en) Intranet penetration system
CN103533039B (en) P2P (Peer-to-Peer) data transmission method, forwarding proxy server and system
JP3666654B2 (en) Internet communication method {MethodforanInternetCommunication}
US20200322418A1 (en) Secure remote computer network
CN104660550A (en) Method for performing session migration among plurality of servers
CN108848099A (en) A kind of port mapping system and its port mapping method based on reversed multi-connection
CN105049543A (en) P2P communication system and method crossing asymmetric NAT between intelligent routers
US6819673B1 (en) Method and system for establishing SNA sessions over wide area networks
CN103414800A (en) Allocation and selection method and system of distributed relay servers in NAT traversal
JP3782654B2 (en) Mobile communication device, mobile communication system, and mobile communication method
US6865178B1 (en) Method and system for establishing SNA connection through data link switching access services over networking broadband services
Cisco Overview
Cisco R
Cisco R
Cisco R

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A port mapping system based on reverse multi connection and its port mapping method

Effective date of registration: 20211202

Granted publication date: 20201103

Pledgee: Hangzhou High-tech Financing Guarantee Co.,Ltd.

Pledgor: HANGZHOU XUJIAN SCIENCE AND TECHNOLOGY Co.,Ltd.

Registration number: Y2021980013922

PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220322

Granted publication date: 20201103

Pledgee: Hangzhou High-tech Financing Guarantee Co.,Ltd.

Pledgor: HANGZHOU XUJIAN SCIENCE AND TECHNOLOGY Co.,Ltd.

Registration number: Y2021980013922

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A port mapping system based on reverse multi connection and its port mapping method

Effective date of registration: 20220322

Granted publication date: 20201103

Pledgee: Shanghai Guotai Junan Securities Asset Management Co.,Ltd.

Pledgor: HANGZHOU XUJIAN SCIENCE AND TECHNOLOGY Co.,Ltd.

Registration number: Y2022990000162

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230131

Granted publication date: 20201103

Pledgee: Shanghai Guotai Junan Securities Asset Management Co.,Ltd.

Pledgor: HANGZHOU XUJIAN SCIENCE AND TECHNOLOGY Co.,Ltd.

Registration number: Y2022990000162

PC01 Cancellation of the registration of the contract for pledge of patent right