CN102685262B - A kind of method of detection network information of address conversion, Apparatus and system - Google Patents

A kind of method of detection network information of address conversion, Apparatus and system Download PDF

Info

Publication number
CN102685262B
CN102685262B CN201210111215.1A CN201210111215A CN102685262B CN 102685262 B CN102685262 B CN 102685262B CN 201210111215 A CN201210111215 A CN 201210111215A CN 102685262 B CN102685262 B CN 102685262B
Authority
CN
China
Prior art keywords
message
nat
probe requests
network address
sequence number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210111215.1A
Other languages
Chinese (zh)
Other versions
CN102685262A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201210111215.1A priority Critical patent/CN102685262B/en
Publication of CN102685262A publication Critical patent/CN102685262A/en
Application granted granted Critical
Publication of CN102685262B publication Critical patent/CN102685262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses a kind of method detecting NAT information, be applied on NAT device, the method includes: A) receive probe requests thereby message, extract the querying condition that described probe requests thereby message carries; B) searching NAT translation entries according to the transmission direction of described querying condition and probe requests thereby message, if finding occurrence, then returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result. The invention also discloses the detection device of NAT information, system, probe requests thereby message is sent by terminal unit, NAT device automatically returns the detection response message carrying NAT information to terminal unit, and NAT changes details to make the communication terminal of NAT device both sides will appreciate that.

Description

A kind of method of detection network information of address conversion, Apparatus and system
Technical field
The present invention relates to data communication field, in particular a kind of method of detection network information of address conversion, Apparatus and system.
Background technology
At present, along with the fast development of Network, the quality of business is proposed increasingly higher requirement by client. NAT (NetworkAddressTranslation, network address translation) business is to solve a kind of basic service that IPv4 address lacks at present. Improve its function, it is possible to be effectively smoothly transitted into the IPv6 stage.
NAT technology, in today that IPv4 address exhausts soon, has expedited the emergence of a lot of RFC drafts. It is concentrated mainly on the IPv4 various countermeasures being transitioned in IPv6 process, such as NAT44, Dual-stacklite, NAT64, NAT46. No matter NAT technology switching network address, be IPv4 to IPv4 conversion, or IPv4 and IPv6 turns mutually, and NAT device all can preserve the transitional information (such as, network address information) before and after conversion, and these information are saved in NAT translation entries.
Adding NAT device in a network makes originally straight-through network be divided into 2 networks, and an Intranet, an outer net, two networks, in NAT device both sides, can't see mutually the other side. Wherein, the network being connected with the internal interface of NAT device is Intranet, and the network being connected with the external interface of NAT device is outer net. Such as, when private network main frame intercoms mutually with public network main frame, private network main frame is after NAT device, in public network territory, it has the individual network address after NAT device is changed to represent it, the network address after this conversion only known by public network main frame, and do not know that the private network main frame network address (network address before conversion) in private network is how many. For another example, the user in private network to issue web site, it is necessary to knows that the network address being mapped in public network territory after changing self by NAT is how many.
To sum up, in order to make the network service after utilizing NAT technology more transparent, it is necessary to a kind of method detecting NAT information, NAT changes details to make the communication terminal of NAT device both sides will appreciate that.
Summary of the invention
The technical problem to be solved is to provide a kind of method of detection network information of address conversion, Apparatus and system, and NAT changes details to make the communication terminal of NAT device both sides will appreciate that.
In order to solve above-mentioned technical problem, the invention provides a kind of method detecting NAT information, be applied in network address translation device, the method includes:
A) receive probe requests thereby message, extract the querying condition that described probe requests thereby message carries;
B) searching NAT translation entries according to the transmission direction of described querying condition and probe requests thereby message, if finding occurrence, then returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result.
Further, described querying condition includes the network address before NAT conversion, step B) in, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Further, step B) in, this NAT device be not as described in the destination node of probe requests thereby message, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
Further, step B) in, described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives.
Further, described querying condition also includes: timestamp information; Step B) in, when described querying condition includes timestamp information, when searching NAT translation entries, search the NAT translation entries meeting described timestamp information.
Further, described probe requests thereby message and described detection response message are Internet control message agreement icmp packet; Or, described probe requests thereby message and described detection response message are port control protocols PCP message.
In order to solve above-mentioned technical problem, present invention also offers a kind of method detecting NAT information, be applied in the network system comprising terminal unit and network address translation device, the method includes:
A) terminal unit sends the probe requests thereby message carrying querying condition;
B) NAT device receives probe requests thereby message, extracts the querying condition that described probe requests thereby message carries; NAT translation entries is searched in transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns the detection response message carrying Query Result to described terminal unit.
C) described terminal unit receives the detection response message carrying Query Result that NAT device returns.
Further, step A) in, described querying condition includes the network address before NAT conversion; Step B) in, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Further, step B) in, this NAT device be not as described in the destination node of probe requests thereby message, after returning, to the terminal unit sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
In order to solve above-mentioned technical problem, present invention also offers a kind of device detecting NAT information, be applied in network address translation device, this device includes:
Receiver module, is used for receiving probe requests thereby message, extracts the querying condition that described probe requests thereby message carries, starting-up response module;
Respond module, searches NAT translation entries for the transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns, to the sending node sending probe requests thereby message, the detection response message carrying Query Result.
Further, described querying condition includes the network address before NAT changes; Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Further, described respond module, destination node for probe requests thereby message as described in such as this NAT device not being, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
Further, described respond module, for when described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives.
In order to solve above-mentioned technical problem, present invention also offers a kind of system detecting NAT information, be applied in the network system comprising terminal unit and network address translation device, the system of this detection NAT information includes:
Terminal sending module, sends the probe requests thereby message carrying querying condition for terminal unit;
NAT receiver module, receives probe requests thereby message for NAT device, extracts the querying condition that described probe requests thereby message carries; NAT translation entries is searched in transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns the detection response message carrying Query Result to described terminal unit.
Terminal receiver module, receives, for described terminal unit, the detection response message carrying Query Result that NAT device returns.
Further, described querying condition includes the network address before NAT changes; Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Compared with prior art, the method of a kind of detection network information of address conversion provided by the invention, Apparatus and system, the probe requests thereby message carrying querying condition is sent by terminal unit, NAT device returns, to terminal unit, the detection response message carrying Query Result after searching NAT translation entries, the communication terminal making NAT device both sides will appreciate that NAT transitional information, enhances the transparency of NAT business.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method (being applied on NAT device) of a kind of detection network information of address conversion of the embodiment of the present invention.
Fig. 2 is the flow chart of the method (being applied on terminal unit) of a kind of detection network information of address conversion of the embodiment of the present invention.
Fig. 3 is the flow chart of the method (being applied to network system) of a kind of detection network information of address conversion of the embodiment of the present invention.
Fig. 4 is the interacting message schematic diagram in application example of the present invention (being initiated probe requests thereby by the terminal unit in Intranet).
Fig. 5 is the interacting message schematic diagram in application example of the present invention (being initiated probe requests thereby by the terminal unit in outer net).
Fig. 6 is the structural representation of the device (being applied on NAT device) of a kind of detection network information of address conversion of the embodiment of the present invention.
Fig. 7 is the structural representation of the device (being applied on terminal unit) of a kind of detection network information of address conversion of the embodiment of the present invention.
Fig. 8 is the structural representation of the system (being applied to network system) of a kind of detection network information of address conversion of the embodiment of the present invention.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with accompanying drawing, embodiments of the invention are described in detail. It should be noted that when not conflicting, the embodiment in the application and the feature in embodiment can combination in any mutually.
As it is shown in figure 1, embodiments provide a kind of method detecting NAT information, being applied in network address translation device, the method includes:
S10, receives probe requests thereby message, extracts the querying condition that described probe requests thereby message carries;
Wherein, described querying condition includes the network address before NAT changes; When described probe requests thereby message transmission direction for mail to outer net from Intranet time, described NAT change before the network address be internal address; When described probe requests thereby message transmission direction for mail to Intranet from outer net time, described NAT change before the network address be outer net address.
Wherein, according to the mapping mode of NAT device difference, the network address before NAT conversion can be any one of following address information: a) IP address information, b) IP address information and port information; Such as, when the transmission direction of described probe requests thereby message is for mailing to outer net from Intranet, an example of IP address information+port information is: IP (192.168.0.100)+port numbers (101):
Wherein, described querying condition also includes: timestamp information; The NAT translation entries that described timestamp information meets described timestamp information for indicating NAT device to search.
Wherein, described querying condition also includes: protocol type; The NAT translation entries that described protocol type meets described protocol type for indicating NAT device to search; Wherein, described protocol type includes: transmission control protocol TCP type, user datagram protocol UDP type or Internet control message agreement ICMP type.
Preferably, described probe requests thereby message is Internet control message agreement (InternetControlMessageProtocol, ICMP) message or port control protocols (PortControlProtocol, PCP) message.
S20, searches NAT translation entries according to the transmission direction of described querying condition and probe requests thereby message, if finding occurrence, then returns, to the sending node sending probe requests thereby message, the detection response message carrying Query Result.
Wherein, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion. When described probe requests thereby message transmission direction for mail to outer net from Intranet time, described NAT change before the network address be internal address, described NAT change after the network address be outer net address; When described probe requests thereby message transmission direction for mail to Intranet from outer net time, described NAT change before the network address be outer net address, described NAT change after the network address be internal address.
Wherein, described Query Result can also include other NAT transitional informations, such as, and the mapping network addresses mode (static mappings, dynamic mapping) etc. of NAT device.
Preferably, this NAT device be not as described in the destination node of probe requests thereby message, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node;Therefore, after adopting the method for the present embodiment, when have employed the NAT device cascade of more than two-stage or two-stage when NAT device, every one-level NAT device can receive probe requests thereby message, thus returning the NAT transitional information of this equipment.
Preferably, when querying condition also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives. Therefore, detection sequence number is adopted can to reflect each NAT device position relationship in cascade structure intuitively.
Wherein, when querying condition also includes timestamp information, then search the NAT translation entries meeting described timestamp information. Specifically, the time of the life span of NAT translation entries with described timestamp is mated, such as, if the establishment time of current NAT translation entries is before this timestamp, then current NAT translation entries is occurrence, otherwise also needs to search the daily record of NAT translation entries, and whether the time period seen between establishment time and the erasing time of the entry recorded in daily record includes this timestamp time, if including, then the NAT translation entries in daily record is occurrence.
Wherein, when querying condition also includes protocol type, then search the NAT translation entries meeting described protocol type.
Wherein, described probe requests thereby message and described detection response message are Internet control message agreement icmp packet; Or, described probe requests thereby message and described detection response message are port control protocols PCP message.
As in figure 2 it is shown, embodiments provide a kind of method detecting NAT information, being applied on terminal unit, the method includes:
S10, sends the probe requests thereby message carrying querying condition;
Wherein, described querying condition includes the network address before NAT changes;
Wherein, described querying condition also includes one or more of following information: detection sequence number, timestamp information and protocol type; Wherein, the positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device; The NAT translation entries that described timestamp information meets described timestamp information for indicating NAT device to search; The NAT translation entries that described protocol type meets described protocol type for indicating NAT device to search; Wherein, described protocol type includes: transmission control protocol TCP type, user datagram protocol UDP type or Internet control message agreement ICMP type.
S20, receives the detection response message carrying Query Result that NAT device returns.
Wherein, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Wherein, after terminal unit receives described detection response message, also preserve Query Result; Preferably, described Query Result is also shown to user by terminal unit.
As it is shown on figure 3, embodiments provide a kind of method detecting NAT information, being applied in the network system comprising terminal unit and network address translation device, the method includes:
S10, terminal unit sends the probe requests thereby message carrying querying condition;
Wherein, described querying condition includes the network address before NAT changes;
Wherein, described querying condition also includes one or more of following information: detection sequence number, timestamp information and protocol type;Wherein, the positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device; The NAT translation entries that described timestamp information meets described timestamp information for indicating NAT device to search; The NAT translation entries that described protocol type meets described protocol type for indicating NAT device to search; Wherein, described protocol type includes: transmission control protocol TCP type, user datagram protocol UDP type or Internet control message agreement ICMP type.
S20, NAT device receives probe requests thereby message, extracts the querying condition that described probe requests thereby message carries; NAT translation entries is searched in transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns the detection response message carrying Query Result to described terminal unit.
Wherein, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Preferably, this NAT device be not as described in the destination node of probe requests thereby message, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
Preferably, when querying condition also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives.
Wherein, when querying condition also includes timestamp information, then search the NAT translation entries meeting described timestamp information; When described querying condition also includes protocol type, then search the NAT translation entries meeting described protocol type.
S30, described terminal unit receives the detection response message carrying Query Result that NAT device returns.
Wherein, after described terminal unit receives detection response message, preserve described NAT information.
Wherein, described probe requests thereby message and described detection response message are Internet control message agreement icmp packet; Or, described probe requests thereby message and described detection response message are port control protocols PCP message.
Application example one
Provide below an application example: in this application example, network system comprises 1, the terminal unit 2 being arranged in public network of terminal unit being arranged in private network and two-stage NAT device. The private address assuming terminal unit 1 is: private IP address (192.168.0.100)+port numbers (101); After first order NAT device is changed, the IP address of described terminal unit 1 becomes: 10.11.0.101, and port numbers becomes: 7000; After second level NAT device is changed, the IP address of described terminal unit 1 becomes: 114.11.0.121, and port numbers becomes: 8000;
As shown in Figure 4, after the terminal unit 1 in above-mentioned private network initiates probe requests thereby, the method for the present invention includes following process:
S101, terminal unit 1 in private network sends the probe requests thereby message address of terminal unit 2 (destination address be) to the terminal unit 2 in public network, the querying condition wherein carried includes: IP address (192.168.0.100)+port numbers (101), and detection sequence number is 1;
S102, after first order NAT device receives probe requests thereby message, returning probe response message 1, the Query Result wherein carried includes: the network address before NAT conversion: the network address after IP address (192.168.0.100)+port numbers (101), NAT conversion: IP address (10.11.0.101)+port numbers (7000) and the detection sequence number received: 1;
S103, first order NAT device is not the destination node of described probe requests thereby message, the network address (IP address (192.168.0.100)+port numbers (101)) before the NAT conversion carried in described probe requests thereby message is replaced in the network address (IP address (10.11.0.101)+port numbers (7000)) after changing with NAT, carry in querying condition in the updated after detection sequence number in the described probe requests thereby message received is added 1, forward the probe requests thereby message after updating to described destination node;
S104, after second level NAT device receives probe requests thereby message, return probe response message 2, the Query Result wherein carried includes: the network address before NAT conversion: the network address after IP address (10.11.0.101)+port numbers (7000), NAT conversion: IP address (114.11.0.121)+port numbers (8000), the detection sequence number received: 2;
S105, second level NAT device is not the destination node of described probe requests thereby message, the network address (IP address (10.11.0.101)+port numbers (7000)) before the NAT conversion carried in described probe requests thereby message is replaced in the network address (IP address (114.11.0.121)+port numbers (8000)) after changing with NAT, carry in querying condition in the updated after detection sequence number in the described probe requests thereby message received is added 1, forward the probe requests thereby message after updating to destination node (terminal unit 2).
Wherein, after the terminal unit 2 in public network receives probe requests thereby message, it is possible to directly abandon this message. Wherein, the Query Result that the terminal unit 1 in private network receives at least includes the information shown in table 1 below:
Detection sequence number The network address before conversion The network address after conversion
1 192.168.0.100+101 10.11.0.101+7000
2 10.11.0.101+7000 114.11.0.121+8000
Table 1
Application example two
As shown in Figure 5, after the terminal unit 1 in above-mentioned private network have accessed the terminal unit 2 in public network, if described terminal unit 2 wants the terminal unit 1 positioning in described Intranet, then described terminal unit 2 initiates probe requests thereby, and the method for the present invention includes following process:
S101, terminal unit 2 in public network sends probe requests thereby message to address " IP address (114.11.0.121)+port numbers (8000) ", the querying condition wherein carried includes: IP address (114.11.0.121)+port numbers (8000), and detection sequence number is 1;
S102, after being received probe requests thereby message by outer net to the first order NAT device in Intranet direction, returning probe response message 1, the Query Result wherein carried includes: the network address before NAT conversion: the network address after IP address (114.11.0.121)+port numbers (8000), NAT conversion: IP address (10.11.0.101)+port numbers (7000) and the detection sequence number received: 1;
S103, first order NAT device is not the destination node of described probe requests thereby message, the network address (IP address (114.11.0.121)+port numbers (8000)) before the NAT conversion carried in described probe requests thereby message is replaced in the network address (IP address (10.11.0.101)+port numbers (7000)) after changing with NAT, carry in querying condition in the updated after detection sequence number in the described probe requests thereby message received is added 1, forward the probe requests thereby message after updating to described destination node; .
S104, after being received probe requests thereby message by outer net to the second level NAT device in Intranet direction, returning probe response message 2, the Query Result wherein carried includes: the network address before NAT conversion: the network address after IP address (10.11.0.101)+port numbers (7000), NAT conversion: IP address (192.168.0.100)+port numbers (101) and the detection sequence number received: 2;
S105, second level NAT device is not the destination node of described probe requests thereby message, the network address (IP address (10.11.0.101)+port numbers (7000)) before the NAT conversion carried in described probe requests thereby message is replaced in the network address (IP address (192.168.0.100)+port numbers (101)) after changing with NAT, carry in querying condition in the updated after detection sequence number in the described probe requests thereby message received is added 1, forward the probe requests thereby message after updating to described destination node.
Wherein, after the terminal unit 1 in private network receives probe requests thereby message, it is possible to directly abandon this message. Wherein, the Query Result that the terminal unit 2 in public network receives at least includes the information shown in table 2 below:
Detection sequence number Address information before conversion Address information after conversion
1 114.11.0.121+8000 10.11.0.101+7000
2 10.11.0.101+7000 192.168.0.100+101
Table 2
As shown in Figure 6, embodiments providing a kind of device detecting NAT information, be applied in network address translation device, this device includes:
Receiver module, is used for receiving probe requests thereby message, extracts the querying condition that described probe requests thereby message carries, starting-up response module;
Respond module, searches NAT translation entries for the transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns, to the sending node sending probe requests thereby message, the detection response message carrying Query Result.
Wherein, described querying condition includes the network address before NAT changes; Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Wherein, described respond module, destination node for probe requests thereby message as described in such as this NAT device not being, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
Wherein, described respond module, for when described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives.
Wherein, described respond module, if being used in the described probe requests thereby message received also carry timestamp information, then search the NAT translation entries meeting described timestamp information; If the described probe requests thereby message received also carries protocol type, then search the NAT translation entries meeting described protocol type. Wherein, described protocol type information includes: transmission control protocol TCP type, user datagram protocol UDP type or Internet control message agreement ICMP type.
As it is shown in fig. 7, embodiments provide a kind of device detecting NAT information, being applied on terminal unit, this device includes:
Sending module, for sending the probe requests thereby message carrying querying condition;
Receiver module, for receiving the detection response message carrying Query Result that NAT device returns.
Wherein, described querying condition includes the network address before NAT changes; Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Wherein, described querying condition also includes one or more of following information: detection sequence number, timestamp information; Wherein, the positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device;The NAT translation entries that described timestamp information meets described timestamp information for indicating NAT device to search; The NAT translation entries that described protocol type meets described protocol type for indicating NAT device to search; Wherein, described protocol type includes: transmission control protocol TCP type, user datagram protocol UDP type or Internet control message agreement ICMP type.
As shown in Figure 8, embodiments providing a kind of system detecting NAT information, be applied in the network system comprising terminal unit and network address translation device, the system of this detection NAT information includes:
Terminal sending module, sends the probe requests thereby message carrying querying condition for terminal unit;
NAT receiver module, receives probe requests thereby message for NAT device, extracts the querying condition that described probe requests thereby message carries; NAT translation entries is searched in transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns the detection response message carrying Query Result to described terminal unit.
Terminal receiver module, receives, for described terminal unit, the detection response message carrying Query Result that NAT device returns.
Wherein, described querying condition includes the network address before NAT changes; Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
Wherein, described querying condition also includes one or more of following information: detection sequence number, timestamp information; Wherein, the positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device; The NAT translation entries that described timestamp information meets described timestamp information for indicating NAT device to search; The NAT translation entries that described protocol type meets described protocol type for indicating NAT device to search; Wherein, described protocol type includes: transmission control protocol TCP type, user datagram protocol UDP type or Internet control message agreement ICMP type;
Wherein, described NAT receiver module, destination node for probe requests thereby message as described in such as this NAT device not being, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include: the network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
Wherein, described NAT receiver module, for when described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives.
Wherein, described NAT receiver module, if being used in the described probe requests thereby message received also carry timestamp information, then search the NAT translation entries meeting described timestamp information; If the described probe requests thereby message received also carries protocol type, then search the NAT translation entries meeting described protocol type.
The a kind of of above-described embodiment offer detects the method for NAT information, Apparatus and system, the probe requests thereby message carrying querying condition is sent by terminal unit, NAT device at different levels automatically return, to terminal unit, the detection response message carrying Query Result after searching NAT translation entries, the communication terminal making NAT device both sides will appreciate that NAT changes details, enhances the transparency of NAT business.
One of ordinary skill in the art will appreciate that all or part of step in said method can be carried out instruction related hardware by program and complete, described program can be stored in computer-readable recording medium, such as read only memory, disk or CD etc. Alternatively, all or part of step of above-described embodiment can also use one or more integrated circuit to realize, and correspondingly, each module/unit in above-described embodiment can adopt the form of hardware to realize, it would however also be possible to employ the form of software function module realizes. The present invention is not restricted to the combination of the hardware and software of any particular form.
It should be noted that; the present invention also can have other various embodiments; when without departing substantially from present invention spirit and essence thereof; those of ordinary skill in the art can make various corresponding change and deformation according to the present invention, but these change accordingly and deformation all should belong to the scope of the claims appended by the present invention.

Claims (13)

1. the method detecting NAT information, is applied in network address translation device, and the method includes:
A) receive the probe requests thereby message that sending node sends, extract the querying condition that described probe requests thereby message carries; Wherein, described sending node is terminal unit;
B) searching NAT translation entries according to the transmission direction of described querying condition and probe requests thereby message, if finding occurrence, then returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result;
Step B) in, this NAT device be not as described in the destination node of probe requests thereby message, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include:
The probe requests thereby message after updating is forwarded to described destination node;
Described NAT device adopts the NAT device cascade of more than two-stage or two-stage;
Step B) in, described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives;
The positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device.
2. the method for claim 1, it is characterised in that:
Described querying condition includes the network address before NAT conversion, step B) in, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
3. method as claimed in claim 2, it is characterised in that:
Step B) in, described to described destination node forward update after probe requests thereby message particularly as follows:
The network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
4. the method as according to any one of claim 2 to 3, it is characterised in that:
Described querying condition also includes: timestamp information;
Step B) in, when described querying condition includes timestamp information, when searching NAT translation entries, search the NAT translation entries meeting described timestamp information.
5. method as claimed any one in claims 1 to 3, it is characterised in that:
Described probe requests thereby message and described detection response message are Internet control message agreement icmp packet; Or, described probe requests thereby message and described detection response message are port control protocols PCP message.
6. the method detecting NAT information, is applied in the network system comprising terminal unit and network address translation device, and the method includes:
A) terminal unit sends the probe requests thereby message carrying querying condition;
B) NAT device receives probe requests thereby message, extracts the querying condition that described probe requests thereby message carries; NAT translation entries is searched in transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns the detection response message carrying Query Result to described terminal unit;
C) described terminal unit receives the detection response message carrying Query Result that NAT device returns;
Step B) in, this NAT device be not as described in the destination node of probe requests thereby message, after returning, to described terminal unit, the detection response message carrying Query Result, also include:
The probe requests thereby message after updating is forwarded to described destination node; Described NAT device adopts the NAT device cascade of more than two-stage or two-stage;
Step B) in, described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives;
The positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device.
7. method as claimed in claim 6, it is characterised in that:
Step A) in, described querying condition includes the network address before NAT conversion; Step B) in, described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
8. method as claimed in claim 7, it is characterised in that:
Step B) in, described to described destination node forward update after probe requests thereby message particularly as follows:
The network address before the NAT conversion carried in described probe requests thereby message is replaced in the network address after changing with NAT, forwards the probe requests thereby message after updating to described destination node.
9. detecting a device for NAT information, be applied in network address translation device, this device includes:
Receiver module, is used for receiving probe requests thereby message, extracts the querying condition that described probe requests thereby message carries, starting-up response module;
Respond module, searches NAT translation entries for the transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns, to the sending node sending probe requests thereby message, the detection response message carrying Query Result; Wherein, described sending node is terminal unit;
Described respond module, be additionally operable to this NAT device be not as described in the destination node of probe requests thereby message, after returning, to the sending node sending probe requests thereby message, the detection response message carrying Query Result, also include:
The probe requests thereby message after updating is forwarded to described destination node;
Described NAT device adopts the NAT device cascade of more than two-stage or two-stage;
Described respond module, it is additionally operable to when described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives;
The positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device.
10. device as claimed in claim 9, it is characterised in that:
Described querying condition includes the network address before NAT conversion;Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
11. device as claimed in claim 10, it is characterised in that:
Described forward the probe requests thereby message after updating to described destination node particularly as follows: the network address before the NAT conversion carried is replaced in described probe requests thereby message in the network address after changing with NAT, forward the probe requests thereby message after updating to described destination node.
12. detect a system for NAT information, being applied in the network system comprising terminal unit and network address translation device, the system of this detection NAT information includes:
Terminal sending module, sends the probe requests thereby message carrying querying condition for terminal unit;
NAT receiver module, receives probe requests thereby message for NAT device, extracts the querying condition that described probe requests thereby message carries; NAT translation entries is searched in transmission direction according to described querying condition and probe requests thereby message, if finding occurrence, then returns the detection response message carrying Query Result to described terminal unit;
Terminal receiver module, receives, for described terminal unit, the detection response message carrying Query Result that NAT device returns;
Described NAT receiver module, be additionally operable to this NAT device be not as described in the destination node of probe requests thereby message, after returning, to described terminal, the detection response message carrying Query Result, also include:
The probe requests thereby message after updating is forwarded to described destination node;
Described NAT device adopts the NAT device cascade of more than two-stage or two-stage;
Described NAT receiver module, it is additionally operable to when described probe requests thereby message also includes detection sequence number, the detection sequence number in probe requests thereby message after described renewal be equal to described in detection sequence number in the probe requests thereby message that receives add 1, described Query Result also include described in detection sequence number in the probe requests thereby message that receives;
The positional information that described detection sequence number is returned from NAT device cascade structure for indicating NAT device.
13. system as claimed in claim 12, it is characterised in that:
Described querying condition includes the network address before NAT conversion; Described Query Result includes: the network address before NAT conversion and the network address after NAT conversion.
CN201210111215.1A 2012-04-16 2012-04-16 A kind of method of detection network information of address conversion, Apparatus and system Active CN102685262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210111215.1A CN102685262B (en) 2012-04-16 2012-04-16 A kind of method of detection network information of address conversion, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210111215.1A CN102685262B (en) 2012-04-16 2012-04-16 A kind of method of detection network information of address conversion, Apparatus and system

Publications (2)

Publication Number Publication Date
CN102685262A CN102685262A (en) 2012-09-19
CN102685262B true CN102685262B (en) 2016-06-15

Family

ID=46816614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210111215.1A Active CN102685262B (en) 2012-04-16 2012-04-16 A kind of method of detection network information of address conversion, Apparatus and system

Country Status (1)

Country Link
CN (1) CN102685262B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873600B (en) * 2012-12-10 2018-10-26 中兴通讯股份有限公司 A kind of network address conversion penetrating method and apparatus
CN103535015B (en) * 2013-05-24 2016-11-23 华为技术有限公司 The management method of public network address resource, port control protocols server and client
CN103347099B (en) * 2013-05-29 2016-08-10 华为技术有限公司 A kind of method of data interaction, Apparatus and system
US9432330B2 (en) 2013-05-29 2016-08-30 Huawei Technologies Co., Ltd. Data interaction method, apparatus, and system
CN106027689B (en) * 2016-04-29 2020-04-10 上海斐讯数据通信技术有限公司 Communication method and communication device
CN108650337B (en) * 2018-04-17 2021-10-08 腾讯科技(深圳)有限公司 Server detection method, system and storage medium
CN116455863A (en) * 2022-01-05 2023-07-18 西安西电捷通无线网络通信股份有限公司 NAT detection method, device and storage medium between network nodes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252592A (en) * 2008-04-14 2008-08-27 信息产业部电信传输研究所 Method and system for tracing network source of IP network
EP2106079A1 (en) * 2007-02-16 2009-09-30 Huawei Technologies Co., Ltd. System, device and method for auto-configuring application terminals in home network
CN102158569A (en) * 2011-06-02 2011-08-17 杭州华三通信技术有限公司 Method and device for data transmission based on address conversion
CN102238039A (en) * 2011-07-30 2011-11-09 华为技术有限公司 NAT (Network Address Translation) event reporting and IP (Internet Protocol) address tracing method and network device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2106079A1 (en) * 2007-02-16 2009-09-30 Huawei Technologies Co., Ltd. System, device and method for auto-configuring application terminals in home network
CN101252592A (en) * 2008-04-14 2008-08-27 信息产业部电信传输研究所 Method and system for tracing network source of IP network
CN102158569A (en) * 2011-06-02 2011-08-17 杭州华三通信技术有限公司 Method and device for data transmission based on address conversion
CN102238039A (en) * 2011-07-30 2011-11-09 华为技术有限公司 NAT (Network Address Translation) event reporting and IP (Internet Protocol) address tracing method and network device

Also Published As

Publication number Publication date
CN102685262A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN102685262B (en) A kind of method of detection network information of address conversion, Apparatus and system
US9787503B2 (en) Utilizing proxy internet protocol addressing in a gateway for communicating with multiple service provider networks
EP2769307B1 (en) Answer augmentation system for authoritative dns servers
JP5817299B2 (en) Address translation apparatus, communication system, and address translation method
US8156249B2 (en) Using server type to obtain network address
US8767737B2 (en) Data center network system and packet forwarding method thereof
EP3171556B1 (en) Method and apparatus for setting network rule entry
TWI516070B (en) Enhancing ds-lite with private ipv4 reachability
US10079917B2 (en) Method and apparatus for synthesized address detection
US8976795B2 (en) Gateway advertisement in a wireless mesh
US9307555B2 (en) Method and system for mobile terminal to access the network through cell phone
CN104168140B (en) VTEP abnormal conditions processing method and processing devices
US8612557B2 (en) Method for establishing connection between user-network of other technology and domain name system proxy server for controlling the same
CN112235408A (en) Network system, reverse proxy method and reverse proxy server
US20120243521A1 (en) Gateway device
CN101582925A (en) Network address translation method and system
CN102970387A (en) Domain name resolution method, device and system
CN111049947B (en) Message forwarding method and device, electronic equipment and storage medium
CN109413224B (en) Message forwarding method and device
US20050030956A1 (en) Method, apparatus and system for accessing multiple nodes on a private network
CN102137172A (en) Access method and access device for DNS (Domain Name Server)
US20080167050A1 (en) Method and system for managing user preferences for one or more software applications runing on a mobile computing device
TW201114221A (en) Method and system of smart detection and recovery
CN103516820A (en) Port forwarding method and apparatus based on MAC address
EP2647179B1 (en) Service access apparatus, method, computer program and computer program product for selective initiation of communication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant