Realize the method for signaling passing through network address switching device in the mobile IP network
Technical field
The present invention relates to field of network communication, relate in particular to the method that realizes the signaling passing through network address switching device in a kind of mobile IP network.
Background technology
Mobile IP is a kind of solution that locomotive function is provided to the user on Internet.Mobile IP can surmount the restriction of geographic range, has characteristics such as extensibility, reliability and fail safe.Mobile IP has expanded moving and roaming capacity of user, can make node still keep ongoing communication in the process of switching.
In mobile IP, MN (mobile node) can be connected on any link with permanent IP address.Mobile IP is providing the large-scale ambulant while to terminal, can also guarantee the IP address allocability and the accessibility of terminal.Mobile IP system mainly comprises MN, FA (Foreign Agent), HA (home agent) and CN (communication node).
In mobile IP, the transmittance process of the packet between MN and the CN is described according to RFC3344 and is realized, its schematic diagram as shown in Figure 1.Specifically describe as follows:
When MN moved to field network, the packet that CN sends to the MN on the field network will be routed to earlier on the HA of MN, then, was delivered to through the tunnel on the FA of MN, and is last, passes to MN by FA.MN sends to the packet of CN with being routed to earlier on the FA of MN, is directly passed to CN by this FA.
If for the safety that guarantees network or support privately owned address, usually place NAT/NAPT (network address translation/network address port conversion) equipment in the exit position of FA/MN, as shown in Figure 2, NAT/NAPT equipment can carry out the conversion of address, port.In this case, the transmittance process of above-mentioned packet can't normally move.
In situation shown in Figure 2, FA and MN are positioned at the NAT/NAPT equipment, are tunnel style between HA and FA, the MN (support co-located care-of address), and this tunnel style comprises IP in IP mode, GRE mode and minimum packaged type.Because these several tunnels generally can't passing through NAT/NAPT equipment.So CN sends to the packet of MN, can't normally be routed to MN.
At situation shown in Figure 2, RFC3519 has formulated the method for a kind of passing through NAT/NAPT equipment, and this method adopts UDP (User Datagram Protoco (UDP)) to realize passing through.Concrete processing procedure is:
When mobile node after succeeding in registration on the FA, by with HA timed sending KeepAlive (keep-alive) message, on NAT/NAPT equipment, set up the mapping table of an IP address, port.HA mails to the packet of MN by after the UDP tunnel encapsulation, sends to the end points (FA/MN) in tunnel by this port.
The shortcoming of the method for above-mentioned passing through NAT/NAPT equipment is:
This method has just solved the crossing problem of HA to the NAT/NAPT equipment of the packet of MN/FA.Can't solve the crossing problem of separating signaling protocols such as register command that comprises to MN/FA of initiating to by HA.
Summary of the invention
In view of above-mentioned existing in prior technology problem, the purpose of this invention is to provide the method that realizes the signaling passing through network address switching device in a kind of mobile IP network, thereby can solve the problem of the signaling passing through NAT/NAPT equipment between HA and the FA/MN.
The objective of the invention is to be achieved through the following technical solutions:
Realize the method for signaling passing through network address switching device in a kind of mobile IP network, comprising:
A, the User Datagram Protoco (UDP) UDP tunnel of home agent in the mobile IP network and the data between Foreign Agent/mobile node is strengthened;
B, utilize the UDP tunnel after the described enhancing, the signaling passing through network address switching device is transmitted between home agent and Foreign Agent/mobile node.
Described steps A specifically comprises:
A sign Foreign Agent/mobile node is set in the type the type field in UDP tunneled requests message whether supports the sign of the signalling path in UDP tunnel, the sign whether a sign home agent supports the signalling path in UDP tunnel is set in the type field in the UDP tunnel response message.
Described steps A specifically comprises:
When the value sign Foreign Agent/mobile node of the sign that is provided with in the type field in described UDP tunneled requests message is not supported the signalling path in UDP tunnel, ignore the value of the sign that is provided with in the type field in described UDP tunnel response message.
Described steps A specifically comprises:
The data type of a sign signaling protocol passage is set in the next head NextHead field in the channel data message header of the mobile IP system in described UDP tunnel, the field of the particular type of a sign signaling protocol is set in this channel data message header.
Described step B specifically comprises:
B1, according to the packaged type of the data in former UDP tunnel, in the tunnel packet in the UDP tunnel of signaling protocol data encapsulation after described enhancing that needs are transmitted;
B2, with described tunnel packet at home agent be hidden between the Foreign Agent/mobile node of network address translation apparatus/network address port conversion equipment back and transmit.
Described step B2 also comprises:
After having placed network address translation apparatus/network address port conversion equipment in the exit position of home agent, IP address of configuration on this equipment, and this IP address is mapped on the privately owned address of home agent statically, Foreign Agent/mobile node communicates by this IP address and home agent.
Described step B2 specifically comprises:
Foreign Agent/mobile node is determined the signaling protocol that is that transmits in the tunnel packet according to the content of Next Head field described in the tunnel packet that receives, determine the particular type of signaling protocol according to the value of the field of the particular type of described sign signaling protocol, from this tunnel packet, take out signaling protocol, and pass to corresponding upper-layer protocol.
Described IP network comprises IPv4 network and IPv6 network.
As seen from the above technical solution provided by the invention, the present invention is by expanding UDP tunneled requests, response message and MIP tunneling data tunneling in the login request message in the mobile IP network, thereby can solve the problem of the signaling passing through NAT/NAPT equipment between HA and the FA/MN by the signaling between transmission HA of the UDP tunnel after the expansion and the FA/MN.
Description of drawings
Fig. 1 is the transmittance process schematic diagram of the packet between MN and the CN in mobile IP;
Fig. 2 is a schematic diagram of placing NAT/NAPT equipment in the exit position of HA and FA, MN;
Fig. 3 is the concrete process chart of the method for the invention;
Fig. 4 is for being encapsulated into signaling data in the schematic diagram in the UDP tunnel;
Fig. 5 is the form schematic diagram that has increased the message of the MIP path message head after being provided with of the present invention;
Fig. 6 is the form schematic diagram that has increased the UDP tunneled requests message after the U field;
Fig. 7 is the form schematic diagram that has increased the UDP tunnel corresponding message after the U field;
Fig. 8 has placed the schematic diagram of NAT/NAPT equipment in the exit position of HA, FA/MN.
Embodiment
The invention provides the method that realizes the signaling passing through network address switching device in a kind of mobile IP network, core of the present invention is: the sign that sign FA/MN, HA support the signalling path in UDP tunnel is set in UDP tunneled requests, the response message in the login request message in mobile IP network, the field of sign signaling protocol type is set in MIP path message head, and the data type of sign signaling protocol is set in Next Head (next head) field.
Describe the method for the invention in detail below in conjunction with accompanying drawing, the concrete handling process of this method comprises the steps: as shown in Figure 3
Step 3-1, the signaling protocol data encapsulation in the UDP tunnel.
The present invention at first will need signaling protocol data encapsulation that passing through NAT/NAPT equipment transmits between HA and FA/MN to being used in the tunnel packet in UDP tunnel of Data transmission bag between original HA and the FA/MN.Can be on specific implementation according to the packaged type of the data in former UDP tunnel, concrete description is referring to RFC3519.Above-mentioned the schematic diagram of signaling protocol data encapsulation in the UDP tunnel as shown in Figure 4.
Step 3-2, the corresponding setting of increase in the UDP tunnel at signaling protocol.
Realizing with the signaling protocol data encapsulation that behind the UDP tunnel the present invention increases corresponding setting at signaling protocol at first at the situation of placing NAT/NAPT equipment in the exit position of FA/MN in the UDP tunnel.Concrete processing procedure is as follows:
The data type of sign signaling protocol is set in the Next Head field in the MIP path message head in the packet header, tunnel in former UDP tunnel.The original data type of Next Head field is: 4, represent the IP head; 47, represent GRE (general routing encapsulation) head; 55, represent minimum encapsulation header.The present invention increases a data type in this field: concrete numerical value is to be determined, and this numerical value represents that data carried by data is the signaling protocol data in the tunnel.
The present invention also increases a D field in above-mentioned MIP path message head, be used for identifying the particular type of signaling protocol.On specific implementation, can represent that signaling protocol type in the passage is for separating log-in protocol with 1.The specific descriptions of this agreement are seen RFC3543.
Increased the MIP path message head after above-mentioned the setting message form as shown in Figure 5.
Increase accordingly setting in the UDP tunneled requests of the present invention in also need the register requirement in mobile IP network, the response message at signaling protocol.Concrete processing procedure is as follows:
Increase field a: U in the type field in UDP tunneled requests message, be used for identifying the signalling path whether FA/MN supports the UDP tunnel.Representing that in the time can being 1 with the value when this field on the specific implementation FA/MN supports signalling path, is that 0 expression FA/MN does not support signalling path.
The form that has increased the UDP tunneled requests message after the U field as shown in Figure 6.
Increase field a: U in the type field in the UDP tunnel response message, be used for identifying the signalling path whether HA supports the UDP tunnel.Can be with being 1 to express support on specific implementation.0 expression is not supported.If the U field that increases in the UDP tunneled requests message is 0, but this field is 1, then ignores this field.
The form that has increased the UDP tunnel response message after the U field as shown in Figure 7.
Whether the outlet of step 3-3, HA is provided with NAT/NAPT equipment.
At the situation of placing NAT/NAPT equipment in the exit position of FA/MN, in the UDP tunnel, increased above-mentioned corresponding setting after, the present invention just judges in the exit position of HA whether place NAT/NAPT equipment, if, execution in step 3-4; Otherwise, execution in step 3-5.The situation of all having placed NAT/NAPT equipment in the exit position of HA, FA/MN as shown in Figure 8.
Step 3-4, in NAT/NAPT the IP address of privately owned address of a static mappings HA of configuration.
After NAT/NAPT equipment had been placed in the exit position of HA, the address of HA was generally privately owned address, in order to make MN/FA outside NAT/NAPT equipment, can visit HA normally, and the reverse address transition of the present invention's configuring static on NAT/NAPT equipment.Promptly in legal IP address of NAT/NAPT equipment disposition, this IP address is mapped to the privately owned address of HA statically.By this legal IP address, MN/FA just can communicate by letter normally with the HA after being hidden in NAT/NAPT equipment.
Step 3-5, utilize above-mentioned UDP tunnel, between HA and FA/MN, transmit signaling data.
Increased above-mentioned setting in UDP tunnel and NAT/NAPT equipment, and with after the signaling protocol data encapsulation is in the tunnel packet in UDP tunnel, just can utilize above-mentioned UDP tunnel, passing through NAT between HA and FA/MN/NAPT equipment transmits the signaling protocol data.Concrete processing procedure is described below:
When HA need be initiated to the signaling protocol of FA/MN, if misdirection information is not then built up in the UDP tunnel between FA/MN and the HA; Otherwise,, then directly packaged tunnel packet is mail to FA/MN by the UDP tunnel if do not place NAT/NAPT equipment in the exit position of HA; Otherwise, utilize the legal IP address of above-mentioned configuration, by the UDP tunnel packaged tunnel packet is mail to FA/MN.
After FA/MN receives the UDP tunnel packet that HA passes over, if the value of field Next Head is the value of protocol channel correspondence in the tunneling data message header of the MIP of this tunnel packet, illustrate that then this UDP tunnel packet is the signaling protocol bag, the value of the D field that is provided with in the tunneling data message header according to described MIP is determined concrete protocol type.Then, the tunnel head is removed, given upper-layer protocol inner IP bag and handle; If Next Head field contents is not to be designated protocol channel, illustrate that then this UDP tunnel packet is a packet, so, handle according to normal processing data packets mode.After FA/MN disposes,, return the response tunnel packet to HA by the UDP tunnel also according to above-mentioned packaged type.
The method of the invention is applicable to IPv4 network and IPv6 network.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.