CN108965137A - A kind of message processing method and device - Google Patents
A kind of message processing method and device Download PDFInfo
- Publication number
- CN108965137A CN108965137A CN201810805036.5A CN201810805036A CN108965137A CN 108965137 A CN108965137 A CN 108965137A CN 201810805036 A CN201810805036 A CN 201810805036A CN 108965137 A CN108965137 A CN 108965137A
- Authority
- CN
- China
- Prior art keywords
- address
- routing table
- router
- policy
- target
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
Abstract
Present disclose provides a kind of message processing method and devices, applied to the router in Border Gateway Protocol (BGP) network, router can receive the first-class rule and policy of the first equipment transmission, judge in the local routing table of router with the presence or absence of target routing lists corresponding with address to be matched and next hop address.If target routing lists are not present in local routing table, the object message to be matched if router to the destination address and address to be matched that receive is forwarded processing according to local routing table.Based on above-mentioned processing, even if receiving only first-class rule and policy, when target routing lists are not present in local routing table, router can be forwarded processing to the message received according to local routing table, without E-Packeting according to invalid stream rule and policy, service disconnection is avoided.
Description
Technical field
This disclosure relates to field of communication technology, more particularly to a kind of message processing method and device.
Background technique
It can be defined with to be matched in stream rule (English: Flow Specification, abbreviation: Flowspec) strategy
The corresponding occurrence in location, for example, address to be matched can for source address to be matched, destination address, source port, destination port,
The corresponding occurrence such as protocol type.Flow Spec strategy is can store in the network equipment, when certain that the network equipment receives
When the destination address of one message and address to be matched match, the network equipment can turn the message according to next hop address
Hair processing.
Border Gateway Protocol (English: Border Gateway Protocol, abbreviation: BGP) network may include controller
With multiple network equipments.There are BGP connections between two network equipments, then two network equipments bgp neighbor each other.In BGP
In network, after a certain network equipment receives stream rule and policy from bgp neighbor or controller, which needs to check
The address to be matched in rule and policy and the validity of next hop address are flowed, to determine the validity of stream rule and policy.In determination
When flowing the validity of rule and policy, the network equipment also needs to obtain the corresponding road in address to be matched from bgp neighbor or controller
By table (can be described as the first routing table) and the corresponding routing table of next hop address (can be described as secondary route table), then, network is set
It is standby regular according to the first routing table, secondary route table, local routing table and longest mask matches, match address is treated respectively under
One, which jumps address, carries out validity check.
Summary of the invention
The disclosure is designed to provide a kind of message processing method and device, can interrupt to avoid network service.Specifically
Technical solution is as follows:
In a first aspect, in order to achieve the above object, the present disclosure discloses a kind of message processing method, the method is applied to
Router in bgp network, which comprises
Receive the first-class rule and policy of the first equipment transmission, wherein comprising to be matched in the first-class rule and policy
Address and next hop address;
Judge to whether there is and the address to be matched and the next hop address in the local routing table of the router
Corresponding target routing lists;
If the target routing lists are not present in the local routing table, to the destination address that receives and it is described to
The object message that match address matches is forwarded processing according to the local routing table.
Second aspect, in order to achieve the above objectives, the disclosure also disclose a kind of message process device, and described device is applied to
Router in bgp network, described device include:
Receiving module, for receiving the first-class rule and policy of the first equipment transmission, wherein the first-class rule and policy
In include address to be matched and next hop address;
Judgment module, whether there is in the local routing table for judging the router and the address to be matched and institute
State the corresponding target routing lists of next hop address;
First processing module, if for the target routing lists to be not present in the local routing table, to receiving
Destination address and the object message that matches of the address to be matched processing is forwarded according to the local routing table.
The third aspect, in order to achieve the above objectives, the disclosure also disclose a kind of router, including processor, communication interface,
Memory and communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
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 objectives, the disclosure also disclose a kind of machine readable storage medium, are stored with machine
Executable instruction, when being called and being executed by processor, the machine-executable instruction promotes the processor: realizing first party
Method and step described in face.
A kind of message processing method and device that the disclosure provides, can be applied to the router in bgp network, router
Can receive the first equipment transmission first-class rule and policy, judge in the local routing table of router with the presence or absence of with it is to be matched
Address and the corresponding target routing lists of next hop address.If target routing lists are not present in local routing table, router if, is right
The object message that the destination address and address to be matched received matches is forwarded processing according to local routing table.Based on upper
Processing is stated, even if receiving only first-class rule and policy, when target routing lists are not present in local routing table, router can be with
Processing is forwarded to the message received according to local routing table, without being E-Packeted according to invalid stream rule and policy,
It can be avoided service disconnection.
Certainly, any product or method for implementing the disclosure must be not necessarily required to reach all the above excellent simultaneously
Point.
Detailed description of the invention
It, below will be to embodiment or the prior art in order to illustrate more clearly of the disclosure or technical solution in the prior art
Attached drawing needed in description is briefly described, it should be apparent that, the accompanying drawings in the following description is only the disclosure
Some embodiments for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other attached drawings.
Fig. 1 is a kind of frame diagram for group-network construction that the disclosure provides;
Fig. 2 is a kind of flow chart for message processing method that the disclosure provides;
Fig. 3 is a kind of exemplary flow chart for message processing method that the disclosure provides;
Fig. 4 is a kind of exemplary flow chart for message processing method that the disclosure provides;
Fig. 5 is a kind of structure chart for message process device that the disclosure provides;
Fig. 6 is a kind of structure chart for router that the disclosure provides.
Specific embodiment
Below in conjunction with the attached drawing in the disclosure, the technical solution in the disclosure is clearly and completely described, is shown
So, described embodiment is only disclosure a part of the embodiment, instead of all the embodiments.Based on the reality in the disclosure
Example is applied, every other embodiment obtained by those of ordinary skill in the art without making creative efforts all belongs to
In the range of disclosure protection.
Present disclose provides a kind of message processing method and devices, and can be applied to router (can be described as target routing
Device), destination router can be the either router in bgp network, and referring to Fig. 1, Fig. 1 is a kind of group of rack that the disclosure provides
The frame diagram of structure is a kind of possible application scenarios.The networking includes: router R1, router R2, router R3, router
R4, router R5 and router R6.Wherein, router R1, router R2 and router R3 be autonomous system (English:
Autonomous System, referred to as: AS) 65000 border router, router R1, router R2 and router R3 each other in
Portion's Border Gateway Protocol (English: Internal Border Gateway Protocol, referred to as: IBGP) neighbours.Router R4,
Router R5 and router R6 is the border router of AS 65001, router R4, router R5 and router R6 IBGP each other
Neighbours.External BGP is (English: External Border Gateway each other by router R1 and router R4
Protocol, referred to as: EBGP) neighbours, router R2 and router R5 ebgp neighbor each other, router R3 and router R6 are each other
Ebgp neighbor.Router R1 can be set to master control router, i.e., all messages are required by router R1.Work as router
When R1 breaks down, message can be handled by router R2 and router R3.A certain destination in Autonomous Domain 65001
Dest1 corresponding routing table in location passes through router R4- router R1, router R5- router R2, router R6- router R1
Three links are published in Autonomous Domain 65000.
Due in controller usually and be not configured with routing table, router can only receive the stream rule plan that controller issues
Slightly.The router can determine stream rule according to local routing table and the address to be matched and the next hop address that flow in rule and policy
Then tactful validity.When in the local routing table of the router there is no with the address to be matched and next in stream rule and policy
When jumping corresponding routing table (i.e. the target routing lists) in address, i.e., stream rule and policy is invalid at this time, and the router is then according to local road
Processing is forwarded to the message received by table.Based on above-mentioned processing, even if receiving only stream rule and policy, work as local routing
When target routing lists being not present in table, router can be forwarded processing to the message received according to local routing table, and
It will not be E-Packeted according to invalid stream rule and policy, can be avoided service disconnection.
Referring to fig. 2, Fig. 2 is a kind of flow chart for message processing method that the disclosure provides, and method is applied in bgp network
Destination router, this method may comprise steps of.
S201: the first-class rule and policy that the first equipment is sent is received.
It wherein, include address to be matched and next hop address in first-class rule and policy.Address to be matched and next-hop
Location can be configured by technical staff according to business demand, the message that address and address to be matched match for control purposes
According to specified path transmission, address to be matched can be the interface IP address of a certain network equipment, or include multiple nets
The network address of the subnet of network equipment.First equipment can be the ebgp neighbor of destination router, or destination router
IBGP neighbours, can also be controller.
In embodiment of the disclosure, destination router can receive the stream rule and policy (i.e. first of the first equipment transmission
Flow rule and policy).For example, destination router can receive first-class rule and policy from the ebgp neighbor of itself, it can also be from certainly
The IBGP neighbours of body receive first-class rule and policy, directly can also receive first-class rule and policy from controller.
S202: judge in the local routing table of destination router with the presence or absence of corresponding with address to be matched and next hop address
Target routing lists.
Wherein, destination router can receive the Update (update) of bgp neighbor (including ebgp neighbor and IEBGP neighbours)
Message, to generate local routing table.When a certain link breaks down in network, destination router equally can receive BGP
The Update message of neighbours, to delete the corresponding routing table of the link.
In embodiment of the disclosure, after destination router receives first-class rule and policy, first-class rule be can parse
It is then tactful, obtain address to be matched and the next hop address in first-class rule and policy.Then, destination router may determine that certainly
With the presence or absence of routing table corresponding with the address to be matched and the next hop address, (i.e. target is routed in the local routing table of body
Table).When destination router determines in local routing table that destination router can determine this to be matchedly there are when target routing lists
Location and the next hop address are effective, it can determine that first-class rule and policy is effective.When destination router determines local routing table
In be not present target routing lists when, show that first-class rule and policy is invalid at this time.
S203: if target routing lists are not present in local routing table, with to be matched to the destination address received
The object message that location matches is forwarded processing according to local routing table.
In embodiment of the disclosure, when destination router determines that target routing lists are not present in local routing table, such as
The message (i.e. object message) that fruit destination router receives destination address and address to be matched matches, the i.e. mesh of object message
Address be address to be matched, alternatively, the destination address of object message belongs to the corresponding subnet in address to be matched.At this point, target
Router then needs to be forwarded processing to object message according to local routing table.
Optionally, destination router can be forwarded object message according to the optimal finger table in local routing table
Processing, to improve message forward efficiency.Then step S203 may include following treatment process: the determining and mesh in local routing table
The routing table to be selected that the destination address of mark message matches;According to preset routing table lookup rule, in routing table to be selected really
Determine optimal finger table;Object message is sent to the corresponding interface of the next hop address in optimal finger table, to complete target report
The forward process of text.
Wherein, preset routing table lookup rule can be rule of thumb configured by technical staff.For example, preset road
It can be determined according to longest mask matches rule by table search rule, alternatively, preset routing table lookup rule can also basis
The administrative distance of routing table and the metric of routing table determine, in the local routing table of destination router with destination address phase
The routing table matched can be multiple.
In embodiment of the disclosure, destination router can be inquired in local routing table first, obtain and target report
Each routing table (routing table i.e. to be selected) that the destination address of text matches.Then, destination router can be according to preset routing
Table search rule determines optimal finger table in routing table to be selected.Finally, object message can be sent to most by destination router
The corresponding interface of next hop address in excellent routing table, so that object message is transmitted to the network connecting with the interface from the interface
Equipment completes the forward process of object message.
When determining optimal finger table, destination router can be first according to longest mask matches rule, in routing to be selected
Interim routing table is determined in table.If interim routing table is one, destination router can be using interim routing table as most
Excellent routing table;If interim routing table be it is multiple, destination router can be determined from multiple interim routing tables management away from
From the smallest interim routing table, as preferred routing table.If destination router can be excellent by this it is preferred that routing table is one
Select routing table as optimal finger table;If it is preferred that routing table be it is multiple, destination router can be from multiple preferred routing tables
In determine the smallest preferred routing table of metric, as optimal finger table.
Optionally, when first-class rule and policy is effective, destination router can be according to first-class rule and policy to reception
To message be forwarded processing.Then this method may also comprise the following steps:: if there are target routings in local routing table
Table is then forwarded processing according to first-class rule and policy to the object message received.
In embodiment of the disclosure, when destination router determines in local routing table there are when target routing lists, i.e., this
When first-class rule and policy it is effective.If destination router receives object message, destination router if, can be according to first-class
Rule and policy is forwarded processing to object message.
When being forwarded to object message, object message can be sent in first-class rule and policy by destination router
The corresponding interface of next hop address complete so that object message is transmitted to the network equipment connecting with the interface from the interface
The forward process of object message.Wherein, the next hop address in first-class rule and policy is usually a certain interface of destination router
Network address.
First-class rule and policy can also be sent to other networks when first-class rule and policy is effective by destination router
Equipment, to realize the automatically dispose of stream rule and policy.Correspondingly, if there are targets in the local routing table of destination router
Routing table, this method can also include following processing step.
Step 1, by the next hop address in the next hop address and target routing lists in first-class rule and policy, modification
For the network address for the interface that destination router is connected with the second equipment.
Wherein, the second equipment is with destination router there are the equipment of bgp neighbor relationship, and the second equipment can be one,
Or it is multiple.
When destination router determines in local routing table there are target routing lists, i.e., when first-class rule and policy is effective, mesh
Marking router can be revised as the next hop address in the next hop address and target routing lists in first-class rule and policy certainly
The network address for the interface that body is connected with the second equipment.
For example, with reference to Fig. 1, when destination router is router R1, at this point, the second equipment can be router R2 and road
By device R3, router R1 can by the next hop address in the next hop address and target routing lists in first-class rule and policy,
It is revised as the network address of itself and the router R2 interface connecting, meanwhile, by the next hop address in first-class rule and policy
With the next hop address in target routing lists, it is revised as the network address of itself and the router R3 interface connecting.
Modified first-class rule and policy and modified target routing lists are sent to the second equipment by step 2, with
Make the second equipment according to modified first-class rule and policy and modified target routing lists, the message received is turned
Hair processing.
In embodiment of the disclosure, destination router can be by modified first-class rule and policy and modified mesh
Mark routing table is sent to the second equipment, so that the second equipment is according to modified first-class rule and policy and modified target road
By table, processing is forwarded to the message received.
After second equipment receives modified first-class rule and policy and modified target routing lists, due to target road
It is modified by device is unified to the next hop address of first-class rule and policy and target routing lists, the second equipment equally can be determined that
Modified first-class rule and policy is effective, so can according to modified first-class rule and policy to the message received into
Row forward process.
In addition, occurring link failure in bgp network, destination router is according to the Update message of bgp neighbor to local road
It is updated by table, may result in destination router according to local routing table, determine that first-class rule and policy is invalid, at this point,
Destination router sends the Update message for being directed to target routing lists to bgp neighbor.Bgp neighbor receives the Update message
Afterwards, it is possible to determine that modified first-class rule and policy is invalid.
As it can be seen that the disclosure may be implemented stream rule and policy automatically dispose, and then realize bgp network control message according to
Specified path transmission.
Referring to Fig. 3, Fig. 3 is a kind of exemplary flow chart for message processing method that the disclosure provides, and this method can answer
For the router R4 in Fig. 1, it is illustrated for issuing first-class rule and policy to router R4 by controller, the party
Method may comprise steps of.
S301: the first-class rule and policy that controller is sent is received.
Wherein, in first-class rule and policy comprising address D est1 to be matched and corresponding next hop address (router R4 with
The network address of router R5 connected interface, referred to as first interface address).
S302: judge in local routing table with the presence or absence of mesh corresponding with address D est1 to be matched and first interface address
Routing table is marked, if target routing lists are not present in local routing table, S303-S305 is executed, if existed in local routing table
Target routing lists execute S306-S308.
S303: when receiving the object message that destination address and address D est1 to be matched match, in local routing table
The routing table to be selected that the destination address of middle determination and object message matches.
S304: according to preset routing table lookup rule, optimal finger table is determined in routing table to be selected.
S305: object message is sent to the corresponding interface of the next hop address in optimal finger table, to complete target report
The forward process of text.
S306: when receiving the object message that destination address and address D est1 to be matched match, object message is sent out
Interface corresponding to first interface address is sent, to complete the forward process of object message.
S307: the first interface address in first-class rule and policy and the first interface address in target routing lists are repaired
It is changed to the network address of itself and the router R1 interface being connected.
S308: being sent to router R1 for modified first-class rule and policy and modified target routing lists, so that
Router R1 is forwarded the message received according to modified first-class rule and policy and modified target routing lists
Processing.
Referring to fig. 4, Fig. 4 is a kind of exemplary flow chart for message processing method that the disclosure provides, and this method can answer
For the router R1 in Fig. 1, it is illustrated for issuing second rule and policy to router R1 by controller, the party
Method may comprise steps of.
S401: the second rule and policy that controller is sent is received.
Wherein, in second rule and policy comprising address D est1 to be matched and corresponding next hop address (router R1 with
The network address of router R4 connected interface, referred to as second interface address).
S402: judge in local routing table with the presence or absence of mesh corresponding with address D est1 to be matched and second interface address
Routing table is marked, if target routing lists are not present in local routing table, S403-S405 is executed, if existed in local routing table
Target routing lists execute S406-S408.
S403: when receiving the object message that destination address and address D est1 to be matched match, in local routing table
The routing table to be selected that the destination address of middle determination and object message matches.
S404: according to preset routing table lookup rule, optimal finger table is determined in routing table to be selected.
S405: object message is sent to the corresponding interface of the next hop address in optimal finger table, to complete target report
The forward process of text.
S406: when receiving the object message that destination address and address D est1 to be matched match, object message is sent out
Interface corresponding to second interface address is sent, to complete the forward process of object message.
S407: the second interface address in second rule and policy and the second interface address in target routing lists are repaired
It is changed to the network address of itself and the router R2 interface being connected, and by modified second rule and policy and modified mesh
Mark routing table is sent to router R2, so that router R2 is according to modified second rule and policy and modified target road
By table, processing is forwarded to the message received.
S408: the second interface address in second rule and policy and the second interface address in target routing lists are repaired
It is changed to the network address of itself and the router R3 interface being connected, and by modified second rule and policy and modified mesh
Mark routing table is sent to router R3, so that router R3 is according to modified second rule and policy and modified target road
By table, processing is forwarded to the message received.
The disclosure is not defined the execution sequence of step S407 and step S408.
As seen from the above, based on the message processing method of the disclosure, router can receive the first of the first equipment transmission
Rule and policy is flowed, is judged in the local routing table of router with the presence or absence of target corresponding with address to be matched and next hop address
Routing table.If target routing lists are not present in local routing table, to the destination address that receives and to be matched if router
The object message that location matches is forwarded processing according to local routing table.Based on above-mentioned processing, even if receiving only first-class
Rule and policy, when target routing lists are not present in local routing table, router can be according to local routing table to receiving
Message is forwarded processing, without E-Packeting according to invalid stream rule and policy, avoids service disconnection.
Corresponding with the embodiment of the method for Fig. 2, referring to Fig. 5, Fig. 5 is a kind of knot for message process device that the disclosure provides
Composition, the device can be applied to the router in bgp network, and device includes:
Receiving module 501, for receiving the first-class rule and policy of the first equipment transmission, wherein the first-class rule
It include address to be matched and next hop address in strategy;
Judgment module 502, whether there is in the local routing table for judging the router and the address to be matched
Target routing lists corresponding with the next hop address;
First processing module 503, if for the target routing lists to be not present in the local routing table, to reception
To destination address and the object message that matches of the address to be matched processing is forwarded according to the local routing table.
Optionally, described device further include:
Second processing module, if for there are the target routing lists in the local routing table, to what is received
The object message is forwarded processing according to the first-class rule and policy.
Optionally, described device further include:
Third processing module, if for there are the target routing lists in the local routing table, it will be described first-class
The next hop address in next hop address and the target routing lists in rule and policy is revised as the router and sets with second
The network address of standby connected interface, wherein second equipment is that there are the equipment of bgp neighbor relationship with the router;
Modified first-class rule and policy and modified target routing lists are sent to second equipment, so that institute
The second equipment is stated according to modified first-class rule and policy and modified target routing lists, the message received is turned
Hair processing.
Optionally, the first processing module 503 is specifically used for the determining and target report in the local routing table
The routing table to be selected that the destination address of text matches;
According to preset routing table lookup rule, optimal finger table is determined in the routing table to be selected;
The corresponding interface of the next hop address that the object message is sent in the optimal finger table, described in completing
The forward process of object message.
As seen from the above, based on the message process device of the disclosure, router can receive the first of the first equipment transmission
Rule and policy is flowed, is judged in the local routing table of router with the presence or absence of target corresponding with address to be matched and next hop address
Routing table.If target routing lists are not present in local routing table, to the destination address that receives and to be matched if router
The object message that location matches is forwarded processing according to local routing table.Based on above-mentioned processing, even if receiving only first-class
Rule and policy, when target routing lists are not present in local routing table, router can be according to local routing table to receiving
Message is forwarded processing, without E-Packeting according to invalid stream rule and policy, avoids service disconnection.
The disclosure additionally provides a kind of router, as shown in fig. 6, including processor 601, communication interface 602, memory
603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 are completed mutually by communication bus 604
Between communication,
Memory 603, for storing computer program;
Processor 601, when for executing the program stored on memory 603, so that router executes following steps, it should
Step includes:
Receive the first-class rule and policy of the first equipment transmission, wherein comprising to be matched in the first-class rule and policy
Address and next hop address;
Judge to whether there is and the address to be matched and the next hop address in the local routing table of the router
Corresponding target routing lists;
If the target routing lists are not present in the local routing table, to the destination address that receives and it is described to
The object message that match address matches is forwarded processing according to the local routing table.
Optionally, the method also includes:
If there are the target routing lists in the local routing table, to the object message received according to institute
It states first-class rule and policy and is forwarded processing.
Optionally, the method also includes:
If there are the target routing lists in the local routing table, by the next-hop in the first-class rule and policy
Next hop address in address and the target routing lists is revised as the network for the interface that the router is connected with the second equipment
Address, wherein second equipment is that there are the equipment of bgp neighbor relationship with the router;
Modified first-class rule and policy and modified target routing lists are sent to second equipment, so that institute
The second equipment is stated according to modified first-class rule and policy and modified target routing lists, the message received is turned
Hair processing.
Optionally, the object message that the described pair of destination address received and the address to be matched match is according to
Local routing table is forwarded processing, comprising:
The routing table to be selected that the determining destination address with the object message matches in the local routing table;
According to preset routing table lookup rule, optimal finger table is determined in the routing table to be selected;
The corresponding interface of the next hop address that the object message is sent in the optimal finger table, described in completing
The forward process of object message.
The communication bus that above-mentioned router is mentioned can be Peripheral Component Interconnect standard (English: Peripheral
Component Interconnect, referred to as: PCI) bus or expanding the industrial standard structure (English: Extended Industry
Standard Architecture, referred to as: EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control
Bus processed etc..Only to be indicated with a thick line in figure convenient for indicating, it is not intended that an only bus or a type of total
Line.
Communication interface is for the communication between above-mentioned router and other equipment.
Memory may include random access memory (English: Random Access Memory, abbreviation: RAM), can also
To include nonvolatile memory (English: Non-Volatile Memory, abbreviation: NVM), for example, at least a disk storage
Device.Optionally, memory can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (English: Central Processing
Unit, referred to as: CPU), network processing unit (English: Network Processor, referred to as: NP) etc.;It can also be digital signal
Processor (English: Digital Signal Processing, abbreviation: DSP), specific integrated circuit (English: Application
Specific Integrated Circuit, referred to as: ASIC), field programmable gate array (English: Field-
Programmable Gate Array, referred to as: FPGA) either other programmable logic device, discrete gate or transistor logic
Device, discrete hardware components.
In the disclosure, the first-class rule and policy that can receive the transmission of the first equipment, judges the local routing of router
It whether there is target routing lists corresponding with address to be matched and next hop address in table.If mesh is not present in local routing table
Routing table is marked, then the object message to match to the destination address and address to be matched that receive turns according to local routing table
Hair processing.Based on above-mentioned processing, even if receiving only first-class rule and policy, when there is no target routing lists in local routing table
When, processing can be forwarded to the message received according to local routing table, without turning according to invalid stream rule and policy
It transmits messages text, avoids service disconnection.
In the another embodiment that the disclosure provides, 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 the another embodiment that the disclosure provides, 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 disclosure.The computer can be general purpose computer, special purpose computer, meter
Calculation machine network or other programmable devices.The computer instruction may be stored in a computer readable storage medium, or
It is transmitted from a computer readable storage medium to another computer readable storage medium, for example, the computer instruction can
To pass through wired (such as coaxial cable, optical fiber, Digital Subscriber Line from a web-site, computer, server or data center
(DSL)) or wireless (such as infrared, wireless, microwave etc.) mode is into another web-site, computer, server or data
The heart is transmitted.The computer readable storage medium can be any usable medium or include that computer can access
The data storage devices such as one or more usable mediums integrated server, data center.The usable medium can be magnetism
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 reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
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 routing in Border Gateway Protocol (BGP) network
Device, which comprises
Receive the first-class rule and policy of the first equipment transmission, wherein include address to be matched in the first-class rule and policy
And next hop address;
Judge in the local routing table of the router with the presence or absence of corresponding with the address to be matched and the next hop address
Target routing lists;
If in the local routing table be not present the target routing lists, to the destination address received with it is described to be matched
The object message that address matches is forwarded processing according to the local routing table.
2. the method according to claim 1, wherein the method also includes:
If there are the target routing lists in the local routing table, to the object message received according to described
First-class rule and policy is forwarded processing.
3. the method according to claim 1, wherein the method also includes:
If there are the target routing lists in the local routing table, by the next hop address in the first-class rule and policy
With the next hop address in the target routing lists, with being revised as the network for the interface that the router is connected with the second equipment
Location, wherein second equipment is that there are the equipment of bgp neighbor relationship with the router;
Modified first-class rule and policy and modified target routing lists are sent to second equipment, so that described
Two equipment are forwarded place according to modified first-class rule and policy and modified target routing lists, to the message received
Reason.
4. the method according to claim 1, wherein described pair of destination address received and described to be matched
The object message that location matches is forwarded processing according to the local routing table, comprising:
The routing table to be selected that the determining destination address with the object message matches in the local routing table;
According to preset routing table lookup rule, optimal finger table is determined in the routing table to be selected;
The corresponding interface of the next hop address that the object message is sent in the optimal finger table, to complete the target
The forward process of message.
5. a kind of message process device, which is characterized in that described device is applied to the routing in Border Gateway Protocol (BGP) network
Device, described device include:
Receiving module, for receiving the first-class rule and policy of the first equipment transmission, wherein wrapped in the first-class rule and policy
Containing address to be matched and next hop address;
Judgment module, in the local routing table for judging the router with the presence or absence of with the address to be matched and it is described under
One jumps the corresponding target routing lists in address;
First processing module, if for the target routing lists to be not present in the local routing table, to the mesh received
Address and the object message that matches of the address to be matched processing is forwarded according to the local routing table.
6. device according to claim 5, which is characterized in that described device further include:
Second processing module, if for there are the target routing lists in the local routing table, described in receiving
Object message is forwarded processing according to the first-class rule and policy.
7. device according to claim 5, which is characterized in that described device further include:
Third processing module, if for there are the target routing lists in the local routing table, by the first-class rule
The next hop address in next hop address and the target routing lists in strategy, is revised as the router and the second equipment phase
The network address of interface even, wherein second equipment is that there are the equipment of bgp neighbor relationship with the router;
Modified first-class rule and policy and modified target routing lists are sent to second equipment, so that described
Two equipment are forwarded place according to modified first-class rule and policy and modified target routing lists, to the message received
Reason.
8. device according to claim 5, which is characterized in that the first processing module is specifically used in the local
The routing table to be selected that the determining destination address with the object message matches in routing table;
According to preset routing table lookup rule, optimal finger table is determined in the routing table to be selected;
The corresponding interface of the next hop address that the object message is sent in the optimal finger table, to complete the target
The forward process of message.
9. a kind of router, which is characterized in that including processor, communication interface, memory and communication bus, wherein processor,
Communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-4.
10. a kind of machine readable storage medium, which is characterized in that be stored with machine-executable instruction, by processor call and
When execution, the machine-executable instruction promotes the processor: realizing any method and step of claim 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810805036.5A CN108965137B (en) | 2018-07-20 | 2018-07-20 | Message processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810805036.5A CN108965137B (en) | 2018-07-20 | 2018-07-20 | Message processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108965137A true CN108965137A (en) | 2018-12-07 |
CN108965137B CN108965137B (en) | 2021-03-19 |
Family
ID=64497587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810805036.5A Active CN108965137B (en) | 2018-07-20 | 2018-07-20 | Message processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108965137B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109995657A (en) * | 2019-03-19 | 2019-07-09 | 新华三技术有限公司合肥分公司 | A kind of method and device of flow forwarding |
CN111181825A (en) * | 2019-12-31 | 2020-05-19 | 智车优行科技(北京)有限公司 | Information processing method and apparatus, electronic device, and storage medium |
CN113992584A (en) * | 2021-10-26 | 2022-01-28 | 新华三信息安全技术有限公司 | Message forwarding method and device |
CN114363191A (en) * | 2021-12-24 | 2022-04-15 | 中国联合网络通信集团有限公司 | Routing diffusion simulation method and device based on nodes and IP addresses |
CN115022225A (en) * | 2022-05-31 | 2022-09-06 | 东风电驱动系统有限公司 | Message forwarding method, device, equipment and readable storage medium |
CN115865801A (en) * | 2022-12-01 | 2023-03-28 | 中兴通讯股份有限公司 | Message transmission method, electronic device and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859316A (en) * | 2005-05-06 | 2006-11-08 | 株式会社日立制作所 | Packet transfer apparatus |
US20140328343A1 (en) * | 2013-05-06 | 2014-11-06 | Cisco Technology, Inc. | Routing internet protocol version 6 link-local addresses in a network environment |
CN104243317A (en) * | 2014-09-26 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and device for forwarding IP (internet protocol) routes |
US20140379929A1 (en) * | 2012-01-10 | 2014-12-25 | Media Network Services As | Data transport |
CN106302461A (en) * | 2016-08-16 | 2017-01-04 | 杭州华三通信技术有限公司 | A kind of method and device checking traffic policy legitimacy |
CN106470158A (en) * | 2016-09-13 | 2017-03-01 | 杭州迪普科技股份有限公司 | Message forwarding method and device |
CN107404439A (en) * | 2016-05-18 | 2017-11-28 | 华为技术有限公司 | For redirecting the method and system, the network equipment and control device of data flow |
CN107404442A (en) * | 2016-05-19 | 2017-11-28 | 中兴通讯股份有限公司 | Flow processing method and system |
-
2018
- 2018-07-20 CN CN201810805036.5A patent/CN108965137B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859316A (en) * | 2005-05-06 | 2006-11-08 | 株式会社日立制作所 | Packet transfer apparatus |
US20140379929A1 (en) * | 2012-01-10 | 2014-12-25 | Media Network Services As | Data transport |
US20140328343A1 (en) * | 2013-05-06 | 2014-11-06 | Cisco Technology, Inc. | Routing internet protocol version 6 link-local addresses in a network environment |
CN104243317A (en) * | 2014-09-26 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and device for forwarding IP (internet protocol) routes |
CN107404439A (en) * | 2016-05-18 | 2017-11-28 | 华为技术有限公司 | For redirecting the method and system, the network equipment and control device of data flow |
CN107404442A (en) * | 2016-05-19 | 2017-11-28 | 中兴通讯股份有限公司 | Flow processing method and system |
CN106302461A (en) * | 2016-08-16 | 2017-01-04 | 杭州华三通信技术有限公司 | A kind of method and device checking traffic policy legitimacy |
CN106470158A (en) * | 2016-09-13 | 2017-03-01 | 杭州迪普科技股份有限公司 | Message forwarding method and device |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109995657A (en) * | 2019-03-19 | 2019-07-09 | 新华三技术有限公司合肥分公司 | A kind of method and device of flow forwarding |
CN109995657B (en) * | 2019-03-19 | 2021-06-08 | 新华三技术有限公司合肥分公司 | Flow forwarding method and device |
CN111181825A (en) * | 2019-12-31 | 2020-05-19 | 智车优行科技(北京)有限公司 | Information processing method and apparatus, electronic device, and storage medium |
CN113992584A (en) * | 2021-10-26 | 2022-01-28 | 新华三信息安全技术有限公司 | Message forwarding method and device |
CN113992584B (en) * | 2021-10-26 | 2023-03-21 | 新华三信息安全技术有限公司 | Message forwarding method and device |
CN114363191A (en) * | 2021-12-24 | 2022-04-15 | 中国联合网络通信集团有限公司 | Routing diffusion simulation method and device based on nodes and IP addresses |
CN114363191B (en) * | 2021-12-24 | 2023-11-10 | 中国联合网络通信集团有限公司 | Route diffusion simulation method and device based on node and IP address |
CN115022225A (en) * | 2022-05-31 | 2022-09-06 | 东风电驱动系统有限公司 | Message forwarding method, device, equipment and readable storage medium |
CN115022225B (en) * | 2022-05-31 | 2023-11-10 | 东风电驱动系统有限公司 | Message forwarding method, device, equipment and readable storage medium |
CN115865801A (en) * | 2022-12-01 | 2023-03-28 | 中兴通讯股份有限公司 | Message transmission method, electronic device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108965137B (en) | 2021-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108965137A (en) | A kind of message processing method and device | |
US8570861B1 (en) | Reputation-based networking | |
CN102598599B (en) | RSVP-TE graceful restart under fast re-route conditions | |
CN106165322B (en) | To the agency of redundant manipulator Routing Protocol | |
CN110971522B (en) | Method, equipment and system for determining route leakage | |
KR102620025B1 (en) | Route handling methods and network devices | |
JP2002016600A (en) | Method for verifying notice of newly specified customer network router | |
CN104734964A (en) | Message processing method, node and system | |
CN108881295A (en) | For detecting and solving the method and the network equipment of anomalous routes | |
WO2016123904A1 (en) | Routing convergence method, device and virtual private network system | |
US11343153B2 (en) | BGP logical topology generation method, and device | |
EP3461079B1 (en) | Path establishment method and device, and network node | |
CN109067657A (en) | A kind of message processing method and device | |
CN108235800A (en) | A kind of network failure probing method and control centre's equipment | |
CN110838978B (en) | Message forwarding method and device | |
CN113055297A (en) | Network topology discovery method and device | |
US20210029015A1 (en) | Rapid and verifiable network configuration repair | |
US20140195671A1 (en) | Method and apparatus providing delayed path calculations based on service type | |
CN107770069A (en) | A kind of LSA notifying method and device | |
US20220070094A1 (en) | Network equipment with inter-network policy-based routing function | |
CN110896377B (en) | OSPF routing control method and device | |
CN114338669B (en) | Block chain-based data transmission method, device, equipment and storage medium | |
WO2022033341A1 (en) | Path restoring method and device | |
WO2020248634A1 (en) | Fault protection method, device and system for optical network | |
CN115695287A (en) | Method for calculating forwarding path and related 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 |