Summary of the invention
The problem to be solved in the present invention provides a kind of method, system and equipment that IP precedence is set, to solve in the prior art, IP message priority configuration complexity in the territory is set, lacks the networking QoS scheme property adjusted flexibly, and the defective that the validity of IP precedence can't continue in the territory between the territory.
For reaching above-mentioned purpose, a kind of method that IP precedence is set of the present invention may further comprise the steps:
The network equipment in the autonomous system receives the routing iinformation that initial network equipment sends, and comprises priority tag in the described routing iinformation;
The network equipment in the described autonomous system is provided with the IP precedence of the IP message that sends to described initial network equipment according to described priority tag.
Before described initial network equipment sends routing iinformation, also comprise:
Corresponding relation between IP precedence and the priority tag is set;
In the Tag territory of described routing iinformation, priority tag is set.
The network equipment in the described autonomous system is provided with IP precedence to the IP message, specifically comprises:
Network equipment inquiry and the corresponding route table items of described IP message destination address in the described autonomous system, and search with the corresponding routing iinformation of described route table items in the Tag thresholding;
The network equipment in the described autonomous system is provided with the IP precedence of described IP message according to the corresponding relation of described Tag thresholding and IP precedence.
The network equipment in the described autonomous system receives the routing iinformation that the outer initial network equipment of autonomous system sends, and specifically may further comprise the steps:
Described initial network equipment is by the outer border networks equipment of autonomous system, and the border networks equipment in autonomous system sends routing iinformation, comprises property value in the described routing iinformation;
Border networks equipment in the described autonomous system is provided with and carries the routing iinformation of Tag thresholding according to the corresponding relation of property value and Tag thresholding, and the routing iinformation of the described Tag of carrying thresholding is sent to other interior network equipment of autonomous system.
Described initial network equipment is by the outer border networks equipment of autonomous system, and the border networks equipment in autonomous system sends routing iinformation, specifically comprises:
The border networks equipment of described initial network equipment outside described autonomous system sends and carries the routing iinformation of Tag thresholding;
Border networks equipment outside the described autonomous system is provided with the routing iinformation that carries property value according to the corresponding relation of property value and Tag thresholding, and the described routing iinformation that carries property value is sent to the interior border networks equipment of autonomous system.
Described initial network equipment sends before the routing iinformation, also comprises: set property and the corresponding relation of Tag thresholding, and the corresponding relation of Tag thresholding and IP precedence is set.
The network equipment in the described autonomous system is provided with before the IP precedence to the IP message, also comprise: the network equipment in the described autonomous system judges whether that according to described IP message needs change IP precedence, if need to change, the network equipment in the then described autonomous system is provided with IP precedence to described IP message.
The present invention also provides a kind of system that IP precedence is set, and comprising: the initial network equipment and the reception network equipment,
Described initial network equipment is used for sending routing iinformation to receiving the network equipment, comprises priority tag in the described routing iinformation;
The described reception network equipment connects described initial network equipment, is used for according to described priority tag, and the IP precedence of the IP message that sends to described initial network equipment is set.
Described initial network equipment comprises: priority is provided with unit and routing iinformation transmitting element,
Described priority is provided with the unit, is used at routing iinformation priority tag being set;
Described routing iinformation transmitting element connects described priority the unit is set, and is used to send described routing iinformation.
The described reception network equipment comprises: IP packet parsing unit, IP precedence are provided with unit and IP packet sending unit,
Described IP packet parsing unit is used for the destination address according to the IP message, parse to transmit the route that described IP message uses, and search with the corresponding routing iinformation of described route in priority tag;
Described IP precedence is provided with the unit, connects described IP packet parsing unit, is used for according to described priority tag the IP precedence of IP message being set;
Described IP packet sending unit connects described IP precedence the unit is set, and is used to send the IP message that is provided with IP precedence.
The described reception network equipment also comprises IP message judging unit, connects described IP packet parsing unit, is used to judge whether described IP message needs to change priority.
The described reception network equipment also comprises correspondence relation storage, connects described IP precedence the unit is set, and is used for the corresponding relation of memory priority level sign and IP precedence.
The present invention also provides a kind of network equipment, comprising: priority is provided with unit and routing iinformation transmitting element,
Described priority is provided with the unit, is used at routing iinformation priority tag being set;
Described routing iinformation transmitting element connects described priority the unit is set, and is used to send described routing iinformation.
The present invention also provides a kind of network equipment, comprising: IP packet parsing unit, IP precedence are provided with unit and IP packet sending unit,
Described IP packet parsing unit is used for the destination address according to the IP message, parse to transmit the route that described IP message uses, and search with the corresponding routing iinformation of described route in priority tag;
Described IP precedence is provided with the unit, connects described IP packet parsing unit, is used for according to described priority tag the IP precedence of IP message being set;
Described IP packet sending unit connects described IP precedence the unit is set, and is used for sending the IP message according to the IP precedence that is provided with.
The described network equipment also comprises IP message judging unit, connects described IP packet parsing unit, is used to judge whether described IP message needs to change IP precedence.
The described network equipment also comprises correspondence relation storage, connects described IP precedence the unit is set, and is used for the corresponding relation of memory priority level sign and IP precedence.
Compared with prior art, the present invention has the following advantages:
A kind of method, system and equipment that IP precedence is set of the present invention has improved the flexibility that IP precedence is provided with in the territory, simplifies the setup the configuration of IP precedence greatly; The function that the present invention and BGP utilize group attribute that IP precedence is set is used, and makes the validity of IP precedence can obtain continuity by IGP in the territory, and forms the QoS solution of whole net.
Embodiment
A kind of method that IP precedence is set of the present invention, by the corresponding relation of IP precedence and priority tag is set, initial network equipment sends the routing iinformation that carries priority tag to other network equipment, other network equipment is stored in this routing iinformation in the routing iinformation database of corresponding Routing Protocol, this Routing Protocol uses the routing iinformation database of oneself to calculate, and the route of calculating joined forms route in the routing table; After other network equipment receives the IP message, learn that according to the destination address of this IP message needs send to initial network equipment with this IP message, so this other network equipment is inquired about its routing table, and the anti-routing iinformation of storing in the routing iinformation database of the Routing Protocol that forms this route of looking into, comprise priority tag in this routing iinformation, according to the IP precedence that sets before and the corresponding relation of priority tag, the IP precedence of this IP message is set then.The idiographic flow of method may further comprise the steps as shown in Figure 2:
Step S201, the network equipment in the autonomous system receives the routing iinformation that initial network equipment sends, and comprises priority tag in this routing iinformation.The network equipment of initial network equipment in autonomous system sends routing iinformation, can inform the network equipment in the autonomous system, to sending the IP message of this initial network equipment, sends according to the information of this priority tag.This initial network equipment can be the network equipment in the autonomous system, also can be the outer network equipment of autonomous system; If the network equipment in the autonomous system, then this routing iinformation is the routing iinformation based on Interior Gateway Protocol; If the network equipment that autonomous system is outer, then this routing iinformation is the routing iinformation based on Exterior Gateway Protocol.
Step S202, the network equipment in the autonomous system are provided with the IP precedence of the IP message that sends to initial network equipment according to the priority tag in the routing iinformation.After the network equipment in the autonomous system receives the routing iinformation that initial network equipment sends among the step S201, this routing iinformation is stored in the routing iinformation database of corresponding Routing Protocol and calculates and form route, then this route is joined in the routing table; The network equipment in autonomous system receives the IP message, destination address according to this IP message, learning need be when this initial network equipment sends, can be according to corresponding route table items in the routing table, inquire about the priority tag of storage routing iinformation in the corresponding routing iinformation database, this IP message is carried out the setting of priority, and this routing iinformation is among the step S201, the routing iinformation that the network equipment sent of initial network equipment in autonomous system.
Before the step S201 of method shown in Figure 2, need set the corresponding relation between IP precedence and the priority tag, after step S202, also need the IP message of finishing IP precedence is sent.Its flow chart as shown in Figure 3, comprising:
Step S301 is provided with the corresponding relation between IP precedence and the priority tag; This corresponding relation is in the network planning, is stored in the network equipment in the autonomous system.
Step S302, the initial network equipment network equipment in autonomous system sends routing iinformation, comprises priority tag in this routing iinformation; Before sending routing iinformation, priority tag need be set in routing iinformation, this priority tag is provided with by automatic or manual.The network equipment of initial network equipment in autonomous system sends routing iinformation, can inform the network equipment in the autonomous system, to sending the IP message of this initial network equipment, sends according to the information of this priority tag.
Step S303, the network equipment in the autonomous system are provided with the IP precedence of the IP message that sends to initial network equipment according to the priority tag in the routing iinformation.The network equipment in the autonomous system receives among the step S302, behind the routing iinformation that initial network equipment sends, this routing iinformation is existed in the routing iinformation database of corresponding Routing Protocol and calculate to form route, and route is joined in the routing table; The network equipment in autonomous system receives the IP message, destination address according to this IP message, learning need be when this initial network equipment sends, can be according to the priority tag in the routing iinformation of storing in the corresponding routing iinformation database of corresponding route table items, this IP message is carried out the setting of priority, this routing iinformation is among the step S302, the routing iinformation that the network equipment of initial network equipment in autonomous system sends.This IP priority of messages is provided with, and is to be provided with according to IP precedence that is provided with before and the corresponding relation between the priority tag, is set to the IP priority of messages with the corresponding IP precedence of priority tag in the corresponding relation.
Step S304 after the network equipment in the autonomous system is provided with IP precedence, sends this IP message.The network equipment in the autonomous system is arranged on IP precedence on the IP message, and this IP message is sent to initial network equipment.
As shown in Figure 4, the flow chart for IP message of the present invention is transmitted may further comprise the steps:
Step S401, the network equipment receives the IP message, and judges whether this IP message needs to change priority; If do not need to change, then the network equipment is directly transmitted this IP message according to routing table information; If need to change, then forward step S402 to.The network equipment is by judging whether the function in this IP message enables, and promptly judges the whether set of function digit of this IP message routing information, judges whether this IP message needs to change priority.
Step S402, the network equipment be according to the destination address of this IP message, route in the table of query and routing, and inquiry generates the routing iinformation of this route, thus obtain the priority tag in the routing iinformation.The network equipment obtains the destination address of this IP message from the IP message, promptly this IP message need send to whom; Then, the network equipment is inquired about the routing iinformation of its route correspondence according to this destination address, and comprises priority tag information in this routing iinformation, and this priority tag is that this network equipment need obtain.
Step S403, the network equipment according to before the IP precedence that is provided with and the corresponding relation of priority tag, the corresponding IP precedence of this priority tag is set to priority that the IP message is transmitted.After the network equipment obtains priority tag,, therefore,, can obtain corresponding IP precedence according to this corresponding relation owing to when the network planning, be provided with the corresponding relation of IP precedence and priority tag.
Step S404, the network equipment is transmitted the IP message according to this IP precedence.The network equipment is transmitted to destination network device according to the setting of IP precedence with this IP message.
Can realize that Routing Protocol of the present invention comprises: OSPF (Open Shortest Path First, Open Shortest Path First), RIP (Routing Information Protocol, routing information protocol) and ISIS (intermediate system) etc.; Also comprise the Routing Protocol among the Ipv6, comprising: RIPng, OSPFv3 and ISISv6 etc.The common feature of summing up those Routing Protocols is exactly all to comprise the Tag territory in the routing iinformation of Routing Protocol.So-called Tag territory is the field domain of not representing specific function in the routing iinformation, and the value of this field domain can be passed through the automatic or manual mode in actual applications, is configured in the respective field territory in the corresponding routing iinformation message to be provided with.In addition, the network equipment of the present invention comprises router and switch etc., and they can support Routing Protocol and QoS to guarantee, therefore, the network equipment that every support Routing Protocol and QoS guarantee all should belong to the scope that the present invention will protect.
With the Tag value of router by ospf routing information the IP message priority being set is that example further specifies.As shown in Figure 5, autonomous system AS100 comprises router-A, router B and the network C of being made up of other router.At first, when the whole network is planned, plan the IP priority of messages of using route A to transmit, and determine the corresponding relation of Tag value in the routing iinformation of this priority and OSPF; This corresponding relation is stored in the router in the autonomous system AS100, comprising router B in the network planning.
Secondly, for route A sets Tag value in the route updating packet, this Tag value is the Tag value of planning when the network planning before on router-A; If route A carries out route by 5 classes of OSPF or 7 class routes to send, the good Tag value of planning before then the Tag value of 5 classes of OSPF or 7 class LSA (Link State Advertisement, Link State Advertisement) being arranged to.The LSA of other the router issue route A of router-A in AS100 has carried the Tag value that sets before the issue among this LSA.
Then, router B learns this route A by network C, the LSA of this route A is stored in the routing iinformation database of OSPF, and calculate to form in the routing table that route A joins router B and form route, be the Tag value of route A setting before comprising among this LSA.It is pointed out that the route that the 5 class LSA that transmit in OSPF calculate is the 5 class routes of OSPF, router B adds routing table entry with this 5 class route and forms route; The route that the 7 class LSA that transmit in OSPF calculate is the 7 class routes of OSPF, and router B adds routing table entry with this 7 class route and forms route.
Transmit through router B as the IP message, when needing to use route A, if router B is route A by the routing iinformation that OSPF calculates this IP message, then router B is according to the Tag value in the routing iinformation corresponding in this route A inquiry routing iinformation database, be 5 classes of this OSPF or the Tag value among the 7 class LSA, and, be this IP message setting definite IP precedence when the network planning before this according to the corresponding relation of Tag value in the protocol massages of IP precedence of determining before and OSPF.
At last, according to this IP precedence, router B is forwarded to router-A by network C with above-mentioned IP message.
Specifically, through the whole network planning, it is 1 that the whole network is arranged to IP precedence to the IP message of address A; Simultaneously, in the OSPF Routing Protocol, be used to calculate routing iinformation 5 classes of route A or the Tag value of 7 class LSA also is set to 1, so just set up IP precedence 1 and calculated corresponding relation between the Tag value 1 of routing iinformation of route A; Router-A is by OSPF Routing Protocol issue route A, and in the Tag field of 5 classes of issue OSPF or 7 class LSA the Tag value to be set be 1.The routing iinformation that router B learns OSPF route A by network C is LSA, and the routing iinformation LSA of this route A is stored in the LSD of OSPF, and calculating formation route A joins in the routing table of router B.When the IP message sent to router B forwarding use route A, in the router B inquiry OSPF LSD, with the Tag value among the corresponding LSA of route A, this Tag value was 1; Then, according to the IP precedence of determining before and the corresponding relation of Tag value, the IP precedence of this IP message is set to 1; At last, be 1 setting according to this IP precedence, this IP message is forwarded to router-A by network C.
With the Tag value of router by the RIP routing iinformation IP message priority being set again is that example further specifies.As shown in Figure 5, autonomous system AS100 comprises router-A, router B and the network C of being made up of other router.At first, when the whole network is planned, plan the IP priority of messages of using route A to transmit, and determine the corresponding relation of Tag value in this priority and the RIP routing iinformation; This corresponding relation is stored in the router in the autonomous system AS100, comprising router B in the network planning.
Secondly, for route A sets Tag value in the route updating packet, this Tag value is the Tag value of planning when the network planning before on router-A; , route A sends the good Tag value of planning before then the Tag value of RIP renewal message being arranged to if carrying out route by RIP.Other the router issue route A information of router-A in AS100 has been carried the Tag value that sets before the information issue in this routing iinformation.
Then, router B learns the routing iinformation of route A by network C, the routing iinformation of this route A is stored in the routing iinformation database of RIP, and calculate to form in the routing table that route A joins router B and form route, be the Tag value of route A setting before comprising in this routing iinformation.
Transmit through router B as the IP message, when needing to use route A, then router B is according to the Tag value of the corresponding routing iinformation of storing in the route A inquiry routing iinformation database, promptly inquire about the Tag value in this RIP renewal message, and, be this IP message setting definite IP precedence when the network planning before this according to the corresponding relation of Tag value in IP precedence of determining before and the RIP protocol massages.
At last, according to this IP precedence, router B is forwarded to router-A by network C with above-mentioned IP message.
Specifically, through the whole network planning, it is 2 that the whole network is arranged to IP precedence to the IP message of address A; Simultaneously, the Tag value that is used to calculate the routing iinformation of route A in rip routing protocol also is set to 2; So just set up IP precedence 2 and be used to calculate corresponding relation between the Tag value 2 of routing iinformation.Router-A is by rip routing protocol issue route A, and in the routing iinformation of issue the Tag value to be set be 2.Router B learns RIP route A by network C, the routing iinformation of this route A is stored in the routing iinformation database of rip routing protocol, and calculates and form route A and join in the routing table of router B.When the IP message sent to router B, router B calculated route A by the RIP agreement, and according to the Tag value in the corresponding routing iinformation in this route A inquiry routing iinformation database, this Tag value is 2; The IP precedence of determining when router B is according to the network planning before then and the corresponding relation of Tag value, the IP precedence of this IP message is set to 2.At last, router B is forwarded to router-A by network C with this IP message according to this IP precedence.
In addition,, make to have identical QoS inside and outside the autonomous system and guarantee, also the function that IP precedence is set between above-mentioned method that IP precedence is set and autonomous system can be used for the IP precedence that autonomous system is outer is incorporated in the autonomous system.As shown in Figure 6, the Routing Protocol between autonomous system is example with BGP, and the Routing Protocol in the autonomous system is an example with the 5 class routes of OSPF.Be that group attribute by BGP is provided with the IP priority of messages between autonomous system, when the network planning, set the corresponding relation of the Tag value of the group attribute of BGP and OSPF 5 class LSA.Have route D to be planned as in the AS200 territory using the IP message priority of this routing forwarding is 1, router D in the AS200 territory issues route D information by BGP coupled border router B in AS100, carrying group attribute in this routing iinformation is 100:1, and during the network planning before, in the corresponding relation that is provided with, with the Tag value of the corresponding OSPF 5 class LSA of this group attribute 100:1 be 10; Border router B among the AS100 receives this route D information, obtain the group attribute 100:1 in this routing iinformation, and according to the corresponding relation of the Tag value of BGP community attribute that sets before and OSPF 5 class LSA, find Tag value 10 with the corresponding OSPF 5 class LSA of this group attribute, then router B issues this route D information by the OSPF Routing Protocol to other router in the AS100 territory, and in the corresponding 5 class LSA of route D the Tag value to be set be 10.Because group attribute can only carry in bgp routing information, so router B no longer carries group attribute during by OSPF Routing Protocol issue route D information in this routing iinformation.So, the corresponding relation of the Tag value of BGP community attribute that is provided with during promptly by the network planning and OSPF 5 class LSA is incorporated into route D information among the AS100.5 class routing modes by OSPF on router C are learnt route D, and route D are joined in the routing table of router C.
As IP message process router C, when using route D to transmit, then router C is according to the route D that stores in its routing table, Tag value in the inquiry OSPF LSD among the 5 class LSA of correspondence, and, be this IP message setting definite IP precedence when the network planning before this according to the corresponding relation of Tag value 10 in the protocol massages of IP precedence of determining before 1 and OSPF.At last, according to this IP precedence, router C transmits border router B with above-mentioned IP message, is forwarded to the purpose router D of route D again by bgp protocol by border router B.
On the contrary, if have route A to be planned as in the AS100 territory using the IP message priority of this routing forwarding is 1, be provided with the corresponding relation of the Tag value 10 of IP message priority 1 and OSPF 5 class LSA when the network planning, then router-A sends to router B that among the OSPF 5 class LSA Tag value to be set be 10.Router B is the border router in the AS100 territory, and is connected with border router D in the AS200 territory.Router B need continue the information of this route A to send to the router D in the AS200 territory, and router B sends by BGP to router D transmission routing iinformation, the corresponding relation of BGP community attribute 100:1 that is provided with when therefore router B needs according to the network planning before and the Tag value 10 of OSPF 5 class LSA, it is 100:1 that group attribute is set in the routing iinformation of BGP, and the routing iinformation that will carry group attribute 100:1 sends to router D.After router D receives this routing iinformation, issue this route A information, and in the corresponding 5 class LSA of route A the Tag value to be set be 10 by OSPF Routing Protocol other router in AS200.
The present invention also provides a kind of system that IP precedence is set, and as shown in Figure 7, comprising: the initial network equipment 100 and the reception network equipment 200.Wherein, initial network equipment 100 is used for sending routing iinformation to receiving the network equipment 200, comprises priority tag in this routing iinformation; Receive the network equipment 200, connect initial network equipment 100, be used for, the IP precedence of the IP message that sends to initial network equipment 100 is set according to priority tag.
Initial network equipment 100 also comprises: priority is provided with unit 101 and routing iinformation transmitting element 102.
Priority is provided with unit 101, is used at routing iinformation priority tag being set, and before sending routing iinformation, the priority tag that planning is good is arranged in the corresponding routing iinformation.
Routing iinformation transmitting element 102, connection priority are provided with unit 101, are used for sending routing iinformation to receiving the network equipment 200, carried priority in this routing iinformation the priority tag information that unit 101 is provided with is set.
Receiving the network equipment 200 also comprises: IP packet parsing unit 201, IP precedence are provided with unit 202, IP packet sending unit 203, IP message judging unit 204 and correspondence relation storage 205.
IP packet parsing unit 201 parses IP message destination address, finds out to transmit the route of using, and the priority tag in the routing iinformation of this route of inquiry generation.
IP precedence is provided with unit 202, connect IP packet parsing unit 201, be used for according to priority tag, the IP precedence of IP message is set, after IP packet parsing unit 201 obtains the priority tag of routing iinformation in this IP message, the IP precedence that is provided with during according to the network planning before and the corresponding relation of priority tag will be arranged in this IP message with the corresponding IP precedence of this priority tag.
IP packet sending unit 203 connects IP precedence unit 202 is set, and is used for sending the IP message according to the IP precedence that is provided with; After IP precedence was provided with unit 202 and sets the IP priority of messages, IP packet sending unit 203 sent the IP message according to this IP precedence.
IP message judging unit 204 connects IP packet parsing unit 201, is used to judge whether the IP message that is received needs to change priority, if need to change, then the routing iinformation by 201 pairs of these IP messages in IP packet parsing unit carries out the priority parsing; If do not need to change, then by IP packet sending unit 203 according to route forwarding table, directly this IP message is transmitted.
Correspondence relation storage 205 connects IP precedence unit 202 is set, and is used for the corresponding relation of memory priority level sign and IP precedence.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.