CN105847153A - Message forwarding method and network device - Google Patents

Message forwarding method and network device Download PDF

Info

Publication number
CN105847153A
CN105847153A CN201610183664.5A CN201610183664A CN105847153A CN 105847153 A CN105847153 A CN 105847153A CN 201610183664 A CN201610183664 A CN 201610183664A CN 105847153 A CN105847153 A CN 105847153A
Authority
CN
China
Prior art keywords
rule
network equipment
information
forwarding
outgoing interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610183664.5A
Other languages
Chinese (zh)
Inventor
孟庆超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201610183664.5A priority Critical patent/CN105847153A/en
Publication of CN105847153A publication Critical patent/CN105847153A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The invention provides a message forwarding method and a network device, and relates to the communication field. The defect of configuring every prefix with the static LSP during the message forwarding by using the static LSP can be solved. The message forwarding method is characterized in that the network device is used to receive a message, and whether the message meets a matching rule included by a strategy route forwarding table can be determined; the strategy route forwarding table comprises the matching rule and one forwarding rule corresponding to the matching rule, and the forwarding rule comprises OUT label information, OUT interface information, and next-hop information; when the message meets the matching rule, the next-hop network device can be determined according to the forwarding rule, and multi-protocol label switching MPLS labels can be packaged for the message; and the message can be forwarded to the next-hop network device after the packaging of the multi-protocol label switching MPLS labels.

Description

A kind of message forwarding method and the network equipment
Technical field
The present invention relates to the communications field, particularly relate to a kind of message forwarding method and the network equipment.
Background technology
At MPLS (Multi-Protocol Label Switching, multi-protocol exchange) network In, need to set up LSP (Label-Switch Path, label forwarding path), MPLS Message forwards along LSP.LSP includes dynamic LSP and static LSP.Wherein, use dynamic When state LSP E-Packets, the equipment in MPLS network is needed all to support the dynamic road of MPLS By agreement and safeguard forward table information, equipment performance, personnel ability are required higher, safeguards into This is higher.Using static LSP to E-Packet, the network equipment need not safeguard that MPLS is dynamic Routing Protocol, the requirement to equipment and personnel is lower than dynamic LSP.
But, when using static LSP, MPLS network access device needs beforehand through appointment Message prefix, outgoing label, outgoing interface, the mode of down hop set up LSP, and each report Literary composition prefix is required for configuring a static LSP, and this results in static LSP and is not suitable for message The network that prefix is more or message prefix often changes.After receiving message, true according to message prefix Fixed corresponding outgoing label, outgoing interface, down hop, and then according to these information determined by message It is transmitted to next-hop network equipment.
Due to the disadvantage mentioned above of static LSP, significantly limit the range of application of static LSP, Cause operator to have to use dynamic LSP to carry out message forwarding, add network design and The cost safeguarded.
Summary of the invention
The present invention provides a kind of message forwarding method and the network equipment, does not turns further according to message prefix Transmit messages literary composition, need for the static LSP of each prefix configuration solving to use static LSP to E-Packet Shortcoming, alleviate the static LSP configuration load of the network equipment.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
First aspect, discloses a kind of message forwarding method, including:
The network equipment receives message, it is judged that whether described message meets policybased routing forward table includes Matched rule;Described policybased routing forward table includes described matched rule and mates with described The forwarding rule that rule is corresponding, described forwarding rule includes that outgoing label information, outgoing interface are believed Breath and next hop information;
If described message meets described matched rule, the described network equipment then forwards rule according to described Then determine next-hop network equipment, and be that described message encapsulates multi-protocol exchange MPLS label;
The described network equipment is after described next-hop network device forwards encapsulation MPLS label Message.
In conjunction with first aspect, in the first possible implementation of first aspect,
Before the described network equipment receives message, described method also includes:
Forward regular and described matched rule described in network equipments configuration, determine that described forwarding is advised It is then effective;
The described network equipment creates and includes that described forwarding is regular and the described plan of described matched rule Slightly route forwarding table.
In conjunction with the first possible implementation of first aspect, the second in first aspect can In the implementation of energy,
Described network equipments configuration forwards rule and matched rule to specifically include:
The described network equipment determines the attribute information E-Packeted, and generates according to described attribute information Matching strategy, the described matching strategy described network equipment of instruction only forwards and meets described attribute information Message;Described attribute information includes preset length or pre-set priority or default incoming interface;
The described network equipment according to described attribute information determine label information, outgoing interface information with And next hop information;
The described network equipment is believed according to the outgoing label information determined, outgoing interface information and down hop Breath generates described forwarding rule.
In conjunction with the first possible implementation of first aspect, can at the third of first aspect In the implementation of energy, if the MPLS functional configuration of the outgoing interface of the described network equipment becomes Changing, after described network equipments configuration forwards rule and matched rule, described method also includes:
The described network equipment judges whether the outgoing interface information that described forwarding rule includes indicates Described outgoing interface;
If the outgoing interface information that described forwarding rule includes indicates described outgoing interface, then judge institute State the next-hop network equipment forwarding rule to indicate the most effective;
If the described network equipment judges that the described next-hop network equipment forwarding rule to indicate is effective And described outgoing interface supports MPLS function, it is determined that described forwarding rule is effective.
In conjunction with in the third possible implementation of first aspect, at the 4th kind of first aspect In possible implementation, forward the regular next-hop network equipment indicated effectively but institute if described State outgoing interface and do not support MPLS function,
Then, the described network equipment creates and includes effectively forwarding regular and described effective forwarding rule right After the policybased routing forward table of the matched rule answered, described method also includes: delete described plan Slightly route forwarding table.
In conjunction with the first possible implementation of first aspect, can the 5th kind of first aspect In the implementation of energy, if the route of the described network equipment changes, the described network equipment is joined After putting forwarding rule and matched rule, described method also includes:
Judge whether the next hop information that described forwarding rule includes indicates route situation of change Corresponding next-hop network equipment;
If the next hop information that described forwarding rule includes indicates described route situation of change pair The next-hop network equipment answered, then judge that the described outgoing interface forwarding rule to indicate is the most effective;
If the described outgoing interface forwarding rule instruction is effective and the instruction of described route situation of change adds Add route, it is determined that described forwarding rule is effective.
In conjunction with the 5th kind of possible implementation of first aspect, can the 6th kind of first aspect In the implementation of energy, forward the outgoing interface of rule instruction effectively if described, but described routing variable Route is deleted in the instruction of change situation,
Then, the described network equipment creates and includes effectively forwarding regular and described effective forwarding rule right After the policybased routing forward table of the matched rule answered, described method also includes: delete described plan Slightly route forwarding table.
Second aspect, discloses a kind of network equipment, including:
Receive unit, be used for receiving message;
Judging unit, for judge whether described message meet that policybased routing forward table includes Join rule;Described policybased routing forward table include described matched rule and with described matched rule A corresponding forwarding rule, described forwarding rule include outgoing label information, outgoing interface information with And next hop information;
Determine unit, if judging that described message meets described coupling rule for described judging unit Then, then next-hop network equipment is determined according to described forwarding rule;
Encapsulation unit, for encapsulating MPLS label for described message;
Transmitting element, for after described next-hop network device forwards encapsulation MPLS label Message.
In conjunction with second aspect, in the first possible implementation of second aspect,
Also include dispensing unit, creating unit,
Described dispensing unit is used for, and before described reception unit receives message, configuration is described to be turned Send out regular and described matched rule;
Described determine that unit is additionally operable to, determine that described forwarding rule is effective;
Described creating unit is used for, and creates and includes that described forwarding is regular and the institute of described matched rule State policybased routing forward table.
In conjunction with in the first possible implementation of second aspect, at the second of second aspect In possible implementation,
Described dispensing unit specifically for, determine the attribute information E-Packeted, according to described genus Property information generate matching strategy, described matching strategy indicates the described network equipment only to forward and meet institute State the message of attribute information;Described attribute information includes preset length or pre-set priority or presets Incoming interface;
Label information, outgoing interface information and down hop letter is determined according to described attribute information Breath;
Described turning is generated according to the outgoing label information determined, outgoing interface information and next hop information Send out rule.
In conjunction with the first possible implementation of second aspect, can at the third of second aspect In the implementation of energy, if the MPLS functional configuration of the outgoing interface of the described network equipment becomes Changing, described judging unit is additionally operable to, and forwards rule and coupling rule in the configuration of described dispensing unit After then, whether the outgoing interface information forwarding rule to include indicates described outgoing interface;
If the outgoing interface information that described forwarding rule includes indicates described outgoing interface, then judge institute State the next-hop network equipment forwarding rule to indicate the most effective;
If judging, the described next-hop network equipment forwarding rule instruction is effective and described outgoing interface Support MPLS function, it is determined that described forwarding rule is effective.
In conjunction with the third possible implementation of second aspect, can the 4th kind of second aspect In the implementation of energy, also include deleting unit,
If the described next-hop network equipment forwarding rule instruction is effective but described outgoing interface does not props up Hold MPLS function,
Then, described deletion unit is used for, and creates in described creating unit and includes effectively forwarding rule And after described effective policybased routing forward table forwarding matched rule corresponding to rule, delete institute State policybased routing forward table.
In conjunction with the first possible implementation of second aspect, can the 5th kind of second aspect In the implementation of energy, if the route of the described network equipment changes, described judging unit is also For, after the configuration of described dispensing unit forwards rule and matched rule, it is judged that described turn Send out whether the next hop information that includes of rule indicates down hop net corresponding to route situation of change Network equipment;
If the next hop information that described forwarding rule includes indicates described route situation of change pair The next-hop network equipment answered, then judge that the outgoing interface in described forwarding rule is the most effective;
If the outgoing interface in described forwarding rule is effective and the instruction of described route situation of change is added Route, it is determined that described forwarding rule is effective.
In conjunction with the 5th kind of possible implementation of second aspect, can the 6th kind of second aspect In the implementation of energy, also include deleting unit, if the described outgoing interface forwarding rule instruction has Effect, but route is deleted in the instruction of described route situation of change,
Described deletion unit is used for, and creates in described creating unit and includes effectively forwarding rule and institute After stating the policybased routing forward table of the matched rule effectively forwarding rule corresponding, delete described plan Slightly route forwarding table.
The message forwarding method of embodiment of the present invention offer and network equipment MAC Address notice side Method and core node, be pre-created matched rule and forward rule, and the message received meets Join rule just according to forwarding rule to E-Packet.Wherein, rule is forwarded to include outgoing label, go out to connect Mouth and the information of next-hop device.It is to say, rely on outgoing label, outgoing interface and down hop to set Standby information can realize message and forward, and so, it is to avoid E-Packet according to message prefix, solves The static LSP of use of having determined E-Packets needs to configure the shortcoming of static LSP for each prefix, Alleviate the static LSP configuration load of the network equipment.Meanwhile, the network equipment need not safeguard MPLS dynamic routing protocol, still supports static LSP.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below The accompanying drawing used required in embodiment or description of the prior art will be briefly described, aobvious and Easily insight, the accompanying drawing in describing below is only some embodiments of the present invention, for this area From the point of view of those of ordinary skill, on the premise of not paying creative work, it is also possible to according to these Accompanying drawing obtains other accompanying drawing.
Fig. 1 is the Organization Chart of MPLS network;
The schematic flow sheet of the message forwarding method that Fig. 2 provides for the embodiment of the present invention 1;
The flow process signal confirming to forward the method for rule that Fig. 3 provides for the embodiment of the present invention 1 Figure;
The another kind of flow process confirming to forward the method for rule that Fig. 4 provides for the embodiment of the present invention 1 Schematic diagram;
The structured flowchart of the network equipment that Fig. 5 provides for the embodiment of the present invention 2;
Another structured flowchart of the network equipment that Fig. 6 provides for the embodiment of the present invention 2;
Another structured flowchart of the network equipment that Fig. 7 provides for the embodiment of the present invention 2.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, to the technical side in the embodiment of the present invention Case is clearly and completely described, it is clear that described embodiment is only the present invention one Divide embodiment rather than whole embodiments.Based on the embodiment in the present invention, this area is general All other embodiments that logical technical staff is obtained under not making creative work premise, Broadly fall into the scope of protection of the invention.
MPLS network utilizes label (label) to carry out data forwarding.When message enters network Time, for the label of its distribution regular length, and label to be packaged together with message, whole In individual repeating process, switching node forwards according only to label.As it is shown in figure 1, MPLS Network includes: CE (Customer Edge) equipment (CE1 and CE2) and MPLS core Heart net;MPLS core net includes PE (Provider Edge) equipment PE1 and PE2 And P (Provider) equipment P1 and P2.
Wherein, CE is customer edge, can be router, it is also possible to be switch or Main frame.PE is provider edge, is positioned at the edge of MPLS core net.P is clothes The P of (i.e. MPLS core net), not direct with CE phase in business provider network Even.
At present, PE equipment (MPLS network access device) needs for the configuration of each prefix quiet State LSP, when message prefix is more or message prefix often changes, then can greatly increase PE The configuration of equipment meets.It addition, PE equipment only supports the message prefix specified so that at present Configuration underaction.
The principle of the present invention is, PE equipment determines according to existing matched rule and mates rule Then corresponding forwarding rule, matched rule constitutes policybased routing forward table with forwarding rule.Message After matching matched rule, E-Packet according to forwarding rule.Forward rule include outgoing label, Outgoing interface, down hop, no longer rely on message prefix to forward as conventional measures route, Configure static LSP without for each message prefix, save expense.Make static state simultaneously The application scenarios of LSP is no longer limited by message prefix, improves the suitability of static LSP.
Embodiment 1:
The embodiment of the present invention provides a kind of message forwarding method, as in figure 2 it is shown, described method bag Include following steps:
101, the network equipment receives message, it is judged that whether described message meets described policybased routing The matched rule that forward table includes.
In implementing, i.e. judge the attribute the; whether attribute of this message includes with matched rule Join.Example, if matched rule be message between X byte~Y byte, then judge this report Whether the length of literary composition is between X byte~Y byte.Or, matched rule be incoming interface be A, I.e. judge at this whether this message is received by incoming interface A.
It should be noted that after the network equipment receives message, it can be determined that whether this locality configures Policybased routing, if be configured with, performs step 101, if being configured without, and can according to former Path forwards, and i.e. determines forward-path according to message prefix.
If described message does not meets the matched rule that described policybased routing forward table includes, then carry out Step 102.If whether described message meets the matched rule that described policybased routing forward table includes Carry out step 103.
102, the network equipment forwards described message according to the message prefix of described message.
103, under the network equipment determines according to the forwarding rule that described policybased routing forward table includes One jumps the network equipment, and is that described message encapsulates MPLS label;Set to described next-hop network The standby message forwarded after encapsulating MPLS label.
In implementing, outgoing interface information and next hop information according to forwarding rule to include are true Determine the down hop network equipment, be that described message encapsulates MPLS label according to outgoing label information.
In a preferred embodiment of the invention, the network equipment also need to be pre-configured with forwarding rule with And matched rule, determine that described forwarding rule is effective.And then, create and include described forwarding Regular and the described policybased routing forward table of described matched rule.
Wherein, matched rule is that the network equipment generates previously according to the attribute information E-Packeted , indicate this network equipment only to forward the message of the attribute information met in matched rule.Attribute Information can be preset length or pre-set priority or default incoming interface.Here preset length is also Also it is preset length scope, example, message length message between X byte~Y byte. Specifically, matched rule can be that message length meets described preset length, or message priority Meet described pre-set priority, or message is received by described default incoming interface.
In implementing, first determine matched rule, the attribute information included further according to matched rule Determine label information, outgoing interface information and next hop information, according to the outgoing label letter determined Breath, outgoing interface information and next hop information generate and forward rule.Of course, it is possible to according to difference The multiple different forwarding rules of attribute information configuration, the different outgoing label forwarding rule to include Information, outgoing interface information and next hop information are incomplete same.Example, matched rule is Message length meets described preset length, and the forwarding rule of its correspondence is A.Matched rule is excellent First level meets described pre-set priority, and the forwarding rule of its correspondence is B.A with B differs. Certainly, it is different according to the matched rule that different preset length generates, corresponding forwarding rule Then can be identical, it is also possible to different, in this no limit.
Needing explanation, described effective forwarding rule is effective, i.e. forwards the letter that rule includes Breath is all effective.Also just says and is, it is necessary to ensure that forwarding rule is effective, and be configured with right The matched rule answered, just can generate according to the matched rule that this forwarding is regular and corresponding Policybased routing forward table.
In implementing, after configuration forwards rule, to confirm that this forwarding rule is the most effective, i.e. Judge whether it outgoing label information included, outgoing interface information and next hop information are effectively Information.For outgoing interface information, if the outgoing interface of outgoing interface information instruction enables MPLS merit Can, i.e. this outgoing interface supports MPLS function, then illustrate that this outgoing interface information is effective.Right In next hop information, if the routing table of network equipments configuration exists the road of next hop information instruction By, then illustrate that this next hop information is effective.
It addition, in order to improve forward efficiency, it is to avoid route processing meaningless in forwarding process, only Have and be configured with forwarding rule and the matched rule of its correspondence simultaneously, just can forward road by construction strategy By table.
If forwarding rule effectively, but it is not the matched rule forwarding rule configuration corresponding, then Be unsatisfactory for the condition of construction strategy route forwarding table, so will not construction strategy route forwarding table, But need to preserve in this locality to forward outgoing interface information, the effectiveness of next hop information in rule.After Continue for forwarding the good corresponding matched rule of rule configuration, then can be according to this forwarding rule and coupling Rule creation policybased routing forward table.
In a preferred embodiment of the invention, network equipments configuration forwards rule and matched rule Afterwards, before construction strategy route forwarding table, when the MPLS function of the outgoing interface of the network equipment Change or the route of the network equipment changes, then need to confirm to forward according to situation of change Rule is the most effective.
Example, with reference to Fig. 3, in response to the MPLS changes of function event of outgoing interface, network Equipment needs to confirm to forward rule the most effective, and the embodiment of the present invention also provides for one and confirms to forward The method of rule, comprises the following steps:
201, the network equipment monitors the MPLS function of outgoing interface and changes.
It can be that outgoing interface is from enabling MPLS that the MPLS function of outgoing interface here changes Function becomes closing MPLS function, or becomes enabling MPLS from closing MPLS function Function.Wherein, enable MPLS function this outgoing interface i.e. and support MPLS function, close MPLS Function i.e. this outgoing interface no longer supports MPLS function.
In implementing, when the monitoring module monitors of the network equipment is to outgoing interface MPLS function Configuration changes, then send out the change of interface MPLS functional configuration to policybased routing module and disappear Breath, this message includes outgoing interface information and configuration variation information, further, configuration variation Information includes that outgoing interface enables MPLS function or interface closes MPLS function.
202, to judge to forward the outgoing interface information that includes of rule whether to indicate described for the network equipment Outgoing interface.
The described herein rule that forwards is the forwarding that the network equipment configures in above-mentioned steps 101 Rule.It is to say, the network equipment need to judge outgoing interface that MPLS function changes with The outgoing interface that the outgoing interface information forwarding rule to include indicates is the most identical.
If the outgoing interface information that described forwarding rule includes indicates described outgoing interface, then walk Rapid 203;If the outgoing interface information that described forwarding rule includes does not indicates described outgoing interface, i.e. The outgoing interface that MPLS function changes and the outgoing interface information instruction forwarding rule to include Outgoing interface differs, then carry out step 204.
203, judge that the described next-hop network equipment forwarding rule to indicate is the most effective.
Wherein, the down hop that the next-hop network equipment of rule instruction i.e. forwards rule to include is forwarded The network equipment of information instruction.
In implementing, i.e. judge whether the routing table that the network equipment is locally stored exists and institute State the route that the next-hop network equipment forwarding rule to indicate is identical.If existing, it is determined that described The next-hop network equipment forwarding rule instruction is effective, otherwise, it is determined that described forwarding is advised The next-hop network equipment then indicated is invalid.
If the described network equipment judges that the described next-hop network equipment forwarding rule to indicate is effective And described outgoing interface supports MPLS function, then carry out step 205;If described forwarding rule refers to The next-hop network equipment shown is effective but described outgoing interface does not support MPLS function, carries out step 206。
In implementing, can determine whether this outgoing interface props up according to MPLS configuration variation message Hold MPLS function.
If 204 these outgoing interfaces support MPLS function, then record the effectiveness of this outgoing interface. If this outgoing interface does not support MPLS function, then record this outgoing interface invalid.
205, determine that described forwarding rule is effective.
And then, the network equipment can perform above-mentioned steps 101, according to described forward rule and Corresponding matched rule construction strategy route forwarding table.
206, deletion strategy route forwarding table.
If it is to say, in outgoing interface MPLS configuration variation message, indicating this outgoing interface to close MPLS function.If by rule creation in the coupling regular and corresponding according to this forwarding Policybased routing forward table, then delete described policybased routing forward table.
In implementing, the network equipment is performed a plurality of times step 101 can configure multiple matched rule Rule is forwarded with multiple.Here, the network equipment needs to travel through each forwards rule, search each Forward the outgoing interface information that rule includes, it is judged that the outgoing interface of this forwarding rule instruction and outgoing interface Outgoing interface indicated by MPLS configuration variation message is the most identical.So, it may be determined that go out Multiple targets forward rule, and (i.e. the outgoing interface of this forwarding rule instruction configures with outgoing interface MPLS Outgoing interface indicated by change message is identical), forward rule to be required for holding for each target Row step 201-206.
Example, with reference to Fig. 4, in response to the route change events of the network equipment, the network equipment Needing to confirm to forward rule the most effective, the embodiment of the present invention also provides for one and confirms to forward rule Method, comprise the following steps:
301, the network equipment monitors route and changes.
Here the route of the network equipment changes can be that the down hop of the network equipment becomes Change.
In implementing, when the monitoring module monitors of the network equipment changes to equipment route, Then sending route change message to policybased routing module, this message includes the down hop after change Information.
302, the network equipment judges whether the next hop information forwarding rule to include indicates route The next-hop network equipment that situation of change is corresponding.
The described herein rule that forwards is the forwarding that the network equipment configures in above-mentioned steps 101 Rule.The next-hop network equipment that route situation of change is corresponding, in the most above-mentioned route change message The network equipment including the next hop information instruction after change.It is to say, the network equipment needs Under judgement equipment route the next-hop network equipment after changing and forwards rule to include The network equipment of one hop-information instruction is the most identical.
If corresponding next of next hop information that forwarding rule includes instruction route situation of change Jump the network equipment, then carry out step 303;If the next hop information that forwarding rule includes does not refers to Show route next-hop network equipment corresponding to situation of change, after i.e. equipment route changes under The next-hop network that the one jumping network equipment and the next hop information forwarding rule to include indicate sets For differing, then carry out ignoring this route change events, strategy route forwarding table is not carried out Amendment or renewal.
303, judge that the described outgoing interface forwarding rule to indicate is the most effective.
Wherein, the outgoing interface information instruction that the outgoing interface of rule instruction i.e. forwards rule to include is forwarded Outgoing interface.
In implementing, i.e. judge that the outgoing interface of the outgoing interface information instruction forwarding rule to include is Enable MPLS function and still close MPLS function.If enabling MPLS function, it is determined that The outgoing interface that the outgoing interface information forwarding rule to include indicates is effective, if closing MPLS merit Can, it is determined that the outgoing interface that the outgoing interface information forwarding rule to include indicates is invalid.
If the described network equipment judges that the described outgoing interface forwarding rule instruction is effective and described road Added route by situation of change instruction, then carry out step 305;If rule is forwarded to indicate described Outgoing interface is effective but route is deleted in the instruction of described route situation of change, carries out step 306.
In implementing, can determine according to above-mentioned route change message that being to increase route still deletes Except route.
If judging, the described outgoing interface forwarding rule to indicate is invalid, then carry out step 304.
If route is added in 304 described route situation of change instructions, then record this forwarding rule bag The effectiveness of the next hop information included.
It is to say, when the next-hop network equipment and the route situation of change pair that forward rule instruction The next-hop network equipment answered is identical, though what the outgoing interface information that this forwarding rule includes indicated Outgoing interface is invalid, but still can record the effectiveness of this next hop information, in order to follow-up should After the outgoing interface that the outgoing interface information forwarding rule to include indicates enables MPLS function, Ke Yigen According to the matched rule generation strategy route forwarding table that this forwarding is regular and corresponding.
305, determine that described forwarding rule is effective.
And then, the network equipment can perform above-mentioned steps 101, according to described forward rule and Corresponding matched rule construction strategy route forwarding table.
306, deletion strategy route forwarding table.
If it is to say, in above-mentioned route change message, route is deleted in instruction.If by root The policybased routing forward table according to rule creation in the coupling that this forwarding is regular and corresponding, then need Delete described policybased routing forward table.
In implementing, the network equipment is performed a plurality of times step 101 can configure multiple matched rule Rule is forwarded with multiple.Here, the network equipment needs to travel through each forwards rule, search each Forward the next hop information that rule includes, it is judged that the next-hop network equipment of this forwarding rule instruction The most identical with the next-hop network equipment that route change message includes.So, can be true Make multiple target and forward rule (i.e. the next-hop network equipment of this forwarding rule instruction and route Next-hop network equipment included by change message is identical), rule is forwarded for each target It is required for performing step 301-306.
The message forwarding method of support static state LSP that the embodiment of the present invention provides and the network equipment, Being pre-created matched rule and forward rule, the message received meets matched rule just according to turning Send out rule to E-Packet.Wherein, rule is forwarded to include outgoing label, outgoing interface and next-hop device Information.It is to say, the information of dependence outgoing label, outgoing interface and next-hop device can be real Existing message forwards, and so, it is to avoid E-Packet according to message prefix, solves the static LSP of use E-Packet the shortcoming needed for the static LSP of each prefix configuration, alleviates the network equipment Static LSP configuration load.Meanwhile, the network equipment need not safeguard that MPLS dynamic routing is assisted View, still supports static LSP.
Embodiment 2:
The embodiment of the present invention provides a kind of network equipment, as it is shown in figure 5, described core node bag Include: receive unit 401, judging unit 402, determine unit 403, encapsulation unit 404 with And transmitting element 405.
Receive unit 401, be used for receiving message.
Judging unit 402, is used for judging whether described message meets policybased routing forward table and include Matched rule;Described policybased routing forward table includes described matched rule and mates with described The forwarding rule that rule is corresponding, described forwarding rule includes that outgoing label information, outgoing interface are believed Breath and next hop information.
Determine unit 403, if it is described to determine that described message meets for described judging unit 402 Matched rule, then determine next-hop network equipment according to described forwarding rule.
Encapsulation unit 404, for encapsulating MPLS label for described message.
Transmitting element 405, for encapsulating MPLS label to described next-hop network device forwards After message.
As shown in Figure 6, the described network equipment also includes: dispensing unit 406 and creating unit 407。
Described dispensing unit 406 is used for, and before described reception unit receives message, configures institute State and forward regular and described matched rule;
Described determine that unit 403 is additionally operable to, determine that described forwarding rule is effective;
Described creating unit 407 is used for, and creates and includes that described forwarding is regular and described matched rule Described policybased routing forward table.
Described dispensing unit 406 specifically for, determine the attribute information E-Packeted, according to institute Stating attribute information and generate matching strategy, described matching strategy indicates the described network equipment only to forward symbol Close the message of described attribute information;Described attribute information include preset length or pre-set priority or Preset incoming interface;According to described attribute information determine label information, outgoing interface information and under One hop-information;Generate according to the outgoing label information determined, outgoing interface information and next hop information Described forwarding rule.
If the MPLS functional configuration of the outgoing interface of the described network equipment changes, described judgement Unit 402 is additionally operable to, and forwards rule and matched rule in the configuration of described dispensing unit 406 Afterwards, whether the outgoing interface information forwarding rule to include indicates described outgoing interface.
If the outgoing interface information that described forwarding rule includes indicates described outgoing interface, then judge institute State the next-hop network equipment forwarding rule to indicate the most effective.
If judging, the described next-hop network equipment forwarding rule instruction is effective and described outgoing interface Support MPLS function, it is determined that described forwarding rule is effective.
As it is shown in fig. 7, the described network equipment also includes deleting unit 408.
If the described next-hop network equipment forwarding rule instruction is effective but described outgoing interface does not props up Holding MPLS function, the most described deletion unit 408 is used for, and creates in described creating unit 407 Build the tactful road including effectively forwarding regular and described effective matched rule forwarding rule correspondence After forward table, delete described policybased routing forward table.
If the route of the described network equipment changes, described judging unit 402 is additionally operable to, After the configuration of described dispensing unit 406 forwards rule and matched rule, it is judged that described forwarding is advised The next-hop network whether next hop information then included indicates route situation of change corresponding sets Standby.
If the next hop information that described forwarding rule includes indicates described route situation of change pair The next-hop network equipment answered, then judge that the outgoing interface in described forwarding rule is the most effective.
If the outgoing interface in described forwarding rule is effective and the instruction of described route situation of change is added Route, it is determined that described forwarding rule is effective.
Forward the outgoing interface of rule instruction effectively if described, but the instruction of described route situation of change is deleted Except route, described deletion unit 408 is used for, and creates in described creating unit 407 and includes Effect forwards the policybased routing forward table of regular and described effective matched rule forwarding rule correspondence Afterwards, described policybased routing forward table is deleted.
The inherent shortcoming that static LSP exists: each message prefix is required for configuration static state LSP so that it is be only applicable to message prefix number less and E-Packet what prefix was basically unchanged Network, or use static LSP just for some prefix.Due to these defects, use static state LSP builds MPLS network and exists for bigger use and limit, and operator has to use cost Higher dynamic LSP builds MPLS network.
The network equipment that the present invention provides can be greatly simplified builds joining of static MPLS network Put so that it is be suitable for increasingly complex, route change network the most frequently, and, except static state The mode determining MPLS forward-path according to message prefix that LSP is intrinsic, it is also possible to according to entering Interface, priority determine MPLS forward-path, can increase the application of static LSP network Scope.
Through the above description of the embodiments, those skilled in the art can be clearly Solution arrives, and for convenience and simplicity of description, only carries out illustrating with the division of above-mentioned each functional module Bright, in actual application, can as desired above-mentioned functions be distributed by different functional modules Complete, the internal structure of device will be divided into different functional modules, to complete above description All or part of function.The specific works process of the device of foregoing description, before being referred to State the corresponding process in embodiment of the method, do not repeat them here.
The described unit that illustrates as separating component can be or may not be and physically divide Opening, the parts shown as unit can be a physical location or multiple physical location, i.e. May be located at a place, or can also be distributed to multiple different local.Can be according to reality Need select some or all of unit therein to realize the purpose of the present embodiment scheme.Separately Outward, each functional unit in each embodiment of the present invention can be integrated in a processing unit In, it is also possible to it is that unit is individually physically present, it is also possible to two or more unit collection Become in a unit.Above-mentioned integrated unit both can realize to use the form of hardware, it is possible to To use the form of SFU software functional unit to realize.
If described integrated unit realizes and as independent using the form of SFU software functional unit When production marketing or use, can be stored in a read/write memory medium.Based on such Understand, part that prior art is contributed by technical scheme the most in other words or Completely or partially can embodying with the form of software product of this technical scheme of person, this software Product is stored in a storage medium, including some instructions with so that an equipment is (permissible It is single-chip microcomputer, chip etc.) or processor (processor) execution each embodiment of the present invention All or part of step of described method.And aforesaid storage medium includes: USB flash disk, mobile hard Dish, read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc. are various can store program code Medium.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is also Being not limited to this, any those familiar with the art is at the technology model that the invention discloses In enclosing, change can be readily occurred in or replace, all should contain within protection scope of the present invention. Therefore, protection scope of the present invention should described be as the criterion with scope of the claims.

Claims (10)

1. a message forwarding method, it is characterised in that including:
The network equipment receives message, it is judged that whether described message meets what policybased routing forward table included Matched rule;Described policybased routing forward table include described matched rule and with described matched rule A corresponding forwarding rule, described forwarding rule include outgoing label information, outgoing interface information and Next hop information;
If described message meets described matched rule, the described network equipment then forwards rule according to described Determine next-hop network equipment, and be that described message encapsulates multi-protocol exchange MPLS label;
Described network equipment report after described next-hop network device forwards encapsulation MPLS label Literary composition.
Method the most according to claim 1, it is characterised in that the described network equipment receives Before message, described method also includes:
Forward regular and described matched rule described in network equipments configuration, determine described forwarding rule It is effective;
The described network equipment creates and includes that described forwarding is regular and the described strategy of described matched rule Route forwarding table.
Method the most according to claim 2, it is characterised in that described network equipments configuration Rule and matched rule is forwarded to specifically include:
The described network equipment determines the attribute information E-Packeted, according to the generation of described attribute information Joining strategy, described matching strategy indicates the described network equipment only to forward the report meeting described attribute information Literary composition;Described attribute information includes preset length or pre-set priority or default incoming interface;
The described network equipment according to described attribute information determine label information, outgoing interface information and Next hop information;
The described network equipment is according to the outgoing label information determined, outgoing interface information and next hop information Generate described forwarding rule.
Method the most according to claim 2, it is characterised in that if the described network equipment The MPLS functional configuration of outgoing interface changes, described network equipments configuration forward rule and After matched rule, described method also includes:
The described network equipment judges whether the outgoing interface information that described forwarding rule includes indicates institute State outgoing interface;
If the outgoing interface information that described forwarding rule includes indicates described outgoing interface, then judge described The next-hop network equipment forwarding rule instruction is the most effective;
If the described network equipment judge the described next-hop network equipment forwarding rule instruction effectively and Described outgoing interface supports MPLS function, it is determined that described forwarding rule is effective.
Method the most according to claim 2, it is characterised in that if the described network equipment Route changes, after described network equipments configuration forwards rule and matched rule, and described side Method also includes:
Judge whether the next hop information that described forwarding rule includes indicates route situation of change pair The next-hop network equipment answered;
If the next hop information that described forwarding rule includes indicates described route situation of change corresponding Next-hop network equipment, then judge described forward rule instruction outgoing interface the most effective;
If the described outgoing interface forwarding rule instruction is effective and the instruction of described route situation of change is added Route, it is determined that described forwarding rule is effective.
6. a network equipment, it is characterised in that including:
Receive unit, be used for receiving message;
Judging unit, for judging whether described message meets the coupling that policybased routing forward table includes Rule;Described policybased routing forward table includes described matched rule and corresponding with described matched rule One forwarding rule, described forwarding rule include outgoing label information, outgoing interface information and next Hop-information;
Determine unit, if judging that described message meets described matched rule for described judging unit, Then determine next-hop network equipment according to described forwarding rule;
Encapsulation unit, for encapsulating multi-protocol exchange MPLS label for described message;
Transmitting element, for after described next-hop network device forwards encapsulation MPLS label Message.
The network equipment the most according to claim 6, it is characterised in that also include that configuration is single Unit, creating unit,
Described dispensing unit, before receiving message at described reception unit, configures described forwarding Regular and described matched rule;
Described determine that unit is additionally operable to, determine that described forwarding rule is effective;
Described creating unit is used for, and creates and includes that described forwarding is regular and described matched rule described Policybased routing forward table.
The network equipment the most according to claim 7, it is characterised in that described dispensing unit Specifically for, determine the attribute information E-Packeted, generate matching strategy according to described attribute information, Described matching strategy indicates the described network equipment only to forward the message meeting described attribute information;Described Attribute information includes preset length or pre-set priority or default incoming interface;
Label information, outgoing interface information and next hop information is determined according to described attribute information;
Described forwarding is generated according to the outgoing label information determined, outgoing interface information and next hop information Rule.
The network equipment the most according to claim 7, it is characterised in that if described network sets The MPLS functional configuration of standby outgoing interface changes, and described judging unit is additionally operable to, in institute After stating dispensing unit configuration forwarding rule and matched rule, forward the outgoing interface that rule includes Whether information indicates described outgoing interface;
If the outgoing interface information that described forwarding rule includes indicates described outgoing interface, then judge described The next-hop network equipment forwarding rule instruction is the most effective;
If judging, the described next-hop network equipment forwarding rule instruction is effective and described outgoing interface props up Hold MPLS function, it is determined that described forwarding rule is effective.
The network equipment the most according to claim 7, it is characterised in that if described network The route of equipment changes, and described judging unit is additionally operable to, and forwards in the configuration of described dispensing unit After rule and matched rule, it is judged that whether the next hop information that described forwarding rule includes refers to Show the next-hop network equipment that route situation of change is corresponding;
If the next hop information that described forwarding rule includes indicates described route situation of change corresponding Next-hop network equipment, then judge that the outgoing interface in described forwarding rule is the most effective;
If the outgoing interface in described forwarding rule is effective and road is added in the instruction of described route situation of change By, it is determined that described forwarding rule is effective.
CN201610183664.5A 2016-03-25 2016-03-25 Message forwarding method and network device Pending CN105847153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610183664.5A CN105847153A (en) 2016-03-25 2016-03-25 Message forwarding method and network device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610183664.5A CN105847153A (en) 2016-03-25 2016-03-25 Message forwarding method and network device

Publications (1)

Publication Number Publication Date
CN105847153A true CN105847153A (en) 2016-08-10

Family

ID=56584275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610183664.5A Pending CN105847153A (en) 2016-03-25 2016-03-25 Message forwarding method and network device

Country Status (1)

Country Link
CN (1) CN105847153A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018137384A1 (en) * 2017-01-24 2018-08-02 华为技术有限公司 Method, device, and system for adjusting a forwarding path
CN109361782A (en) * 2018-11-02 2019-02-19 迈普通信技术股份有限公司 A kind of message forwarding method and the network equipment
WO2020088683A1 (en) * 2018-11-02 2020-05-07 华为技术有限公司 Method for processing routing event record entry, network device and control device
CN111628930A (en) * 2020-05-25 2020-09-04 河南群智信息技术有限公司 Label-based Chinese medicinal material planting monitoring information rerouting method
CN111837367A (en) * 2018-02-28 2020-10-27 德国电信股份有限公司 Techniques for policy management for multiple connectivity network protocols
CN112702266A (en) * 2018-06-29 2021-04-23 华为技术有限公司 Method for generating label forwarding table, message sending method, device and equipment
CN114978993A (en) * 2022-04-24 2022-08-30 欧冶云商股份有限公司 Message routing method based on label expression calculation and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047625A (en) * 2006-04-26 2007-10-03 华为技术有限公司 Strategy route device and method
US8176201B1 (en) * 2003-11-05 2012-05-08 Juniper Networks, Inc. Controlling the signaling of label-switched paths using a label distribution protocol employing messages which facilitate the use of external prefixes
CN104486229A (en) * 2014-12-24 2015-04-01 迈普通信技术股份有限公司 Method and equipment for realizing VPN message forwarding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8176201B1 (en) * 2003-11-05 2012-05-08 Juniper Networks, Inc. Controlling the signaling of label-switched paths using a label distribution protocol employing messages which facilitate the use of external prefixes
CN101047625A (en) * 2006-04-26 2007-10-03 华为技术有限公司 Strategy route device and method
CN104486229A (en) * 2014-12-24 2015-04-01 迈普通信技术股份有限公司 Method and equipment for realizing VPN message forwarding

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018137384A1 (en) * 2017-01-24 2018-08-02 华为技术有限公司 Method, device, and system for adjusting a forwarding path
US11063874B2 (en) 2017-01-24 2021-07-13 Huawei Technologies Co., Ltd. Forwarding path adjustment method, apparatus, and system
CN111837367A (en) * 2018-02-28 2020-10-27 德国电信股份有限公司 Techniques for policy management for multiple connectivity network protocols
CN111837367B (en) * 2018-02-28 2021-09-10 德国电信股份有限公司 Techniques for policy management for multiple connectivity network protocols
CN112702266A (en) * 2018-06-29 2021-04-23 华为技术有限公司 Method for generating label forwarding table, message sending method, device and equipment
CN109361782A (en) * 2018-11-02 2019-02-19 迈普通信技术股份有限公司 A kind of message forwarding method and the network equipment
WO2020088683A1 (en) * 2018-11-02 2020-05-07 华为技术有限公司 Method for processing routing event record entry, network device and control device
US11882037B2 (en) 2018-11-02 2024-01-23 Huawei Technologies Co., Ltd. Entry processing method, network device, and control device
CN111628930A (en) * 2020-05-25 2020-09-04 河南群智信息技术有限公司 Label-based Chinese medicinal material planting monitoring information rerouting method
CN111628930B (en) * 2020-05-25 2022-04-19 河南群智信息技术有限公司 Label-based rerouting method
CN114978993A (en) * 2022-04-24 2022-08-30 欧冶云商股份有限公司 Message routing method based on label expression calculation and electronic equipment
CN114978993B (en) * 2022-04-24 2023-08-08 欧冶云商股份有限公司 Message routing method based on label expression calculation and electronic equipment

Similar Documents

Publication Publication Date Title
CN105847153A (en) Message forwarding method and network device
CN106656801B (en) Reorientation method, device and the Business Stream repeater system of the forward-path of Business Stream
CN103634423B (en) Three-layered interface based MPLS-TP (multi-protocol label switching-transport profile) configuration method and device
CN105072038B (en) A kind of data message forwarding method and device
CN104717098B (en) A kind of data processing method and device
CN102137024B (en) Message processing method, exit routing device and border routing device
CN105991433B (en) The method and apparatus of Layer3 Virtual Private Network access Layer 2 virtual private network
CN111092801B (en) Data transmission method and device
CN103023773B (en) Method, device and system for forwarding message in multi-topology network
CN102447639B (en) A kind of policy routing method and device
CN109218200A (en) A kind of message processing method and device
CN108111413A (en) Method for routing, system and the equipment of stacking network
CN106375105A (en) Method of determining path fault, controller, switches and system
CN101924676B (en) Consultation method of control word ability and pseudowire establishing equipment
CN104219125A (en) Method, device and system for forwarding message in ICN
CN104601466A (en) Routing control method and border router
CN106878072A (en) A kind of message transmitting method and device
US20230216786A1 (en) Method for forwarding service packet, method for sending sr policy, device, and system
CN115065637B (en) Method and device for transmitting computing power resource information and electronic equipment
CN107948042A (en) A kind of message forwarding method and device
CN109218190A (en) A kind of the determination method and node of transmission path
CN105024928B (en) A kind of pretection switch method and apparatus of multi-protocol label switching network
CN102136957B (en) Label switched path monitoring realization method, device and system
CN106209630B (en) A kind of label management method and device
CN106453088A (en) Static routing configuration method and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160810

RJ01 Rejection of invention patent application after publication