CN109067657A - A kind of message processing method and device - Google Patents

A kind of message processing method and device Download PDF

Info

Publication number
CN109067657A
CN109067657A CN201810971891.3A CN201810971891A CN109067657A CN 109067657 A CN109067657 A CN 109067657A CN 201810971891 A CN201810971891 A CN 201810971891A CN 109067657 A CN109067657 A CN 109067657A
Authority
CN
China
Prior art keywords
label
lsr
message
ldp
network prefix
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.)
Granted
Application number
CN201810971891.3A
Other languages
Chinese (zh)
Other versions
CN109067657B (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810971891.3A priority Critical patent/CN109067657B/en
Publication of CN109067657A publication Critical patent/CN109067657A/en
Application granted granted Critical
Publication of CN109067657B publication Critical patent/CN109067657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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]

Abstract

The embodiment of the present application provides a kind of message processing method and device, applied to the first LSR in target network, according to the first LDP label message for carrying first network prefix, and carry first network prefix the first SR label packet generate the first SR enter label, the 2nd LSR of SR label forwarding is not supported upstream to send the second LDP label message for carrying the corresponding relationship that first network prefix enters label with the first SR in LSR, so that the 2nd LSR is when receiving the first service message to match with first network prefix, it is that the first SR enters label by the tag modification in the first service message.As it can be seen that can also be SR label by the tag modification of the first service message, so that egress LSR can receive the service message for carrying SR label, and then business diagnosis relevant to SR label can be carried out even if the 2nd LSR does not support SR label forwarding.

Description

A kind of message processing method and device
Technical field
This application involves technical field of the computer network, more particularly to a kind of message processing method and device.
Background technique
Currently, multiprotocol label switching (Multiprotocol Label Switching, MPLS) network is to apply to compare One of extensive network.The basic Component units of MPLS network be Label Switch Router (Label Switching Router, LSR), entrance LSR, inside LSR and egress LSR can be specifically divided into.Entrance LSR can receive service message, and by business report Text is forwarded to internal LSR, and then, service message can be forwarded to egress LSR by internal LSR.
After MPLS network foundation, each LSR needs first to generate Label Forwarding Information Base, is docked so as to subsequent according to Label Forwarding Information Base The service message received is forwarded.Each LSR in MPLS network supports tag distribution protocol (Label Distribution Protocol, LDP), and LDP label forwarding table, detailed process can be generated are as follows: egress LSR can be a certain network prefix point Enter label with corresponding first LDP label, and using the first LDP label as the LDP of itself, then internally LSR sends carrying There is the first LDP label message of the corresponding relationship of the network prefix and the first LDP label.Internal LSR is according to first received LDP label message generates corresponding second LDP label of the network prefix, and the LDP as itself enters label, by the first LDP label As the LDP outgoing label of itself, LDP label forwarding table is obtained, meanwhile, internal LSR can also be marked according to the first LDP received Message is signed, generates the second LDP label message, and send supreme trip LSR.
Each equipment can also support multiprotocol label switching section to route (Segment Routing with MPLS, MPLS SR) technology, and generate SR Label Forwarding Information Base, detailed process are as follows: egress LSR can be according to the corresponding default rope of a certain network prefix Draw value and Segment routing overall situation label segment (Segment Routing Global Block, the SRGB) base value of itself generates SR mark Label, the SR as itself enter label, and internally LSR sends the SR label packet for carrying the SRGB of itself.Internal LSR according to The SR label packet received, the SR for generating itself enter label and SR outgoing label, obtain the corresponding SR label of the network prefix and turn It delivers.
In practice, there may be certain LSR (can be described as the 2nd LSR) for not supporting SR label forwarding in MPLS network, It can be LDP outgoing label by the tag modification of service message according to LDP label forwarding table when 2nd LSR receives service message, and It is sent to the first LSR downstream.First LSR then will continue to forward the service message according to LDP label forwarding table, in this way, going out Mouth LSR can only receive the service message for carrying LDP label.And what certain network services needed to be received according to egress LSR The service message for carrying SR label is analyzed.Therefore, if there is the LSR for not supporting SR label forwarding in MPLS network, The service message for the carrying LDP label that then egress LSR can only receive, leads to not carry out business diagnosis.
Summary of the invention
The embodiment of the present application is designed to provide a kind of message processing method and device, egress LSR can be made to receive The service message of SR label is carried, and then business diagnosis relevant to SR label can be carried out.Specific technical solution is as follows:
In a first aspect, in order to achieve the above object, the embodiment of the present application discloses a kind of message processing method, the method Applied to the first LSR in target network, the target network further includes other LSR, which comprises
When received the first tag distribution protocol LDP label message for carrying first network prefix and carry After the first Segment routing SR label packet for stating first network prefix, generated and described first according to the first SR label packet Corresponding first SR of network prefix enters label;
The 2nd LSR of SR label forwarding is not supported if existed in the LSR of upstream, according to the first LDP label message, to 2nd LSR sends the 2nd LDP mark for carrying the corresponding relationship that the first network prefix enters label with the first SR Sign message so that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and receiving and It is described the by the tag modification in first service message when the first service message that the first network prefix matches One SR enters label.
Optionally, the method also includes:
According to the first SR label packet, the first SR outgoing label is generated;
First SR is entered into label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base;
When receive carry the first SR and enter the second service message of label when, according to the SR Label Forwarding Information Base, It is the first SR outgoing label by the first SR tag modification in second service message.
Optionally, the method also includes:
Obtain the device identification for sending the LSR of the first SR label packet;
The device identification that will acquire enters label as the first SR and the corresponding next-hop of the first SR outgoing label is set Standby mark, is added in the SR Label Forwarding Information Base.
Optionally, the method also includes:
From the SR Label Forwarding Information Base, obtains and enter label and the corresponding mesh of the first SR outgoing label with the first SR Mark next-hop device mark;
The second service message of the first SR outgoing label will be carried, is sent to the target next-hop device mark pair The target device answered.
Optionally, the corresponding default index value of the first network prefix is also carried in the first SR label packet, It is described that label is entered according to the first SR label packet generation first SR corresponding with the first network prefix, comprising:
Obtain the default index value;
By preset Segment routing overall situation label segment base value and the default index value and value, as the first network Corresponding first SR of prefix enters label.
Second aspect, in order to achieve the above object, the embodiment of the present application disclose a kind of message process device, described device Applied to the first LSR in target network, the target network further includes other LSR, and described device includes:
Generation module, for when receive carry first network prefix the first tag distribution protocol LDP label message, It is raw according to the first SR label packet and after carrying the first Segment routing SR label packet of the first network prefix Enter label at first SR corresponding with the first network prefix;
Sending module, if for there is the 2nd LSR for not supporting SR label forwarding in the LSR of upstream, according to described first LDP label message sends to the 2nd LSR and carries the corresponding pass that the first network prefix enters label with the first SR Second LDP label message of system, so that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, And when receiving the first service message to match with the first network prefix, by the label in first service message It is revised as the first SR and enters label.
Optionally, described device further include:
Processing module, for generating the first SR outgoing label according to the first SR label packet;
First SR is entered into label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base;
When receive carry the first SR and enter the second service message of label when, according to the SR Label Forwarding Information Base, It is the first SR outgoing label by the first SR tag modification in second service message.
Optionally, the processing module is also used to obtain the device identification for sending the LSR of the first SR label packet;
The device identification that will acquire enters label as the first SR and the corresponding next-hop of the first SR outgoing label is set Standby mark, is added in the SR Label Forwarding Information Base.
Optionally, the processing module is also used to from the SR Label Forwarding Information Base, is obtained and is entered label with the first SR Target next-hop device mark corresponding with the first SR outgoing label;
The second service message of the first SR outgoing label will be carried, is sent to the target next-hop device mark pair The target device answered.
Optionally, the corresponding default index value of the first network prefix is also carried in the first SR label packet, The generation module is specifically used for obtaining the default index value;
By preset Segment routing overall situation label segment base value and the default index value and value, as the first network Corresponding first SR of prefix enters label.
The third aspect, in order to achieve the above object, the embodiment of the present application provide a kind of electronic equipment, including processor, Communication interface, memory and communication bus, wherein processor, communication interface, memory are completed each other by communication bus Communication;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step described in first aspect.
Fourth aspect, in order to achieve the above object, the embodiment of the present application provide a kind of machine readable storage medium, storage There is machine-executable instruction, when being called and being executed by processor, the machine-executable instruction promotes the processor: realizing Method and step described in first aspect.
5th aspect, in order to achieve the above object, the embodiment of the present application provides a kind of computer program comprising instruction Product, when run on a computer, so that computer executes method and step described in above-mentioned first aspect.
A kind of message processing method and device provided by the embodiments of the present application are handed over applied to the first label in target network Router LSR is changed, target network further includes other LSR, when receiving the first LDP label report for carrying first network prefix After the first SR label packet that is literary and carrying first network prefix, according to the generation of the first SR label packet and first network Corresponding first SR of prefix enters label, if there is the 2nd LSR for not supporting SR label forwarding in the LSR of upstream, sends out to the 2nd LSR The the second LDP label message for carrying the corresponding relationship that first network prefix enters label with the first SR is sent, so that the 2nd LSR is stored Include the LDP label forwarding table that the first SR enters label, and is receiving the first business report to match with first network prefix Tag modification in first service message is that the first SR enters label by Wen Shi.Based on above-mentioned processing, even if the 2nd LSR is not supported The tag modification of first service message can also be SR label, carried so that egress LSR can receive by SR label forwarding The service message of SR label, and then business diagnosis relevant to SR label can be carried out.
Certainly, any product or method for implementing the application must be not necessarily required to reach all the above excellent simultaneously Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of frame diagram of group-network construction provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of message processing method provided by the embodiments of the present application;
Fig. 3 is a kind of exemplary flow chart of message processing method provided by the embodiments of the present application;
Fig. 4 is a kind of structure chart of message process device provided by the embodiments of the present application;
Fig. 5 is the structure chart of a kind of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of message processing method and device, can be applied to first in target network LSR, target network further include other LSR.Do not support that the LSR of SR label forwarding can be described as the 2nd LSR in target network, first LSR is the downstream LSR of the 2nd LSR.
Referring to Fig. 1, Fig. 1 is a kind of frame diagram of group-network construction provided by the embodiments of the present application, is a kind of possible application Scene.The networking includes multiple LSR:LSR1, LSR2, LSR3, LSR4 and LSR5, and SRGB base value is 16000.Wherein, first LSR is LSR4, and the 2nd LSR is LSR3, and LSR1 is entrance LSR, and LSR5 is egress LSR.The available a certain network prefix of LSR5 Corresponding SR label, specifically, network prefix can be Loopback (local loopback) address of LSR5 itself, then, LSR5 The corresponding default index value of the available network prefix, default index value can be set by technical staff according to business demand It sets.For example, the address Loopback of LSR5 is 1.1.1.1/32, corresponding default index value is 201.LSR5 according to itself SRGB base value 16000, the corresponding SR label of available address 1.1.1.1/32 are 16000+201=16201, as itself SR enters label.In addition, LSR5 can also distribute LDP label 1600 for address 1.1.1.1/32, the SR as itself enters label.So Afterwards, LSR5 can will send the corresponding relationship for carrying itself SRGB base value and address 1.1.1.1/32 and index to LSR4 The SR label packet of value 201.After LSR4 receives the SR label packet of LSR5 transmission, according to the SRGB base value and index of LSR5 Value, generates the SR outgoing label 16000+201=16201 of itself, meanwhile, LSR4 is generated according to itself SRGB benchmark and index value The SR of itself enters label 16000+201=16201.In addition, LSR5 can also be sent to LSR4 carries address 1.1.1.1/32 With the LDP label message of the corresponding relationship of LDP label 1600.LSR4 then can be generated itself corresponding address 1.1.1.1/32's LDP enters label 1500, by 1600 as itself LDP outgoing label.
In the prior art, LSR4 can send the correspondence for carrying address 1.1.1.1/32 and LDP label 1500 to LSR3 The LDP label message of relationship.After LSR3 receives label packet, the LDP that itself corresponding address 1.1.1.1/32 can be generated enters Label 1000 and LDP outgoing label 1500.In addition, the corresponding SR of address 1.1.1.1/32, which can be generated, in LSR2 enters label 16201.By SR label forwarding is not supported in LSR3, and when LSR2 receives the service message for carrying SR label 16201, LSR2 is viscous according to label Normally, the LDP that the SR label 16201 in service message is revised as LSR3 is entered into label 1000, and by modified business report Text is sent to LSR3.After LSR3 receives the service message, the LDP label 1000 in the service message is revised as itself LDP outgoing label 1500, and modified service message is sent to LSR4.After LSR4 receives the service message, by the business LDP label 1500 in message is revised as the LDP outgoing label 1600 of itself, and modified service message is sent to LSR5, So far, the label in service message that egress LSR 5 receives is that the LDP of itself enters label 1600.As can be seen that due to LSR2 There is the LSR3 for not supporting SR label forwarding before with LSR5, even if carrying SR label in the service message that LSR2 is received, The label in service message that LSR5 is received can also be modified to LDP label.
Method based on the embodiment of the present application, LSR4 receive carry address 1.1.1.1/32 LDP label message and After SR label packet, LSR4 enters 16201 corresponding relationship of label to the SR that LSR3 transmission carries address 1.1.1.1/32 and itself LDP label message, i.e., notice LSR3 itself LDP enter label be 16201.After LSR3 receives the LDP label message of LSR4, It generates the corresponding LDP of address 1.1.1.1/32 and enters label 1000, and be used as corresponding LDP outgoing label for 16201.Not due to LSR3 Supporting SR label forwarding, when LSR2 receives the service message for carrying SR label 16201, LSR2 bonds rule according to label, The LDP that SR label 16201 in service message is revised as LSR3 is entered into label 1000, and modified service message is sent to LSR3.After LSR3 receives the service message, the LDP label 1000 in the service message is revised as to the LDP outgoing label of itself 16201, and modified service message is sent to LSR4.It, will be in the service message after LSR4 receives the service message SR label 16201 is revised as the SR outgoing label 16201 of itself, and modified service message is sent to LSR5, so far, outlet The label carried in the service message that LSR5 is received is that the SR of itself enters label 16201, and then can be received according to LSR5 Service message carry out relevant to SR label business diagnosis, for example, the business such as traffic statistics.
Referring to fig. 2, Fig. 2 is a kind of flow chart of message processing method provided by the embodiments of the present application, and this method can answer For the first LSR in target network, target network further includes other LSR, and this method may comprise steps of:
S201: when receive the first tag distribution protocol LDP label message for carrying first network prefix and carry After having the first Segment routing SR label packet of first network prefix, generated and first network prefix according to the first SR label packet Corresponding first SR enters label.
In an implementation, in order to realize the business to match to destination address and a certain network prefix (i.e. first network prefix) The forward process of message, in MPLS network operational process, the first LSR can receive downstream LSR transmission carry the first net The LDP label message (the first LDP label message) of network prefix can also carry downstream LSR's in the first LDP label message LDP enters label.Correspondingly, the first LSR is generated corresponding with first network prefix according to the first LDP label message received LDP label, the LDP as itself enters label, and the LDP of downstream LSR is entered LDP outgoing label of the label as itself, generates LDP Label Forwarding Information Base, and then the service message for carrying LDP label can be forwarded according to LDP label forwarding table.
In addition, if the first LSR is the entrance LSR of MPLS network, first can also to generate first network prefix corresponding Forwarding information storehouse (Forward Information dataBase, FIB) table, the fib table may refer to table (1).
Table (1)
Dest Out label Nexthop Out interface
10.1.0.0 40 X A1
Record has the Dest (destination address), Out label (outgoing label), Nexthop of service message (next in table (1) Jump equipment mark) and Out interface (outgoing interface) corresponding relationship.It is when the first LSR receives destination address When service message 10.1.0.0, label 40 is added for the service message, and next-hop device X is sent to by outgoing interface A1, The equipment X i.e. downstream LSR of the first LSR.
First LSR can also receive the SR label packet (i.e. first for carrying first network prefix of downstream LSR transmission SR label packet).After receiving the first LDP label message and the first SR label packet, the first LSR can be marked according to the first SR Label message generates first SR corresponding with first network prefix and enters label.
Optionally, the corresponding default index value of first network prefix can be carried in the first SR label packet.Correspondingly, It may include following processing step that first LSR, which generates corresponding first SR of first network prefix to enter label:
Step 1 obtains default index value.
In an implementation, if carrying the corresponding default index value of first network prefix in the first SR label packet, the One LSR can parse the first SR label packet, obtain default index value.
Step 2, by preset Segment routing overall situation label segment base value and default index value and value, as first network Corresponding first SR of prefix enters label.
In an implementation, after the first LSR obtains the corresponding default index value of first network prefix, itself available segmentation Route global label segment base value, by the Segment routing overall situation label segment base value of itself and default index value and value, as first The corresponding SR of network prefix enters label (i.e. the first SR enters label).
S202: not supporting the 2nd LSR of SR label forwarding if existed in the LSR of upstream, according to the first LDP label message, The the second LDP label message for carrying the corresponding relationship that first network prefix enters label with the first SR is sent to the 2nd LSR, so that 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and is matched receiving with first network prefix It is that the first SR enters label by the tag modification in the first service message when the first service message.
Wherein, in the neighborhood for establishing MPLS network, the first LSR, which can be determined, does not support SR label in the LSR of upstream The LSR (i.e. the 2nd LSR) of forwarding.
In an implementation, if there are the 2nd LSR in the LSR of upstream, the first LSR can be according to the first LDP label message, to Two LSR send the second LDP label message for carrying the corresponding relationship that first network prefix enters label with the first SR.Specifically, First LSR obtains first network prefix, generates the LDP mark for carrying the corresponding relationship that first network prefix enters label with the first SR It signs message (i.e. the second LDP label message).Then, the second LDP label message can be sent to the 2nd LSR by the first LSR.
Based on above-mentioned processing, after the 2nd LSR receives the second LDP label message of the first LSR transmission, can be generated and the The corresponding LDP label of one network prefix, the LDP as itself enter label, and the first SR that will be carried in the second LDP label message Enter LDP outgoing label of the label as itself, and then generate the LDP label forwarding table of itself, referring to table (2).
Table (2)
In label Out label
The LDP of 2nd LSR enters label First SR enters label
When the 2nd LSR receives service message (i.e. the first service message) to match with first network prefix, wherein The LDP that label in first service message is the 2nd LSR enters label, and the 2nd LSR, will then according to the LDP label forwarding table of itself Label (i.e. the LDP of itself enters label) in first service message, be revised as itself LDP outgoing label (i.e. the first SR enter mark Label).
As it can be seen that even if the 2nd LSR does not support SR label forwarding, it can also be by the tag modification in the service message received Enter label for the SR of downstream LSR, and then the egress LSR of MPLS network can be made to receive the service message for carrying SR label.
Optionally, the first LSR can also be handled the service message received according to the SR Label Forwarding Information Base of itself. Specifically, this method may also comprise the following steps::
Step 1 generates the first SR outgoing label according to the first SR label packet.
In an implementation, the first LSR according to the first SR label packet, can generate itself SR outgoing label (i.e. the first SR goes out Label).
For example, the corresponding default index value of first network prefix and downstream can be carried in the first SR label packet The SRGB base value of LSR.First LSR can parse the first SR label packet, obtain the corresponding default index value of first network prefix. First LSR can by the SRGB base value of downstream LSR and default index value and value (i.e. the SR of downstream LSR enters label), as oneself The SR outgoing label (i.e. the first SR outgoing label) of body.
First SR is entered label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base by step 2.
In an implementation, the first SR can be entered label and the first SR outgoing label by the first LSR, accordingly be added to the SR of itself In Label Forwarding Information Base, to be forwarded processing to service message according to SR Label Forwarding Information Base.
Step 3, when receive carry the first SR and enter the second service message of label when, will according to SR Label Forwarding Information Base It is the first SR outgoing label that the first SR in second service message, which enters tag modification,.
In an implementation, when the first LSR receives the service message of upstream LSR transmission, it can parse the service message, obtain The label carried to the service message.When the first LSR receives service message (i.e. the second business for carrying the first SR and entering label Message) when, the first LSR can be according to itself SR Label Forwarding Information Base, and by the label in the second service message, (i.e. the first SR enters mark Label) it is revised as the first SR outgoing label.
Optionally, the first LSR can also add corresponding next-hop device mark in SR Label Forwarding Information Base.Specifically, This method can also include following processing step:
Obtain the device identification for sending the LSR of the first SR label packet;The device identification that will acquire enters mark as the first SR Next-hop device mark corresponding with the first SR outgoing label is signed, is added in SR Label Forwarding Information Base.
In an implementation, after receiving the first SR label packet, the first LSR the first SR label packet of available transmission The device identification of downstream LSR (can be described as the 3rd LSR), and the device identification of the 3rd LSR is entered into label and first as the first SR The corresponding next-hop device mark of SR outgoing label, is added in SR Label Forwarding Information Base, referring to table (3).
Table (3)
In label Out label Nexthop
First SR enters label First SR outgoing label 3rd LSR
Correspondingly, the first LSR can also be according to the SR Label Forwarding Information Base that record have next-hop device to identify to receiving Service message is forwarded processing.
Specifically, this method can also include following processing step:
Step 1 obtains and enters under label and the corresponding target of the first SR outgoing label with the first SR from SR Label Forwarding Information Base One jumps device identification.
In an implementation, when the first LSR by the first SR in the second service message enter tag modification be the first SR outgoing label after, First LSR can also be obtained in SR Label Forwarding Information Base, enter label and the corresponding next-hop device of the first SR outgoing label with the first SR Mark (i.e. target next-hop device identifies).
Step 2 will carry the second service message of the first SR outgoing label, be sent to target next-hop device mark pair The target device answered.
In an implementation, after obtaining target next-hop device mark, the first LSR can will carry the first SR outgoing label Second service message is sent to target next-hop device and identifies corresponding target device (i.e. the 3rd LSR), completes the second business report The forward process of text.
Referring to Fig. 3, Fig. 3 is a kind of exemplary flow chart of message processing method provided by the embodiments of the present application, this method It is illustrated by taking the networking of Fig. 1 as an example, the first LSR is LSR4, and the 2nd LSR is LSR3, and the 2nd LSR does not support SR label forwarding. The SRGB base value of LSR1 is 16000, the SRGB base value of LSR2 is 17000, the SRGB base value of LSR3 is 18000, the SRGB of LSR4 Base value is 19000, the SRGB base value of LSR5 is 20000, and first network prefix can be the address Loopback of LSR5 4.4.4.4/32, the corresponding default index value of first network prefix is 0, and this method may include following processing step:
S301: when the first LDP label message for carrying first network prefix 4.4.4.4/32 for receiving LSR5 transmission With carry first network prefix 4.4.4.4/32 the first SR label packet when, LSR4 according to the first SR label packet generate with Corresponding first SR of first network prefix 4.4.4.4/32 enters label (i.e. 19000+0=19000), and the SR of LSR5 is entered label and is made For the corresponding first SR outgoing label (i.e. 20000+0=20000) of first network prefix 4.4.4.4/32, corresponding next-hop is set and is set The standby device identification for being identified as LSR5, obtains SR Label Forwarding Information Base.The SR Label Forwarding Information Base of LSR4 may refer to table (4).
Table (4)
In label Out label Nexthop
First SR enters label 19000 First SR outgoing label 20000 LSR5
S302:LSR4 to LSR3 transmission carries first network prefix 4.4.4.4/32 and the first SR, and to enter label 19000 right The the second LDP label message that should be related to.
S303:LSR3 generates the corresponding LDP of first network prefix 4.4.4.4/32 and enters mark according to the second LDP label message Label 1500, and the first SR is entered into label 19000 as LDP and enters the corresponding LDP outgoing label of label 1500, corresponding next-hop is set Device identification is the device identification of LSR4, obtains LDP label forwarding table, when LSR receives carry that LDP enters label 1500 the When two service messages, the tag modification in the second service message is entered for the first SR by label 19000 according to LDP label forwarding table.
The LDP label forwarding table of LSR3 may refer to table (5).
Table (5)
In label Out label Nexthop
LDP enters label 1500 First SR enters label 19000 LSR4
The second service message for carrying the first SR and entering label 19000 is sent to LSR4 by S304:LSR3.
The tag modification of second service message is the first SR outgoing label according to SR Label Forwarding Information Base by S305:LSR4 20000, and modified second service message is sent to LSR5.
As seen from the above, based on the message processing method of the embodiment of the present application, first network prefix is carried when receiving The first LDP label message and after carrying the first SR label packet of first network prefix, according to the first SR label packet It generates first SR corresponding with first network prefix and enters label, do not support the second of SR label forwarding if existed in the LSR of upstream LSR sends the second LDP label message for carrying the corresponding relationship that first network prefix enters label with the first SR to the 2nd LSR, So that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and receiving and first network prefix phase It is that the first SR enters label by the tag modification in the first service message when the first service message matched.Based on above-mentioned processing, even if 2nd LSR does not support SR label forwarding, can also be SR label by the tag modification of the first service message, so that egress LSR can To receive the service message for carrying SR label, and then business diagnosis relevant to SR label can be carried out.
Corresponding with above-mentioned Fig. 2 embodiment of the method, referring to fig. 4, Fig. 4 is a kind of Message processing provided by the embodiments of the present application The structure chart of device, the device are applied to the first LSR in target network, and the target network further includes other LSR, the dress It sets and includes:
Generation module 401 receives the first tag distribution protocol LDP label report for carrying first network prefix for working as After the first Segment routing SR label packet that is literary and carrying the first network prefix, according to the first SR label report Text generates first SR corresponding with the first network prefix and enters label;
Sending module 402, if not supporting the 2nd LSR of SR label forwarding for existing in the LSR of upstream, according to described the One LDP label message carries the first network prefix to the 2nd LSR transmission and enters the corresponding of label with the first SR Second LDP label message of relationship, so that the 2nd LSR storage includes the LDP label forwarding that the first SR enters label Table, and when receiving the first service message to match with the first network prefix, it will be in first service message Tag modification is that the first SR enters label.
Optionally, described device further include:
Processing module, for generating the first SR outgoing label according to the first SR label packet;
First SR is entered into label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base;
When receive carry the first SR and enter the second service message of label when, according to the SR Label Forwarding Information Base, It is the first SR outgoing label by the first SR tag modification in second service message.
Optionally, the processing module is also used to obtain the device identification for sending the LSR of the first SR label packet;
The device identification that will acquire enters label as the first SR and the corresponding next-hop of the first SR outgoing label is set Standby mark, is added in the SR Label Forwarding Information Base.
Optionally, the processing module is also used to from the SR Label Forwarding Information Base, is obtained and is entered label with the first SR Target next-hop device mark corresponding with the first SR outgoing label;
The second service message of the first SR outgoing label will be carried, is sent to the target next-hop device mark pair The target device answered.
Optionally, the corresponding default index value of the first network prefix is also carried in the first SR label packet, The generation module 401 is specifically used for obtaining the default index value;
By preset Segment routing overall situation label segment base value and the default index value and value, as the first network Corresponding first SR of prefix enters label.
As seen from the above, based on the message process device of the embodiment of the present application, first network prefix is carried when receiving The first LDP label message and after carrying the first SR label packet of first network prefix, according to the first SR label packet It generates first SR corresponding with first network prefix and enters label, do not support the second of SR label forwarding if existed in the LSR of upstream LSR sends to the 2nd LSR according to the first LDP label message and carries the corresponding pass that first network prefix enters label with the first SR Second LDP label message of system, so that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and is receiving It is that the first SR enters mark by the tag modification in the first service message when to the first service message to match with first network prefix Label.Based on above-mentioned processing, even if the 2nd LSR does not support SR label forwarding, can also be by the tag modification of the first service message SR label so that egress LSR can receive the service message for carrying SR label, and then can carry out relevant to SR label Business diagnosis.
The embodiment of the present application also provides a kind of electronic equipment, as shown in figure 5, include processor 501, communication interface 502, Memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory 503 are complete by communication bus 504 At mutual communication,
Memory 503, for storing computer program;
Processor 501, when for executing the program stored on memory 503, so that the electronic equipment executes at message The step of reason method, this method comprises:
When received the first tag distribution protocol LDP label message for carrying first network prefix and carry After the first Segment routing SR label packet for stating first network prefix, generated and described first according to the first SR label packet Corresponding first SR of network prefix enters label;
The 2nd LSR of SR label forwarding is not supported if existed in the LSR of upstream, according to the first LDP label message, to 2nd LSR sends the 2nd LDP mark for carrying the corresponding relationship that the first network prefix enters label with the first SR Sign message so that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and receiving and It is described the by the tag modification in first service message when the first service message that the first network prefix matches One SR enters label.
Optionally, the method also includes:
According to the first SR label packet, the first SR outgoing label is generated;
First SR is entered into label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base;
When receive carry the first SR and enter the second service message of label when, according to the SR Label Forwarding Information Base, It is the first SR outgoing label by the first SR tag modification in second service message.
Optionally, the method also includes:
Obtain the device identification for sending the LSR of the first SR label packet;
The device identification that will acquire enters label as the first SR and the corresponding next-hop of the first SR outgoing label is set Standby mark, is added in the SR Label Forwarding Information Base.
Optionally, the method also includes:
From the SR Label Forwarding Information Base, obtains and enter label and the corresponding mesh of the first SR outgoing label with the first SR Mark next-hop device mark;
The second service message of the first SR outgoing label will be carried, is sent to the target next-hop device mark pair The target device answered.
Optionally, the corresponding default index value of the first network prefix is also carried in the first SR label packet, It is described that label is entered according to the first SR label packet generation first SR corresponding with the first network prefix, comprising:
Obtain the default index value;
By preset Segment routing overall situation label segment base value and the default index value and value, as the first network Corresponding first SR of prefix enters label.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described Message processing when being executed by processor The step of method.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that computer executes any message processing method in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For electronic equipment, machine readable storage medium and computer program product embodiments, since it is substantially similar to method reality Example is applied, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (10)

1. a kind of message processing method, which is characterized in that the method is applied to the first Tag switching routing in target network Device LSR, the target network further include other LSR, which comprises
When receiving the first tag distribution protocol LDP label message for carrying first network prefix and carry described After first Segment routing SR label packet of one network prefix, generated and the first network according to the first SR label packet Corresponding first SR of prefix enters label;
The 2nd LSR of SR label forwarding is not supported if existed in the LSR of upstream, according to the first LDP label message, to described 2nd LSR sends the second LDP label report for carrying the corresponding relationship that the first network prefix enters label with the first SR Text so that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and receive with it is described It is the first SR by the tag modification in first service message when the first service message that first network prefix matches Enter label.
2. the method according to claim 1, wherein the method also includes:
According to the first SR label packet, the first SR outgoing label is generated;
First SR is entered into label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base;
When receive carry the first SR and enter the second service message of label when, according to the SR Label Forwarding Information Base, by institute Stating the first SR tag modification in the second service message is the first SR outgoing label.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Obtain the device identification for sending the LSR of the first SR label packet;
The device identification that will acquire enters label and the corresponding next-hop device mark of the first SR outgoing label as the first SR Know, is added in the SR Label Forwarding Information Base.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
From the SR Label Forwarding Information Base, obtains and enter under label and the corresponding target of the first SR outgoing label with the first SR One jumps device identification;
The second service message of the first SR outgoing label will be carried, it is corresponding to be sent to the target next-hop device mark Target device.
5. the method according to claim 1, wherein also carrying described first in the first SR label packet The corresponding default index value of network prefix, it is described corresponding with the first network prefix according to the first SR label packet generation The first SR enter label, comprising:
Obtain the default index value;
By preset Segment routing overall situation label segment base value and the default index value and value, as the first network prefix Corresponding first SR enters label.
6. a kind of message process device, which is characterized in that described device is applied to the first Tag switching routing in target network Device LSR, the target network further include other LSR, and described device includes:
Generation module, for when receive carry first network prefix the first tag distribution protocol LDP label message and After the first Segment routing SR label packet for carrying the first network prefix, according to the first SR label packet generate with Corresponding first SR of the first network prefix enters label;
Sending module, if marked for there is the 2nd LSR for not supporting SR label forwarding in the LSR of upstream according to the first LDP Message is signed, sends to the 2nd LSR and to carry the first network prefix and the first SR enters the corresponding relationship of label Second LDP label message, so that the 2nd LSR storage includes the LDP label forwarding table that the first SR enters label, and When receiving the first service message to match with the first network prefix, by the tag modification in first service message Enter label for the first SR.
7. device according to claim 6, which is characterized in that described device further include:
Processing module, for generating the first SR outgoing label according to the first SR label packet;
First SR is entered into label and the first SR outgoing label, is accordingly added in SR Label Forwarding Information Base;
When receive carry the first SR and enter the second service message of label when, according to the SR Label Forwarding Information Base, by institute Stating the first SR tag modification in the second service message is the first SR outgoing label.
8. device according to claim 7, which is characterized in that the processing module is also used to obtain transmission described first The device identification of the LSR of SR label packet;
The device identification that will acquire enters label and the corresponding next-hop device mark of the first SR outgoing label as the first SR Know, is added in the SR Label Forwarding Information Base.
9. device according to claim 8, which is characterized in that the processing module is also used to from the SR label forwarding In table, obtains and enter label and the first SR outgoing label corresponding target next-hop device mark with the first SR;
The second service message of the first SR outgoing label will be carried, it is corresponding to be sent to the target next-hop device mark Target device.
10. device according to claim 6, which is characterized in that also carry described in the first SR label packet The corresponding default index value of one network prefix, the generation module are specifically used for obtaining the default index value;
By preset Segment routing overall situation label segment base value and the default index value and value, as the first network prefix Corresponding first SR enters label.
CN201810971891.3A 2018-08-24 2018-08-24 Message processing method and device Active CN109067657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810971891.3A CN109067657B (en) 2018-08-24 2018-08-24 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810971891.3A CN109067657B (en) 2018-08-24 2018-08-24 Message processing method and device

Publications (2)

Publication Number Publication Date
CN109067657A true CN109067657A (en) 2018-12-21
CN109067657B CN109067657B (en) 2021-03-26

Family

ID=64755969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810971891.3A Active CN109067657B (en) 2018-08-24 2018-08-24 Message processing method and device

Country Status (1)

Country Link
CN (1) CN109067657B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110808924A (en) * 2019-11-12 2020-02-18 迈普通信技术股份有限公司 Chip loopback message processing method, device and storage medium
CN111669422A (en) * 2019-03-08 2020-09-15 华为技术有限公司 Message transmission method and device
CN112134801A (en) * 2020-08-11 2020-12-25 中盈优创资讯科技有限公司 Method and device for processing segment identification SID and each node

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869061A (en) * 2014-02-24 2015-08-26 瞻博网络公司 Neighbor-label distribution with label distribution protocol
CN104980350A (en) * 2014-04-02 2015-10-14 华为技术有限公司 Message processing method and label switching router
CN105075195A (en) * 2013-03-15 2015-11-18 思科技术公司 Label distribution protocol over segment routing
CN105871722A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Tag structure and tag message forwarding method and device
US20170026224A1 (en) * 2015-07-22 2017-01-26 Cisco Technology, Inc. Resilient segment routing service hunting with tcp session stickiness
CN106487686A (en) * 2015-08-28 2017-03-08 中兴通讯股份有限公司 SR forwarding entry generation method and device
WO2017141080A1 (en) * 2016-02-15 2017-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Techniques for exposing maximum node and/or link segment identifier depth utilizing ospf
US9807001B2 (en) * 2014-07-17 2017-10-31 Cisco Technology, Inc. Segment routing using a remote forwarding adjacency identifier
CN107666438A (en) * 2016-07-27 2018-02-06 中兴通讯股份有限公司 Message forwarding method and device
US9942136B2 (en) * 2013-06-08 2018-04-10 Huawei Technologies Co., Ltd. Packet processing method and router
CN108023815A (en) * 2016-11-03 2018-05-11 中兴通讯股份有限公司 Information transferring method, apparatus and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105075195A (en) * 2013-03-15 2015-11-18 思科技术公司 Label distribution protocol over segment routing
US9942136B2 (en) * 2013-06-08 2018-04-10 Huawei Technologies Co., Ltd. Packet processing method and router
CN104869061A (en) * 2014-02-24 2015-08-26 瞻博网络公司 Neighbor-label distribution with label distribution protocol
CN104980350A (en) * 2014-04-02 2015-10-14 华为技术有限公司 Message processing method and label switching router
US9807001B2 (en) * 2014-07-17 2017-10-31 Cisco Technology, Inc. Segment routing using a remote forwarding adjacency identifier
CN105871722A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Tag structure and tag message forwarding method and device
US20170026224A1 (en) * 2015-07-22 2017-01-26 Cisco Technology, Inc. Resilient segment routing service hunting with tcp session stickiness
CN106487686A (en) * 2015-08-28 2017-03-08 中兴通讯股份有限公司 SR forwarding entry generation method and device
WO2017141080A1 (en) * 2016-02-15 2017-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Techniques for exposing maximum node and/or link segment identifier depth utilizing ospf
CN107666438A (en) * 2016-07-27 2018-02-06 中兴通讯股份有限公司 Message forwarding method and device
CN108023815A (en) * 2016-11-03 2018-05-11 中兴通讯股份有限公司 Information transferring method, apparatus and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669422A (en) * 2019-03-08 2020-09-15 华为技术有限公司 Message transmission method and device
CN111669422B (en) * 2019-03-08 2022-03-11 华为技术有限公司 Message transmission method and device
US11956148B2 (en) 2019-03-08 2024-04-09 Huawei Technologies Co., Ltd. Packet transmission method and device
CN110808924A (en) * 2019-11-12 2020-02-18 迈普通信技术股份有限公司 Chip loopback message processing method, device and storage medium
CN112134801A (en) * 2020-08-11 2020-12-25 中盈优创资讯科技有限公司 Method and device for processing segment identification SID and each node
CN112134801B (en) * 2020-08-11 2022-02-15 中盈优创资讯科技有限公司 Method and device for processing segment identification SID and each node

Also Published As

Publication number Publication date
CN109067657B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US20240007376A1 (en) Network Performance Parameter Sending Method, Network Performance Calculation Method, and Network Node
WO2019128950A1 (en) Packet processing method, network node, and system
CN104734964B (en) Message processing method, node and system
US8854953B2 (en) Optimizing endpoint selection of MRT-FRR detour paths
CN109067657A (en) A kind of message processing method and device
CN105024985A (en) Message processing method and apparatus
CN109962850A (en) The method and controller and computer readable storage medium of realization Segment routing
CN102035740B (en) Multi-protocol label switching three-layer private virtual net fast rerouting method and system
CN105376162B (en) A kind of link-state information notifying method and equipment
CN104954288B (en) Method for sending information, device and communication system
CN103746874B (en) Method and equipment for IP (Internet protocol) FPM (flow performance monitor)
CN110138610A (en) A kind of sending method and device of service message
CN108965137A (en) A kind of message processing method and device
CN109525501A (en) A kind of method and apparatus adjusting forward-path
CN107979519A (en) The difference implementation method and VTEP, PE of VXLAN business
CN103986654A (en) LSP generating method and device
CN103986660B (en) The device of loading micro code and the method for loading micro code
CN109347748A (en) A kind of method and apparatus of synchronization of routing information
CN108696433A (en) Route flapping suppressing method and BGP routing devices
CN112995034B (en) Service path determination method and device
CN107078953A (en) The method divided for scalable computer network
CN113938403A (en) Capability notification method and related equipment
US20100124177A1 (en) Method for specifying input edge router
CN111866916A (en) Service configuration method, equipment and server
CN109150707B (en) Routing path analysis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant