Search

CN-122003847-A - Communication method, electronic equipment and device

CN122003847ACN 122003847 ACN122003847 ACN 122003847ACN-122003847-A

Abstract

The embodiment of the application provides a communication method, electronic equipment and a device, which are applied to first equipment, wherein the first equipment is electronic equipment supporting SRv6 in a network, and the method comprises the steps of obtaining SRv Locator of the first equipment, sending a first LLDP message to second equipment, wherein the first LLDP message comprises SRv Locator of the first equipment, so that the second equipment generates a Locator route reaching the first equipment according to SRv Locator of the first equipment. By applying the embodiment of the application, SRv information notification can be performed through a simple routing protocol.

Inventors

  • LIN CHANGWANG

Assignees

  • 新华三技术有限公司

Dates

Publication Date
20260508
Application Date
20240903

Claims (20)

  1. A communication method applied to a first device, the first device being an electronic device supporting internet protocol version 6 segment routing SRv in a network, the method comprising: acquiring SRv Locator of the first device; And sending a first Link Layer Discovery Protocol (LLDP) message to a second device, wherein the first LLDP message comprises SRv Locator of the first device, so that the second device generates a Locator route reaching the first device according to SRv Locator of the first device.
  2. The method according to claim 1, wherein the method further comprises: Receiving a second LLDP message sent by a third device, wherein the second LLDP message comprises SRv Locator of the third device; Generating a Locator route reaching the third device according to SRv Locator of the third device; And based on a dynamic routing protocol, sending a routing notification message to a dynamic routing protocol neighbor of the first device, wherein the routing notification message comprises the Locator route reaching the third device.
  3. The method of claim 2, wherein the second LLDP message further includes SRv capabilities Capbility, the method further comprising: and determining the maximum segment identification SID stack depth supported by the third device according to the SRv capability.
  4. The method of claim 3, wherein the first LLDP message further includes SRv capabilities, the SRv capabilities being used to cause the second device to determine SRv capabilities of the first device, the SRv capabilities representing a maximum SID stack depth supported by the first device.
  5. The method of claim 2, wherein each LLDP message includes a SRv Locator TLV structure, the SRv6 Locator TLV structure being used to carry SRv locators of devices.
  6. The method of claim 5, wherein the SRv6 Locator TLV structure includes a Value field, the Value field including a Locator field, the Locator field being used to carry SRv Locator of a device; The value field also comprises a multi-topology identification MTID field, an overhead field, an algorithm field, a Locator length field and a sub-TLV field; The MTID field carries an MTID, the overhead field represents path overhead of SRv's 6 Locator, the algorithm field represents a path calculation algorithm used by the device, and the Locator length field represents the length of SRv's 6 Locator; The sub-TLVs comprise a first sub-TLV and/or a second sub-TLV, the first sub-TLV bears a last End SID, wherein the End SID is a SID which is preassigned by the equipment under the SRv Locator, and the second sub-TLV bears a management label.
  7. The method of claim 4, wherein each LLDP message further includes a SRv6 Capbility TLV structure, and wherein the SRv6 Capbility TLV structure is used to carry the SRv6 capabilities.
  8. The method of claim 7, wherein the SRv < 6 > Capbility TLV structure includes a value field that includes an optional sub-TLV, The optional sub-TLV includes a type field that carries the type of the maximum tag stack depth MSD supported by the device, and a length field that carries an MSD value that represents the maximum number of SIDs that the device is allowed to carry in a message generated by the device.
  9. An electronic device, wherein the electronic device is a device supporting internet protocol version 6 segment routing SRv in a network, the electronic device comprising: A processor; A transceiver; a machine-readable storage medium storing machine-executable instructions executable by the processor, the machine-executable instructions causing the processor to perform the steps of: acquiring SRv Locator of the first device; And sending a first Link Layer Discovery Protocol (LLDP) message to a second device, wherein the first LLDP message comprises SRv Locator of the first device, so that the second device generates a Locator route reaching the first device according to SRv Locator of the first device.
  10. The electronic device of claim 9, wherein the machine-executable instructions further cause the processor to perform the steps of: Receiving a second LLDP message sent by a third device, wherein the second LLDP message comprises SRv Locator of the third device; Generating a Locator route reaching the third device according to SRv Locator of the third device; And based on a dynamic routing protocol, sending a routing notification message to a dynamic routing protocol neighbor of the first device, wherein the routing notification message comprises the Locator route reaching the third device.
  11. The electronic device of claim 10, wherein the second LLDP message further includes SRv capabilities Capbility, the machine-executable instructions further causing the processor to perform the steps of: and determining the maximum segment identification SID stack depth supported by the third device according to the SRv capability.
  12. The electronic device of claim 11, wherein the first LLDP message further includes SRv capabilities, the SRv capabilities being configured to enable the second device to determine SRv capabilities of the first device, the SRv capabilities representing a maximum SID stack depth supported by the first device.
  13. The electronic device of claim 10, wherein each LLDP message includes a SRv Locator TLV structure, the SRv6 Locator TLV structure being used to carry SRv locators of devices.
  14. The electronic device of claim 13, wherein the SRv Locator TLV structure includes a Value field, the Value field includes a Locator field, and the Locator field is used to carry SRv Locator of the device; The value field also comprises a multi-topology identification MTID field, an overhead field, an algorithm field, a Locator length field and a sub-TLV field; The MTID field carries an MTID, the overhead field represents path overhead of SRv's 6 Locator, the algorithm field represents a path calculation algorithm used by the device, and the Locator length field represents the length of SRv's 6 Locator; The sub-TLVs comprise a first sub-TLV and/or a second sub-TLV, the first sub-TLV bears a last End SID, wherein the End SID is a SID which is preassigned by the equipment under the SRv Locator, and the second sub-TLV bears a management label.
  15. The electronic device of claim 12, wherein each LLDP message further includes a SRv to Capbility TLV structure, wherein the SRv to Capbility TLV structure is configured to carry the SRv6 capabilities.
  16. The electronic device of claim 15, wherein the SRv-Capbility TLV structure includes a value field that includes an optional sub-TLV, The optional sub-TLV includes a type field that carries the type of the maximum tag stack depth MSD supported by the device, and a length field that carries an MSD value that represents the maximum number of SIDs that the device is allowed to carry in a message generated by the device.
  17. A communication apparatus for use with a first device that is an electronic device in a network that supports internet protocol version 6 segment routing SRv, the apparatus comprising: The Locator acquisition module is used for acquiring SRv Locator of the first device; The first message sending module is configured to send a first link layer discovery protocol LLDP message to a second device, where the first LLDP message includes SRv Locator of the first device, so that the second device generates a Locator route reaching the first device according to SRv Locator of the first device.
  18. The apparatus of claim 17, wherein the apparatus further comprises: A message receiving module, configured to receive a second LLDP message sent by a third device, where the second LLDP message includes SRv Locator of the third device; The route generation module is used for generating a Locator route reaching the third device according to SRv Locator of the third device; And the second message sending module is used for sending a route notification message to a dynamic routing protocol neighbor of the first device based on a dynamic routing protocol, wherein the route notification message comprises the Locator route reaching the third device.
  19. The apparatus of claim 18, wherein the second LLDP message further includes SRv capabilities Capbility, the apparatus further comprising: And the maximum SID determining module is used for determining the maximum segment identification SID stack depth supported by the third device according to the SRv capability.
  20. The apparatus of claim 19, wherein the first LLDP message further includes SRv capabilities, the SRv capabilities being configured to enable the second device to determine SRv capabilities of the first device, the SRv capabilities representing a maximum SID stack depth supported by the first device.

Description

Communication method, electronic equipment and device Technical Field The present application relates to the field of communications technologies, and in particular, to a communications method, an electronic device, and an apparatus. Background In communication based on SRv (Segment Routing Internet Protocol Version, internet protocol version 6 segment routing) technology, SRv locators (locators) of electronic devices need to be mutually advertised in advance between electronic devices in a network. The notification SRv Locator may be based on IS-IS (INTERMEDIATE SYSTEM to INTERMEDIATE SYSTEM, intermediate system to intermediate system protocol) or OSPFv3 (Open short PATH FIRST version 3, third edition link state routing protocol). However, since the protocols of IS-IS and OSPFv3 are complex, it IS difficult for an electronic device, such as a host (host), which does not support the complex dynamic routing protocol function, to advertise SRv locators in the above related art. Such electronic devices have difficulty completing SRv notification of 6 locators, and subsequent SRv communication. Disclosure of Invention The embodiment of the application aims to provide a communication method, electronic equipment and device, so as to carry out SRv Locator notification through a simple routing protocol. The specific technical scheme is as follows: In a first aspect, an embodiment of the present application provides a communication method, applied to a first device, where the first device is an electronic device supporting internet protocol version 6 segment routing SRv in a network, where the method includes: acquiring SRv Locator of the first device; And sending a first Link Layer Discovery Protocol (LLDP) message to a second device, wherein the first LLDP message comprises SRv Locator of the first device, so that the second device generates a Locator route reaching the first device according to SRv Locator of the first device. In one embodiment of the application, the method further comprises: Receiving a second LLDP message sent by a third device, wherein the second LLDP message comprises SRv Locator of the third device; Generating a Locator route reaching the third device according to SRv Locator of the third device; And based on a dynamic routing protocol, sending a routing notification message to a dynamic routing protocol neighbor of the first device, wherein the routing notification message comprises the Locator route reaching the third device. In one embodiment of the present application, the second LLDP message further includes SRv capabilities Capbility, and the method further includes: and determining the maximum segment identification SID stack depth supported by the third device according to the SRv capability. In one embodiment of the present application, the first LLDP message further includes SRv capabilities, wherein the SRv capabilities are used to enable the second device to determine SRv capabilities of the first device, and the SRv capabilities represent a maximum SID stack depth supported by the first device. In one embodiment of the present application, each LLDP packet includes SRv6 _6_locator_tlv structure, and the SRv6 _6_locator_tlv structure is used for carrying SRv6 _locator of the device. In one embodiment of the present application, the SRv Locator TLV structure includes a Value field, where the Value field includes a Locator field, and the Locator field is used for carrying SRv Locator of the device; The value field also comprises a multi-topology identification MTID field, an overhead field, an algorithm field, a Locator length field and a sub-TLV field; The MTID field carries an MTID, the overhead field represents path overhead of SRv's 6 Locator, the algorithm field represents a path calculation algorithm used by the device, and the Locator length field represents the length of SRv's 6 Locator; The sub-TLVs comprise a first sub-TLV and/or a second sub-TLV, the first sub-TLV bears a last End SID, wherein the End SID is a SID which is preassigned by the equipment under the SRv Locator, and the second sub-TLV bears a management label. In one embodiment of the present application, each LLDP message further includes SRv to Capbility TLV structure, and the SRv to Capbility TLV structure is used to carry the SRv6 capability. In one embodiment of the present application, the SRv 6: 6 Capbility TLV structure includes a value field, which includes an optional sub-TLV, The optional sub-TLV includes a type field that carries the type of the maximum tag stack depth MSD supported by the device, and a length field that carries an MSD value that represents the maximum number of SIDs that the device is allowed to carry in a message generated by the device. In a second aspect, an embodiment of the present application provides an electronic device, where the electronic device is a device supporting internet protocol version 6 segment routing SRv in a network, and the electronic device includes: A