CN100438502C - L2TP message processing method - Google Patents

L2TP message processing method Download PDF

Info

Publication number
CN100438502C
CN100438502C CNB2005100807238A CN200510080723A CN100438502C CN 100438502 C CN100438502 C CN 100438502C CN B2005100807238 A CNB2005100807238 A CN B2005100807238A CN 200510080723 A CN200510080723 A CN 200510080723A CN 100438502 C CN100438502 C CN 100438502C
Authority
CN
China
Prior art keywords
l2tp
message
list item
route
routing table
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
CNB2005100807238A
Other languages
Chinese (zh)
Other versions
CN1863139A (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005100807238A priority Critical patent/CN100438502C/en
Publication of CN1863139A publication Critical patent/CN1863139A/en
Application granted granted Critical
Publication of CN100438502C publication Critical patent/CN100438502C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention relates to an L2TP message processing method in the technical field of network communication. When the method receives an L2TP with the request of tunnel message establishment, the method firstly establishes a relative forwarding table and adds a mark in a routing table. When a subsequent message needing to be unpacked is received, after the routing table is searched, an outer-layer control head is directly removed. When the L2TP message is processed and sent, the forwarding table is directly searched, and message control information is filled out once for carrying out forwarding processing. The present invention realizes that when the subsequent L2TP message is processed, a forwarding process is carried out for avoiding problems, such as low speed for processing the message, etc., caused by searching the table and forwarding by multiple times.

Description

A kind of L2TP message processing method
Technical field
The present invention relates to network communications technology field, relate in particular to a kind of L2TP message processing method.
Background technology
VPN (Virtual Private Network, Virtual Private Network) is a kind of new technology that develops rapidly along with broad application of Internet in recent years, makes up private dedicated network on the common network in order to be implemented in, to satisfy the communication needs of private user.
Be accompanied by the continuous expansion of numerous enterprises and company, the employee goes on business increased, institution functioning abroad and customers distribute and disperse day by day, the affiliate is also increasing, like this, increasing modern enterprise presses for and utilizes the public internet resource to carry out enterprise or in-company intercommunication, and carries out intercommunication with enterprise or company outside.Thereby be convenient to carry out sales promotion, sale, after-sale service, training, cooperation and other consulting activity.Wide market has been established in the extensive use that described various demand is VPN.
L2TP (Layer 2 Tunneling Protocol, Layer 2 Tunneling Protocol) be to draft by IETF (the Internet engineering duty group), companies such as Microsoft participate in, combine PPTP (Point-to-Point TunnelingProtocol, Point to Point Tunnel Protocol) and L2F (Layer 2Forwarding, Layer Two Forwarding Protocol) advantage of two agreements is by numerous companies are accepted.And become standard RFC (RadioFrequency Channel, radio frequency channel).L2TP both can be used for realizing dial vpn business (VPDN access), also can be used for realizing the special line vpn service.
L2TP has realized transmitting private data on common network, promptly set up the tunnel on common network, transmits private data in the tunnel.Be embodied in to send in the process that receives message and need to walk forwarding process twice.
Specifically comprise when receiving message: forwarding process is removed the public network data control information for the first time, and forwarding process is handled the private data message for the second time.Specifically comprise when sending message: add the control information of private data message for the first time, add the public network data control information for the second time.Because transmitting-receiving adopts twice forwarding process to cause bigger burden to equipment, when message is handled, be easy to generate and do not wish the accident that occurs to wait problem slowly as response speed.
Therefore, need provide a kind of method can reduce the number of times that passes on that message sends, avoid repeatedly transmitting and the reaction speed brought waits problem slowly.
Summary of the invention
In view of above-mentioned existing in prior technology problem, the purpose of this invention is to provide a kind of L2TP message processing method, when receiving that L2TP requires to set up channel message, report for the first time and set up relevant transmitting and interpolation sign in routing table, after receiving the follow-up message that needs decapsulation, searching routing table, directly remove outer control head, when processing needs to send the L2TP message, directly search and transmit, once fill in the message control information and transmit processing.
The objective of the invention is to be achieved through the following technical solutions:
The invention provides a kind of Layer 2 Tunneling Protocol L2TP message processing method, comprise the steps:
A, receive the L2TP message of this machine of sending to, search routing table, if determine no decapsulation sign in this L2TP message, then in routing table, add decapsulation and add the encapsulation sign, and preserve the list item transmitted corresponding with the L2TP message according to loaded information in the described L2TP message;
B, follow-up receive L2TP message to be transmitted after, according to the list item of transmitting of described preservation, fill in and L2TP message control information corresponding described to be transmitted, and send described message.
Determining after searching routing table in the described steps A has the decapsulation sign in this L2TP message, then removes L2TP message control head.
Described step B comprises:
In system database, search the list item transmitted corresponding with L2TP message described to be transmitted.
The described list item of transmitting comprises that L2TP requires to set up the forwarding information of tunnel end, next jumping, outgoing interface address.
Described message control information specifically comprises: heading information, next jumping and outgoing interface.
The described list item of transmitting comprises a renewal process when route changes, it comprises the steps:
Determine the list item of route variable effect L2TP in transmitting;
List item during renewal L2TP transmits.
The step of the list item during described definite route variable effect L2TP transmits specifically comprises
Search the list item that L2TP transmits, with route in L2TP route in transmitting and the routing table relatively,, illustrate that then route variable effect L2TP transmits if the route that changes in the routing table is contained in the L2TP route.
The step of the list item during described definite route variable effect L2TP transmits also comprises:
Determine that the message processor enabling the timer of tabling look-up and searching and transmit;
Change the timer end mark of tabling look-up, reactivate the timer of tabling look-up according to the end mark after the described change and begin to search and transmit, and the list item of definite route variable effect.
The step of the list item during described definite route variable effect L2TP transmits also comprises:
Determine that the message processor do not transmit searching;
The message processor starts the timer of tabling look-up and begins to search, and the list item of definite route variable effect.
As seen from the above technical solution provided by the invention, the present invention sets up relevant transmitting when receiving that L2TP requires to set up channel message, when handling transmission L2TP message, directly searches and transmits, and once fills in the message control information and transmits processing.The reaction speed of having avoided repeatedly transmitting and having brought waits problem slowly.
Description of drawings
Fig. 1 needs the L2TP message flow chart of decapsulation for the processing of the method for the invention.
Fig. 2 need add the L2TP message flow chart of encapsulation for the processing of the method for the invention.
Fig. 3 upgrades for the method for the invention and transmits flow chart.
Embodiment
Core concept of the present invention provides a kind of L2TP message processing method, when setting up L2TP Tunnel, search routing table with destination address or source address in the outer IP head of L2TP, the routing table information that modification is hit, multiplexing therein original flag bit or use reserved place sign-the indicate message that to hit this route need be done special processing, when receiving subsequent packet, search routing table with appropriate address in the IP message, if hitting the message description of this route needs decapsulation or adds encapsulation, then carry out decapsulation or add encapsulation handling, set up relevant transmitting according to channel message information simultaneously, make when handling transmission L2TP message, directly search and transmit, once fill in the message control information and transmit processing.
With reference to Figure 1 shows that the operational flowchart that the present invention handles needs the L2TP of decapsulation message, this processing procedure comprises the steps:
Step 1: the message processor receives message;
The message processor receives all messages from each port;
Step 2: whether the message of judging above-mentioned reception is the message of issuing this machine;
According to the destination address of the above-mentioned message that receives judge this message whether be to issue this machine message;
Step 3: judge whether it is the L2TP message;
If the above-mentioned message that receives is the message that sends to this machine, then the message processor according to the type of message of message control head as: the port numbers of protocol number, UDP (User Datagram Protocol, User Data Protocol) message etc. judges whether above-mentioned message is L2TP Tunnel control message;
Step 4: search routing table, judge whether the above-mentioned message that receives needs decapsulation;
Need message corresponding field in its routing table of decapsulation to have the decapsulation sign, judge whether message needs decapsulation, watch promptly whether the decapsulation sign is arranged in this routing table;
Step 5: if above-mentioned message does not have the decapsulation sign, then revise routing table, add decapsulation and add the encapsulation sign;
When the message of the above-mentioned no decapsulation sign that is based on L2TP that receives, in system database, search the list item that whether has the routing table that conforms to this message format with the destination address in the outer IP head of L2TP, promptly search routing table with destination address, if find satisfactory routing table, then revise the flag bit of this routing table, multiplexing therein original flag bit or use reserved place sign add the decapsulation sign; In system database, search the list item that whether has the routing table that conforms to this message format with the source address in the outer IP head of L2TP, promptly search routing table with source address, if find satisfactory routing table, then revise the flag bit of this routing table, multiplexing therein original flag bit or use reserved place sign, add the encapsulation sign, purpose is, when receiving the message of follow-up same route, can directly judge the needs decapsulation or add encapsulation according to this sign, then carry out decapsulation or add encapsulation handling;
Step 6: set up the list item that L2TP transmits according to above-mentioned L2TP message information;
Set up the list item that corresponding L2TP transmits according to the above-mentioned message that receives, preserve corresponding tunnel information, described tunnel information can be stored in the transmitting of foundation, each list item in transmitting is writing down the tunnel information of a L2TP Tunnel;
Step 7: remove the control head in the L2TP message;
For the above-mentioned message decapsulation that needs decapsulation, promptly remove the outer field control head in the L2TP message;
Need decapsulation if judge the message that receives in the above-mentioned steps 4, in the promptly corresponding routing table decapsulation sign is arranged, then directly enter step 7 and carry out the decapsulation operation;
Step 8: the message after the above-mentioned decapsulation is handled according to common message handling process, and its concrete processing mode the present invention does not limit;
Step 9: if judge the message-handling processor system of non-the machine of message that receives in the step 2, then carry out the relevant subsequent operation according to type of message, concrete processing mode the present invention does not limit;
Step 10: if judge the non-L2TP of the message message-handling processor system that receives in the above-mentioned steps 3, then carry out the relevant subsequent operation according to type of message, concrete processing mode the present invention does not limit;
With reference to Figure 2 shows that the present invention handles the operational flowchart of the L2TP message that need add encapsulation, this processing procedure comprises the steps:
Step 21: the message processor receives message;
The message processor receives all messages from each port;
Step 22: search routing table, judge whether the message of above-mentioned reception is the message that need add encapsulation;
The message processor judges according to message format whether the message receive is the L2TP message that needs add encapsulation, and whether promptly watch in the routing table corresponding field has and add the encapsulation sign;
Step 23: search the relevant list item of transmitting according to above-mentioned L2TP message;
If the above-mentioned message that receives is the L2TP message that need add encapsulation, then the message processor judges whether to hit according to message information and transmits, and promptly searches whether to have the list item of transmitting that conforms to this message format in system database; Promptly, receive needs when the network equipment and add the message of encapsulation based on L2TP, search routing table with destination address, all list items of transmitting that conform to the message format of handling of storage in the system database, in database, exist and the corresponding list item of transmitting of L2TP message format that receives, directly calling this transmits and adds encapsulation operation, this list item of transmitting comprises that requirement sets up the forwarding information of tunnel end, next jumping, outgoing interface address etc. are transmitted this and are kept in the database;
Step 24: fill in message L2TP control information;
When handling this kind message, directly search the list item of transmitting, once fill in the message control information according to the list item of transmitting; This L2TP message control information comprises: heading information, next jumping and outgoing interface etc.;
Step 25: send message, promptly transmit described message, finish L2TP message processing procedure;
Step 26: if the non-need of message that the message processor receives add the L2TP message of encapsulation, then carry out the relevant subsequent operation according to type of message, concrete processing mode the present invention does not limit.
Described transmitting after setting up, the route in network changes, and this variable effect during contents in table, then needs described transmitting upgraded processing, with the accuracy that guarantees that message is transmitted in transmitting.
With reference to shown in Figure 3, when changing, upgrade the processing procedure of transmitting for route, specifically may further comprise the steps:
Step 30: route changes;
Store a routing table in the system database, show that when route changes corresponding route changes in the routing table;
Step 31: judge whether the route variation influences the list item that L2TP transmits, if influence, then execution in step 32, otherwise, end operation;
With route in L2TP route in transmitting and the routing table relatively, if the route that changes in the routing table is contained in the L2TP route, illustrate that then route variable effect L2TP transmits; Opposite if the route that changes in the routing table is not contained in the L2TP route, then this route changes does not influence L2TP and transmits, then end operation;
Step 32: judge whether to have the timer of tabling look-up, promptly whether searching and transmitting;
The message processor is searched when transmitting need start the timer of tabling look-up accordingly, in order to accelerate to search and in search procedure, do not take for a long time resource, set each timer and search a part of transmitting, each search procedure is set an end mark, when the timer search procedure runs into end mark, then finish to search, after searching end, a timer do not find the result, then enable another timer again and continue to search, up to running into end mark;
Step 33:, then change the timer end mark of tabling look-up if the message processor is being searched and transmitted;
Because the variation of route may occur in the place that the message processor had been searched, running into predefined end mark as if the timer of tabling look-up stops to search, then can't find accordingly and transmit, therefore will change end mark, and make this message processor reactivate this timer of tabling look-up;
Step 34:, then start the timer of tabling look-up and begin to search if the message processor is not transmitted searching;
Step 35: upgrade L2TP and transmit, operating process finishes;
When route changed, the corresponding content of transmitting also will be upgraded.
To the processing of step 35, can guarantee the accuracy transmitted by step 31, thereby guarantee that effectively the L2TP message transmits the accuracy of handling.
In sum, the present invention walks one time forwarding process when having realized processing L2TP message, has avoided repeatedly transmitting the reaction speed that causes and has waited problem slowly.
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.

Claims (9)

1, a kind of Layer 2 Tunneling Protocol L2TP message processing method is characterized in that, comprises the steps:
A, receive the L2TP message of this machine of sending to, search routing table, if determine no decapsulation sign in this L2TP message, then in routing table, add decapsulation and add the encapsulation sign, and preserve the list item transmitted corresponding with the L2TP message according to loaded information in the described L2TP message;
B, follow-up receive L2TP message to be transmitted after, according to the list item of transmitting of described preservation, fill in and L2TP message control information corresponding described to be transmitted, and send described message.
2, a kind of L2TP message processing method as claimed in claim 1 is characterized in that, determining after searching routing table in the described steps A has the decapsulation sign in this L2TP message, then removes L2TP message control head.
3, a kind of L2TP message processing method as claimed in claim 1 is characterized in that described step B comprises:
In system database, search the list item transmitted corresponding with L2TP message described to be transmitted.
4, a kind of L2TP message processing method as claimed in claim 1 is characterized in that, the described list item of transmitting comprises that L2TP requires to set up the forwarding information of tunnel end, next jumping, outgoing interface address.
5, a kind of L2TP message processing method as claimed in claim 1 is characterized in that, described message control information specifically comprises: heading information, next jumping and outgoing interface.
6, a kind of L2TP message processing method as claimed in claim 1 is characterized in that, the described list item of transmitting comprises a renewal process when route changes, and it comprises the steps:
Determine the list item of route variable effect L2TP in transmitting;
List item during renewal L2TP transmits.
7, a kind of L2TP message processing method as claimed in claim 6 is characterized in that, the step of the list item during described definite route variable effect L2TP transmits specifically comprises:
Search the list item that L2TP transmits, with route in L2TP route in transmitting and the routing table relatively,, illustrate that then route variable effect L2TP transmits if the route that changes in the routing table is contained in the L2TP route.
As claim 6 or 7 described a kind of L2TP message processing methods, it is characterized in that 8, the step of the list item during described definite route variable effect L2TP transmits also comprises:
Determine that the message processor enabling the timer of tabling look-up and searching and transmit;
Change the timer end mark of tabling look-up, reactivate the timer of tabling look-up according to the end mark after the described change and begin to search and transmit, and the list item of definite route variable effect.
As claim 6 or 7 described a kind of L2TP message processing methods, it is characterized in that 9, the step of the list item during described definite route variable effect L2TP transmits also comprises:
Determine that the message processor do not transmit searching;
The message processor starts the timer of tabling look-up and begins to search, and the list item of definite route variable effect.
CNB2005100807238A 2005-07-05 2005-07-05 L2TP message processing method Active CN100438502C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100807238A CN100438502C (en) 2005-07-05 2005-07-05 L2TP message processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100807238A CN100438502C (en) 2005-07-05 2005-07-05 L2TP message processing method

Publications (2)

Publication Number Publication Date
CN1863139A CN1863139A (en) 2006-11-15
CN100438502C true CN100438502C (en) 2008-11-26

Family

ID=37390469

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100807238A Active CN100438502C (en) 2005-07-05 2005-07-05 L2TP message processing method

Country Status (1)

Country Link
CN (1) CN100438502C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267395B (en) * 2008-03-13 2012-04-25 华为技术有限公司 Data transmission method and device
CN101304387B (en) * 2008-06-18 2010-09-01 中兴通讯股份有限公司 Method for implementing tunnel conversion of bi-layer tunnel protocol
CN103036761B (en) * 2012-12-21 2015-08-05 浙江宇视科技有限公司 A kind of tunnel server and client terminal device
CN103647832B (en) * 2013-12-13 2017-06-09 华为技术有限公司 Information synchronization method and the network equipment
CN108092942B (en) * 2016-11-21 2020-04-10 深圳市中兴微电子技术有限公司 Message processing method and device
CN109039916B (en) * 2018-09-13 2021-08-06 迈普通信技术股份有限公司 Message forwarding method, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6614809B1 (en) * 2000-02-29 2003-09-02 3Com Corporation Method and apparatus for tunneling across multiple network of different types
CN1492650A (en) * 2002-10-24 2004-04-28 华为技术有限公司 Method for network server to support multiple examples based on two layre tunnel protocol
US6765881B1 (en) * 2000-12-06 2004-07-20 Covad Communications Group, Inc. Virtual L2TP/VPN tunnel network and spanning tree-based method for discovery of L2TP/VPN tunnels and other layer-2 services

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6614809B1 (en) * 2000-02-29 2003-09-02 3Com Corporation Method and apparatus for tunneling across multiple network of different types
US6765881B1 (en) * 2000-12-06 2004-07-20 Covad Communications Group, Inc. Virtual L2TP/VPN tunnel network and spanning tree-based method for discovery of L2TP/VPN tunnels and other layer-2 services
CN1492650A (en) * 2002-10-24 2004-04-28 华为技术有限公司 Method for network server to support multiple examples based on two layre tunnel protocol

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
L2TP虚拟专用网. 佘堃,谭兴烈,周明天.电子科技大学学报,第31卷第4期. 2002
L2TP虚拟专用网. 佘堃,谭兴烈,周明天.电子科技大学学报,第31卷第4期. 2002 *

Also Published As

Publication number Publication date
CN1863139A (en) 2006-11-15

Similar Documents

Publication Publication Date Title
CN100438502C (en) L2TP message processing method
CN101336427B (en) Digital object routing based on a service request
US7894447B2 (en) Digital object routing
US7890662B2 (en) System and method for providing unified IP presence
CN100550841C (en) Autonomous System Boundary Router, AS Boundary Router route issuing method and Autonomous System Boundary Router, AS Boundary Router
CN101194489B (en) Information processing server, remote control system, and remote control method
CN113411243B (en) Data transmission method and device
US20070133548A1 (en) Transmission apparatus having a plurality of network interfaces and transmission method using the same
EP1134938A1 (en) System, device and method for supporting a label switched path across a non-MPLS compliant segment
CN101789904A (en) Method and equipment for controlling flow
US20090116513A1 (en) System and Method for Providing Single IP Tunnel
JPH08204746A (en) Inter-lan connection router
CN103795622B (en) Message forwarding method and device using same
CN102571613A (en) Method and network device for message forwarding
JP2008546272A (en) Terminal apparatus having handover function based on SCTP and handover method
CN107786450A (en) A kind of data message transmission method, device and machinable medium
JP2007194763A (en) Network system
CN105323229A (en) CPE-based data transmission method, network element, platform and system
CN103200068A (en) Multi-tunnel transmission device based on user service
CN106507414A (en) Message forwarding method and device
CN100561978C (en) A kind of strategy route device and method
CN103139068B (en) The method E-Packeted, router and system
CN101534210A (en) A method and equipment for setting priority of multicast IP messages
CN100496024C (en) A method to forward the channel message and a network device
JP6457960B2 (en) Communication flow labeling system, label management device, communication flow identification device, and communication flow labeling method

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
TR01 Transfer of patent right

Effective date of registration: 20220927

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right