CN112118183A - Message forwarding method - Google Patents

Message forwarding method Download PDF

Info

Publication number
CN112118183A
CN112118183A CN201910518274.2A CN201910518274A CN112118183A CN 112118183 A CN112118183 A CN 112118183A CN 201910518274 A CN201910518274 A CN 201910518274A CN 112118183 A CN112118183 A CN 112118183A
Authority
CN
China
Prior art keywords
message
port
server
proxy server
service server
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.)
Pending
Application number
CN201910518274.2A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201910518274.2A priority Critical patent/CN112118183A/en
Publication of CN112118183A publication Critical patent/CN112118183A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1806Go-back-N protocols
    • 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
    • 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
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a message forwarding method, which is applied to a communication system comprising a client, a proxy server and a service server, wherein a forwarding channel T is arranged between the service server and the proxy server, a port P0 and a port P1 are respectively monitoring ports of the service server and the proxy server, the service server establishes a mapping relation from P0 to (P1, T), the proxy server establishes a mapping relation from P1 to (P0, T), the proxy server sends a message D2 through the forwarding channel T after receiving a message D1 at a port P1, and the message D2 contains source address information of the message D1; and after receiving the message D2, the server constructs a message D3, wherein the source address of the message D3 is the source address of the message D1, and the destination port is P0. By the method, resources of the proxy server and the service server can be saved, and transmission reliability between the client and the service server is improved.

Description

Message forwarding method
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a packet forwarding method.
Background
Fig. 1 is a schematic diagram of a Network topology according to the present invention, in which a service server accesses the internet through a Network Address Translation (NAT) router, and due to the NAT technology, a client and other devices on the internet cannot directly access the service server. Fig. 2 depicts a specific flow of the prior art, and the following is described in detail by taking a TCP (Transmission Control Protocol) port P1 of a client accessing a proxy server as an example:
201. the service server is used as a client to establish a TCP connection T to the proxy server, and sends a message to request the proxy server to distribute a TCP port corresponding to a TCP port P0 through the connection T;
202. the proxy server distributes a port P1 and establishes a mapping relation between P1 and (P0, T);
203A, client and proxy port P1 establish TCP connection C0;
203B, TCP sending service data through the connection after the connection is successfully established, wherein the service data refers to the data part in the TCP protocol;
203C, caching service data by the proxy server;
204. the proxy server searches the mapping relation according to P0, and sends a message to the service server through the connection T to inform that a newly established TCP connection exists on the port P0, wherein the message comprises the value of the port P1 and the identifier of the TCP connection C0;
205. the service server and the local TCP port P1 establish a local connection C1 and establish a mapping relation between C1 and C0;
206. after C1 is successfully established, the service server sends a message to inform the proxy server that the data received on the connection C0 can be forwarded, wherein the message contains the identifications of C0 and C1;
207. the proxy server establishes a mapping relation between C0 and C1, and sends a message through T, wherein the message comprises the identifier of C1 and the service data cached in the step 203C;
208. the service server sends the service data through the connection C0 according to the C1 identifier in the message.
The prior art has the following disadvantages:
1. the occupied resources are more: if a plurality of clients need to access the service server, the proxy server and each client need to establish TCP connection, and the service server also needs to establish the same number of local TCP connections to occupy a plurality of TCP resources; moreover, a local TCP connection of the service server needs to occupy one TCP port, which is also a limited resource;
2. unreliable message transmission: in order to realize reliable transmission, the TCP protocol requires sending an ACK message after receiving the message, and if the transmitting and receiving end does not receive the ACK message, the message needs to be retransmitted. In the above flow, step 203C defaults to send an ACK message when receiving a message, and if a transmission failure (e.g., connection T interruption) occurs in a subsequent step, a service message sent by the client is actually lost, but the client cannot sense the loss of the message and no retransmission occurs, thereby causing unreliable transmission between the client and the service server.
Disclosure of Invention
The embodiment of the invention provides a message forwarding method, which can save resources of a proxy server and a service server and simultaneously improve the transmission reliability between a client and the service server.
In view of this, the embodiment of the present invention provides:
a message forwarding method is applied to a communication system comprising a client, a proxy server and a service server, wherein a forwarding channel T is arranged between the service server and the proxy server, a port P0 and a port P1 are respectively monitoring ports of the service server and the proxy server, the service server establishes a mapping relation from P0 to (P1, T), the proxy server establishes a mapping relation from P1 to (P0, T), the proxy server sends a message D2 through the forwarding channel T after receiving a message D1 at a port P1, and the message D2 comprises source address information of the message D1 and port P0 information; and after receiving the message D2, the service server constructs a message D3, wherein the source address of the message D3 is the source address of the message D1, and the destination port is P0.
The invention has the beneficial effects that: the resources of the proxy server and the service server are saved, and the transmission reliability between the client and the service server is improved.
Drawings
FIG. 1 is a schematic diagram of the network topology of the present invention;
FIG. 2 is a prior art flow diagram;
FIG. 3 is a flow chart of an embodiment of the present invention;
fig. 4 is a schematic diagram of packet encapsulation according to an embodiment of the present invention.
Detailed Description
The invention is primarily applicable to the network topology shown in fig. 1; because of the characteristics of the NAT technology, whether NAT equipment exists in the network has no influence on the technical scheme of the invention, and in order to highlight the technical scheme, the NAT equipment is not embodied in the embodiment of the invention.
Referring to fig. 3, an embodiment of the present invention provides a packet forwarding method, which is applied to a communication system including a client, a proxy server, and a service server, where a forwarding channel T is located between the service server and the proxy server, a port P0 and a port P1 are listening ports of the service server and the proxy server, the service server has established a mapping relationship from P0 to (P1, T), and the proxy server has established a mapping relationship from P1 to (P0, T); the message forwarding process among the client, the proxy server and the service server is as follows:
301. the client sends a message D1 to a port P1 of the proxy server;
302. the proxy server searches a mapping relation table according to the port P1 to determine a channel T and a port P0, and then sends a message D2 through the T, wherein the message D2 comprises port P0 information, source address information of the message D1 and application data;
303. the service server constructs a message D3 according to the information in the message D2, wherein the source address of the message D3 is the source address of the message D1, and the destination port is P0;
304. if the service server needs to send a message to the client by using the port P0, searching a mapping relation according to P0 to determine a channel T and a port P1; then sending a message D4 through T, wherein the message D4 contains port P1 information and source address information of the message D1;
305. the proxy server constructs a message D5 according to the information in the message D4, wherein the source port of the message D5 is P1, and the destination address is the source address of the client.
For more clearly describing the message forwarding method, it is assumed that:
1. the IP address of the service server is 11.1.1.1, and the port P0 is a TCP port 3389; the proxy server IP address is 22.2.2.2, port P1 is TCP port 9833;
2. the IP addresses of the forwarding channel T are respectively 11.1.1.1:1000 and 22.2.2.2:2000 in port number, and the protocol is UDP;
3. the client has an IP address of 33.3.3.3 and communicates with a proxy server 9833 port using a TCP source port 3000.
The message encapsulation in the above flow is as shown in fig. 4 (the message only shows the key content of the IP message):
message D1: in the standard TCP message, the source address is the IP address of the client and the used port number, and the destination address is the IP address of the proxy server and P1;
message D2: modifying the destination IP and the destination port of D1 into the IP address of the service server and P0, and then using the IP address and the P0 as the application data of UDP;
message D3: taking out an application data part of the UDP message as an IP message;
message D4: the application data of the UDP is a standard TCP message, but the TCP message uses the IP address of the proxy server and P1 as the source address;
message D5: and taking out the application data part of the UDP message as the IP message.
After the TCP connection is established, a TCP connection is newly generated on the client side, the local address and the remote address are 33.3.3.3:3000 and 22.2.2.2:9833, the TCP connection is not newly generated on the proxy server, a connection is newly generated on the service server, and the local address and the remote address are 11.1.1.1:3389 and 33.3.3.3: 3000.
The method for the message D2 to carry the source address of D1 and the port P0 information is not limited to that shown in fig. 4, and if the message D1 is directly used as the application data of the message D2, since the service server has the mapping relationship from P0 to (T, P1), the port P0 can be determined on the service server through T and P1; similar methods are not exhaustive, but should be considered within the scope of the present invention.
The above description of the embodiments is only for the purpose of helping understanding the method of the present invention and the core idea thereof, and for those skilled in the art, the specific implementation and the application range may be changed according to the idea of the present invention; in view of the above, the present disclosure should not be construed as limiting the invention.

Claims (3)

1. A message forwarding method is applied to a communication system comprising a client, a proxy server and a service server, wherein a forwarding channel T is arranged between the service server and the proxy server, a port P0 and a port P1 are respectively monitoring ports of the service server and the proxy server, the service server establishes a P0-to-T mapping relation, and the proxy server establishes a P1-to-T mapping relation, and is characterized by comprising the following steps:
the proxy server sends a message D2 through the forwarding channel T after receiving the message D1 at the port P1, wherein the message D2 contains source address information of the message D1 and information of the port P0;
and after receiving the message D2, the server constructs a message D3, wherein the source address of the message D3 is the source address of the message D1, and the destination port is the P0.
2. The method of claim 1, the traffic server accessing the internet through a NAT device.
3. The method according to claim 1, wherein the message D1 is a TCP message.
CN201910518274.2A 2019-06-19 2019-06-19 Message forwarding method Pending CN112118183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910518274.2A CN112118183A (en) 2019-06-19 2019-06-19 Message forwarding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910518274.2A CN112118183A (en) 2019-06-19 2019-06-19 Message forwarding method

Publications (1)

Publication Number Publication Date
CN112118183A true CN112118183A (en) 2020-12-22

Family

ID=73795117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910518274.2A Pending CN112118183A (en) 2019-06-19 2019-06-19 Message forwarding method

Country Status (1)

Country Link
CN (1) CN112118183A (en)

Similar Documents

Publication Publication Date Title
US10110714B2 (en) Methods for exchanging network management messages using UDP over HTTP protocol
US8130766B2 (en) System and method for implementing multimedia calls across a private network boundary
US7016973B1 (en) Apparatus and methods for providing translucent proxies in a communications network
EP1892887B1 (en) Communication method between communication devices and communication apparatus
WO2016155300A1 (en) Remote control system and remote control method for wireless terminal device
US7970928B2 (en) Transparent auto-discovery of network devices logically located between a client and server
EP2449749B1 (en) Method and apparatus for relaying packets
US20120226820A1 (en) System and method of traffic inspection and stateful connection forwarding among geographically dispersed network appliances organized as clusters
US8724630B2 (en) Method and system for implementing network intercommunication
CN112073545B (en) MP-TCP capability for transmitting server devices using DNS
US8547998B2 (en) Tunneling IPv6 packet through IPv4 network using a tunnel entry based on IPv6 prefix and tunneling IPv4 packet using a tunnel entry based on IPv4 prefix
KR102366156B1 (en) Network relay system and data transmission method for narrowband wireless communication system
CN103685007A (en) Method for MAC address learning during packet forwarding of edge devices and edge device
JP2005033250A (en) Relaying apparatus and port forward setting method
WO2009005212A1 (en) Ipv6 over ipv4 transition method and apparatus for improving performance of control server
CN112118183A (en) Message forwarding method
CN108848099B (en) Port mapping system based on reverse multi-connection and port mapping method thereof
EP2466924B1 (en) Method, system and access service router for implementing multicast service
KR101586058B1 (en) Device for connecting peer-to-peer communication considering nat types and method connecting peer-to-peer communication using the same
US10693673B2 (en) Method and apparatus for routing data to cellular network
CN116192742B (en) Routing acceleration method and system based on application
JP2014022969A (en) Multi-home communication method and system
US20090052446A1 (en) Communications Interface
CN117544668A (en) Method for reverse proxy through external network server

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201222

WD01 Invention patent application deemed withdrawn after publication