CN109005116A - A kind of message forwarding method and device - Google Patents
A kind of message forwarding method and device Download PDFInfo
- Publication number
- CN109005116A CN109005116A CN201710422799.7A CN201710422799A CN109005116A CN 109005116 A CN109005116 A CN 109005116A CN 201710422799 A CN201710422799 A CN 201710422799A CN 109005116 A CN109005116 A CN 109005116A
- Authority
- CN
- China
- Prior art keywords
- forwarding
- packet
- forwarding device
- sent
- strategy
- 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/20—Hop count for routing purposes, e.g. TTL
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A kind of message forwarding method and device, to solve in the prior art in SDN network it is more to the number of processes of the ttl value of IP packet, cause to consume the more problem of system resource.Controller determines that the forward-path between source device and purpose equipment includes N number of forwarding device, the number to be forwarded for determining the IP packet to be forwarded for being sent to the purpose equipment from the source device is N, and the first forwarding strategy of the first forwarding device is determined according to the times N to be forwarded, so that first forwarding device subtracts N processing, then the IP packet after forward process to the ttl value execution in the corresponding IP packet of the IP address of the purpose equipment;And the controller determines the second forwarding strategy of at least one the second forwarding device, so that each second forwarding device forwards the corresponding IP packet of the IP address of the purpose equipment.In this way, it is possible to reduce the number of processes of ttl value reduces the consumption of system resource.
Description
Technical field
This application involves field of communication technology more particularly to a kind of message forwarding methods and device.
Background technique
Software defined network (software-defined networking, SDN) is to separate control layer and forwarding
Communication network.It include SDN controller and multiple forwarding devices in the SDN network.The SDN controller is for controlling and managing
The multiple forwarding device, according to the Internet protocol (Internet of the host connected on the multiple forwarding device
Protocol, IP) address and the multiple forwarding device topology, the forwarding strategy of each forwarding device is generated, for referring to
Lead the IP packet that forwarding device forwarding includes the corresponding purpose IP address of the forwarding strategy.Each forwarding device, for connecing
After receiving IP packet, corresponding forwarding strategy is determined according to the purpose IP address of the IP packet, and according to determining forwarding strategy
Forward the IP packet.
Currently, the SDN controller configures each forwarding device in multiple forwarding devices on every forward-path
Following forwarding strategy: time-to-live (time to live, TTL) the value execution processing that subtracts one to including in IP packet, and forward
IP packet that treated.The forwarding strategy is sent to the multiple forwarding device by the SDN controller;The multiple forwarding
Each forwarding device in equipment subtracts one to the ttl value for including in the IP packet received according to the forwarding strategy, then turns
Hair treated IP packet.
However, when multiple forwarding devices on a forward-path pass through the IP report that above-mentioned forwarding strategy forwarding receives
Wen Shi will handle the ttl value in IP packet due to each forwarding device, so as to each IP packet in the SDN network
Ttl value number of processes it is more, cause consumption system resource it is more.
Summary of the invention
The application provides a kind of message forwarding method and device, to solve in the prior art in SDN network to each
The number of processes of the ttl value of IP packet is more, causes to consume the more problem of system resource.
In a first aspect, this application provides a kind of message forwarding methods, this method comprises:
Controller determines that the forward-path between source device and purpose equipment, the forward-path include N number of forwarding device,
The number to be forwarded for determining the IP packet to be forwarded for being sent to the purpose equipment from the source device is N, and according to described wait turn
Hair times N determines the first forwarding strategy of the first forwarding device, and determines the second forwarding of at least one the second forwarding device
Strategy;Then, first forwarding strategy is sent to first forwarding device, and second forwarding strategy is distinguished
It is sent at least one described second forwarding device;Wherein, N is the positive integer more than or equal to 2;First forwarding device is
Any of N number of forwarding device forwarding device, at least one described second forwarding device are to remove in N number of forwarding device
Forwarding device other than first forwarding device;First forwarding strategy includes corresponding to the IP address of the purpose equipment
IP packet in include ttl value execute subtract N processing and forward process after the IP packet first instruction information;Described
Two forwarding strategies include the second indication information for forwarding the corresponding IP packet of the IP address of the purpose equipment, second forwarding
Strategy does not include the instruction information for handling the ttl value of the corresponding IP packet of IP address of the purpose equipment.
By the above method, the corresponding IP of IP address that first forwarding device can be made to receive the purpose equipment
After message, N processing is subtracted to the ttl value execution for including in the IP packet according to the first instruction information, and will processing
The IP packet afterwards is sent to the next-hop device of first forwarding device, and can make at least one second turn described
The second forwarding device of each of equipment is sent out according to the second indication information, by the IP address of the purpose equipment received
Corresponding IP packet is transmitted to the next-hop device of second forwarding device.In this way, in the repeating process of the IP packet, only
Need first forwarding device to handle the ttl value of the IP packet primary, without other forwarding devices (it is described at least one the
Two forwarding devices) ttl value is handled, therefore, only the ttl value of IP packet is handled primary, it is possible to reduce ttl value
Number of processes, so as to reduce the consumption of system resource.
In a possible design, the controller be can be, but not limited to as SDN controller etc..
In a possible design, the forwarding device be can be, but not limited to as interchanger, router etc., wherein when
The forwarding device can be three-tier switch when being interchanger.
In a possible design, the controller can in the following two cases be sent out first forwarding strategy
Give first forwarding device:
The first situation: when the controller and first forwarding device establish connection, by first forwarding strategy
It is sent to first forwarding device;
Second situation: after the controller receives the forwarding strategy request that first forwarding device is sent, by institute
It states the first forwarding strategy and is sent to first forwarding device.
By the above method, first forwarding strategy successfully can be sent to first forwarding by the controller
Equipment, so that first forwarding device is handled and forwarded to the IP packet received according to first forwarding strategy.
In a possible design, the controller sends first forwarding strategy to first forwarding device
When, first forwarding strategy can be carried in the flow table that the controller is issued to first forwarding device.
By the above method, first forwarding strategy successfully can be sent to first forwarding by the controller
Equipment, so that first forwarding device is handled and forwarded to the IP packet received according to first forwarding strategy.
In a possible design, second forwarding strategy is sent to by the controller in the following two cases
The second forwarding device of each of at least one second forwarding device:
The first situation: when the controller and each second forwarding device establish connection, by second forwarding strategy
It is sent to second forwarding device;
Second situation:, will after the controller receives the forwarding strategy request of any one second forwarding device transmission
Second forwarding strategy is sent to second forwarding device.
By the above method, the controller can successfully by second forwarding strategy be sent respectively to it is described at least
One the second forwarding device, so that at least one described second forwarding device was received according to second forwarding strategy forwarding
IP packet.
In a possible design, the controller sends second forwarding strategy to any one second forwarding device
When, second forwarding strategy can be carried in the flow table that the controller is issued to second forwarding device.
By the above method, the controller can successfully by second forwarding strategy be sent respectively to it is described at least
One the second forwarding device, so that at least one described second forwarding device was received according to second forwarding strategy forwarding
IP packet.
Second aspect, the embodiment of the present application also provides another message forwarding methods, this method comprises:
First forwarding device receives the first forwarding strategy that controller is sent, and first forwarding device is source device and mesh
Equipment between forward-path on any of N number of forwarding device, first forwarding strategy includes to from the source
Equipment is sent to the ttl value in the IP packet of the purpose equipment included and executes the IP packet after subtracting N processing and forward process
First instruction information;And after the corresponding IP packet of IP address for receiving the purpose equipment, according to first instruction
Information subtracts N processing to the ttl value execution for including in the IP packet, the IP packet that obtains that treated;It then will place
The IP packet after reason is sent to the next-hop device of first forwarding device;Wherein, N is just whole more than or equal to 2
Number.
By the above method, can include according to first forwarding strategy it is described first instruction information butt joint receive from
The source device is sent to the ttl value execution that the IP packet of the purpose equipment includes and subtracts N processing, so that other forwarding devices
Without handling the ttl value in the IP packet, to reduce the number of processes to ttl value, system resource is reduced
Consumption.
In a possible design, first forwarding device receives the upper hop from first forwarding device and sets
The IP packet that preparation is sent.Optionally, the upper hop equipment of first forwarding device is that source device or another forwarding are set
It is standby, wherein when first forwarding of first forwarding device on forward-path between source device and purpose equipment is set
When standby, the upper hop equipment of first forwarding device is the source device;When first forwarding device is the forwarding road
When forwarding device in diameter in addition to first forwarding device, the upper hop equipment of first forwarding device is that another forwarding is set
It is standby.
In a possible design, after first forwarding device receives the IP packet, reported to the IP
Before the ttl value execution for including in text subtracts N processing, first forwarding device also executes following steps:
First forwarding device calculates the checksum of the IP packet, and determines the checksum being calculated
It is consistent with the checksum for including in the IP packet.
By the above method, first forwarding device can verify the integrality of the received IP packet, i.e., in institute
During stating the first forwarding device reception IP packet, the head of the IP packet is not damaged or distorts, and in this way may be used
It, can be correct to avoid first forwarding device to guarantee that first forwarding device handles and forward the complete IP packet
The IP packet that portion has damaged or distorted is handled and is forwarded, and then can be to avoid waste system resource.
In a possible design, when first forwarding device determine the checksum that is calculated with it is described
When the checksum for including in IP packet is inconsistent, show that the head of the IP packet has been damaged or has distorted, at this point, described
One forwarding device abandons the IP packet or the IP packet is sent to the controller by first forwarding device.
In this way, first forwarding device can be made, and the forwarding after the first forwarding device described in the forward-path
Equipment no longer needs to that the IP packet is handled and forwarded, and then can promote network bandwidth benefit to avoid waste system resource
With rate.
In a possible design, after first forwarding device receives the IP packet, reported to the IP
Before the ttl value execution for including in text subtracts N processing, first forwarding device determines that the ttl value is greater than N (for example, institute
Stating ttl value is 4, N 3).In this manner it is ensured that first forwarding device, and be located at first described in the forward-path
The IP packet of forwarding device forwarding after forwarding device is legal IP packet (the wherein legal ttl value for indicating IP packet
Validity checking is carried out to the IP packet greater than other forwarding devices 0), are avoided, saves process.
In a possible design, when first forwarding device determine in above process the ttl value be less than or
When person is equal to N while being 3 (for example, the ttl value is 3, N), show that the IP packet can not be forwarded to purpose equipment, it will
As invalid packet (i.e. TTL be less than or equal to 0), at this point, first forwarding device abandons the IP packet or described
The IP packet is sent to the controller by the first forwarding device.The first forwarding device described in this way can abandon in advance will
Or illegal IP packet, so that first forwarding device, and it is located at the first forwarding described in the forward-path
Forwarding device after equipment no longer needs to that the IP packet is handled and forwarded, so can to avoid waste system resource,
Promote network bandwidth utilization factor.
In a possible design, the next-hop device of first forwarding device is purpose equipment or another forwarding
Equipment, when first forwarding device is the last one forwarding device in the IP packet forward-path to be passed through, institute
The next-hop device for stating the first forwarding device is the purpose equipment;When first forwarding device is to remove in the forward-path
When forwarding device other than the last one forwarding device, the next-hop device of first forwarding device is another forwarding device.
In a possible design, first forwarding device will treated that the IP packet is sent to described the
Before the next-hop device of one forwarding device, the checksum of the IP packet after the first forwarding device calculation processing,
And the checksum being calculated described in replaces the checksum for including in the IP packet.
By the above method, the checksum of the IP packet can be made more acurrate, and then make first forwarding device
Next-hop forwarding device the integrality of the IP packet is more accurately verified according to the checksum of the IP packet of update.
In a possible design, first forwarding device be can be, but not limited to as interchanger, router etc.,
In, it can be three-tier switch when first forwarding device is interchanger.
The third aspect, the embodiment of the present application also provides another message forwarding methods, this method comprises:
Forwarding device receives the forwarding strategy that controller is sent, and the forwarding strategy includes forwarding from source device to be sent to purpose
The instruction information of the IP packet of equipment;Then, the forwarding device is receiving the IP that purpose IP address is the purpose equipment
After the IP packet of address, the IP packet is transmitted to the next-hop device of the forwarding device according to the instruction information.Its
In, the forwarding strategy does not include the instruction information for handling the ttl value of the corresponding IP packet of IP address of the purpose equipment.
By the above method, the forwarding device need to only forward received IP packet, without the ttl value to the IP packet
It is handled, reduces the number of processes to ttl value in this way, thereby reduce the consumption of system resource.
In a possible design, the forwarding device receives what the upper hop equipment from the forwarding device was sent
The IP packet.Optionally, the upper hop equipment of the forwarding device is source device or another forwarding device, wherein works as institute
State forwarding device be the IP packet forward-path to be passed through in first forwarding device when, upper the one of the forwarding device
Jump equipment is the source device;When the forwarding device sets for the forwarding in the forward-path in addition to first forwarding device
When standby, the upper hop equipment of the forwarding device is another forwarding device.
In a possible design, after the forwarding device receives the IP packet, turn by the IP packet
Before the next-hop device for issuing the forwarding device, the forwarding device also executes following steps:
The forwarding device calculates the checksum of the IP packet, and determines the checksum being calculated and institute
It is consistent to state the checksum for including in IP packet.
By the above method, the forwarding device can verify the integrality of the received IP packet, i.e., at described turn
During sending out the equipment reception IP packet, the head of the IP packet is not damaged or distorts, and can guarantee institute in this way
It states forwarding device and forwards the complete IP packet, the IP packet that can have been damaged head or distort to avoid the forwarding device
It is forwarded, and then can be to avoid waste system resource.
In a possible design, when the forwarding device determines in the checksum calculated and the IP packet
Including checksum it is inconsistent when, show that the head of the IP packet has been damaged or has distorted, at this point, the forwarding device will
The IP packet abandons or the IP packet is sent to the controller by the forwarding device.In this way, described turn can be made
Equipment is sent out, and the forwarding device after forwarding device described in the forward-path no longer needs to carry out the IP packet
It handles and forwards, and then network bandwidth utilization factor can be promoted to avoid waste system resource.
In a possible design, the next-hop device of the forwarding device is that purpose equipment or another forwarding are set
It is standby, when the forwarding device is the last one forwarding device in the IP packet forward-path to be passed through, the forwarding
The next-hop device of equipment is the purpose equipment;When the forwarding device is in the forward-path except the last one forwarding is set
When forwarding device other than standby, the next-hop device of the forwarding device is another forwarding device.
In a possible design, the forwarding device be can be, but not limited to as interchanger, router etc., wherein when
Second forwarding device can be three-tier switch when being interchanger.
Fourth aspect, the embodiment of the present application also provides a kind of controller, which, which has, realizes above method example
The function of middle controller behavior.The function can also execute corresponding software realization by hardware realization by hardware.
The hardware or software include one or more modules corresponding with above-mentioned function.
It include processing unit and transmission unit, these units in the structure of the controller in a possible design
The corresponding function in above-mentioned first aspect in method example can be executed, referring specifically to the detailed description in method example, herein
It does not repeat them here.
It is described including communication interface, processor and memory in the structure of the controller in a kind of possible design
Communication interface is for sending and receiving data, the processor is configured to the controller is supported to execute in above-mentioned first aspect
Method in corresponding function.The memory is coupled with the processor, saves the necessary program instruction of controller
And data.
5th aspect, the embodiment of the present application also provides a kind of forwarding device, which, which has, realizes the above method
The function of first forwarding device behavior in example.The function can also be executed corresponding by hardware realization by hardware
Software realization.The hardware or software include one or more modules corresponding with above-mentioned function.
It include that receiving unit, processing unit and transmission are single in the structure of the forwarding device in a possible design
Member, these units can execute the corresponding function in above-mentioned second aspect in method example, referring specifically to detailed in method example
Thin description, is not repeated herein.
It include communication interface, processor and memory, institute in the structure of the forwarding device in a kind of possible design
Communication interface is stated for sending and receiving data, the processor is configured to the forwarding device is supported to execute above-mentioned second party
Corresponding function in method in face.The memory is coupled with the processor, saves the necessary journey of forwarding device
Sequence instruction and data.
6th aspect, the embodiment of the present application also provides a kind of forwarding device, which, which has, realizes the above method
The function of second forwarding device behavior in example.The function can also be executed corresponding by hardware realization by hardware
Software realization.The hardware or software include one or more modules corresponding with above-mentioned function.
It include receiving unit and transmission unit, these lists in the structure of the forwarding device in a possible design
Member can execute the corresponding function in the above-mentioned third aspect in method example, referring specifically to the detailed description in method example, this
Place does not repeat them here.
It include communication interface, processor and memory, institute in the structure of the forwarding device in a kind of possible design
Communication interface is stated for sending and receiving data, the processor is configured to the forwarding device is supported to execute above-mentioned third party
Corresponding function in method in face.The memory is coupled with the processor, saves the necessary journey of forwarding device
Sequence instruction and data.
7th aspect includes controller and more in the communication network the embodiment of the present application also provides a kind of communication network
A forwarding device, the controller are the controller of above-mentioned fourth aspect, the first forwarding device in the multiple forwarding device
For the forwarding device of above-mentioned 5th aspect, other forwarding devices in the multiple forwarding device are the forwarding of above-mentioned 6th aspect
Equipment.
Eighth aspect, the embodiment of the present application also provides a kind of computer storage medium, the computer storage medium is deposited
Computer executable instructions are contained, the computer executable instructions are for making the computer execute any of the above-described kind of method.
In the embodiment of the present application, controller determines the forward-path between source device and purpose equipment, the forward-path
Including N number of forwarding device, N is the positive integer more than or equal to 2;The controller, which is determined from the source device, is sent to the purpose
The number to be forwarded of the IP packet to be forwarded of equipment is N, and determines the first of the first forwarding device according to the times N to be forwarded
Forwarding strategy, so that first forwarding device first holds the ttl value in the corresponding IP packet of the IP address of the purpose equipment
Row subtracts N processing, then by the next-hop device of treated the IP packet is sent to first forwarding device;The controller
The second forwarding strategy of at least one the second forwarding device is determined, so that each of at least one described second forwarding device
The corresponding IP packet of the IP address of the purpose equipment is transmitted to the next-hop device of second forwarding device by two forwarding devices.
In the method, it is sent due to the controller to first forwarding device and at least one described second forwarding device different
Forwarding strategy only need first forwarding device to the TTL of the IP packet and then in the repeating process of the IP packet
Value processing is primary, handles without other forwarding devices (at least one described second forwarding device) the ttl value, because
This, when the quantity of the forwarding device of every forward-path is more in SDN network, only reports each IP in the SDN network
The ttl value processing of text is primary, it is possible to reduce the number of processes of ttl value, so as to reduce the consumption of system resource.
Detailed description of the invention
Fig. 1 is a kind of configuration diagram of communication network provided by the present application;
Fig. 2 is a kind of flow diagram of message forwarding method provided by the present application;
Fig. 3 is a kind of structural schematic diagram of controller provided by the present application;
Fig. 4 is a kind of structural schematic diagram of forwarding device provided by the present application;
Fig. 5 is the structural schematic diagram of another forwarding device provided by the present application;
Fig. 6 is the structure chart of another controller provided by the present application;
Fig. 7 is the structure chart of another forwarding device provided by the present application;
Fig. 8 is the structure chart of another forwarding device provided by the present application.
Specific embodiment
The application is described in further detail below in conjunction with attached drawing.
The embodiment of the present application provides a kind of message forwarding method and device, to solve in the prior art in SDN network
It is more to the number of processes of the ttl value of each IP packet, cause to consume the more problem of system resource.Wherein, herein described
Method and apparatus based on the same inventive concept, since the principle that method and device solves the problems, such as is similar, apparatus and method
Implementation can be with cross-reference, and overlaps will not be repeated.
In the technical solution of the embodiment of the present application, controller determines the forward-path between source device and purpose equipment, institute
Stating forward-path includes N number of forwarding device, and N is the positive integer more than or equal to 2;The controller is determined to be sent out from the source device
Number to be forwarded toward the IP packet to be forwarded of the purpose equipment is N, and determines the first forwarding according to the times N to be forwarded
First forwarding strategy of equipment, so that first forwarding device is first in the corresponding IP packet of the IP address of the purpose equipment
Ttl value execution subtract N processing, then by the next-hop device of treated the IP packet is sent to first forwarding device;
And the controller determines the second forwarding strategy of at least one the second forwarding device, so that at least one described second forwarding
The corresponding IP packet of the IP address of the purpose equipment is transmitted to second forwarding and set by the second forwarding device of each of equipment
Standby next-hop device.In the method, due to the controller to first forwarding device and it is described at least one second
Forwarding device sends different forwarding strategies, and then in the repeating process of the IP packet, only needs first forwarding device
It is primary to the ttl value processing of the IP packet, without other forwarding devices (at least one described second forwarding device) to described
Ttl value is handled, therefore, when the quantity of the forwarding device of every forward-path is more in SDN network, in the SDN net
Only the ttl value of each IP packet is handled in network primary, it is possible to reduce the number of processes of ttl value, so as to reduce system money
The consumption in source.
Hereinafter, the part term in the application is explained, in order to those skilled in the art understand that.
1), the invention relates to controller, multiple forwarding devices can be controlled and be managed, and to every
A forwarding device configures the forwarding strategy etc. of the corresponding IP packet of different purpose IP address.Wherein, the controller can with but not
It is limited to be SDN controller etc..
2), the invention relates to the first forwarding device and the second forwarding device, for forward IP packet equipment, example
Such as, interchanger, router etc..It wherein, can be three when first forwarding device and second forwarding device are interchanger
Layer switch.
3), " multiple " in the embodiment of the present application, refer to two or more.
4), in the description of the present application, the vocabulary such as " first ", " second " are only used for distinguishing the purpose of description, and cannot manage
Solution is indication or suggestion relative importance, can not be interpreted as indication or suggestion sequence.
In order to more clearly from describe the technical solution of the embodiment of the present application, with reference to the accompanying drawing, to the embodiment of the present application
The message forwarding method and device of offer are described in detail.
Fig. 1 shows a kind of applicable possible communication network of message forwarding method provided by the embodiments of the present application, described
Communication network includes: controller and multiple forwarding devices.The multiple forwarding device for realizing source device and purpose equipment it
Between communication.Wherein, the controller, for determining the forward-path between the source device and the purpose equipment, to institute
It states each forwarding device in multiple forwarding devices on forward-path and configures turning for the different corresponding IP packets of purpose IP address
Hair strategy, and the forwarding strategy of configuration is sent to corresponding forwarding device.For example, being based on communication network shown in FIG. 1, it is assumed that
Forward-path between the source device and the purpose equipment includes forwarding device A, forwarding device B and forwarding device C, i.e. institute
The IP packet for stating source device sending needs to get to the purpose by forwarding device A, forwarding device B and forwarding device C and set
It is standby.Then the controller be respectively forwarding device A, forwarding device B and forwarding device C configuration forwarding strategy A, forwarding strategy B and
Then forwarding strategy A is sent to forwarding device A by forwarding strategy C, forwarding strategy B is sent to forwarding device B, and will turn
Hair strategy C is sent to forwarding device C.
Wherein, optionally, the controller, can be by this turn when sending corresponding forwarding strategy to a forwarding device
Hair strategy is carried in the controller into the corresponding flow table that the forwarding device issues.
The multiple forwarding device, forwarding device A as shown in Figure 1, forwarding device B, forwarding device C are IP packet
The multi-hop transmission equipment for needing to pass through when being forwarded to purpose equipment from source device.Each forwarding in the multiple forwarding device
Equipment, the forwarding strategy sent for receiving the controller, and the IP packet received is carried out according to the forwarding strategy
Respective handling simultaneously forwards.
For example, the forwarding strategy A, the forwarding strategy B and the forwarding strategy C in above-mentioned example are to mesh
IP address be the IP address of the purpose equipment IP packet in include the ttl value execution processing that subtracts one after will treated IP
When message is forwarded to corresponding next-hop device, the forwarding device A is received be sent to the IP packet of the purpose equipment after, it is right
After processing that the ttl value execution for including in the IP packet subtracts one, by treated, the IP packet is sent to the forwarding device
B;After the forwarding device B receives the IP packet, continue the ttl value execution processing that subtracts one to including in the IP packet,
Then by treated, the IP packet is sent to the forwarding device C;The forwarding device C continues to wrap in the IP packet
The ttl value execution processing that subtracts one included, then will treated that the IP packet is sent to the purpose equipment that (the i.e. described forwarding is set
The next-hop device of standby C).
By the above method, the forwarding of IP packet is just completed in the communication network.
A kind of message forwarding method provided by the embodiments of the present application, suitable for communication network as shown in Figure 1.Refering to Fig. 2
Shown, the detailed process of this method includes:
Step 201, controller determine that the forward-path between source device and purpose equipment, the forward-path include N number of
Forwarding device, N are the positive integer more than or equal to 2.
Wherein, due to the forwarding device in the entire communication network of the controller management, the controller obtains whole
The topology of a communication network and the terminal device of each forwarding device connection, and by one in any two terminal device
Terminal device is as source device, another terminal device equipment as a purpose, calculate the source device and the purpose equipment it
Between forward-path, it can accurately determine from the forwarding to be passed through of the IP packet that the source device is sent to the purpose equipment
The quantity for the forwarding device for including in path and the forward-path.
Optionally, the controller can be, but not limited to as SDN controller etc.;The forwarding device can be, but not limited to for
Interchanger, router etc., wherein can be three-tier switch when the forwarding device is interchanger.
Step 202, the controller determine from the source device be sent to the purpose equipment IP packet to be forwarded to
Hop count is N.
For example, when controller determines that the source device is sent to the forward-path that the IP packet of the purpose equipment needs to pass through
In include forwarding device when being three forwarding devices as shown in Figure 1, the controller according to the quantity 3 of forwarding device,
The number to be forwarded for determining the IP packet is 3, so that the controller is executed according to the determining number to be forwarded
Step 203.
Step 203, the controller determine the first forwarding strategy of the first forwarding device according to the times N to be forwarded,
And determine the second forwarding strategy of at least one the second forwarding device.
Wherein, first forwarding device is any of N number of forwarding device forwarding device, it is described at least one the
Two forwarding devices are the forwarding device in N number of forwarding device in addition to first forwarding device.
By taking Fig. 1 as an example, first forwarding device can be the forwarding device A, or be the forwarding device B, or
Person is the forwarding device C.When first forwarding device is the forwarding device A, at least one described second forwarding is set
Standby is the forwarding device B and forwarding device C;When first forwarding device is the forwarding device B or described turn
Send out equipment C when, with first forwarding device be the forwarding device A when, principle is identical, and and will not be described here in detail.
Specifically, first forwarding strategy includes including in the corresponding IP packet of the IP address of the purpose equipment
Ttl value executes the first instruction information of the IP packet after subtracting N processing and forward process;Second forwarding strategy includes turning
The second indication information for the corresponding IP packet of IP address for sending out purpose equipment described.Wherein, the IP address pair of the purpose equipment
The IP packet answered refers to that purpose IP address is the IP packet of the IP address of the purpose equipment.Due to not wrapped in second indication information
The processing to ttl value is included, therefore, the forwarding device for receiving the second forwarding strategy is corresponding in the IP address for forwarding the purpose equipment
IP packet when, do not modify the ttl value of the IP packet.Second forwarding strategy does not include the IP for handling the purpose equipment
The instruction information of the ttl value of the corresponding IP packet in address.
By above-mentioned forwarding strategy, IP packet can be made from the source device to the repeating process of the purpose equipment
In, it only needs first forwarding device to handle the ttl value of the IP packet primary, is set without at least one described second forwarding
It is standby that the ttl value is handled, therefore, it is possible to reduce the number of processes of ttl value, so as to reduce disappearing for system resource
Consumption.
First forwarding strategy is sent to first forwarding device by step 204, the controller.
Optionally, the controller can execute in the following two cases step 204:
The first situation: when the controller and first forwarding device establish connection, the controller executes step
204。
Second situation: it after the controller receives the forwarding strategy request that first forwarding device is sent, executes
Step 204.
Specifically, first forwarding device is with receiving the IP of the purpose equipment in above-mentioned second situation
After the corresponding IP packet in location, not when locally finding corresponding forwarding strategy, first forwarding device is to the control
Device sends forwarding strategy request, so that the controller sends corresponding forwarding strategy to first forwarding device.
Optionally, the controller can carry first forwarding strategy in the control when executing step 204
In the flow table that device is issued to first forwarding device.
After the corresponding IP packet of IP address that step 205, first forwarding device receive the purpose equipment, according to
The first instruction information that first forwarding strategy includes subtracts N processing to the ttl value execution for including in the IP packet, obtains
The IP packet to treated.
Wherein, first forwarding device receives the IP that the upper hop equipment from first forwarding device is sent
Message.Optionally, the upper hop equipment of first forwarding device is source device or another forwarding device, wherein when described
When first forwarding device is first forwarding device in the IP packet forward-path to be passed through, first forwarding device
Upper hop equipment be the source device;When first forwarding device be in the forward-path except first forwarding device with
When outer forwarding device, the upper hop equipment of first forwarding device is another forwarding device.
For example, shown in Fig. 1, when first forwarding device is the forwarding device A, first forwarding device it is upper
One jumps equipment as source device;When first forwarding device is the forwarding device B, the upper hop of first forwarding device
Equipment is the forwarding device A.
Optionally, after first forwarding device receives the IP packet, the institute that includes in the IP packet
It states ttl value to execute before subtracting N processing, first forwarding device also executes following steps:
First forwarding device calculates the checksum of the IP packet;
First forwarding device determines the checksum being calculated and in the IP packet
Checksum is consistent.
Through the above steps, first forwarding device can verify the integrality of the received IP packet, i.e., in institute
During stating the first forwarding device reception IP packet, the head of the IP packet is not damaged or distorts, and in this way may be used
It, can be correct to avoid first forwarding device to guarantee that first forwarding device handles and forward the complete IP packet
The IP packet that portion has damaged or distorted is handled and is forwarded, and then can be to avoid waste system resource.
Optionally, in above-mentioned steps, when first forwarding device determines the checksum being calculated and institute
State the checksum for including in IP packet it is inconsistent when, show that the head of the IP packet has been damaged or has distorted, at this point, described
First forwarding device abandons the IP packet or the IP packet is sent to the control by first forwarding device
Device.In this way, first forwarding device can be made, and turn after first forwarding device on the forward-path
Hair equipment no longer needs to that the IP packet is handled and forwarded, and then can promote network bandwidth to avoid waste system resource
Utilization rate.
Optionally, when first forwarding device is first forwarding device on the forward-path, described the
After one forwarding device receives the IP packet, before the ttl value execution for including in the IP packet subtracts N processing,
First forwarding device determines that the ttl value is greater than N (for example, the ttl value is 4, N 3).In this manner it is ensured that described
First forwarding device, and the IP packet of the forwarding device forwarding after the first forwarding device described in the forward-path
It is legal IP packet, avoids other forwarding devices and validity checking is carried out to the IP packet, save process, wherein
The legal ttl value for indicating IP packet is greater than 0.
Optionally, (the example when first forwarding device determines that the ttl value is less than or equal to N in above process
Such as, the ttl value is 3, N when being 3), show that the IP packet can not be forwarded to purpose equipment, invalid packet will be become
(i.e. TTL be less than or equal to 0), at this point, first forwarding device abandons the IP packet or first forwarding device
The IP packet is sent to the controller.The first forwarding device described in this way can abandon in advance will or illegally
IP packet turn so that first forwarding device, and after the first forwarding device described in the forward-path
Hair equipment no longer needs to that the IP packet is handled and forwarded, and then can promote network bandwidth to avoid waste system resource
Utilization rate.
The IP packet is sent to first forwarding device by treated for step 206, first forwarding device
Next-hop device.
Wherein, the next-hop device of first forwarding device is purpose equipment or another forwarding device, when described the
When one forwarding device is the last one forwarding device in the IP packet forward-path to be passed through, first forwarding device
Next-hop device be the purpose equipment;When first forwarding device is in the forward-path except the last one forwarding is set
When forwarding device other than standby, the next-hop device of first forwarding device is another forwarding device.
For example, shown in Fig. 1, when first forwarding device is the forwarding device C, under first forwarding device
One jumps equipment as the purpose equipment;When first forwarding device is the forwarding device B, first forwarding device
Next-hop device is the forwarding device C.
Optionally, before first forwarding device executes step 206, first forwarding device also executes following step
It is rapid:
The checksum of the IP packet after the first forwarding device calculation processing, and be calculated described in
Checksum replaces the checksum for including in the IP packet.
Under normal conditions, since each forwarding device needs to examine by the checksum of IP packet after receiving IP packet
It whether complete tests the IP packet, therefore, by the above method, the checksum of the IP packet can be made more acurrate, and then make
The next-hop forwarding device of first forwarding device more accurately verifies the IP according to the checksum of the IP packet of update
The integrality of message.
Second forwarding strategy is sent respectively at least one described second forwarding and set by step 207, the controller
It is standby.
Optionally, the controller executes the method for step 207 and the controller sends first forwarding strategy
Identical to the method for first forwarding device, for details, reference can be made to above-mentioned steps 204, and details are not described herein again.
The corresponding IP report of the IP address that step 208, at least one described second forwarding device receive the purpose equipment
The IP packet is transmitted to described second according to the second indication information that second forwarding strategy includes respectively by Wen Hou
The next-hop device of forwarding device.
Wherein, each second forwarding device receives the IP report that the upper hop equipment from second forwarding device is sent
Text, and since first forwarding device and at least one described second forwarding device are randomly ordered, each second turn
The upper hop equipment for sending out equipment is identical as the upper hop equipment situation of first forwarding device, reference can be made in above-mentioned steps 205
The upper hop equipment of first forwarding device.
Similarly, the next-hop device situation phase of the next-hop device of each second forwarding device and first forwarding device
Together, reference can be made to the next-hop device of the first forwarding device described in above-mentioned steps 206.
Optionally, each second forwarding device is described the IP packet to be transmitted to after receiving the IP packet
Before the next-hop device of second forwarding device, following steps are also executed:
Second forwarding device calculates the checksum of the IP packet;
Second forwarding device determines the checksum being calculated and in the IP packet
Checksum is consistent.
Wherein, each second forwarding device executes the first forwarding device described in above-mentioned steps and above-mentioned steps 205 and executes
The beneficial effect that same steps generate is identical.
Also, the checksum being calculated is determined in each second forwarding device and includes in the IP packet
Operation when checksum is inconsistent is determined with the first forwarding device described in above-mentioned steps 205 described in being calculated
Operation beneficial effect that is identical, and therefore the generating when checksum for including in checksum and the IP packet is inconsistent
It is identical.
In a step 208, the second forwarding device of each of at least one described second forwarding device is directly by the IP
Message is transmitted to the next-hop device of second forwarding device, does not need again to handle the ttl value of the IP packet, this
Sample reduces the number of processes of ttl value, reduces the consumption of system resource.
Further, it is generally the case that when forwarding device to IP packet ttl value processing after, need to recalculate simultaneously
The checksum for updating treated the IP packet, using the embodiment of the present application method, due to described at least one second turn
Hair equipment is and then described without recalculating again and updating that treated without handling the ttl value of the IP packet
The checksum of IP packet, therefore, it is possible to reduce the calculating and update times of the checksum of IP packet, and then can more drop
The consumption of low system resource.
Using message forwarding method provided by the embodiments of the present application, controller determines to be turned between source device and purpose equipment
Path is sent out, the forward-path includes N number of forwarding device, and N is the positive integer more than or equal to 2;The controller is determined from institute
Stating source device and being sent to the number to be forwarded of the IP packet to be forwarded of the purpose equipment is N, and true according to the times N to be forwarded
First forwarding strategy of fixed first forwarding device, so that first forwarding device is first corresponding to the IP address of the purpose equipment
IP packet in ttl value execution subtract N processing, then the IP packet is sent under first forwarding device by treated
One jumps equipment;And the controller determines the second forwarding strategy of at least one the second forwarding device, so that described at least one
The corresponding IP packet of the IP address of the purpose equipment is transmitted to this by the second forwarding device of each of a second forwarding device
The next-hop device of second forwarding device.In the method, due to the controller to first forwarding device and it is described extremely
Few second forwarding device sends different forwarding strategies, and then in the repeating process of the IP packet, only needs described the
One forwarding device handles once the ttl value of the IP packet, and without other forwarding devices, (at least one described second forwarding is set
It is standby) ttl value is handled, therefore, when the quantity of the forwarding device of every forward-path is more in SDN network,
Only the ttl value of each IP packet is handled in the SDN network primary, it is possible to reduce the number of processes of ttl value, so as to drop
The consumption of low system resource.
It should be noted that the sequence of above-mentioned steps 204-206 and step 207-208 are only an example, the application couple
Said sequence is without limitation.Optionally, since first forwarding device and at least one described second forwarding device are wait turn
Randomly ordered in the IP packet of the hair forward-path to be passed through, therefore, first forwarding device can be the forward-path
In first forwarding device, at least one described second forwarding device be first forwarding device after forwarding device;
Or first forwarding device is the last one forwarding device in the forward-path, at least one described second forwarding device
For the forwarding device before first forwarding device;Or first forwarding device is interspersed in described at least one second turn
It sends out at any position between equipment.It therefore, optionally, can be according to the first forwarding device and at least one described second forwarding
The practical sequence of equipment adjusts above-mentioned steps 204-208.
Based on above embodiments, since first forwarding device and at least one described second forwarding device are at described turn
It is randomly ordered in hair path, therefore, exist in order to avoid being eventually dropped or can be sent to the IP packet of the controller
By being dropped or being sent to again the controller after the forwarding of multiple forwarding devices, multiple forwarding devices are caused to do useless
The case where function, waste system resource, the controller can be using first forwarding device in the forward-path as described in
First forwarding device sends first forwarding strategy to first forwarding device, so that first forwarding device
Validity judgement is carried out to IP packet to be forwarded, thus reach can judge in the forward-path at the first time it is to be forwarded
The legitimacy of the IP packet, and then illegal IP packet is abandoned or is sent in advance the controller, to avoid resource wave
Take.
Still by taking Fig. 1 as an example, the controller determines that the forwarding device A is first forwarding device, and the forwarding is set
The standby B and forwarding device C is the second forwarding device, and first forwarding strategy that the controller determines includes to being sent to
State the first instruction that the ttl value for including in the IP packet of purpose equipment executes the IP packet after the processing that subtracts 3 and forward process
Information, after first forwarding strategy is sent to the forwarding device A by the controller, the forwarding device A is receiving hair
Toward the purpose equipment IP packet when, first judge whether the ttl value in the IP packet is greater than 3, when determining the IP packet
In ttl value be less than or equal to 3 when, the IP packet is just abandoned or is sent to the controller, is avoided in this way
The IP packet is forwarded to when the forwarding device B perhaps arrives the forwarding device C by the forwarding device B or by institute
State forwarding device C and carry out validity checking again, save process, at the same can also to avoid the inessential forwarding of the IP packet,
Avoid waste system resource.
Based on above embodiments, the embodiment of the present application also provides a kind of controllers, and the controller application is in as shown in Figure 1
Communication network, for realizing message forwarding method as shown in Figure 2.As shown in fig.3, the controller 300 includes: that processing is single
Member 301 and transmission unit 302, wherein
The processing unit 301, for determining the forward-path between source device and purpose equipment, the forward-path packet
N number of forwarding device is included, N is the positive integer more than or equal to 2;
Determine that the number to be forwarded of Internet protocol IP packet to be forwarded for being sent to the purpose equipment from the source device is
N;And
Determine the first forwarding strategy of the first forwarding device according to the times N to be forwarded, and determine at least one the
Second forwarding strategy of two forwarding devices;Wherein, first forwarding device is that the forwarding of any of described N number of forwarding device is set
Standby, at least one described second forwarding device is that the forwarding in N number of forwarding device in addition to first forwarding device is set
It is standby;First forwarding strategy includes subtracting N to the ttl value execution for including in the corresponding IP packet of the IP address of the purpose equipment
It handles and first of the IP packet after forward process indicates information;Second forwarding strategy includes that the purpose is forwarded to set
The second indication information of the corresponding IP packet of standby IP address;Second forwarding strategy does not include handling the purpose equipment
The instruction information of the ttl value of the corresponding IP packet of IP address;The transmission unit 302, for sending out first forwarding strategy
Give first forwarding device;And
Second forwarding strategy is sent respectively at least one described second forwarding device.
Optionally, the forwarding device is interchanger or router.
Using controller provided by the embodiments of the present application, the forward-path between source device and purpose equipment is determined, it is described
Forward-path includes N number of forwarding device, and N is the positive integer more than or equal to 2;The controller determination is sent to from the source device
The number to be forwarded of the IP packet to be forwarded of the purpose equipment is N, and determines that the first forwarding is set according to the times N to be forwarded
The first standby forwarding strategy, so that first forwarding device is first in the corresponding IP packet of the IP address of the purpose equipment
Ttl value execution subtracts N processing, then by the next-hop device of treated the IP packet is sent to first forwarding device;With
And the controller determines the second forwarding strategy of at least one the second forwarding device, so that at least one described second forwarding is set
The corresponding IP packet of the IP address of the purpose equipment is transmitted to second forwarding device by each of standby second forwarding device
Next-hop device.In this way, since the controller is to first forwarding device and at least one described second forwarding device
Different forwarding strategies is sent, and then in the repeating process of the IP packet, only needs first forwarding device to the IP
The ttl value processing of message is primary, carries out without other forwarding devices (at least one described second forwarding device) to the ttl value
Processing, therefore, when the quantity of the forwarding device of every forward-path is more in SDN network, only to every in the SDN network
The ttl value processing of a IP packet is primary, it is possible to reduce the number of processes of ttl value, so as to reduce the consumption of system resource.
Based on above embodiments, the embodiment of the present application also provides a kind of forwarding device, which is applied to such as Fig. 1
Shown in communication network, for realizing the function of the first forwarding device in message forwarding method as shown in Figure 2.Refering to Fig. 4 institute
Show, which includes: receiving unit 401, processing unit 402 and transmission unit 403, wherein
The receiving unit 401, for receiving the first forwarding strategy of controller transmission, wherein the forwarding device 400
Any of N number of forwarding device on forward-path between source device and purpose equipment, the first forwarding strategy packet
After including to N processing and forward process is subtracted from the ttl value execution for including in the IP packet that the source device is sent to the purpose equipment
The IP packet first instruction information;N is the positive integer more than or equal to 2;And
Receive the corresponding IP packet of IP address of the purpose equipment;
The processing unit 402, the IP address for receiving the purpose equipment in the receiving unit 401 are corresponding
After IP packet, N processing is subtracted to the ttl value execution for including in the IP packet according to the first instruction information, after obtaining processing
The IP packet;
The transmission unit 403, for by the next-hop of treated the IP packet the is sent to forwarding device 400
Equipment.
Optionally, the processing unit 402, is also used to:
After the receiving unit 401 receives the IP packet, the ttl value for including in the IP packet is held
Before row subtracts N processing, determine that the ttl value is greater than N.
Optionally, the processing unit 402, is also used to:
The next-hop of treated the IP packet the is sent to forwarding device 400 is set in the transmission unit 403
Before standby, the verification of the IP packet after calculation processing and checksum, and the checksum replacement being calculated described in
The checksum for including in the IP packet.
Optionally, the forwarding device 400 is interchanger or router.
Using forwarding device provided by the embodiments of the present application, the first forwarding strategy that controller is sent is received, wherein described
First forwarding strategy includes handling and forwarding to being sent to the ttl value execution for including from source device and subtract N in the IP packet of purpose equipment
First instruction information of the IP packet that treated;And in the corresponding IP packet of IP address for receiving the purpose equipment
Afterwards, N processing is subtracted to the ttl value execution for including in the IP packet according to the first instruction information, obtains that treated
The IP packet, then by the next-hop device of treated the IP packet the is sent to forwarding device.In this way, described turn
After equipment is sent out to the ttl value processing once of the IP packet, the ttl value is handled without other forwarding devices, thus
The number of processes to ttl value can be reduced, system resources consumption is reduced.
Based on above embodiments, the embodiment of the present application also provides another forwarding device, which is applied to such as
Communication network shown in FIG. 1, for realizing the function of the second forwarding device in message forwarding method as shown in Figure 2.Refering to Fig. 5
Shown, which includes: receiving unit 501 and transmission unit 502, wherein
The receiving unit 501, for receiving the forwarding strategy of controller transmission, the forwarding strategy includes forwarding from source
Equipment is sent to the instruction information of the IP packet of purpose equipment;And
Receive the corresponding IP packet of IP address of the purpose equipment;
The transmission unit 502, the IP address for receiving the purpose equipment in the receiving unit 501 are corresponding
After IP packet, the IP packet is transmitted to the next-hop device of the forwarding device 500 according to the instruction information.
Optionally, the forwarding device 500 is interchanger or router.
Using forwarding device provided by the embodiments of the present application, the forwarding strategy that controller is sent, the forwarding strategy are received
The instruction information of the IP packet of purpose equipment is sent to from source device including forwarding;And in the IP address for receiving the purpose equipment
After corresponding IP packet, the IP packet is transmitted to the next-hop device of the forwarding device according to the instruction information.This
Sample, at least one forwarding device do not need to handle the ttl value of the IP packet, it is possible to reduce to the ttl value
Number of processes, so as to reduce system resources consumption.
It should be noted that being schematical, only a kind of logic function to the division of unit in the embodiment of the present application
It divides, there may be another division manner in actual implementation.Each functional unit in embodiments herein can integrate
In one processing unit, it is also possible to each unit and physically exists alone, one can also be integrated in two or more units
In a unit.Above-mentioned integrated unit both can take the form of hardware realization, can also be in the form of software functional units
It realizes.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the application
The all or part of the steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(read-only memory, ROM), random access memory (random access memory, RAM), magnetic or disk
Etc. the various media that can store program code.
Based on above embodiments, the embodiment of the present application also provides a kind of controller, the controller application is in such as Fig. 1 institute
The communication network shown, for realizing message forwarding method as shown in Figure 2.As shown in fig.6, the controller 600 includes: logical
Believe interface 601, processor 602 and memory 603, wherein
It is connected with each other between the communication interface 601, the processor 602 and the memory 603.Optionally, institute
Communication interface 601, the processor 602 and the memory 603 is stated to be connected with each other by bus 604;The bus 604 can
To be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or extension industrial standard
Structure (Extended Industry Standard Architecture, EISA) bus etc..The bus can be divided into address
Bus, data/address bus, control bus etc..Only to be indicated with a thick line in Fig. 6, it is not intended that only one convenient for indicating
Bus or a type of bus.
The controller 600 is when realizing message forwarding method as shown in Figure 2:
The communication interface 601, for sending and receiving data;
The processor 602, for determining that the forward-path between source device and purpose equipment, the forward-path include
N number of forwarding device;N is the positive integer more than or equal to 2;
The number to be forwarded for determining the IP packet to be forwarded for being sent to the purpose equipment from the source device is N;
Determine the first forwarding strategy of the first forwarding device according to the times N to be forwarded, and determine at least one the
Second forwarding strategy of two forwarding devices;Wherein, first forwarding device is that the forwarding of any of described N number of forwarding device is set
Standby, at least one described second forwarding device is that the forwarding in N number of forwarding device in addition to first forwarding device is set
It is standby;First forwarding strategy includes subtracting N to the ttl value execution for including in the corresponding IP packet of the IP address of the purpose equipment
It handles and first of the IP packet after forward process indicates information;Second forwarding strategy includes that the purpose is forwarded to set
The second indication information of the corresponding IP packet of standby IP address;
It controls the communication interface 601 and first forwarding strategy is sent to first forwarding device;
It controls the communication interface 601 second forwarding strategy is sent respectively at least one described second forwarding and set
It is standby.
Optionally, the forwarding device is interchanger or router.
The memory 603, for storing program etc..Specifically, program may include program code, the program code packet
Include computer operation instruction.The memory 603 may include RAM, it is also possible to further include nonvolatile memory (non-
Volatile memory), a for example, at least magnetic disk storage.The processor 602 executes the memory 603 and is stored
Application program, above-mentioned function is realized, to realize message forwarding method as shown in Figure 2.
Using controller provided by the embodiments of the present application, the forward-path between source device and purpose equipment is determined, it is described
Forward-path includes N number of forwarding device, and N is the positive integer more than or equal to 2;The controller determination is sent to from the source device
The number to be forwarded of the IP packet to be forwarded of the purpose equipment is N, and determines that the first forwarding is set according to the times N to be forwarded
The first standby forwarding strategy, so that first forwarding device is first in the corresponding IP packet of the IP address of the purpose equipment
Ttl value execution subtracts N processing, then by the next-hop device of treated the IP packet is sent to first forwarding device;With
And the controller determines the second forwarding strategy of at least one the second forwarding device, so that at least one described second forwarding is set
The corresponding IP packet of the IP address of the purpose equipment is transmitted to second forwarding device by each of standby second forwarding device
Next-hop device.In this way, since the controller is to first forwarding device and at least one described second forwarding device
Different forwarding strategies is sent, and then in the repeating process of the IP packet, only needs first forwarding device to the IP
The ttl value processing of message is primary, carries out without other forwarding devices (at least one described second forwarding device) to the ttl value
Processing, therefore, when the quantity of the forwarding device of every forward-path is more in SDN network, only to every in the SDN network
The ttl value processing of a IP packet is primary, it is possible to reduce the number of processes of ttl value, so as to reduce the consumption of system resource.
Based on above embodiments, the embodiment of the present application also provides a kind of forwarding device, which is applied to such as Fig. 1
Shown in communication network, for realizing the function of the first forwarding device in message forwarding method as shown in Figure 2.Refering to Fig. 7 institute
Show, which includes: communication interface 701, processor 702 and memory 703, wherein
It is connected with each other between the communication interface 701, the processor 702 and the memory 703.Optionally, institute
Communication interface 701, the processor 702 and the memory 703 is stated to be connected with each other by bus 704;The bus 704 can
To be pci bus or eisa bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for table
Show, only indicated with a thick line in Fig. 7, it is not intended that an only bus or a type of bus.
The forwarding device 700 is when realizing message forwarding method as shown in Figure 2:
The communication interface 701, for sending and receiving data;
The processor 702 receives the first forwarding strategy that controller is sent for controlling the communication interface 701,
In, N number of forwarding device any of of the forwarding device on the forward-path between source device and purpose equipment is described
First forwarding strategy includes subtracting from N from the IP packet that the source device is sent to the purpose equipment to the ttl value execution for including
It manages and first of the IP packet after forward process indicates information;N is the positive integer more than or equal to 2;
After controlling the corresponding IP packet of IP address that the communication interface 701 receives the purpose equipment, according to described
First instruction information subtracts N processing to the ttl value execution for including in the IP packet, the IP packet that obtains that treated;
Control next-hop of the communication interface 701 by treated the IP packet the is sent to forwarding device 700
Equipment.
The processor 702, is also used to:
After controlling the communication interface 701 and receiving the IP packet, the TTL that includes in the IP packet
Before value execution subtracts N processing, determine that the ttl value is greater than N.
The processor 702, is also used to:
Controlling the communication interface 701, by treated, the IP packet is sent to the next of the forwarding device 700
Before jumping equipment, the verification of the IP packet after calculation processing and checksum, and the checksum being calculated described in
Replace the checksum for including in the IP packet.
Optionally, the forwarding device 700 is interchanger or router.
The memory 703, for storing program etc..Specifically, program may include program code, the program code packet
Include computer operation instruction.The memory 703 may include RAM, it is also possible to further include nonvolatile memory, for example, at least
One magnetic disk storage.The processor 702 executes the application program that the memory 703 is stored, and realizes above-mentioned function, from
And realize message forwarding method as shown in Figure 2.
Using forwarding device provided by the embodiments of the present application, the first forwarding strategy that controller is sent is received, wherein described
First forwarding strategy includes handling and forwarding to being sent to the ttl value execution for including from source device and subtract N in the IP packet of purpose equipment
First instruction information of the IP packet that treated;And in the corresponding IP packet of IP address for receiving the purpose equipment
Afterwards, N processing is subtracted to the ttl value execution for including in the IP packet according to the first instruction information, obtains that treated
The IP packet, then by the next-hop device of treated the IP packet the is sent to forwarding device.In this way, described turn
After equipment is sent out to the ttl value processing once of the IP packet, the ttl value is handled without other forwarding devices, thus
The number of processes to ttl value can be reduced, system resources consumption is reduced.
Based on above embodiments, the embodiment of the present application also provides another forwarding device, which is applied to such as
Communication network shown in FIG. 1, for realizing the function of the second forwarding device in message forwarding method as shown in Figure 2.Refering to Fig. 8
Shown, which includes: communication interface 801, processor 802 and memory 803, wherein
It is connected with each other between the communication interface 801, the processor 802 and the memory 803.Optionally, institute
Communication interface 801, the processor 802 and the memory 803 is stated to be connected with each other by bus 804;The bus 804 can
To be pci bus or eisa bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for table
Show, only indicated with a thick line in Fig. 8, it is not intended that an only bus or a type of bus.
The forwarding device 800 is when realizing message forwarding method as shown in Figure 2:
The communication interface 801, for sending and receiving data;
The processor 802, the forwarding strategy sent for controlling the reception of communication interface 801 controller, described turn
Hair strategy includes the instruction information that forwarding is sent to the IP packet of purpose equipment from source device;And
After controlling the corresponding IP packet of IP address that the communication interface 801 receives the purpose equipment, according to described
Instruction information controls the next-hop device that the IP packet is transmitted to the forwarding device 800 by the communication interface 801.
Optionally, the forwarding device 800 is interchanger or router.
The memory 803, for storing program etc..Specifically, program may include program code, the program code packet
Include computer operation instruction.The memory 803 may include RAM, it is also possible to further include nonvolatile memory, for example, at least
One magnetic disk storage.The processor 802 executes the application program that the memory 803 is stored, and realizes above-mentioned function, from
And realize message forwarding method as shown in Figure 2.
Using forwarding device provided by the embodiments of the present application, the forwarding strategy that controller is sent, the forwarding strategy are received
The instruction information of the IP packet of purpose equipment is sent to from source device including forwarding;And in the IP address for receiving the purpose equipment
After corresponding IP packet, the IP packet is transmitted to the next-hop device of the forwarding device according to the instruction information.This
Sample, at least one forwarding device do not need to handle the ttl value of the IP packet, it is possible to reduce to the ttl value
Number of processes, so as to reduce system resources consumption.
In conclusion providing a kind of message forwarding method by the embodiment of the present application and device, controller determine source device
Forward-path between purpose equipment, the forward-path include N number of forwarding device, and N is the positive integer more than or equal to 2;
The controller determines that the number to be forwarded for the IP packet to be forwarded for being sent to the purpose equipment from the source device is N, and root
The first forwarding strategy of the first forwarding device is determined according to the times N to be forwarded, so that first forwarding device is first to described
Ttl value execution in the corresponding IP packet of the IP address of purpose equipment subtracts N processing, then the IP packet is sent to by treated
The next-hop device of first forwarding device;And the controller determines the second forwarding of at least one the second forwarding device
Strategy, so that the second forwarding device of each of at least one described second forwarding device is by the IP address pair of the purpose equipment
The IP packet answered is transmitted to the next-hop device of second forwarding device.In the method, since the controller is to described
One forwarding device and at least one described second forwarding device send different forwarding strategies, and then in the forwarding of the IP packet
In the process, first forwarding device is only needed to handle the ttl value of the IP packet primary, it is (described without other forwarding devices
At least one second forwarding device) ttl value is handled, therefore, the forwarding of every forward-path is set in SDN network
When standby quantity is very big, only the ttl value of each IP packet is handled in the SDN network primary, it is possible to reduce the place of ttl value
Number is managed, so as to reduce the consumption of system resource.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, the computer in one or more which includes computer usable program code can be used in the application
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
Obviously, those skilled in the art can carry out various modification and variations without departing from this Shen to the embodiment of the present application
Please embodiment spirit and scope.In this way, if these modifications and variations of the embodiment of the present application belong to the claim of this application
And its within the scope of equivalent technologies, then the application is also intended to including these modification and variations.
Claims (9)
1. a kind of message forwarding method characterized by comprising
Controller determines that the forward-path between source device and purpose equipment, the forward-path include N number of forwarding device, and N is
Positive integer more than or equal to 2;
The controller determine from the source device be sent to the purpose equipment Internet protocol IP packet to be forwarded it is to be forwarded
Number is N;
The controller determines the first forwarding strategy of the first forwarding device according to the times N to be forwarded, and determines at least
Second forwarding strategy of one the second forwarding device;Wherein, first forwarding device is any of described N number of forwarding device
Forwarding device, at least one described second forwarding device be N number of forwarding device in addition to first forwarding device
Forwarding device;When first forwarding strategy includes to the survival for including in the corresponding IP packet of the IP address of the purpose equipment
Between ttl value execute subtract N processing and forward process after the IP packet first instruction information;Second forwarding strategy includes
Forward the second indication information of the corresponding IP packet of the IP address of the purpose equipment;
First forwarding strategy is sent to first forwarding device by the controller;
Second forwarding strategy is sent respectively at least one described second forwarding device by the controller.
2. a kind of message forwarding method characterized by comprising
First forwarding device receive controller send the first forwarding strategy, wherein first forwarding device be source device with
Any of N number of forwarding device on forward-path between purpose equipment, first forwarding strategy include to from described
Source device is sent to the time-to-live ttl value execution in the Internet protocol IP packet of the purpose equipment included and subtracts N and handle and forward
First instruction information of the IP packet that treated;N is the positive integer more than or equal to 2;
After the corresponding IP packet of IP address that first forwarding device receives the purpose equipment, according to first instruction
Information subtracts N processing to the ttl value execution for including in the IP packet, the IP packet that obtains that treated;
First forwarding device is by the next-hop device of treated the IP packet is sent to first forwarding device.
3. method according to claim 2, which is characterized in that after first forwarding device receives the IP packet,
Before the ttl value execution for including in the IP packet subtracts N processing, the method also includes:
First forwarding device determines that the ttl value is greater than N.
4. method as claimed in claim 2 or claim 3, which is characterized in that first forwarding device will treated the IP
Message is sent to before the next-hop device of first forwarding device, the method also includes:
The verification of the IP packet after the first forwarding device calculation processing and checksum, and be calculated described in
Checksum replaces the checksum for including in the IP packet.
5. a kind of controller characterized by comprising
Memory, for storing program instruction;
Communication interface, for sending and receiving data;
Processor, for calling the program instruction of storage in the memory to execute following methods:
Determine the forward-path between source device and purpose equipment, the forward-path includes N number of forwarding device, N be greater than or
Positive integer equal to 2;
The number to be forwarded for determining the Internet protocol IP packet to be forwarded for being sent to the purpose equipment from the source device is N;
The first forwarding strategy of the first forwarding device is determined according to the times N to be forwarded, and determines at least one second turn
Send out the second forwarding strategy of equipment;Wherein, first forwarding device is any of N number of forwarding device forwarding device,
At least one described second forwarding device is the forwarding device in N number of forwarding device in addition to first forwarding device;
First forwarding strategy includes holding in the corresponding IP packet of the IP address of the purpose equipment to the time-to-live ttl value for including
Row subtracts the first instruction information of the IP packet after N processing and forward process;Second forwarding strategy includes described in forwarding
The second indication information of the corresponding IP packet of the IP address of purpose equipment;
It controls the communication interface and first forwarding strategy is sent to first forwarding device;
It controls the communication interface and second forwarding strategy is sent respectively at least one described second forwarding device.
6. a kind of forwarding device characterized by comprising
Memory, for storing program instruction;
Communication interface, for sending and receiving data;
Processor, for calling the program instruction of storage in the memory to execute following methods:
Control the communication interface and receive the first forwarding strategy that controller is sent, wherein the forwarding device be source device with
Any of N number of forwarding device on forward-path between purpose equipment, first forwarding strategy include to from described
Source device is sent to the time-to-live ttl value execution in the Internet protocol IP packet to be forwarded of the purpose equipment included and subtracts N processing
And the first instruction information of the IP packet after forward process;N is the positive integer more than or equal to 2;
After controlling the corresponding IP packet of IP address that the communication interface receives the purpose equipment, refer to according to described first
Show that information subtracts N processing to the ttl value execution for including in the IP packet, the IP packet that obtains that treated;
Control next-hop device of the communication interface by treated the IP packet the is sent to forwarding device.
7. forwarding device as claimed in claim 6, which is characterized in that the processor is also used to:
After controlling the communication interface and receiving the IP packet, the ttl value for including in the IP packet is executed
Before subtracting N processing, determine that the ttl value is greater than N.
8. forwarding device as claimed in claims 6 or 7, which is characterized in that the processor is also used to:
The communication interface is being controlled by treated before the IP packet is sent to the next-hop device of the forwarding device,
The verification of the IP packet after calculation processing and checksum, and the checksum being calculated described in replaces the IP report
The checksum for including in text.
9. a kind of computer storage medium characterized by comprising
The computer storage medium is stored with computer executable instructions, the computer executable instructions by make it is described based on
Calculation machine perform claim requires the described in any item methods of 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710422799.7A CN109005116B (en) | 2017-06-07 | 2017-06-07 | Message forwarding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710422799.7A CN109005116B (en) | 2017-06-07 | 2017-06-07 | Message forwarding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109005116A true CN109005116A (en) | 2018-12-14 |
CN109005116B CN109005116B (en) | 2020-07-24 |
Family
ID=64573985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710422799.7A Active CN109005116B (en) | 2017-06-07 | 2017-06-07 | Message forwarding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109005116B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111787593A (en) * | 2019-04-03 | 2020-10-16 | 电信科学技术研究院有限公司 | Data transmission method and node |
CN112448921A (en) * | 2019-08-30 | 2021-03-05 | 华为技术有限公司 | Method and device for detecting rear door |
CN115086227A (en) * | 2022-07-14 | 2022-09-20 | 中国联合网络通信集团有限公司 | Method, device and equipment for determining forwarding strategy and storage medium |
CN115865682A (en) * | 2022-12-15 | 2023-03-28 | 中国联合网络通信集团有限公司 | SDN link detection processing method, controller, system and medium |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1613267A (en) * | 2001-11-16 | 2005-05-04 | M2网络股份有限公司 | A method and implementation for a flow specific modified selective-repeat ARQ communication system |
CN101145856A (en) * | 2006-09-13 | 2008-03-19 | 中兴通讯股份有限公司 | A multi-broadcast communication method and device for automatic protection switching |
CN103257626A (en) * | 2012-01-31 | 2013-08-21 | 费希尔-罗斯蒙特系统公司 | Apparatus and method for establishing maintenance routes within a process control system |
CN103401726A (en) * | 2013-07-19 | 2013-11-20 | 华为技术有限公司 | Network path detecting method, device and system |
EP2672668A1 (en) * | 2012-06-06 | 2013-12-11 | Juniper Networks, Inc. | Creating searchable and global database of user visible process traces |
CN104506482A (en) * | 2014-10-10 | 2015-04-08 | 香港理工大学 | Detection method and detection device for network attack |
CN104796344A (en) * | 2014-01-16 | 2015-07-22 | 中兴通讯股份有限公司 | Method, system, Openflow switch and server for realizing message forwarding based on SDN |
CN105516184A (en) * | 2015-12-31 | 2016-04-20 | 清华大学深圳研究生院 | Increment deployment SDN network-based method for defending link flooding attack |
CN105634842A (en) * | 2014-10-29 | 2016-06-01 | 华为技术有限公司 | Method and system for detecting bandwidth, and devices |
CN105634839A (en) * | 2014-10-29 | 2016-06-01 | 华为技术有限公司 | Method and device for acquiring accessible address space of network |
WO2016123314A1 (en) * | 2015-01-28 | 2016-08-04 | Hewlett-Packard Development Company, L.P. | Data loop determination in a software-defined network |
CN106027388A (en) * | 2016-05-13 | 2016-10-12 | 清华大学 | SDN inter-domain routing information transferring method |
CN106375207A (en) * | 2016-09-05 | 2017-02-01 | 上海斐讯数据通信技术有限公司 | Time exceeded message control method and system based on SDN (Software Defined Network) |
CN106464725A (en) * | 2014-05-22 | 2017-02-22 | 高通股份有限公司 | Systems and methods of operating a device of a data path group network |
CN106559325A (en) * | 2015-09-25 | 2017-04-05 | 华为技术有限公司 | Path detection method and device |
CN106612211A (en) * | 2015-10-23 | 2017-05-03 | 华为技术有限公司 | A rout detecting method, a controller and a network device in a VxLAN |
-
2017
- 2017-06-07 CN CN201710422799.7A patent/CN109005116B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1613267A (en) * | 2001-11-16 | 2005-05-04 | M2网络股份有限公司 | A method and implementation for a flow specific modified selective-repeat ARQ communication system |
CN101145856A (en) * | 2006-09-13 | 2008-03-19 | 中兴通讯股份有限公司 | A multi-broadcast communication method and device for automatic protection switching |
CN103257626A (en) * | 2012-01-31 | 2013-08-21 | 费希尔-罗斯蒙特系统公司 | Apparatus and method for establishing maintenance routes within a process control system |
EP2672668A1 (en) * | 2012-06-06 | 2013-12-11 | Juniper Networks, Inc. | Creating searchable and global database of user visible process traces |
CN103401726A (en) * | 2013-07-19 | 2013-11-20 | 华为技术有限公司 | Network path detecting method, device and system |
CN104796344A (en) * | 2014-01-16 | 2015-07-22 | 中兴通讯股份有限公司 | Method, system, Openflow switch and server for realizing message forwarding based on SDN |
CN106464725A (en) * | 2014-05-22 | 2017-02-22 | 高通股份有限公司 | Systems and methods of operating a device of a data path group network |
CN104506482A (en) * | 2014-10-10 | 2015-04-08 | 香港理工大学 | Detection method and detection device for network attack |
CN105634842A (en) * | 2014-10-29 | 2016-06-01 | 华为技术有限公司 | Method and system for detecting bandwidth, and devices |
CN105634839A (en) * | 2014-10-29 | 2016-06-01 | 华为技术有限公司 | Method and device for acquiring accessible address space of network |
WO2016123314A1 (en) * | 2015-01-28 | 2016-08-04 | Hewlett-Packard Development Company, L.P. | Data loop determination in a software-defined network |
CN106559325A (en) * | 2015-09-25 | 2017-04-05 | 华为技术有限公司 | Path detection method and device |
CN106612211A (en) * | 2015-10-23 | 2017-05-03 | 华为技术有限公司 | A rout detecting method, a controller and a network device in a VxLAN |
CN105516184A (en) * | 2015-12-31 | 2016-04-20 | 清华大学深圳研究生院 | Increment deployment SDN network-based method for defending link flooding attack |
CN106027388A (en) * | 2016-05-13 | 2016-10-12 | 清华大学 | SDN inter-domain routing information transferring method |
CN106375207A (en) * | 2016-09-05 | 2017-02-01 | 上海斐讯数据通信技术有限公司 | Time exceeded message control method and system based on SDN (Software Defined Network) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111787593A (en) * | 2019-04-03 | 2020-10-16 | 电信科学技术研究院有限公司 | Data transmission method and node |
CN111787593B (en) * | 2019-04-03 | 2022-08-30 | 大唐移动通信设备有限公司 | Data transmission method and node |
CN112448921A (en) * | 2019-08-30 | 2021-03-05 | 华为技术有限公司 | Method and device for detecting rear door |
CN112448921B (en) * | 2019-08-30 | 2024-05-24 | 华为技术有限公司 | Method and device for detecting rear door |
CN115086227A (en) * | 2022-07-14 | 2022-09-20 | 中国联合网络通信集团有限公司 | Method, device and equipment for determining forwarding strategy and storage medium |
CN115086227B (en) * | 2022-07-14 | 2023-10-03 | 中国联合网络通信集团有限公司 | Method, device, equipment and storage medium for determining forwarding strategy |
CN115865682A (en) * | 2022-12-15 | 2023-03-28 | 中国联合网络通信集团有限公司 | SDN link detection processing method, controller, system and medium |
Also Published As
Publication number | Publication date |
---|---|
CN109005116B (en) | 2020-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2019109163A (en) | SYSTEMS AND METHODS FOR SESSION CONTROL OF A PROTOCOL DATA UNIT (PDU) ADAPTED TO AN APP | |
CN109005116A (en) | A kind of message forwarding method and device | |
CN109361606B (en) | Message processing system and network equipment | |
CN107770269B (en) | A kind of service response method and its terminal | |
CN111385246B (en) | Secure route identification method and device | |
WO2015106618A1 (en) | Resource scheduling method and apparatus | |
CN106534345B (en) | A kind of message forwarding method and device | |
US11444840B2 (en) | Virtualized networking application and infrastructure | |
CN104580107B (en) | malicious attack detection method and controller | |
CN105939284B (en) | The matching process and device of message control strategy | |
CN104601467A (en) | Method and device for sending messages | |
CN108738082A (en) | Conversation processing method, apparatus and system | |
WO2016045056A1 (en) | Switch and service request packet processing method | |
CN108170533A (en) | The processing method and processing device of message, computer readable storage medium | |
CN108965137A (en) | A kind of message processing method and device | |
JP2005322107A (en) | Load distribution device and program | |
JP2016530746A (en) | Method and apparatus for controlling network capacity | |
WO2017030531A1 (en) | Implementing forwarding behavior based on communication activity between a controller and a network device | |
WO2016049926A1 (en) | Data packet processing apparatus and method | |
CN106559323A (en) | A kind of method and apparatus sent on SDN equipment first packet | |
CN106304154B (en) | A kind of data transmission method and PDCP entity of PDCP entity | |
CN108259358A (en) | route issuing method and device | |
CN109379283A (en) | Self-organized network communication method, apparatus and ad hoc network based on Internet of Things heterogeneous device | |
CN109639502A (en) | Return operated control method and content distributing network | |
CN110851275B (en) | Load transfer method and device of routing node |
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 |