Method and apparatus for diverting flow
暂无分享,去创建一个
Disclosed are a method and apparatus for diverting a flow. The method comprises: a first network node calculating a first packet loss rate of a first forwarding tunnel within a pre-set period; when the first packet loss rate is greater than a first pre-determined threshold value, reducing a rated bandwidth of the first forwarding tunnel by a first pre-determined bandwidth to obtain a first available bandwidth; and when a forwarding flow of the first forwarding tunnel exceeds the first available bandwidth, diverting the exceeded forwarding flow onto a second data link for forwarding. It can be seen that the first network node reduces the available bandwidth of the first forwarding tunnel to be the first available bandwidth in the case of a high packet loss rate of the first forwarding tunnel, and since the first available bandwidth is smaller than the originally shown available bandwidth of the first forwarding tunnel, the forwarding flow can exceed the first available bandwidth earlier, a diverting opportunity of the first network node for diverting the flow is advanced, and the occurrence probability of severe packet loss situation can be reduced prior to the diverting of flow.