Method and apparatus for generating link state protocol data packet
AssigneeZte Corporation
InventorsQiang Wu, Guangteng Zhou
Life of this patent
Estimating the term…
Abstract
The disclosure discloses a method and apparatus for generating a Link State Protocol data packet (LSP). In the method, a length of a reserved space is configured, wherein the length of the reserved space is smaller than a default maximum length of a single LSP fragment; and the reserved space is set, according to the length of the reserved space, in all LSP fragments which are generated in sequence. According to the technical solution provided in the disclosure, a bad effect caused by network oscillation can be eliminated significantly.
Claims6
A method for generating a Link State Protocol data packet (LSP), comprising:
- configuring a length of a reserved space, wherein the length of the reserved space is smaller than a default maximum length of a single LSP fragment;
- and
- setting, according to the length of the reserved space, the reserved space in all LSP fragments which are generated in sequence;
- wherein a space out of the reserved space in each LSP fragment of the all LSP fragments is filled with link state information;
- where after setting, according to the length of the reserved space, the reserved space in all the LSP fragments which are generated in sequence, further comprising:
- readjusting the length of the reserved space when the length of the residual space in the LSP fragment is determined to be smaller than the length of the ITEM to be inserted, and all LSP fragments in the currently used IS are already used;
- or,
- after setting, according to the length of the reserved space, the reserved space in all the LSP fragments which are generated in sequence, further comprising:
- searching for an LSP fragment where an ITEM to be deleted is located;
- judging whether at least one other ITEM, except the ITEM to be deleted, exists in the LSP fragment when the at least one other ITEM, except the ITEM to be deleted, exists in the LSP fragment, reorganising and updating the link state information in the LSP fragment and when no other ITEM, except the ITEM to be deleted, exists in the LSP fragment, readjusting the length of the reserved space;
- wherein the length of the reserved space is readjusted according to a following formula:
- L
- r
- =
- (
- ∑
- n
- =
- 0
- 256
-
-
- (
- L
- max
- -
- L
- n
- cur
- )
- /
- 256
- )
- *
- N
-
-
- %
- ,
- where Lr is the length of the reserved space, Lmax is the default maximum length, Lncur represents a current actual length of an LSP fragment numbered as n, 0≤n≤256, 0<N<100.
An apparatus for generating a Link State Protocol data packet (LSP), comprising:
- a configuration component, configured to configure a length of a reserved space, wherein the length of the reserved space is smaller than a default maximum length of a single LSP fragment;
- and
- a setting component, configured to set, according to the length of the reserved space, the reserved space in all LSP fragments which are generated in sequence;
- wherein a space out of the reserved space in each LSP fragment of the all LSP fragments is filled with link state information;
- wherein the apparatus further comprising:
- a first adjustment component, configured to readjust the length of the reserved space when the length of the residual space in the LSP fragment is determined to be smaller than the length of the ITEM to be inserted, and all LSP fragments in the currently used IS are already used;
- or wherein the apparatus further comprising:
- a second searching component, configured to search for an LSP fragment where an ITEM to be deleted is located;
- a judgment component, configured to judge whether at least one other ITEM, except the ITEM to be deleted, exists in the LSP fragment a third reorganisation and update component, configured to reorganise and update the link state information in the LSP fragment when the judgment component judges that the at least one other ITEM, except the ITEM to be deleted, exists in the LSP fragment and a second adjustment component, configured to readjust the length of the reserved space when the judgment component judges that no other ITEM, except the ITEM to be deleted, exists in the LSP fragment;
- wherein the length of the reserved space is readjusted according to a following formula:
- L
- r
- =
- (
- ∑
- n
- =
- 0
- 256
-
-
- (
- L
- max
- -
- L
- n
- cur
- )
- /
- 256
- )
- *
- N
-
-
- %
- ,
- where Lr is the length of the reserved space, Lmax is the default maximum length, Lncur represents a current actual length of an LSP fragment numbered as n, 0≤n≤256, 0<N<100.
Dependencies are inferred from the claim text.