WO2022166607A1 - 发送报文的方法、装置、系统及存储介质 - Google Patents

发送报文的方法、装置、系统及存储介质 Download PDF

Info

Publication number
WO2022166607A1
WO2022166607A1 PCT/CN2022/073045 CN2022073045W WO2022166607A1 WO 2022166607 A1 WO2022166607 A1 WO 2022166607A1 CN 2022073045 W CN2022073045 W CN 2022073045W WO 2022166607 A1 WO2022166607 A1 WO 2022166607A1
Authority
WO
WIPO (PCT)
Prior art keywords
address prefix
packet
domain
algorithm
identification information
Prior art date
Application number
PCT/CN2022/073045
Other languages
English (en)
French (fr)
Inventor
赵孟凯
徐国其
郑娟
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22748886.3A priority Critical patent/EP4277235A4/en
Publication of WO2022166607A1 publication Critical patent/WO2022166607A1/zh
Priority to US18/363,783 priority patent/US20230388232A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/748Address table lookup; Address filtering using longest matching prefix
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/566Routing instructions carried by the data packet, e.g. active networks

Definitions

  • the present application relates to the field of communications, and in particular, to a method, device, system and storage medium for sending a message.
  • the Flexible Algorithm divides the segment routing (SR) network into network shards by means of algorithm definition.
  • Each network shard is a logical network, and different network shards correspond to different flexible algorithms.
  • the device For a certain device in the SR network, the device is called the first device.
  • the first device needs to publish the identification information of the flexible algorithm to the second device.
  • the second device is another device in the SR network except the first device.
  • the first device and the second device are located in the same autonomous system (autonomous system, AS) domain.
  • AS autonomous system
  • the second device cannot receive the identification information of the flexible algorithm published by the first device, so that the second device cannot use the flexible algorithm to send services to the first device, affecting the network Deployment flexibility.
  • the present application provides a method, device, system and storage medium for sending a message, so as to improve the flexibility of network deployment.
  • the technical solution is as follows:
  • the present application provides a method for sending a message.
  • a first device receives a first message, the first message includes a first address prefix, and the first device is a first autonomous system AS.
  • the first address prefix is obtained based on the address prefix advertised by the second device.
  • the second device is located in the second AS domain.
  • the first AS domain is different from the second AS domain.
  • the device sends a message.
  • the first device acquires the second address prefix and the identification information of the target flexible algorithm based on the first address prefix, where the second address prefix is used to send a packet to the second device.
  • the first device sends a second packet to the device in the first AS domain, where the second packet includes the second address prefix and the identification information of the target flexible algorithm, so that the device in the first AS domain forwards the matching through the path corresponding to the target flexible algorithm
  • the message of the second address prefix
  • the first device Since the first device obtains the second address prefix and the identification information of the target flexible algorithm based on the first address prefix in the first packet, the first device sends the second address prefix and the identification of the target flexible algorithm to the devices in the first AS domain information, and the second address prefix is used to send a packet to the second device, so that the device in the first AS domain can also obtain the target flexibility algorithm corresponding to the device located in the second AS domain.
  • the first AS domain needs to send a packet matching the second address prefix, it can use the path corresponding to the target flexibility algorithm to send the packet, thereby improving the flexibility of network deployment.
  • the first device determines a first correspondence based on the first address prefix, and the first correspondence includes a correspondence between the second address prefix and the identification information of the first candidate flexibility algorithm. Since the first device includes the corresponding relationship between the second address prefix and the identification information of the first candidate flexible algorithm, the first corresponding relationship can be determined based on the first address prefix, and then the target flexible algorithm can be determined to ensure that the first device can send The device in the first AS domain sends the identification information of the target flexible algorithm.
  • the first device uses the first candidate flexibility algorithm as the target flexibility algorithm.
  • the first device may use the first candidate flexibility algorithm in the first correspondence as the target flexibility algorithm, that is, the target flexibility algorithm in the first AS domain is obtained through the statically configured correspondence.
  • the first packet further includes identification information of the second candidate flexible algorithm.
  • the first device determines the target flexibility algorithm from the first candidate flexibility algorithm and the second candidate flexibility algorithm. That is, the first device may also receive the second candidate flexibility algorithm from the second AS domain, and determine the target flexibility algorithm from the second candidate flexibility algorithm and the first candidate flexibility algorithm.
  • the target flexible algorithm in the first AS domain can be obtained through a statically configured correspondence, or can be dynamically carried by a packet from the second AS domain, which increases the diversity of target flexible algorithm acquisition methods.
  • the second address prefix is a prefix in the Segment Routing Internet Protocol Version 6 Locator SRv6 Locator
  • the second packet includes the locator type length value Locator TLV
  • the Locator TLV includes the second Address prefix and identification information of the target flexible algorithm.
  • the second message includes the Locator TLV, which is used to issue the SRv6 Locator to the device in the first AS domain, and carries the target flexibility algorithm corresponding to the SRv6 Locator.
  • the identification information of the second candidate flexible algorithm is carried in the type-length value TLV of the first packet, and the path corresponding to the second flexible algorithm candidate is used in the second flexible algorithm.
  • the border device in the second AS domain can also send the identification information of the second flexible algorithm alternative to the first device in the first AS domain through the TLV in the first packet, so as to ensure the first The device can obtain the target flexibility algorithm.
  • the first address prefix matches the second address prefix.
  • the first device acquires the second address prefix and the identification information of the target flexible algorithm based on the first address prefix, which means that the first device matches the first correspondence including the second address prefix based on the first address prefix relationship, and then obtain the second address prefix and the identification information of the target flexible algorithm from the first corresponding relationship.
  • the first packet is a border gateway protocol BGP packet.
  • the BGP packet is used to send routing information including the first address prefix from the second AS domain to the first AS domain.
  • the present application provides a method for sending a packet.
  • a third device sends a first packet to a device in the first AS domain, where the first packet includes a first address prefix and a flexible algorithm. identification information, so that the devices in the first AS domain forward the packet through the path corresponding to the flexible algorithm, and the packet matches the first address prefix.
  • the third device is the boundary device of the second AS domain, the first AS domain is different from the second AS domain, the first address prefix is used to identify the second device in the second AS domain, and the packet forwarding path corresponding to the flexible algorithm is used for to forward the packet to the second device in the second AS domain.
  • the first packet sent by the third device to the device in the first AS domain includes the identification information of the flexible algorithm, it is guaranteed that the first device can obtain the target flexible algorithm corresponding to the second device in the second AS domain, and send it to the third device.
  • a device in an AS domain sends identification information of the target flexible algorithm, and the first device is a border device of the first AS domain. In this way, when the device in the first AS domain needs to send a packet to the second device in the second AS domain, the packet can be sent using the path corresponding to the target flexibility algorithm, thereby improving the flexibility of network deployment.
  • the third device receives a third packet, where the third packet includes the address prefix advertised by the second device and the identification information of the flexible algorithm, and the first address prefix is based on the address prefix advertised by the second device It is obtained that the second device is a device other than the third device in the second AS domain.
  • the third device receives the address prefix and the identification information of the flexible algorithm advertised by the second device, it can send the identification information of the second device to the first AS domain.
  • the address prefix and the identification information of the flexible algorithm are solved to solve the problem of losing the identification information of the flexible algorithm in the cross-domain scenario.
  • the first device can obtain the target flexibility algorithm corresponding to the second device, and sends the identification information of the target flexibility algorithm to the device in the first AS domain.
  • a device in the first AS domain needs to send a packet to the second device, it can use a path corresponding to the target flexibility algorithm to send the packet, thereby improving the flexibility of network deployment.
  • the first packet is a Border Gateway Protocol BGP packet.
  • the BGP packet is used to send routing information including the first address prefix from the second AS domain to the first AS domain.
  • the address prefix advertised by the second device is different from the first address prefix. This enables the third device to aggregate the address prefixes advertised by the second device to obtain the first address prefix, so that the first address prefix identifies different devices in the second AS domain, so that the devices in the first AS domain use the path corresponding to the target flexible algorithm Send packets to different devices in the second AS domain, thereby further improving the flexibility of network deployment.
  • the second device is the same as the third device.
  • the first address prefix also identifies the third device, the devices in the first AS domain obtain the target flexible algorithm corresponding to the third device, and use the path corresponding to the target flexible algorithm to send packets to the third device, so as to improve the flexibility of network deployment. sex.
  • the identification information of the flexible algorithm is carried in the type length value TLV of the first packet.
  • the third device in the second AS domain can also send the identification information of the flexible algorithm published by the device in the second AS domain to the device in the first AS domain through the TLV in the first packet, so as to Ensure that devices in the first AS domain can obtain the flexible algorithm.
  • the third packet includes the locator type length value Locator TLV, and the Locator TLV includes the address prefix advertised by the device in the second AS domain and the identification information of the flexible algorithm. That is, the third packet is a packet that advertises the SRv6 Locator in the second AS domain.
  • the present application provides an apparatus for sending a message, which is used to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus includes a unit for performing the method in the first aspect or any possible implementation manner of the first aspect.
  • the present application provides an apparatus for sending a message, which is used to execute the method in the second aspect or any possible implementation manner of the second aspect.
  • the apparatus includes a unit for performing the method in the second aspect or any one possible implementation manner of the second aspect.
  • the present application provides an apparatus for sending a message, where the apparatus includes a processor and a memory.
  • the processor and the memory may be connected through an internal connection.
  • the memory is used for storing a program
  • the processor is used for executing the program in the memory, so that the device performs the method in the first aspect or any possible implementation manner of the first aspect.
  • the present application provides an apparatus for sending a message, where the apparatus includes a processor and a memory.
  • the processor and the memory may be connected through an internal connection.
  • the memory is used for storing a program
  • the processor is used for executing the program in the memory, so that the apparatus performs the method of the second aspect or any possible implementation manner of the second aspect.
  • the present application provides a computer program product, the computer program product includes a computer program stored in a computer-readable storage medium, and the computer program is loaded by a processor to implement the first aspect, the first aspect, and the third aspect.
  • the second aspect any possible implementation manner of the first aspect, or any possible implementation manner of the second aspect.
  • the present application provides a computer-readable storage medium for storing a computer program, and the computer program is loaded by a processor to execute the first aspect, the second aspect, and any possible implementation manner of the first aspect. or any possible implementation of the second aspect.
  • the present application provides a chip, including a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the above-mentioned first aspect, second aspect, and the first aspect.
  • the present application provides a system for sending a message, the system includes the device described in the third aspect and the device described in the fourth aspect, or the system includes the device described in the fifth aspect and The device of the sixth aspect.
  • FIG. 1 is a schematic structural diagram of an SR network provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for sending a message provided by an embodiment of the present application
  • FIG. 3 is a flowchart of another method for sending a message provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another apparatus for sending a message provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a system for sending a message according to an embodiment of the present application.
  • an embodiment of the present application provides an SR network 100, including:
  • the first AS domain and the second AS domain includes multiple devices
  • the second AS domain includes multiple devices. Multiple devices in the first AS domain can communicate with each other, and multiple devices in the second AS domain can communicate with each other.
  • the border devices of the first AS domain can communicate with the border devices of the second AS domain.
  • the first AS domain includes Device 0, Device 1, Device 2, Device 3, and Device 4.
  • Device 0 can communicate with Device 1 and Device 2, respectively, and Device 1 can also communicate with Device 2 and Device 2, respectively.
  • 3 communication device 2 can also communicate with device 4, and device 3 and device 4 are boundary devices of the first AS domain.
  • the second AS domain includes Device 5, Device 6, Device 7, Device 8, and Device 9.
  • Device 9 can communicate with Device 7 and Device 8, respectively, Device 7 can also communicate with Device 5 and Device 8, respectively, and Device 8 can also communicate with Device 8 and Device 8.
  • Device 6 communicates, and device 5 and device 6 are boundary devices of the second AS domain. Therein, device 5 can also communicate with device 3 , and device 6 can also communicate with device 4 .
  • the SR network 100 including the first AS domain and the second AS domain as an example, and for any one of the above-mentioned first AS domain and second AS domain, the number of devices in the AS domain and/or the connection relationship
  • the structures such as these are also examples and cannot be used as limitations on the SR network 100 and the AS domain.
  • the AS domain may also have other structures, and the SR network 100 may also include other AS domains, that is, the SR network 100 may also include a third AS domain and/or a fourth AS domain, etc.
  • the structure is not listed one by one here.
  • Each network topology is a logical network, including some devices in the AS domain and / or part of the link.
  • Each network topology corresponds to a different flexibility algorithm, and for the flexibility algorithm corresponding to each network topology, the flexibility algorithm can be used to calculate a path for forwarding packets, and the path is located in the network topology.
  • the second device sends an intermediate system to intermediate system (ISIS) message to other devices in the second AS domain, so that the other device generates a forwarding entry, the forwarding entry It is used to send a packet to a second device, where the second device is a device in the second AS domain.
  • the ISIS message includes a segment routing Internet Protocol version 6 locator (SR internet protocol version 6, SRv6 locator) of the second device, where the SRv6 locator includes address prefix, mask and identification information of the flexible algorithm published by the second device .
  • the device in the second AS domain receives the ISIS message, generates a forwarding entry based on the SRv6 locator, and continues to transmit the ISIS message to other devices in the second AS domain.
  • the forwarding table entry includes the address prefix, the mask, and next-hop information, and the next-hop information is obtained based on the flexible algorithm.
  • the next hop information includes the interface identifier of the outgoing interface on the device, and other devices communicating with the outgoing interface are located in the network topology corresponding to the flexible algorithm.
  • the devices that receive the ISIS packet in the second AS domain may generate forwarding entries in the above-mentioned manner, and the next hop information in the forwarding entries is obtained based on the flexible algorithm, thereby forming the second AS domain.
  • the path corresponding to the flexible algorithm the path is located in the network topology corresponding to the flexible algorithm.
  • the destination address of the message and the mask included in the forwarding entry are ANDed to obtain the address prefix;
  • the address prefix included in the forwarding entry matches the address prefix included in the forwarding entry, that is, when the packet matches the address prefix included in the forwarding entry, the packet is sent to the second device based on the next hop information included in the forwarding entry. . That is, sending a packet to the second device through the path corresponding to the flexible algorithm, and the path corresponding to the flexible algorithm is located in the network topology corresponding to the flexible algorithm, so that the packet can be sent to the second device through the network topology corresponding to the flexible algorithm. , thereby improving the flexibility of network deployment.
  • the first AS domain and the second AS domain shown in FIG. 1 it is assumed that the first AS domain is deployed with the flexible algorithm 1 corresponding to the identification information "130" and the flexible algorithm 2 corresponding to the identification information "128" , the first network topology and the second network topology are generated in the first AS domain through the flexible algorithm 1 and the flexible algorithm 2.
  • the first network topology includes device 0, device 1, and device 3, and the second network topology includes device 0, device 2, and device 4.
  • the first network topology corresponds to flexible algorithm 1
  • the second network topology corresponds to flexible algorithm 2.
  • a third network topology is generated in the second AS domain, and the third network topology includes device 5, device 6, device 7, Device 8 and Device 9.
  • the device 9 located in the second AS domain sends an ISIS message
  • the ISIS message includes the SRv6 locator of the device 9, and the SRv6 locator includes the address prefix, mask and the identification information "129" of the flexible algorithm 3 issued by the device 9.
  • the device 7 in the second AS domain receives the ISIS message, it generates a forwarding entry based on the SRv6 locator included in the ISIS message, and the forwarding entry includes the address prefix, the mask and the next hop information.
  • the next hop information is obtained based on the flexible algorithm 3 , and the next hop information includes the interface identifier of the outgoing interface on the device 7 that communicates with the device 9 .
  • Device 7 sends the ISIS message to other devices in the second AS domain, for example, sends the ISIS message to device 5 and device 8 .
  • device 5 For device 5, device 8, and device 6 in the second AS domain, when receiving the ISIS message, the operations performed by the foregoing device 9 are performed.
  • the third device receives the ISIS message and sends BGP messages to other AS domains that communicate with itself, so that the border devices in other AS domains are based on the BGP message.
  • Generate a forwarding entry where the forwarding entry is used to send a packet to the second device, the BGP packet includes a first address prefix and a mask corresponding to the first address prefix, and the BGP packet includes the first address prefix
  • the address prefix is obtained based on the address prefix advertised by the second device.
  • the boundary device in the first AS domain that communicates with the third device is the first device
  • the first device receives the BGP packet, and then sends ISIS to the devices in the first AS domain message
  • the ISIS message includes the first address prefix in the BGP message and the mask corresponding to the first address prefix.
  • the device in the first AS domain generates a forwarding entry based on the ISIS message, and the forwarding entry includes a first address prefix, a mask corresponding to the first address prefix, and next-hop information, where the next-hop information is based on The network topology of the first AS domain is obtained.
  • BGP packets cannot carry the identification information of the flexible algorithm.
  • a third device sends a BGP packet to the first AS domain
  • the data in the second AS domain will be lost.
  • the identification information of the flexible algorithm published by the device results in that the device in the first AS domain cannot obtain the identification information of the flexible algorithm.
  • the devices in the first AS domain cannot use the flexible algorithm to send packets to the devices in the second AS domain, which affects the flexibility of network deployment.
  • border device 5 receives the ISIS packet, and sends a BGP packet to the first AS domain that communicates with itself, where the BGP packet includes the first address prefix and the mask corresponding to the first address prefix, the first address prefix included in the BGP is obtained based on the address prefix advertised by the device 9 .
  • the border device 3 of the first AS domain receives the BGP message, and sends an ISIS message to Device 1, Device 2, and Device 0 in the first AS domain, where the ISIS message includes the first address prefix in the BGP message and the The mask corresponding to the first address prefix.
  • the border device 6 receives the ISIS packet, and sends a BGP packet to the first AS domain that communicates with itself, where the BGP packet also includes the first address prefix and the mask corresponding to the first address prefix.
  • the border device 4 of the first AS domain receives the BGP message, and sends an ISIS message to Device 1, Device 2, and Device 0 in the first AS domain, where the ISIS message includes the first address prefix in the BGP message and the The mask corresponding to the first address prefix.
  • both the edge device 5 and the edge device 6 lose the identification information of the flexible algorithm published by the device 9 in the BGP packet sent to the first AS domain.
  • the above description takes the direction in which the second AS domain sends the address prefix to the first AS domain as an example.
  • the first AS domain can also send the address prefix to the second AS domain according to the content described above, and the first AS domain can also send the address prefix to the second AS domain.
  • the BGP packet sent to the second AS domain also loses the identification information of the flexible algorithm published by the devices in the first AS domain.
  • the present application may adopt any of the following embodiments to solve the problem of losing the identification information of the flexible algorithm in the cross-domain scenario, so that the devices in the first AS domain can also obtain the identification information of the flexible algorithm . Therefore, when a device in the first AS domain needs to send a packet to a device in the second AS domain, a flexible algorithm can be used to calculate a forwarding path to the device in the first AS domain, and use the forwarding path to send the packet.
  • an embodiment of the present application provides a method 200 for sending a packet, and the method 200 may be applied to the SR network 100 shown in FIG. 1 .
  • the first packet sent by the third device to the first device does not include the identification information of the flexibility algorithm published by the device in the second AS domain, but the first device actively obtains the target flexibility after receiving the first packet Identification information for the algorithm.
  • the third device may be device 6, the first device may be device 4, and the first packet sent by device 6 to device 4 does not include the first packet advertised by devices in the second AS domain
  • the method 200 includes:
  • Step 201 a third device obtains a third address prefix, the third device is a border device of the second AS domain, and the third address prefix is an address prefix advertised by devices in the second AS domain.
  • the third address prefix may be the address prefix of the third device (eg, the address prefix advertised by the third device), or may be the address prefix advertised by the second device.
  • the second device is a device other than the third device in the second AS domain.
  • step 201 when the third address prefix is the address prefix advertised by the second device, the third device receives the third packet, the third packet includes the third address prefix advertised by the second device, and the third packet is sent from the third packet. to obtain the third address prefix.
  • the third packet may be a packet sent by the second device in the second AS domain.
  • the third device may be the device 5 or the device 6 in the SR network 100 shown in FIG. 1 , assuming that the third device is the device 6 and the second device For other devices in the second AS except device 6, that is, the second device includes device 5, device 7, device 8, and/or device 9, etc., assuming that the second device is device 9.
  • Device 9 sends a third packet in the second AS domain, where the third packet includes the third address prefix advertised by device 9, and device 6 receives the third packet and obtains the third address prefix from the third packet.
  • the third packet may further include the second mask and/or the identification information of the second flexible algorithm candidate, the second mask is the mask issued by the second device, and the identification information of the second flexible algorithm alternative is the second device Identification information of the published flexible algorithm.
  • the third address prefix may be an internet protocol version 6 (IPv6) address of the second device, or it may be an address prefix included in the SRv6 locator of the second device.
  • IPv6 internet protocol version 6
  • the SRv6 locator of the second device includes the third address prefix, the second mask and the identification information of the second alternative flexible algorithm.
  • the third packet when the third address prefix is the IPv6 address of the second device, the third packet includes the Internet Protocol Version 6 prefix reachability type length value (IPv6 prefix reachability TLV), and the IPv6 prefix reachability TLV includes the first Three address prefixes.
  • IPv6 prefix reachability TLV Internet Protocol Version 6 prefix reachability type length value
  • the third device obtains the third address prefix from the IPv6 prefix reachability TLV of the third packet.
  • the IPv6 prefix reachability TLV further includes a second mask.
  • the IPv6 prefix reachability TLV of the third packet includes the third address prefix and the second mask.
  • the third address prefix and the second mask are represented as "9:100::1/64", that is, the IPv6 prefix reachability TLV of the third packet includes "9:100::1/64".
  • the third packet when the third address prefix is an address prefix included in the SRv6 locator of the second device, the third packet includes a locator type length value (locator type length value, Locator TLV), and the Locator TLV includes the second device
  • the SRv6 locator, the SRv6 locator includes the third address prefix, the second mask and the identification information of the second alternative flexible algorithm.
  • the third device obtains the third address prefix from the SRv6 locator included in the third packet.
  • the SRv6 locator of the second device includes "9:100::/64" and "129".
  • "9:100::” is the address prefix included in the SRv6 locator
  • "/64" is the mask
  • the length of the mask is 128 bits
  • the high 64 bits of the mask are all 1
  • the mask The lower 64 bits of the code have a value of 0.
  • "129” is the identification information of the second candidate flexible algorithm.
  • the third address prefix and mask issued by the second device are represented as "9:100::/64”
  • the identification information of the second flexible algorithm candidate issued by the second device is "129”
  • the third The Locator TLV of the packet includes the SRv6 locator, that is, "9:100::/64" and "129".
  • the third device obtains a third address prefix of "9:100::” from the SRv6 locator included in the third packet.
  • the second device sends the third packet to the device in the second AS domain that communicates with the second device.
  • the device receives a third packet, where the third packet includes an IPv6 prefix reachability TLV that includes the third address prefix and the second mask, and the third packet includes the IPv6 prefix reachability TLV.
  • the three-address prefix is the IPv6 address of the second device, and a forwarding entry is generated based on the third address prefix and the second mask.
  • the forwarding entry includes the third address prefix, the second mask, and next-hop information.
  • the next-hop The information is obtained based on the topology of the second AS domain.
  • the SRv6 locator when the third message includes the SRv6 locator, the SRv6 locator includes the third address prefix, the second mask, and the identification information of the second alternative flexible algorithm, and a forwarding table entry is generated based on the SRv6 locator, and the forwarding table
  • the item includes the third address prefix, the second mask, and the next hop information obtained based on the second alternative flexible algorithm.
  • the device may also continue to forward the third packet to other devices in the second AS domain. In the case that the device is a boundary device of the second AS domain, that is, the device is a third device, the following operation of step 201 is performed.
  • the device 9 in the second AS domain needs to advertise the third address prefix, that is, the second device is the device 9 .
  • the devices in the second AS domain that communicate with the second device include device 7 and device 8 , and the second device sends a third packet to device 7 and device 8 .
  • the third packet includes the IPv6 prefix reachability TLV, the IPv6 prefix reachability TLV includes the third address prefix and the second mask, and the third address prefix and the second mask are represented as "9:100::1/64",
  • the third address prefix "9:100::1" is the IPv6 address of the second device.
  • Device 7 receives the third packet, and generates a forwarding entry based on "9:100::1/64" included in the IPv6 prefix reachability TLV.
  • the forwarding entry includes the third address prefix and the second mask (represented as “9 :100::1/64”), and next-hop information; and, device 7 sends a third packet to device 5.
  • Device 5 is the boundary device of the second AS domain, that is, device 5 is the third device, and device 5 receives the third packet and obtains the third address prefix "9:100: :1", and a forwarding table entry is generated based on the "9:100::1/64" included by the IPv6 prefix reachability TLV, the forwarding table entry including the third address prefix and the second mask (represented as "9:100 ::1/64”), and next hop information.
  • the device 8 receives the third packet, generates a forwarding entry based on "9:100::1/64" included in the IPv6 prefix reachability TLV, and the device 8 also sends the third packet to the device 6.
  • Device 6 is another border device in the second AS domain.
  • Device 6 receives the third packet, obtains the third address prefix "9:100::1" from the IPv6 prefix reachability TLV, and based on the IPv6 prefix reachability TLV includes The "9:100::1/64" generates a forwarding entry.
  • the second device sends a third message to the device 7 and the device 8, and the third message includes the Locator TLV, and the Locator TLV includes the SRv6 locator of the second device, and the SRv6
  • the locator includes the third address prefix, the second mask, and the identification information of the second alternative flexible algorithm.
  • the third address prefix and the second mask are represented as "9:100::/64".
  • the identification information is "129", and the second alternative flexible algorithm is the aforementioned flexible algorithm 3.
  • Device 7 receives a third packet including an SRv6 locator including a third address prefix and a second mask (denoted as "9:100::/64"), and a second alternative flexible algorithm
  • the identification information "129" of the SRv6 locator generates a forwarding entry based on the SRv6 locator, the forwarding entry includes the third address prefix and the second mask (represented as "9:100::/64"), and the next hop information, The next hop information is obtained based on the second candidate flexible algorithm corresponding to “129”; and, the device 7 also sends a third packet to the device 5 .
  • Device 5 is the boundary device of the second AS domain, that is, device 5 is the third device, device 5 receives the third packet, and obtains the third address prefix "9:100::” from the SRv6 locator included in the third packet , and a forwarding entry is generated based on the SRv6 locator, the forwarding entry includes a third address prefix and a second mask (represented as "9:100::/64"), and next hop information, the next hop The information is obtained based on the second alternative flexible algorithm corresponding to "129".
  • the device 8 receives the third message, generates a forwarding entry based on the SRv6 locator, and the device 8 also sends the third message to the device 6.
  • Device 6 is another border device in the second AS domain, device 6 receives the third packet, obtains the third address prefix "9:100::” from the SRv6 locator included in the third packet, and, based on the SRv6 locator generates forwarding entries.
  • step 201 in the case where the third address prefix is the address prefix of the third device, the third device obtains its own third address prefix.
  • the third address prefix is an address prefix advertised by the third device.
  • the third address prefix may be the IPv6 address of the third device, or, may be the address prefix included in the SRv6 locator of the third device.
  • the SRv6 locator of the third device includes the third address prefix, the second mask, and the identification information of the second alternative flexible algorithm.
  • the third device sends a third packet to other devices in the second AS domain, where the third packet includes the third address prefix, so as to implement the advertisement of the third address prefix.
  • other devices in the second AS domain after receiving the third packet, other devices in the second AS domain generate a forwarding entry based on the content of the third packet. For details of the generation process, refer to the relevant content described above, and will not be described in detail here.
  • Step 202 The third device sends a first packet to the first AS domain, where the first packet includes a first address prefix, and the first address prefix is obtained based on the third address prefix.
  • step 202 the third device acquires the first address prefix, and sends the first packet to the first device, where the first device is a border device of the first AS domain, and the third device communicates with the first device.
  • the first packet also includes a mask corresponding to the first address prefix.
  • the first address prefix may be the same as the third address prefix.
  • the first address prefix identifies the second device, and the first address prefix is used for sending packets to the second device.
  • the first address prefix is a prefix obtained by aggregating the third address prefix.
  • the first address prefix identifies the multiple devices, the multiple devices include the second device, and the first address prefix is used to address the multiple devices to the multiple devices. The device sends a message.
  • the third device can obtain the first address prefix in the following two ways, but the way the third device obtains the first address prefix is not limited to these two ways, that is, the third device may also have other methods for obtaining the first address prefix.
  • the methods are not listed and described here, but only the two methods are described.
  • the two methods include:
  • the third device when the third device obtains the third address prefix, it uses the third address prefix as the first address prefix.
  • the mask corresponding to the first address prefix is the second mask.
  • the device 6 in the SR network is the third device, and the third address prefix obtained by the third device is "9:100::1", "9:100” ::1" is the IPv6 address of device 9.
  • the third device uses "9:100::1" as the first address prefix, and sends the first packet to the first device (which is device 4).
  • the first address prefix included in the first packet is "9:100::1" ".
  • "9:100::1" identifies the device 9 and can be used to send a message to the device 9.
  • the third address prefix obtained by the third device is "9:100::”, and "9:100::” is the address prefix included in the SRv6 locator of device 9.
  • the third device uses "9:100::” as the first address prefix, and sends the first packet to the first device (which is device 4).
  • the first packet includes the first address prefix "9:100::”.
  • the third device when the third device obtains the third address prefix, it aggregates multiple address prefixes to obtain the first address prefix, where the multiple address prefixes include the third address prefix and other devices that have received the second AS domain. Published address prefix.
  • the first address prefix is a common prefix of the plurality of address prefixes.
  • the mask corresponding to the first address prefix is used to obtain the common prefix.
  • the third device (the device 6 of the SR network shown in FIG. 1 ) has received two address prefixes, and the two address prefixes are respectively the address prefix “9:100” advertised by the device 7 in the second AS domain ::3" and the address prefix "9:100:::4" advertised by device 8 in the second AS domain.
  • the third address prefix obtained by the third device is "9:100::1", and "9:100::1" is the IPv6 address of device 9.
  • the third device aggregates the three address prefixes to obtain the first address
  • the prefix is "9:100::”
  • the three address prefixes are "9:100::3", "9:100::4 and "9:100::1" respectively.
  • "9:100 ::” identifies the three devices, which include device 7, device 8, and device 9, and can be used to send messages to device 7, device 8, and/or device 9.
  • the third device sends a first packet to the first device (which is device 4), where the first address prefix included in the first packet is "9:100::”. or,
  • the third address prefix obtained by the third device is "9:100::”, and "9:100::” is the address prefix included in the SRv6 locator of device 9.
  • the third device aggregates the three address prefixes to obtain the first address prefix.
  • One address prefix is "9:100::”
  • the three address prefixes are "9:100::3", "9:100:::4" and "9:100:::” respectively.
  • "9: 100::” identifies the three devices, which include device 7, device 8, and device 9, and can be used to send messages to device 7, device 8, and/or device 9.
  • the third device sends a first packet to the first device (which is device 4), where the first address prefix included in the first packet is "9:100::”.
  • the third device is a border device of the second AS domain
  • the first packet sent by the third device to the first AS domain is BGP. message.
  • Step 203 The first device receives the first packet, and obtains the second address prefix and the identification information of the target flexible algorithm based on the first address prefix included in the first packet.
  • the first device may also generate a forwarding entry based on the first packet, where the forwarding entry includes a first address prefix, a mask corresponding to the first address prefix, and next-hop information, where the next-hop information includes the first device.
  • the first device stores the correspondence between the address prefix, the mask and the identification information of the alternative flexible algorithm.
  • the first device acquires the second address prefix and the identification information of the target flexible algorithm based on the corresponding relationship and the first address prefix.
  • it can be implemented through the following operations from 2031 to 2034, where the operations from 2031 to 2034 are:
  • the first device obtains the first address prefix from the first packet, and selects a record from the corresponding relationship as the first record.
  • the first device selects from the first record in the corresponding relationship, and takes the selected first record as the first record.
  • the first device obtains the second address prefix based on the mask included in the first record and the first address prefix.
  • the first device may perform an AND operation on the mask included in the first record and the first address prefix, and use the result of the AND operation as the second address prefix.
  • the first device takes the identification information of the candidate flexible algorithm included in the first record as the identification information of the target flexible algorithm, and ends the return.
  • first, second, and third conditions are as follows:
  • the second address prefix is the same as the address prefix included in the first record. That is, in the case where the second address prefix is the same as the address prefix included in the first record, the first device determines that the second address prefix matches the address prefix included in the first record.
  • the second condition, for the address prefix included in the first record, the second address prefix is the prefix of the address prefix. That is, in the case where the second address prefix is a prefix of the address prefix, the first device determines that the second address prefix matches the address prefix included in the first record.
  • the second address prefix is a prefix of the address prefix, indicating that the second address prefix is a part of the address prefix.
  • the third condition is that, for the address prefix included in the first record, the address prefix is a prefix of the second address prefix. That is, in the case where the address prefix is a prefix of the second address prefix, the first device determines that the second address prefix matches the address prefix included in the first record.
  • the address prefix is a prefix of the second address prefix, indicating that the address prefix is a part of the second address prefix.
  • the first device selects one other record from the corresponding relationship as the first record, and returns to 2032.
  • the first device selects the second record from the corresponding relationship as the first record, and returns to 2032. That is, the above operations 2032-2034 are repeated until a record including an address prefix matching the second address prefix is found from the corresponding relationship.
  • the first device further acquires the first mask.
  • the first device uses the mask included in the first record as the first mask.
  • the first device stores the correspondence between the address prefix, the mask and the identification information of the alternative flexible algorithm as shown in Table 1 below.
  • the address prefix included in the first record record is "9:100::”
  • the mask is "/64”
  • the identification information of the alternative flexible algorithm is "128”
  • the address prefix "9:100::” is a 64-bit prefix
  • the mask "/64" is a mask whose upper 64 bits are all 1.
  • the address prefix included in the second record record is "9:200::”
  • the mask is "/64”
  • the identification information of the alternative flexible algorithm is "130”
  • the address prefix "9:200::” is a 64-bit prefix
  • the mask "/64" is a mask whose upper 64 bits are all 1.
  • the first address prefix included in the first packet received by the first device is "9:100::1".
  • the first device selects the first record from the corresponding relationship shown in Table 1 as the first record, and performs an AND with the mask "/64" included in the first record and the first address prefix "9:100::1". operation, the obtained second address is prefixed with "9:100::”.
  • the second address prefix "9:100::” is the same as the address prefix "9:100::” in the first record, so it is determined that the two match, so the identification information of the alternative flexible algorithm included in the first record is "128" is used as the identification information of the target flexible algorithm, and the mask "/64" in the first record is used as the first mask.
  • the first address prefix included in the first packet received by the first device is "9:100::”, that is, the first address prefix is "9:100::”.
  • the first device selects the first record from the corresponding relationship shown in Table 1 as the first record, and performs AND operation on the mask "/64" included in the first record and the first address prefix "9:100::” , the resulting second address is prefixed with "9:100::”.
  • the second address prefix "9:100::” is the same as the address prefix "9:100::” in the first record, so it is determined that the two match, so the identification information of the alternative flexible algorithm included in the first record is "128" is used as the identification information of the target flexible algorithm, and the mask "/64" in the first record is used as the first mask.
  • Step 204 The first device sends a second packet to the device in the first AS domain, where the second packet includes the second address prefix and the identification information of the target flexible algorithm.
  • the second packet further includes the first mask.
  • the second message is an ISIS message.
  • the second message includes the Locator TLV, where the Locator TLV includes the second address prefix and the identification information of the target flexible algorithm.
  • the Locator TLV further includes a first mask.
  • the Locator TLV includes an SRv6 locator, and the SRv6 locator includes the second address prefix, the first mask, and the identification information of the target flexible algorithm.
  • the device when a device in the first AS domain receives the second packet, the device receives the second packet, and if the second packet includes the second address prefix and the identification information of the target flexible algorithm, based on the second packet
  • the SRv6 locator included in the document generates a forwarding table entry, and the forwarding table entry includes the second address prefix, the second mask and the next hop information, and the next hop information is obtained based on the target flexibility algorithm.
  • the next hop information includes an interface identifier of an outgoing interface on the device, and the device communicating with the outgoing interface is located in a network topology corresponding to the target flexible algorithm.
  • the devices that obtain the second packet in the first AS domain may generate forwarding entries in the above manner, and the next hop information in the forwarding entries is obtained based on the target flexible algorithm, thus forming the target flexible algorithm in the first AS domain.
  • the corresponding path which is located in the network topology corresponding to the target flexibility algorithm.
  • the device when the device needs to send a message to the second device, the device performs an AND operation on the destination address of the message and the first mask included in the forwarding entry to obtain an address prefix. If the obtained address prefix is the same as the second address prefix included in the forwarding entry, it means that the packet matches the second address prefix.
  • the device sends the packet based on the next hop information included in the forwarding entry, that is, sends the packet using the path corresponding to the target flexible algorithm.
  • the device 4 in the SR network 100 sends a second packet to the device 2, and the second packet includes an SRv6 locator, and the SRv6 locator includes a second address prefix and a first mask ( represented as "9:100::/64"), and the identification information of the target flexible algorithm "128", and the device 2 generates a forwarding entry based on the SRv6 locator, the forwarding entry includes the second address prefix and the first mask. (represented as "9:100::/64"), and the next hop information, which is obtained based on the target flexibility algorithm corresponding to "128".
  • Device 2 receives the second packet, and generates a forwarding entry based on the SRv6 locator.
  • the forwarding entry includes the second address prefix, the first mask (represented as "9:100::/64"), and the next hop information .
  • the next hop information is obtained based on the target flexible algorithm corresponding to "128”, the next hop information includes the interface identifier of the outbound interface on the device 2, and the device 4 that communicates with the outbound interface is the second corresponding to the target flexible algorithm.
  • Device 2 also sends a second packet to device 0.
  • the first device after receiving the first packet, the first device obtains the second address prefix and the identification information of the target flexible algorithm based on the first address prefix in the first packet, and sends the information to the first AS domain.
  • the device sends the second packet, the second packet includes the second address prefix and the identification information of the target flexible algorithm, the second address prefix is used to send the packet to the second device, and the target flexible algorithm is used to calculate the forwarding of the packet. path.
  • the device in the first AS domain can obtain target flexibility.
  • the device in the first AS domain needs to send a packet to the second device, it obtains the second address prefix based on the destination address of the packet, and determines the target based on the second address prefix.
  • the path corresponding to the flexible algorithm is used to send the packet to the second device using the path corresponding to the target flexible algorithm.
  • the path is located in the network shard corresponding to the target flexibility algorithm, so that the flexibility of network deployment can be improved.
  • an embodiment of the present application provides a method 300 for sending a packet, and the method 300 may be applied to the SR network 100 shown in FIG. 1 .
  • the first packet sent by the third device to the first device includes the identification information of the flexible algorithm corresponding to the second AS domain, and after receiving the first packet, the first device based on the first packet Get the identification information of the target flexibility algorithm.
  • the third device may be device 6, the first device may be device 4, and the first packet sent by device 6 to device 4 includes the flexibility corresponding to the second AS domain The identification information of the algorithm.
  • the device 4 obtains the identification information of the target flexible algorithm based on the first message.
  • the method 300 includes:
  • Step 301 The third device obtains the third address prefix and the identification information of the second alternative flexible algorithm, the third device is the boundary device of the second AS domain, and the second alternative flexible algorithm is used to calculate the arrival in the second AS domain.
  • the packet forwarding path of devices in the second AS domain is the third device obtains the third address prefix and the identification information of the second alternative flexible algorithm, the third device is the boundary device of the second AS domain, and the second alternative flexible algorithm is used to calculate the arrival in the second AS domain.
  • the third address prefix and the identification information of the second candidate flexible algorithm are the address prefix and the identification information of the flexible algorithm advertised by the device in the second AS domain, respectively.
  • the devices in the second AS domain include a third device or a second device, and the second device is another device in the second AS domain except the third device.
  • the third address prefix and the identification information of the second candidate flexible algorithm are the address prefix of the third device and the identification information of the flexible algorithm, respectively.
  • the third address prefix and the identification information of the second candidate flexible algorithm are the address prefix and the identification information of the flexible algorithm released by the second device, respectively.
  • step 301 when the third address prefix and the identification information of the second alternative flexible algorithm are respectively the address prefix and the identification information of the flexible algorithm advertised by the second device, the third device receives the third packet, and the third packet is sent to the third device.
  • the message includes the third address prefix advertised by the second device and the identification information of the second alternative flexible algorithm, and the third address prefix and the identification information of the second alternative flexible algorithm are obtained from the third message.
  • the third packet may be a packet sent by the second device in the second AS domain.
  • the third packet further includes a second mask, where the second mask is a mask advertised by the second device.
  • the third device may also obtain the second mask from the third packet.
  • the third message includes the Locator TLV, and the Locator TLV includes the SRv6 locator of the second device, and the SRv6 locator includes the third address prefix, the second mask, and the identification information of the second alternative flexible algorithm.
  • the second device sends the third packet to the device in the second AS domain that communicates with the second device.
  • the device receives the third packet, and generates a forwarding entry based on the SRv6 locator, where the forwarding entry includes the third address prefix, the second mask, and the next hop information.
  • the one-hop information is obtained based on the second alternative flexible algorithm.
  • the device may also forward the third packet to other devices in the second AS domain. In the case that the device is a boundary device of the second AS domain, that is, the device is a third device, the following operation of step 301 is performed.
  • the device 9 in the second AS domain needs to advertise the third address prefix, that is, the second device is the device 9 .
  • the devices in the second AS domain that communicate with the second device include device 7 and device 8 , and the second device sends a third packet to device 7 and device 8 .
  • the third message includes the Locator TLV
  • the Locator TLV includes the SRv6 locator of the second device
  • the SRv6 locator includes the third address prefix
  • the second mask and the identification information of the second alternative flexible algorithm the third address prefix and
  • the second mask is represented as "9:100::/64"
  • the identification information of the second alternative flexible algorithm is "129".
  • the device 7 receives the third packet, the SRv6 locator includes the third address prefix and the second mask (represented as “9:100::/64"), and the identification information "129" of the second alternative flexible algorithm, based on The SRv6 locator generates a forwarding table entry that includes a third address prefix and a second mask (denoted as "9:100::/64"), and next-hop information based on " 129" corresponding to the second alternative flexibility algorithm.
  • Device 7 also sends a third message to device 5 .
  • Device 5 is the boundary device of the second AS domain, that is, device 5 is the third device, device 5 receives the third packet, and obtains the third address prefix "9:100::” from the SRv6 locator included in the third packet , and a forwarding entry is generated based on the SRv6 locator, the forwarding entry includes a third address prefix and a second mask (represented as "9:100::/64"), and next hop information, the next hop The information is obtained based on the second alternative flexible algorithm corresponding to "129".
  • the device 8 receives the third message, generates a forwarding entry based on the SRv6 locator, and the device 8 also sends the third message to the device 6.
  • Device 6 is another border device in the second AS domain, device 6 receives the third packet, obtains the third address prefix "9:100::” from the SRv6 locator included in the third packet, and, based on the SRv6 locator generates forwarding entries.
  • step 301 when the third address prefix and the identification information of the second candidate flexible algorithm are the address prefix of the third device and the identification information of the flexible algorithm, respectively, the third device obtains the third address prefix and Identification information of the second candidate flexible algorithm.
  • the third address prefix and the identification information of the second alternative flexible algorithm are the address prefix and the identification information of the flexible algorithm released by the third device, respectively.
  • the third device sends a third packet to other devices in the second AS domain.
  • the third packet includes the SRv6 locator of the third device, and the SRv6 locator of the third device includes the third address prefix, the second mask, and the second candidate Identification information for the flexible algorithm.
  • the third device obtains the third address prefix and the identification information of the second candidate flexible algorithm from the SRv6 locator of the third device.
  • the third device may also obtain the second mask.
  • Step 302 The third device sends a first packet to the first AS domain, where the first packet includes the first address prefix and the identification information of the second alternative flexible algorithm, and the first address prefix is obtained based on the third address prefix.
  • the third device acquires the first address prefix and sends the first message to the first device, the first device is a border device of the first AS domain, and the third device communicates with the first device.
  • the first packet may further include a mask corresponding to the first address prefix.
  • the first packet is a BGP packet.
  • the first packet is extended so that the first packet includes a TLV, and the TLV includes the first address prefix and the identification information of the second alternative flexible algorithm.
  • the TLV further includes a mask corresponding to the first address prefix.
  • the first address prefix may be the same as the acquired third address prefix.
  • the first address prefix identifies the second device, and the first address prefix is used to send a packet to the second device.
  • the mask corresponding to the first address prefix is the second mask. or,
  • the first address prefix is a prefix obtained by the third device by aggregating the obtained third address prefix.
  • the first address prefix identifies the multiple devices, the multiple devices include the second device, and the first address prefix is used for Send messages to the multiple devices.
  • the mask corresponding to the first address prefix is used to obtain the aggregated prefix.
  • step 202 of the method 200 shown in FIG. 2 For the detailed implementation process of acquiring the first address prefix by the third device, reference may be made to the relevant content in step 202 of the method 200 shown in FIG. 2 , which will not be described in detail here.
  • the third packet includes the SRv6 locator of the second device, and the SRv6 locator includes "9:100::/64" and "129".
  • the third device receives the third packet, obtains the third address prefix as "9:100::” from the Locator TLV included in the third packet, uses "9:100::” as the first address prefix, and sends the first address to the first device. (for device 4) sends a first packet, the first packet includes the first address prefix, the second mask, and the identification information of the second alternative flexible algorithm, that is, the first packet includes "9:100::/ 64" and "129".
  • Step 303 The first device receives the first packet, and obtains the second address prefix and the identification information of the target flexible algorithm based on the first address prefix included in the first packet and the identification information of the second alternative flexible algorithm.
  • the second address prefix and the identification information of the target flexible algorithm may be acquired in the following two ways.
  • the ways for the first device to obtain the identification information of the second address prefix and the target flexible algorithm are not limited to these two ways, that is, the first device may also have other ways to obtain the identification information of the second address prefix and the target flexible algorithm. Instead of enumerating the descriptions one by one, only the two ways are described.
  • the two methods are:
  • the first device uses the first address prefix and the identification information of the second candidate flexible algorithm included in the first packet as the second address prefix and the identification information of the target flexible algorithm, respectively.
  • the first device When the first packet further includes the second mask, the first device also uses the second mask as the first mask.
  • the first device further determines whether the flexible algorithm deployed in the first AS domain includes the second candidate flexible algorithm, and if it includes the second alternative flexible algorithm, the first packet includes the flexible algorithm.
  • the first address prefix and the identification information of the second candidate flexible algorithm are respectively used as the identification information of the second address prefix and the target flexible algorithm.
  • the first device receives the first packet, the first packet includes "9:100::/64" and "129", and "9:100::” is used as the second address prefix, and the first packet includes "9:100::/64" and "129".
  • “129” is used as the identification information of the target flexible algorithm, and "/64" is used as the first mask.
  • the first device obtains the first correspondence based on the first address prefix, the first correspondence includes the second address prefix and the identification information of the first candidate flexible algorithm, and the identification information based on the first alternative flexible algorithm and The identification information of the second candidate flexible algorithm is to obtain the identification information of the target flexible algorithm.
  • the first device may select the identification information of one candidate flexible algorithm from the identification information of the first flexible algorithm candidate and the identification information of the second flexible algorithm as the identification information of the target flexible algorithm. For example, the first device may select the identification information of the first candidate flexibility algorithm as the identification information of the target flexibility algorithm, and/or the first device may select the identification information of the second candidate flexibility algorithm as the identification information of the target flexibility algorithm.
  • the first device stores the correspondence between the address prefix, the mask, and the identification information of the alternative flexible algorithm;
  • the operations are:
  • the first device obtains the first address prefix from the first packet, and selects a record from the corresponding relationship as the first record.
  • the first device selects from the first record in the corresponding relationship, and takes the selected first record as the first record.
  • the first device obtains the second address prefix based on the mask and the first address prefix included in the first record.
  • the first device may perform an AND operation on the mask included in the first record and the first address prefix, and use the result of the AND operation as the second address prefix.
  • the first device uses the identification information of the alternative flexible algorithm included in the first record as the identification information of the first alternative flexible algorithm, so as to obtain the identification information including the second flexible algorithm.
  • the first correspondence between the address prefix and the identification information of the first candidate flexible algorithm, and the return is ended.
  • the first device selects one other record from the corresponding relationship as the first record, and returns to 3032.
  • the first device selects the second record from the corresponding relationship as the first record, and returns to 3032. That is, the above operations 3032-3034 are repeated until a record including an address prefix matching the second address prefix is found from the corresponding relationship.
  • the first device also obtains the first mask.
  • the first device uses the mask included in the first record as the first mask, or the first device uses the second address included in the first packet as the first mask. mask as the first mask.
  • the first device when the first device uses the identification information of the first candidate flexibility algorithm as the identification information of the target flexibility algorithm, the first device may use the mask included in the first record as the first mask; When the device uses the identification information of the second candidate flexible algorithm as the identification information of the target flexible algorithm, the first device may use the second mask included in the first packet as the first mask.
  • the first device stores the correspondence between the address prefix and the identification information of the alternative flexible algorithm; in the second mode, the first device uses the first address prefix in the first packet as the second address prefix , based on the second address prefix, obtain the identification information of the corresponding alternative flexible algorithm from the corresponding relationship between the address prefix and the identification information of the alternative flexible algorithm, and use the obtained identification information of the alternative flexible algorithm as the first alternative flexible algorithm to obtain the first correspondence including the second address prefix and the identification information of the first alternative flexible algorithm.
  • Step 304 It is the same as step 204 of the method 200 shown in FIG. 2, and will not be described in detail here.
  • the first packet sent by the third device to the first device not only includes the first address prefix, but also includes identification information of the second alternative flexible algorithm.
  • the first device obtains the second address prefix and the identification information of the target flexible algorithm based on the first address prefix in the first packet and the identification information of the second candidate flexible algorithm, and sends the first address prefix to the device in the first AS domain.
  • the second packet includes a second address prefix and identification information of the target flexible algorithm
  • the second address prefix is used to send the packet to the second device
  • the target flexible algorithm is used to calculate the path of the packet. In this way, the device in the first AS domain can obtain target flexibility.
  • the device in the first AS domain needs to send a packet to the second device, it obtains the second address prefix based on the destination address of the packet, and determines the target based on the second address prefix.
  • the path corresponding to the flexible algorithm is used to send the packet to the second device using the path corresponding to the target flexible algorithm.
  • the path is located in the network shard corresponding to the target flexibility algorithm, so that the flexibility of network deployment can be improved.
  • an embodiment of the present application provides an apparatus 400 for sending a packet, and the apparatus 400 is deployed on the first device provided by any of the foregoing implementations, for example, deployed on the first device of the SR network 100 shown in FIG. 1 . (device 3 or device 4), on the first device in the method 200 shown in FIG. 2 or the first device in the method 300 shown in FIG. 3, including:
  • the receiving unit 401 is configured to receive a first packet, where the first packet includes a first address prefix, the apparatus 400 is a border device of the AS domain of the first autonomous system, and the first address prefix is based on an address prefix advertised by the second device obtained, the second device is located in the second AS domain, the first AS domain is different from the second AS domain, and the first address prefix is used to send packets to the second device;
  • a processing unit 402 configured to obtain a second address prefix and identification information of the target flexible algorithm based on the first address prefix, where the second address prefix is used to send a message to the second device;
  • the sending unit 403 is configured to send a second packet to the device in the first AS domain, where the second packet includes the second address prefix and the identification information of the target flexible algorithm, so that the device in the first AS domain passes the corresponding target flexible algorithm.
  • the path forwards the packets matching the second address prefix.
  • step 203 of the method 200 shown in FIG. 2 and the related content in step 303 of the method 300 shown in FIG.
  • step 203 of the method 200 shown in FIG. 2 and the related content in step 303 of the method 300 shown in FIG. 3 It will not be described in detail here.
  • the processing unit 402 is configured to determine a first correspondence based on the first address prefix, where the first correspondence includes a correspondence between the second address prefix and the identification information of the first candidate flexibility algorithm.
  • step 303 of the method 300 shown in FIG. 3 please refer to the relevant content in step 303 of the method 300 shown in FIG. 3 above, which will not be described in detail here.
  • processing unit 402 is further configured to use the first candidate flexibility algorithm as the target flexibility algorithm.
  • the first packet further includes identification information of the second candidate flexibility algorithm
  • the processing unit 402 is further configured to determine the target flexibility algorithm from the first candidate flexibility algorithm and the second candidate flexibility algorithm.
  • step 303 of the method 300 shown in FIG. 3 which will not be described in detail here.
  • the second address prefix is the prefix in the Segment Routing Internet Protocol Version 6 locator SRv6 Locator
  • the second packet includes the locator type length value Locator TLV
  • the Locator TLV includes the second address prefix and the target flexible algorithm. identification information.
  • step 204 of the method 200 shown in FIG. 2 and related content in step 304 of the method 300 shown in FIG. 3 which will not be described in detail here.
  • the identification information of the second alternative flexible algorithm is carried in the type length value TLV of the first packet.
  • the first address prefix matches the second address prefix.
  • the first packet is a Border Gateway Protocol BGP packet.
  • the receiving unit receives the first packet, where the first packet includes the first address prefix, and the first address prefix is obtained based on the address prefix advertised by the second device, which is located in the second AS domain.
  • the processing unit obtains the second address prefix and the identification information of the target flexible algorithm based on the first address prefix in the first packet, so that the sending unit sends the second address prefix and the identification information of the target flexible algorithm to the device in the first AS domain, and
  • the second address prefix is used to send a packet to the second device, so that the device in the first AS domain can also obtain the target flexibility algorithm corresponding to the device located in the second AS domain. In this way, when a device in the first AS domain needs to send a packet matching the second address prefix, the packet can be sent using a path corresponding to the target flexibility algorithm, thereby improving the flexibility of network deployment.
  • an embodiment of the present application provides an apparatus 500 for sending a message.
  • the apparatus 500 is deployed on the third device provided by any of the foregoing implementations, for example, deployed on the third device of the SR network 100 shown in FIG. 1 . (device 5 or device 6), the third device in the method 200 shown in FIG. 2 or the third device in the method 300 shown in FIG. 3, including:
  • a sending unit 501 is configured to send a first packet to a device in the first AS domain, where the first packet includes a first address prefix and identification information of the flexible algorithm, so that the device in the first AS domain is forwarded through a path corresponding to the flexible algorithm message, the message matches the address prefix identifying the second device;
  • the apparatus 500 is a boundary device of the second AS domain, the first AS domain is different from the second AS domain, the first address prefix is used to identify the second device in the second AS domain, and the packet corresponding to the flexible algorithm is forwarded The path is used to forward packets to the second device in the second AS domain.
  • the apparatus 500 further includes a receiving unit 502:
  • the receiving unit 502 is configured to receive a third packet, where the third packet includes an address prefix advertised by the second device and identification information of the flexible algorithm, and the first address prefix is obtained based on the address prefix advertised by the second device.
  • the apparatus 500 further includes a processing unit 503;
  • the first address prefix is obtained by the processing unit 503 based on the address prefix issued by the second device.
  • the first packet is a Border Gateway Protocol BGP packet.
  • the identification information of the flexible algorithm is carried in the type length value TLV of the first packet.
  • the third packet includes the locator type length value Locator TLV, and the Locator TLV includes the address prefix advertised by the second device and the identification information of the flexible algorithm.
  • Locator TLV included in the second packet refers to the relevant content in step 301 of the method 300 shown in FIG. 3 above, and will not be described in detail here.
  • the address prefix advertised by the second device is different from the first address prefix.
  • the second device is the same as the apparatus.
  • the first packet sent by the sending unit to the device in the first AS domain includes the identification information of the flexible algorithm, thus ensuring that the boundary device in the first AS domain can obtain the target flexible algorithm corresponding to the second device , to send the identification information of the target flexible algorithm to the device in the first AS domain.
  • the packet can be sent using a path corresponding to the target flexibility algorithm, thereby improving the flexibility of network deployment.
  • an embodiment of the present application provides a schematic diagram of an apparatus 600 for sending a message.
  • the apparatus 600 may be the first device provided in any of the foregoing embodiments, for example, may be the first device (device 3 or device 4) of the SR network 100 shown in FIG. 1 , the first device in the method 200 shown in FIG. 2 .
  • the apparatus 600 includes at least one processor 601 , internal connections 602 , memory 603 and at least one transceiver 604 .
  • the apparatus 600 is an apparatus with a hardware structure, which can be used to implement the functional modules in the apparatus 400 described in FIG. 4 .
  • the processing unit 402 in the apparatus 400 shown in FIG. 4 can be implemented by calling the code in the memory 603 by the at least one processor 601, and the receiving unit 401 and the receiving unit 401 in the apparatus 400 shown in FIG.
  • the sending unit 403 may be implemented by the at least one transceiver 604 .
  • the apparatus 600 may also be used to implement the function of the first device in any of the foregoing embodiments.
  • the above-mentioned processor 601 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or an or A plurality of integrated circuits used to control the execution of the programs of the present application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connection 602 described above may include a path to transfer information between the above described components.
  • the internal connection 602 may be a single board or a bus or the like.
  • the above-mentioned at least one transceiver 604 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 603 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 603 is used for storing the application program code for executing the solution of the present application, and the execution is controlled by the processor 601.
  • the processor 601 is configured to execute the application program code stored in the memory 603, and cooperate with at least one transceiver 604, so that the apparatus 600 realizes the functions in the method of the present patent.
  • the processor 601 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 6 .
  • the apparatus 600 may include multiple processors, for example, the processor 601 and the processor 607 in FIG. 6 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • an embodiment of the present application provides a schematic diagram of an apparatus 700 for sending a message.
  • the apparatus 700 may be the third device provided in any of the foregoing embodiments, for example, may be the third device (device 5 or device 6) of the SR network 100 shown in FIG. 1 , the third device in the method 200 shown in FIG. 2 .
  • the apparatus 700 includes at least one processor 701 , internal connections 702 , memory 703 and at least one transceiver 704 .
  • the apparatus 700 is an apparatus with a hardware structure, which can be used to implement the functional modules in the apparatus 500 described in FIG. 5 .
  • the processing unit 503 in the apparatus 500 shown in FIG. 5 can be implemented by calling the code in the memory 703 by the at least one processor 701, and the sending unit 501 and the sending unit 501 in the apparatus 500 shown in FIG.
  • the receiving unit 502 may be implemented by the at least one transceiver 704 .
  • the apparatus 700 may also be used to implement the function of the third device in any of the foregoing embodiments.
  • the processor 701 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or A plurality of integrated circuits used to control the execution of the programs of the present application.
  • CPU general-purpose central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connection 702 described above may include a path to transfer information between the aforementioned components.
  • the internal connection 702 can be a single board or a bus or the like.
  • the above-mentioned at least one transceiver 704 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 703 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 703 is used for storing the application program code for executing the solution of the present application, and the execution is controlled by the processor 701 .
  • the processor 701 is configured to execute the application program code stored in the memory 703, and cooperate with at least one transceiver 704, so that the apparatus 700 realizes the functions in the method of the present patent.
  • the processor 701 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 7 .
  • the apparatus 700 may include multiple processors, for example, the processor 701 and the processor 707 in FIG. 7 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
  • an embodiment of the present application provides a system 800 for sending a message, where the system 800 includes the apparatus 400 shown in FIG. 4 and the apparatus 500 shown in FIG. 5 , or the system 800 includes the following The apparatus 600 shown in FIG. 6 and the apparatus 700 shown in FIG. 7 .
  • the apparatus 400 shown in FIG. 4 or the apparatus 600 shown in FIG. 6 may be the first device 801
  • the apparatus 500 shown in FIG. 5 or the apparatus 700 shown in FIG. 7 may be the third device 802 .
  • first, second and other words are used to distinguish the same or similar items with basically the same function and function, and it should be understood that between “first”, “second” and “nth” There are no logical or timing dependencies, and no restrictions on the number and execution order. It will also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first image may be referred to as a second image, and, similarly, a second image may be referred to as a first image, without departing from the scope of various described examples. Both the first image and the second image may be images, and in some cases, may be separate and distinct images.
  • the size of the sequence number of each process does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not be used in the embodiment of the present application. Implementation constitutes any limitation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开一种发送报文的方法、装置、系统及存储介质,属于通信领域。所述方法包括:第一设备接收第一报文,第一报文包括第一地址前缀,第一设备是第一AS域的边界设备,第一地址前缀是基于第二设备发布的地址前缀得到的,第二设备位于第二AS域,第一AS域和第二AS域不同,第一地址前缀用于向第二设备发送报文;第一设备基于第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,第二地址前缀用于向第二设备发送报文;第一设备向第一AS域内的设备发送第二报文,第二报文包括第二地址前缀和目标柔性算法的标识信息,以使得第一AS域内的设备通过目标柔性算法对应的路径转发匹配第二地址前缀的报文。本申请能够提高网络部署的灵活性。

Description

发送报文的方法、装置、系统及存储介质
本申请要求于2021年2月3日提交的申请号为202110151946.8、发明名称为“发送报文的方法、装置、系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别涉及一种发送报文的方法、装置、系统及存储介质。
背景技术
柔性算法(Flexible Algorithm)是通过算法定义的方式将分段路由(segment routing,SR)网络分割为网络分片,每个网络分片是个逻辑网络,不同的网络分片对应不同的柔性算法。
对于SR网络中的某个设备,将该设备称为第一设备,第一设备需要向第二设备发布柔性算法的标识信息,第二设备是SR网络中除第一设备之外的其他设备,且第一设备和第二设备位于同一自治系统(autonomous system,AS)域内。这样当第二设备向第一设备发送业务时,第二设备基于该标识信息对应的柔性算法计算到达第一设备的转发路径,该转发路径位于该柔性算法对应的网络分片中,使用该转发路径向第一设备发送业务,从而实现网络灵活部署。
然而,当第一设备和第二设备位于不同AS域内,第二设备无法接收到第一设备发布的柔性算法的标识信息,导致第二设备无法使用该柔性算法向第一设备发送业务,影响网络部署灵活性。
发明内容
本申请提供了一种发送报文的方法、装置、系统及存储介质,以提高网络部署的灵活性。所述技术方案如下:
第一方面,本申请提供了一种发送报文的方法,在所述方法中,第一设备接收第一报文,第一报文包括第一地址前缀,第一设备是第一自治系统AS域的边界设备,第一地址前缀是基于第二设备发布的地址前缀得到的,第二设备位于第二AS域,第一AS域和第二AS域不同,第一地址前缀用于向第二设备发送报文。第一设备基于第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,第二地址前缀用于向第二设备发送报文。第一设备向第一AS域内的设备发送第二报文,第二报文包括第二地址前缀和目标柔性算法的标识信息,以使得第一AS域内的设备通过目标柔性算法对应的路径转发匹配所述第二地址前缀的报文。
由于第一设备基于第一报文中的第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,这样第一设备向第一AS域内的设备发送第二地址前缀和目标柔性算法的标识信息,而第二地址前缀用于向第二设备发送报文,使得第一AS域内的设备也可以得到位于第二AS域的设备对应目标柔性算法。如此第一AS域内的设备在需要发送与第二地址前缀匹配的报文时,可以使用目标柔性算法对应的路径来发送该报文,从而提高了网络部署的灵活性。
在一种可能的实现方式中,第一设备基于第一地址前缀确定第一对应关系,第一对应关 系包括第二地址前缀和第一备选柔性算法的标识信息的对应关系。由于第一设备中包括第二地址前缀和第一备选柔性算法的标识信息的对应关系,这样可以基于第一地址前缀确定第一对应关系,进而确定目标柔性算法,以保证第一设备可以向第一AS域内的设备发送目标柔性算法的标识信息。
在另一种可能的实现方式中,第一设备将第一备选柔性算法作为目标柔性算法。在这种实现方式中,第一设备可以将第一对应关系中的第一备选柔性算法作为目标柔性算法,即第一AS域内的目标柔性算法通过静态配置的对应关系获得。
在另一种可能的实现方式中,第一报文还包括第二备选柔性算法的标识信息。第一设备从第一备选柔性算法和第二备选柔性算法中确定目标柔性算法。即第一设备还可以接收来自第二AS域的第二备选柔性算法,并从该第二备选柔性算法和第一备选柔性算法中确定目标柔性算法。在这种实现方式中,第一AS域内的目标柔性算法可以通过静态配置的对应关系获得,也可以由来自第二AS域内的报文动态携带,增加了目标柔性算法获取方式的多样性。
在另一种可能的实现方式中,第二地址前缀为分段路由互联网协议第六版定位符SRv6 Locator中的前缀,第二报文包括定位符类型长度值Locator TLV,该Locator TLV包括第二地址前缀和目标柔性算法的标识信息。在该实现方式中,第二报文包括Locator TLV,用于向第一AS域内的设备发布SRv6 Locator,并携带该SRv6 Locator对应的目标柔性算法。
在另一种可能的实现方式中,第二备选柔性算法的标识信息携带在第一报文的类型长度值TLV中,所述第二备选柔性算法对应的路径用于在所述第二AS域内向所述第二设备发送报文。这样在跨域的场景下,即第二AS域的边界设备也可以通过第一报文中的TLV向第一AS域的第一设备发送第二备选柔性算法的标识信息,以保证第一设备能够获取到目标柔性算法。
在另一种可能的实现方式中,第一地址前缀与第二地址前缀匹配。从而,所述第一设备基于所述第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,指的是所述第一设备基于第一地址前缀匹配包括第二地址前缀的第一对应关系,进而由所述第一对应关系获取第二地址前缀和目标柔性算法的标识信息。
在另一种可能的实现方式中,第一报文为边界网关协议BGP报文。该BGP报文用于从第二AS域向第一AS域发送包括第一地址前缀的路由信息。
第二方面,本申请提供了一种发送报文的方法,在所述方法中,第三设备向第一AS域的设备发送第一报文,第一报文包括第一地址前缀和柔性算法的标识信息,以使得第一AS域内的设备通过柔性算法对应的路径转发报文,该报文与第一地址前缀相匹配。其中,第三设备是第二AS域的边界设备,第一AS域和第二AS域不同,第一地址前缀用于标识第二AS域内的第二设备,柔性算法对应的报文转发路径用于在第二AS域内向第二设备转发报文。
由于第三设备向第一AS域内的设备发送的第一报文包括柔性算法的标识信息,这样保证第一设备可以获取与第二AS域内的第二设备相对应的目标柔性算法,并向第一AS域内的设备发送目标柔性算法的标识信息,第一设备为第一AS域的边界设备。如此第一AS域内的设备需要向第二AS域内的第二设备发送报文时,可以使用目标柔性算法对应的路径来发送该报文,从而提高了网络部署的灵活性。
在一种可能的实现方式中,第三设备接收第三报文,第三报文包括第二设备发布的地址前缀和柔性算法的标识信息,第一地址前缀是基于第二设备发布的地址前缀得到的,第二设 备是第二AS域除第三设备之外的设备。这样对于第二AS域内的边界设备,即对于第三设备,第三设备在接收第二设备发布的地址前缀和柔性算法的标识信息时,可以向第一AS域内发送用于标识的第二设备的地址前缀和柔性算法的标识信息,解决跨域场景下丢失柔性算法的标识信息的问题。这样保证第一设备可以获取与第二设备相对应的目标柔性算法,并向第一AS域内的设备发送目标柔性算法的标识信息。如此第一AS域内的设备需要向第二设备发送报文时,可以使用目标柔性算法对应的路径来发送该报文,从而提高了网络部署的灵活性。
在一种可能的实现方式中,第一报文为边界网关协议BGP报文。该BGP报文用于从第二AS域向第一AS域发送包括第一地址前缀的路由信息。
在另一种可能的实现方式中,第二设备发布的地址前缀与第一地址前缀不同。这样可以支持第三设备对第二设备发布的地址前缀进行聚合得到第一地址前缀,使得第一地址前缀标识第二AS域内的不同设备,从而第一AS域内的设备使用目标柔性算法对应的路径向第二AS域内的不同设备发送报文,从而进一步提高网络部署的灵活性。
在另一种可能的实现方式中,第二设备与第三设备相同。这样使得第一地址前缀也标识第三设备,第一AS域内的设备获取与第三设备对应的目标柔性算法,使用目标柔性算法对应的路径向第三设备发送报文,以提高网络部署的灵活性。
在另一种可能的实现方式中,柔性算法的标识信息携带在第一报文的类型长度值TLV。这样在跨域的场景下,即第二AS域的第三设备也可以通过第一报文中的TLV向第一AS域的设备发送第二AS域内的设备发布的柔性算法的标识信息,以保证第一AS域内的设备能够获取到柔性算法。
在另一种可能的实现方式中,第三报文包括定位符类型长度值Locator TLV,Locator TLV包括第二AS域内的设备发布的地址前缀和柔性算法的标识信息。即第三报文为第二AS域内通告SRv6 Locator的报文。
第三方面,本申请提供了一种发送报文的装置,用于执行第一方面或第一方面的任意一种可能的实现方式中的方法。具体地,所述装置包括用于执行第一方面或第一方面的任意一种可能的实现方式中的方法的单元。
第四方面,本申请提供了一种发送报文的装置,用于执行第二方面或第二方面的任意一种可能的实现方式中的方法。具体地,所述装置包括用于执行第二方面或第二方面的任意一种可能的实现方式中的方法的单元。
第五方面,本申请提供了一种发送报文的装置,所述装置包括处理器和存储器。其中,所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序,使得所述设备完成第一方面或第一方面的任意可能的实现方式中的方法。
第六方面,本申请提供了一种发送报文的装置,所述装置包括处理器和存储器。其中,所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序,使得所述设备完成第二方面或第二方面的任意可能的实现方式中的方法。
第七方面,本申请提供了一种计算机程序产品,所述计算机程序产品包括在计算机可读存储介质中存储的计算机程序,并且所述计算程序通过处理器进行加载来实现上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。
第八方面,本申请提供了一种计算机可读存储介质,用于存储计算机程序,所述计算机程序通过处理器进行加载来执行上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。
第九方面,本申请提供了一种芯片,包括存储器和处理器,存储器用于存储计算机指令,处理器用于从存储器中调用并运行该计算机指令,以执行上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。
第十方面,本申请提供了一种发送报文的系统,所述系统包括第三方面所述的装置和第四方面所述的装置,或者,所述系统包括第五方面所述的装置和第六方面的装置。
附图说明
图1是本申请实施例提供的一种SR网络的结构示意图;
图2是本申请实施例提供的一种发送报文的方法流程图;
图3是本申请实施例提供的另一种发送报文的方法流程图;
图4是本申请实施例提供的一种发送报文的装置结构示意图;
图5是本申请实施例提供的另一种发送报文的装置结构示意图;
图6是本申请实施例提供的另一种发送报文的装置结构示意图;
图7是本申请实施例提供的另一种发送报文的装置结构示意图;
图8是本申请实施例提供的一种发送报文的系统结构示意图。
具体实施方式
下面将结合附图对本申请实施方式作进一步地详细描述。
参见图1,本申请实施例提供了一种SR网络100,包括:
第一AS域和第二AS域,第一AS域包括多个设备,第二AS域包括多个设备。第一AS域内的多个设备之间可相互通信,第二AS域内的多个设备之间可相互通信。第一AS域的边界设备可与第二AS域的边界设备通信。
例如,如图1所示,第一AS域包括设备0、设备1、设备2、设备3和设备4,设备0可分别与设备1和设备2通信,设备1还可分别与设备2和设备3通信,设备2还可与设备4通信,设备3和设备4是第一AS域的边界设备。
第二AS域包括设备5、设备6、设备7、设备8和设备9,设备9可分别与设备7和设备8通信,设备7还可分别与设备5和设备8通信,设备8还可与设备6通信,设备5和设备6是第二AS域的边界设备。其中,设备5还可与设备3通信,以及设备6还可与设备4通信。
上述以SR网络100包括第一AS域和第二AS域为例进行说明,以及对于上述第一AS域和第二AS域中的任意一个AS域,该AS域内的设备数量和/或连接关系等结构也是举例说明,不能作为对SR网络100以及该AS域的限定。当然可以基于实际需求,该AS域还可能有其他结构,以及SR网络100还可能包括其他AS域,即SR网络100还可能包括第三AS域和/或第四AS域等,对于其他AS域的结构,在此不再一一列举说明。
对于上述每个AS域,该AS域部署了多个柔性算法,通过该多个柔性算法在AS域中生成多个网络拓扑,每个网络拓扑是一个逻辑网络,包括AS域中的部分设备和/或部分链路。 每个网络拓扑与不同的柔性算法相对应,对于每个网络拓扑对应的柔性算法,该柔性算法可用于计算用于转发报文的路径,该路径位于该网络拓扑中。
对于上述第二AS域,第二设备向第二AS域内的其他设备发送中间系统到中间系统(intermediate system to intermediate system,ISIS)报文,以使得该其他设备生成转发表项,该转发表项用于向第二设备发送报文,第二设备是第二AS域内的设备。该ISIS报文包括第二设备的分段路由互联网协议第六版定位符(SR internet protocol version 6,SRv6 locator),该SRv6 locator包括第二设备发布的地址前缀、掩码和柔性算法的标识信息。第二AS域内的设备接收该ISIS报文,基于该SRv6 locator生成转发表项,并向第二AS域内的其他设备继续传递该ISIS报文。其中,该转发表项包括该地址前缀、该掩码以及下一跳信息,该下一跳信息是基于该柔性算法获取的。该下一跳信息包括该设备上的出接口的接口标识,且与该出接口通信的其他设备位于该柔性算法对应的网络拓扑。如此,第二AS域内接收该ISIS报文的设备均可能按上述方式生成转发表项,而转发表项中的下一跳信息均基于该柔性算法获取的,从而在第二AS域中形成该柔性算法对应的路径,该路径位于该柔性算法对应的网络拓扑中。
其中,对于第二AS域中的设备,该设备在需要向第二设备发送报文时,将该报文的目的地址与该转发表项包括的掩码进行与运算,得到地址前缀;在得到的地址前缀与该转发表项包括的地址前缀匹配时,也即该报文与该转发表项包括的地址前缀匹配时,基于该转发表项包括的下一跳信息向第二设备发送报文。即实现通过该柔性算法对应的路径向第二设备发送报文,该柔性算法对应的路径位于该柔性算法对应的网络拓扑中,这样实现通过该柔性算法对应的网络拓扑向第二设备发送报文,从而提高网络部署的灵活性。
举例来说,以图1所示的第一AS域和第二AS域为例,假设第一AS域部署有标识信息“130”对应的柔性算法1和标识信息“128”对应的柔性算法2,通过柔性算法1和柔性算法2,在第一AS域生成第一网络拓扑和第二网络拓扑。第一网络拓扑包括设备0、设备1和设备3,第二网络拓扑包括设备0、设备2和设备4。第一网络拓扑与柔性算法1相对应,第二网络拓扑与柔性算法2相对应。以及,假设第二AS域部署有标识信息“129”对应的柔性算法3,通过柔性算法3,在第二AS域生成第三网络拓扑,第三网络拓扑包括设备5、设备6、设备7、设备8和设备9。
假设,位于第二AS域内的设备9发送ISIS报文,该ISIS报文包括设备9的SRv6 locator,该SRv6 locator包括设备9发布的地址前缀、掩码和柔性算法3的标识信息“129”。第二AS域内的设备7在接收到该ISIS报文时,基于该ISIS报文包括的SRv6 locator,生成转发表项,该转发表项包括该地址前缀、该掩码以及下一跳信息,该下一跳信息是基于该柔性算法3获取的,该下一跳信息包括设备7上的与设备9通信的出接口的接口标识。设备7向第二AS域的其他设备发送该ISIS报文,例如向设备5和设备8发送该ISIS报文。对于第二AS域内的设备5、设备8和设备6在接收到该ISIS报文时,执行上述设备9执行的操作。
对于第二AS域的边界设备,即对于第三设备,第三设备接收该ISIS报文,向与自身通信的其他AS域发送BGP报文,以使得其他AS域内的边界设备基于该BGP报文生成转发表项,该转发表项用于向第二设备发送报文,该BGP报文包括第一地址前缀和与该第一地址前缀相对应的掩码,且该BGP报文包括的第一地址前缀是基于第二设备发布的地址前缀得到的。假设该其他AS域为上述第一AS域,第一AS域中的与第三设备通信的边界设备为第一 设备,第一设备接收该BGP报文,再向第一AS域内的设备发送ISIS报文,该ISIS报文包括该BGP报文中的第一地址前缀和与该第一地址前缀相对应的掩码。第一AS域内的设备基于该ISIS报文生成转发表项,该转发表项包括第一地址前缀、与该第一地址前缀相对应的掩码和下一跳信息,该下一跳信息是基于第一AS域的网络拓扑获取的。
然而,根据现有的通信协议的规定,BGP报文是无法携带柔性算法的标识信息,在跨域的场景下,第三设备向第一AS域发送BGP报文时会丢失第二AS域内的设备发布的柔性算法的标识信息,导致第一AS域内的设备无法得到柔性算法的标识信息。这样,第一AS域内的设备无法使用该柔性算法向第二AS域内的设备发送报文,影响网络部署灵活性。
举例来说,对于第二AS域的边界设备5和边界设备6,边界设备5接收该ISIS报文,向与自身通信的第一AS域发送BGP报文,该BGP报文包括第一地址前缀和与该第一地址前缀相对应的掩码,该BGP包括的第一地址前缀是基于设备9发布的地址前缀得到的。第一AS域的边界设备3接收该BGP报文,向第一AS域内的设备1、设备2和设备0发送ISIS报文,该ISIS报文包括该BGP报文中的第一地址前缀和与该第一地址前缀相对应的掩码。同样,边界设备6接收该ISIS报文,向与自身通信的第一AS域发送BGP报文,该BGP报文也包括第一地址前缀和与该第一地址前缀相对应的掩码。第一AS域的边界设备4接收该BGP报文,向第一AS域内的设备1、设备2和设备0发送ISIS报文,该ISIS报文包括该BGP报文中的第一地址前缀和与该第一地址前缀相对应的掩码。
从上述内容可以看出,无论是边界设备5,还是边界设备6,在向第一AS域发送的BGP报文中均丢失了设备9发布的柔性算法的标识信息。其中,上述是以第二AS域向第一AS域发送地址前缀的方向为例来说明,同样第一AS域也可以按上述描述的内容向第二AS域发送地址缀,且第一AS域向第二AS域发送的BGP报文也会丢失第一AS域内的设备发布的柔性算法的标识信息。
为了解决上述问题,以提高网络部署灵活性,本申请可以采用如下任意实施例来解决跨域场景下丢失柔性算法的标识信息的问题,使得第一AS域内的设备也能得到柔性算法的标识信息。从而,第一AS域内的设备在需要向第二AS域内的设备发送报文时,可以使用柔性算法计算到达第一AS域内的设备的转发路径,并使用该转发路径来发送该报文。
参见图2,本申请实施例提供了一种发送报文的方法200,所述方法200可以应用于图1所示的SR网络100。在所述方法200中第三设备向第一设备发送的第一报文不包括第二AS域内的设备发布的柔性算法的标识信息,但第一设备在接收第一报文后主动获取目标柔性算法的标识信息。例如,以图1所示SR网络100为例,第三设备可以为设备6,第一设备可以为设备4,设备6向设备4发送的第一报文不包括第二AS域内的设备发布的柔性算法的标识信息,但设备4在接收第一报文后主动获取目标柔性算法的标识信息。所述方法200,包括:
步骤201:第三设备获取第三地址前缀,第三设备是第二AS域的边界设备,第三地址前缀是第二AS域内的设备发布的地址前缀。
第三地址前缀可能是第三设备的地址前缀(如第三设备发布的地址前缀),或者,可能是第二设备发布的地址前缀。第二设备是第二AS域内除第三设备之外其他设备。
在步骤201中,在第三地址前缀是第二设备发布的地址前缀的情况,第三设备接收第三报文,第三报文包括第二设备发布的第三地址前缀,从第三报文中获取第三地址前缀。其中,第三报文可以是第二设备在第二AS域内发送的报文。
例如,以图1所示SR网络100中的第二AS域为例,第三设备可以为图1所示SR网络100中的设备5或设备6,假设第三设备为设备6,第二设备为第二AS中除设备6之外的其他设备,即第二设备包括设备5、设备7、设备8和/或设备9等,假设第二设备为设备9。设备9在第二AS域内发送第三报文,第三报文包括设备9发布的第三地址前缀,设备6接收第三报文,从第三报文中获取第三地址前缀。
第三报文还可以包括第二掩码和/或第二备选柔性算法的标识信息,第二掩码是第二设备发布的掩码,第二备选柔性算法的标识信息是第二设备发布的柔性算法的标识信息。
第三地址前缀可能是第二设备的互联网协议第六版(internet protocol version 6,IPv6)地址,或者,可能是第二设备的SRv6 locator包括的地址前缀。
第二设备的SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息。
可选的,在第三地址前缀是第二设备的IPv6地址的情况,第三报文包括互联网协议第六版前缀可达性类型长度值(IPv6 prefix reachability TLV),该IPv6 prefix reachability TLV包括第三地址前缀。第三设备在接收第三报文时,从第三报文的该IPv6 prefix reachability TLV中获取第三地址前缀。
可选的,该IPv6 prefix reachability TLV还包括第二掩码。
例如,假设第三地址前缀是“9:100::1”,“9:100::1”是第二设备上的一个IPv6地址,以及假设第二设备上的第二掩码为“/64”,该掩码的长度是128位比特,该掩码的高64位比特值均为1,该掩码的低64位比特值均为0。第三报文的IPv6 prefix reachability TLV包括第三地址前缀和第二掩码。其中,第三地址前缀和第二掩码表示为“9:100::1/64”,即第三报文的IPv6 prefix reachability TLV包括“9:100::1/64”。第三设备在接收该第三报文时,从该第三报文的该IPv6 prefix reachability TLV中获取第三地址前缀为“9:100::1”。
可选的,在第三地址前缀是第二设备的SRv6 locator包括的地址前缀的情况,第三报文包括定位符类型长度值(locator type length value,Locator TLV),该Locator TLV包括第二设备的SRv6 locator,该SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息。第三设备在接收第三报文时,从第三报文包括的该SRv6 locator中获取第三地址前缀。
例如,假设第二设备的SRv6 locator包括“9:100::/64”和“129”。其中,“9:100::”是SRv6 locator包括的地址前缀,“/64”是掩码,该掩码的长度是128位比特,该掩码的高64位比特值均为1,该掩码的低64位比特值均为0。“129”是第二备选柔性算法的标识信息。在该例子中,第二设备发布的第三地址前缀和掩码表示为“9:100::/64”,第二设备发布的第二备选柔性算法的标识信息是“129”,第三报文的Locator TLV包括该SRv6 locator,即包括“9:100::/64”和“129”。第三设备在接收该第三报文时,从该第三报文包括的该SRv6 locator中获取第三地址前缀为“9:100::”。
对于上述第三报文,第二设备向第二AS域内的与第二设备通信的设备发送第三报文。对于与第二设备通信的每个设备,该设备接收第三报文,在第三报文包括IPv6 prefix reachability TLV的情况,该IPv6 prefix reachability TLV包括第三地址前缀和第二掩码,且第三地址前缀为第二设备的IPv6地址,基于第三地址前缀和第二掩码生成转发表项,该转发表项包括第三地址前缀、第二掩码和下一跳信息,该下一跳信息是基于第二AS域的拓扑获取的。或者,在第三报文包括SRv6 locator的情况下,该SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息,基于该SRv6 locator生成转发表项,该转发表项包括 第三地址前缀、第二掩码和下一跳信息,该下一跳信息是基于第二备选柔性算法获取的。该设备还可以向第二AS域内的其他设备继续转发第三报文。在该设备是第二AS域的边界设备的情况下,即该设备为第三设备,执行如下步骤201的操作。
例如,以图1所示的SR网络100为例,假设第二AS域中的设备9需要发布第三地址前缀,即第二设备为设备9。第二AS域内与第二设备通信的设备包括设备7和设备8,第二设备向设备7和设备8发送第三报文。其中,第三报文包括IPv6 prefix reachability TLV,该IPv6 prefix reachability TLV包括第三地址前缀和第二掩码,第三地址前缀和第二掩码表示为“9:100::1/64”,第三地址前缀“9:100::1”为第二设备的IPv6地址。
设备7接收第三报文,基于该IPv6 prefix reachability TLV包括的“9:100::1/64”生成转发表项,该转发表项包括第三地址前缀和第二掩码(表示为“9:100::1/64”),以及下一跳信息;以及,设备7向设备5发送第三报文。设备5为第二AS域的边界设备,即设备5为第三设备,设备5接收第三报文,从第三报文包括的该IPv6 prefix reachability TLV中获取第三地址前缀“9:100::1”,以及,基于该IPv6 prefix reachability TLV包括的“9:100::1/64”生成转发表项,该转发表项包括第三地址前缀和第二掩码(表示为“9:100::1/64”),以及下一跳信息。
同样,设备8接收第三报文,基于该IPv6 prefix reachability TLV包括的“9:100::1/64”生成转发表项,以及,设备8还向设备6发送第三报文。设备6为第二AS域的另一边界设备,设备6接收第三报文,从该IPv6 prefix reachability TLV中获取第三地址前缀“9:100::1”,以及基于该IPv6 prefix reachability TLV包括的“9:100::1/64”生成转发表项。
再例如,仍以设备9为第二设备为例,第二设备向设备7和设备8发送第三报文,第三报文包括Locator TLV,该Locator TLV包括第二设备的SRv6 locator,该SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息,第三地址前缀和第二掩码表示为“9:100::/64”,第二备选柔性算法的标识信息为“129”,第二备选柔性算法为上述柔性算法3。
设备7接收第三报文,第三报文包括SRv6 locator,该SRv6 locator包括第三地址前缀和第二掩码(表示为“9:100::/64”),以及第二备选柔性算法的标识信息“129”,基于该SRv6 locator生成转发表项,该转发表项包括第三地址前缀和第二掩码(表示为“9:100::/64”),以及下一跳信息,该下一跳信息是基于“129”对应的第二备选柔性算法获取的;以及,设备7还向设备5发送第三报文。设备5为第二AS域的边界设备,即设备5为第三设备,设备5接收第三报文,从第三报文包括的该SRv6 locator中获取第三地址前缀“9:100::”,以及,基于该SRv6 locator生成转发表项,该转发表项包括第三地址前缀和第二掩码(表示为“9:100::/64”),以及下一跳信息,该下一跳信息是基于“129”对应的第二备选柔性算法获取的。
同样,设备8接收第三报文,基于该SRv6 locator生成转发表项,以及,设备8还向设备6发送第三报文。设备6为第二AS域的另一边界设备,设备6接收第三报文,从第三报文包括的该SRv6 locator中获取第三地址前缀“9:100::”,以及,基于该SRv6 locator生成转发表项。
在步骤201中,在第三地址前缀是第三设备的地址前缀的情况,第三设备获取其自身的第三地址前缀。
可选的,第三地址前缀是第三设备发布的地址前缀。
第三地址前缀可能是第三设备的IPv6地址,或者,可能是第三设备的SRv6 locator包括的地址前缀。
第三设备的SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息。
第三设备向第二AS域内的其他设备发送第三报文,第三报文包括第三地址前缀,以实现发布第三地址前缀。其中,第二AS域内的其他设备接收第三报文后,基于第三报文中的内容生成转发表项,详细生成过程参见上述描述的相关内容,在此不再详细说明。
步骤202:第三设备向第一AS域发送第一报文,第一报文包括第一地址前缀,第一地址前缀是基于第三地址前缀得到的。
在步骤202中,第三设备获取第一地址前缀,向第一设备发送第一报文,第一设备是第一AS域的边界设备,且第三设备与第一设备通信。
第一报文还包括与第一地址前缀相对应的掩码。
举例来说,第一地址前缀可能与第三地址前缀相同,在此情况下,第一地址前缀标识第二设备,第一地址前缀用于向第二设备发送报文。或者,第一地址前缀是第三地址前缀进行聚合得到的前缀,此情况下,第一地址前缀标识该多个设备,该多个设备包括第二设备,第一地址前缀用于向该多个设备发送报文。
也就是说,第三设备有如下两种方式获取第一地址前缀,但第三设备获取第一地址前缀的方式不限于该两种方式,即第三设备还可以有其他获取第一地址前缀的方式,在此不一一列举说明,而是只说明该两种方式。该两种方式包括:
第一种方式、第三设备在获取到第三地址前缀时,将第三地址前缀作为第一地址前缀。
可选的,与第一地址前缀相对应的掩码为第二掩码。
例如,以图1所示的SR网络为例,假设在该SR网络中的设备6为第三设备,第三设备获取的第三地址前缀为“9:100::1”,“9:100::1”是设备9的IPv6地址。第三设备将“9:100::1”作为第一地址前缀,向第一设备(为设备4)发送第一报文,第一报文包括的第一地址前缀“9:100::1”。此时“9:100::1”标识设备9,可用于向设备9发送报文。
再例如,第三设备获取的第三地址前缀为“9:100::”,“9:100::”为设备9的SRv6 locator包括的地址前缀。第三设备将“9:100::”作为第一地址前缀,向第一设备(为设备4)发送第一报文,第一报文包括的第一地址前缀“9:100::”。
第二种方式、第三设备在获取到第三地址前缀时,对多个地址前缀进行聚合得到第一地址前缀,该多个地址前缀包括第三地址前缀和已接收第二AS域内的其他设备发布的地址前缀。
第一地址前缀是该多个地址前缀的共同前缀。可选的,与第一地址前缀相对应的掩码用于获取该共同前缀。
例如,假设第三设备(为图1所示SR网络的设备6)已接收到的两个地址前缀,该两个地址前缀分别为第二AS域中的设备7发布的地址前缀“9:100::3”和第二AS域中的设备8发布的地址前缀“9:100::4”。
假设第三设备获取的第三地址前缀为“9:100::1”,“9:100::1”是设备9的IPv6地址,第三设备对三个地址前缀进行聚合,得到第一地址前缀为“9:100::”,该三个地址前缀分别为“9:100::3”、“9:100::4”和“9:100::1”,此时“9:100::”标识该三个设备,该三个设备包括设备7、设备8和设备9,可用于向设备7、设备8和/或设备9发送报文。第三设备向第一设备(为设备4)发送第一报文,第一报文包括的第一地址前缀“9:100::”。或者,
假设第三设备获取的第三地址前缀为“9:100::”,“9:100::”是设备9的SRv6 locator包括 的地址前缀,第三设备对三个地址前缀进行聚合,得到第一地址前缀为“9:100::”,该三个地址前缀分别为“9:100::3”、“9:100::4”和“9:100::”,此时“9:100::”标识该三个设备,该三个设备包括设备7、设备8和设备9,可用于向设备7、设备8和/或设备9发送报文。第三设备向第一设备(为设备4)发送第一报文,第一报文包括的第一地址前缀“9:100::”。
可选的,由于第一AS和第二AS域是两个不同的AS域,第三设备是第二AS域的边界设备,所以第三设备向第一AS域发送的第一报文是BGP报文。
步骤203:第一设备接收第一报文,基于第一报文包括的第一地址前缀获取第二地址前缀和目标柔性算法的标识信息。
第一设备还可以基于第一报文生成转发表项,该转发表项包括第一地址前缀、与第一地址前缀相对应的掩码和下一跳信息,该下一跳信息包括第一设备上的出接口的接口标识,该出接口与第三设备通信。
第一设备中保存有地址前缀、掩码与备选柔性算法的标识信息的对应关系。
在步骤203中,第一设备基于该对应关系和第一地址前缀,获取第二地址前缀和目标柔性算法的标识信息。在实现时,可以通过如下2031至2034的操作来实现,该2031至2034的操作分别为:
2031:第一设备从第一报文中获取第一地址前缀,从该对应关系中选择一条记录作为第一记录。
例如,第一设备从该对应关系中的第一条记录开始选择,将选择的第一条记录作为第一记录。
2032:第一设备基于第一记录包括的掩码和第一地址前缀获取第二地址前缀。
第一设备可以将第一记录包括的掩码和第一地址前缀进行与运算,将与运算的结果作为第二地址前缀。
2033:在第二地址前缀与第一记录包括的地址前缀匹配时,第一设备将第一记录包括的备选柔性算法的标识信息作为目标柔性算法的标识信息,结束返回。
可选的,在第二地址前缀与第一记录包括的地址前缀满足如下第一种条件、第二种条件和/或第二种条件,表示第二地址前缀与第一记录包括的地址前缀匹配。第一种条件、第二种条件和第三种条件如下所示:
第一种条件,第二地址前缀与第一记录包括的地址前缀相同。即在第二地址前缀与第一记录包括的地址前缀相同的情况,第一设备确定第二地址前缀与第一记录包括的地址前缀匹配。
第二种条件,对于第一记录包括的地址前缀,第二地址前缀是该地址前缀的前缀。即在第二地址前缀是该地址前缀的前缀的情况下,第一设备确定第二地址前缀与第一记录包括的地址前缀匹配。
第二地址前缀是该地址前缀的前缀,表示第二地址前缀是该地址前缀的一部分。
第三种条件,对于第一记录包括的地址前缀,该地址前缀是第二地址前缀的前缀。即在该地址前缀是第二地址前缀的前缀的情况下,第一设备确定第二地址前缀与第一记录包括的地址前缀匹配。
该地址前缀是第二地址前缀的前缀,表示该地址前缀是第二地址前缀的一部分。
2034:在第二地址前缀与第一记录包括的地址前缀不匹配时,第一设备从该对应关系中 选择一条其他记录作为第一记录,返回2032。
例如,假设第一记录为该对应关系中的第一条记录,则第一设备从该对应关系中选择第二条记录作为第一记录,返回2032。即重复上述2032-2034的操作,直至从该对应关系中找出包括与第二地址前缀匹配的地址前缀的记录。
可选的,在步骤203中,第一设备还获取第一掩码。其中,在第二地址前缀与第一记录包括的地址前缀匹配时,第一设备将第一记录包括的掩码作为第一掩码。
例如,第一设备保存有如下表1所示的地址前缀、掩码与备选柔性算法的标识信息的对应关系。对于该对应关系中的第一条记录,第一记录记录包括的地址前缀为“9:100::”,掩码为“/64”以及备选柔性算法的标识信息为“128”,其中,地址前缀“9:100::”是一个64位的前缀,掩码“/64”是一个高64位比特值均为1的掩码。对于该对应关系中的第二条记录,第二记录记录包括的地址前缀为“9:200::”,掩码为“/64”以及备选柔性算法的标识信息为“130”,其中,地址前缀“9:200::”是一个64位的前缀,掩码“/64”是一个高64位比特值均为1的掩码。
表1
序号 地址前缀+掩码 备选柔性算法的标识信息
1 9:100::/64 128
2 9:200::/64 130
…… …… ……
假设,第一设备(为图1所示SR网络100中的设备4)接收的第一报文包括的第一地址前缀为“9:100::1”。第一设备从如表1所示的对应关系中选择第一条记录作为第一记录,将第一记录包括的掩码“/64”与第一地址前缀“9:100::1”进行与运算,得到的第二地址前缀为“9:100::”。其中,第二地址前缀“9:100::”与第一记录中的地址前缀“9:100::”相同,所以确定两者匹配,因此将第一记录包括的备选柔性算法的标识信息“128”作为目标柔性算法的标识信息,以及将第一记录中的掩码“/64”作为第一掩码。
再例如,假设,第一设备接收的第一报文包括的第一地址前缀为“9:100::”,即第一地址前缀为“9:100::”。第一设备从如表1所示的对应关系中选择第一条记录作为第一记录,将第一记录包括的掩码“/64”与第一地址前缀“9:100::”进行与运算,得到的第二地址前缀为“9:100::”。其中,第二地址前缀“9:100::”与第一记录中的地址前缀“9:100::”相同,所以确定两者匹配,因此将第一记录包括的备选柔性算法的标识信息“128”作为目标柔性算法的标识信息,以及将第一记录中的掩码“/64”作为第一掩码。
步骤204:第一设备向第一AS域内的设备发送第二报文,第二报文包括第二地址前缀和目标柔性算法的标识信息。
可选的,在第一设备还获取到第一掩码的情况,第二报文还包括第一掩码。
第二报文为ISIS报文。第二报文包括Locator TLV,该Locator TLV包括第二地址前缀和目标柔性算法的标识信息。可选的,该Locator TLV还包括第一掩码。
可选的,该Locator TLV包括SRv6 locator,该SRv6 locator包括第二地址前缀、第一掩码和目标柔性算法的标识信息。
其中,对于第一AS域内的设备在接收到第二报文时,该设备接收第二报文,在第二报 文包括第二地址前缀和目标柔性算法的标识信息的情况,基于第二报文包括的该SRv6 locator生成转发表项,该转发表项包括第二地址前缀、第二掩码和下一跳信息,该下一跳信息是基于目标柔性算法获取的。可选的,该下一跳信息包括该设备上的出接口的接口标识,与该出接口通信的设备位于目标柔性算法对应的网络拓扑。
第一AS域内得到第二报文的设备均可能按上述方式生成转发表项,而转发表项中的下一跳信息均基于目标柔性算法获取的,从而在第一AS域中形成目标柔性算法对应的路径,该路径位于目标柔性算法对应的网络拓扑中。
这样,当该设备需要向第二设备发送报文时,该设备对该报文的目的地址和该转发表项包括的第一掩码进行与运算,得到地址前缀。在得到的地址前缀与该转发表项包括的第二地址前缀相同的情况,表示该报文与第二地址前缀匹配。该设备基于该转发表项包括的下一跳信息发送该报文,即使用目标柔性算法对应的路径发送该报文。
例如,对于图1所示的SR网络100,SR网络100中的设备4向设备2发送第二报文,第二报文包括SRv6 locator,该SRv6 locator包括第二地址前缀和第一掩码(表示为“9:100::/64”),以及目标柔性算法的标识信息“128”,以及设备2基于该SRv6 locator生成转发表项,该转发表项包括第二地址前缀和第一掩码(表示为“9:100::/64”),以及下一跳信息,该下一跳信息是基于“128”对应的目标柔性算法获取的。
设备2接收第二报文,基于该SRv6 locator生成转发表项,该转发表项包括第二地址前缀和第一掩码(表示为“9:100::/64”),以及下一跳信息。该下一跳信息是基于“128”对应的目标柔性算法获取的,该下一跳信息包括设备2上的出接口的接口标识,与该出接口通信的设备4是目标柔性算法对应的第二网络拓扑中的设备。设备2还向设备0发送第二报文。
在设备2需要向设备9发送报文时,假设该报文的目的地址为“9::100:1”,将目的地址“9:100::1”与该转发表项包括的第一掩码“/64”进行与运算,得到地址前缀为“9::100::”。该地址前缀“9::100::”与该转发表项包括的第二地址前缀“9:100::”相同,表示该报文与第二地址前缀“9:100::”匹配。设备2基于该转发表项包括的下一跳信息发送该报文,从而实现确定目标柔性算法对应的路径,使用目标柔性算法对应的路径发送报文。
在本申请实施例中,由于第一设备在接收到第一报文后,基于第一报文中的第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,向第一AS域中的设备发送第二报文,第二报文包括第二地址前缀和目标柔性算法的标识信息,第二地址前缀用于向第二设备发送报文,目标柔性算法用于计算该报文的转发路径。这样使得第一AS域内的设备可以得到目标柔性,在第一AS域内的设备需要向第二设备发送报文时,基于该报文的目的地址获取第二地址前缀,基于第二地址前缀确定目标柔性算法对应的路径,使用目标柔性算法对应的路径向第二设备发送该报文。该路径位于目标柔性算法对应的网络分片中,从而可以提高网络部署的灵活性。
参见图3,本申请实施例提供了一种发送报文的方法300,所述方法300可以应用于图1所示的SR网络100。在所述方法300中第三设备向第一设备发送的第一报文包括与第二AS域相对应的柔性算法的标识信息,第一设备在接收第一报文后,基于第一报文获取目标柔性算法的标识信息。例如,以图1所示SR网络100为例,第三设备可以为设备6,第一设备可以为设备4,设备6向设备4发送的第一报文包括与第二AS域相对应的柔性算法的标识信息,设备4在接收第一报文后,基于第一报文获取目标柔性算法的标识信息所述方法300,包括:
步骤301:第三设备获取第三地址前缀和第二备选柔性算法的标识信息,第三设备是第二AS域的边界设备,第二备选柔性算法用于在第二AS域内计算到达第二AS域内的设备的报文转发路径。
第三地址前缀和第二备选柔性算法的标识信息分别是第二AS域内的设备发布的地址前缀和柔性算法的标识信息。第二AS域内的设备包括第三设备或第二设备,第二设备是第二AS域内除第三设备之外的其他设备。
即,第三地址前缀和第二备选柔性算法的标识信息分别是第三设备的地址前缀和柔性算法的标识信息。或者,第三地址前缀和第二备选柔性算法的标识信息分别是第二设备发布的地址前缀和柔性算法的标识信息。
在步骤301中,在第三地址前缀和第二备选柔性算法的标识信息分别是第二设备发布的地址前缀和柔性算法的标识信息的情况,第三设备接收第三报文,第三报文包括第二设备发布的第三地址前缀和第二备选柔性算法的标识信息,从第三报文中获取第三地址前缀和第二备选柔性算法的标识信息。其中,第三报文可以是第二设备在第二AS域内发送的报文。
可选的,第三报文还包括第二掩码,第二掩码是第二设备发布的掩码。第三设备还可以从第三报文中获取第二掩码。
第三报文包括Locator TLV,该Locator TLV包括第二设备的SRv6 locator,该SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息。
对于上述第三报文,第二设备向第二AS域内的与第二设备通信的设备发送第三报文。对于与第二设备通信的每个设备,该设备接收第三报文,基于该SRv6 locator生成转发表项,该转发表项包括第三地址前缀、第二掩码和下一跳信息,该下一跳信息是基于第二备选柔性算法获取的。该设备还可以向第二AS域内的其他设备转发第三报文。在该设备是第二AS域的边界设备的情况下,即该设备为第三设备,执行如下步骤301的操作。
例如,以图1所示的SR网络100为例,假设第二AS域中的设备9需要发布第三地址前缀,即第二设备为设备9。第二AS域内与第二设备通信的设备包括设备7和设备8,第二设备向设备7和设备8发送第三报文。其中,第三报文包括Locator TLV,该Locator TLV包括第二设备的SRv6 locator,该SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息,第三地址前缀和第二掩码表示为“9:100::/64”,第二备选柔性算法的标识信息为“129”。
设备7接收第三报文,该SRv6 locator包括第三地址前缀和第二掩码(表示为“9:100::/64”),以及第二备选柔性算法的标识信息“129”,基于该SRv6 locator生成转发表项,该转发表项包括第三地址前缀和第二掩码(表示为“9:100::/64”),以及下一跳信息,该下一跳信息是基于“129”对应的第二备选柔性算法获取的。设备7还向设备5发送第三报文。设备5为第二AS域的边界设备,即设备5为第三设备,设备5接收第三报文,从第三报文包括的该SRv6 locator中获取第三地址前缀“9:100::”,以及,基于该SRv6 locator生成转发表项,该转发表项包括第三地址前缀和第二掩码(表示为“9:100::/64”),以及下一跳信息,该下一跳信息是基于“129”对应的第二备选柔性算法获取的。
同样,设备8接收第三报文,基于该SRv6 locator生成转发表项,以及,设备8还向设备6发送第三报文。设备6为第二AS域的另一边界设备,设备6接收第三报文,从第三报文包括的该SRv6 locator中获取第三地址前缀“9:100::”,以及,基于该SRv6 locator生成转发 表项。
在步骤301中,在第三地址前缀和第二备选柔性算法的标识信息分别是第三设备的地址前缀和柔性算法的标识信息的情况,第三设备获取其自身发布的第三地址前缀和第二备选柔性算法的标识信息。
可选的,第三地址前缀和第二备选柔性算法的标识信息分别是第三设备发布的地址前缀和柔性算法的标识信息。
第三设备向第二AS域内的其他设备发送第三报文,第三报文包括第三设备的SRv6 locator,第三设备的SRv6 locator包括第三地址前缀、第二掩码和第二备选柔性算法的标识信息。
在步骤301中,第三设备从第三设备的SRv6 locator中获取第三地址前缀和第二备选柔性算法的标识信息。第三设备还可以获取第二掩码。
其中,第二AS域内的其他设备接收第三报文后,基于第三报文中的内容生成转发表项,详细生成过程参见上述描述的相关内容,在此不再详细说明。
步骤302:第三设备向第一AS域发送第一报文,第一报文包括第一地址前缀和第二备选柔性算法的标识信息,第一地址前缀是基于第三地址前缀得到的。
在步骤中,第三设备获取第一地址前缀,向第一设备发送第一报文,第一设备是第一AS域的边界设备,且第三设备与第一设备通信。
可选的,第一报文还可能包括与第一地址前缀相对应的掩码。
第一报文是BGP报文。在步骤302中,对第一报文进行扩展,使得第一报文包括TLV,该TLV包括第一地址前缀和第二备选柔性算法的标识信息。可选的,该TLV还包括与第一地址前缀相对应的掩码。
第一地址前缀可能与获取的第三地址前缀相同,在此情况下,第一地址前缀标识第二设备,第一地址前缀用于向第二设备发送报文。可选的,与第一地址前缀相对应的掩码为第二掩码。或者,
第一地址前缀是第三设备对获取的第三地址前缀进行聚合得到的前缀,此情况下,第一地址前缀标识该多个设备,该多个设备包括第二设备,第一地址前缀用于向该多个设备发送报文。可选的,与第一地址前缀相对应的掩码用于获取该聚合的前缀。
第三设备获取第一地址前缀的详细实现过程,可以参见图2所示方法200的步骤202中的相关内容,在此不再详细说明。
例如,假设第三报文包括第二设备的SRv6 locator,该SRv6 locator包括“9:100::/64”和“129”。第三设备接收第三报文,从第三报文包括的Locator TLV获取第三地址前缀为“9:100::”,将“9:100::”作为第一地址前缀,向第一设备(为设备4)发送第一报文,第一报文包括的第一地址前缀、第二掩码和第二备选柔性算法的标识信息,即第一报文包括“9:100::/64”和“129”。
步骤303:第一设备接收第一报文,基于第一报文包括的第一地址前缀和第二备选柔性算法的标识信息,获取第二地址前缀和目标柔性算法的标识信息。
在步骤中,可以通过如下两种方式来获取第二地址前缀和目标柔性算法的标识信息。但第一设备获取第二地址前缀和目标柔性算法的标识信息的方式不限于该两种方式,即第一设备还可以有其他获取第二地址前缀和目标柔性算法的标识信息的方式,在此不一一列举说明, 而是只说明该两种方式。该两种方式分别为:
第一种方式,第一设备将第一报文包括的第一地址前缀和第二备选柔性算法的标识信息分别作为第二地址前缀和目标柔性算法的标识信息。
在第一报文还包括第二掩码的情况,第一设备还将第二掩码作为第一掩码。
可选的,在第一种方式中,第一设备还确定在第一AS域中部署的柔性算法是否包括第二备选柔性算法,如果包括第二备选柔性算法,将第一报文包括的第一地址前缀和第二备选柔性算法的标识信息分别作为第二地址前缀和目标柔性算法的标识信息。
例如,第一设备(为设备4)接收第一报文,第一报文包括“9:100::/64”和“129”,将“9:100::”作为第二地址前缀,将“129”作为目标柔性算法的标识信息,将“/64”作为第一掩码。
第二种方式,第一设备基于第一地址前缀获取第一对应关系,第一对应关系包括第二地址前缀和第一备选柔性算法的标识信息,基于第一备选柔性算法的标识信息和第二备选柔性算法的标识信息,获取目标柔性算法的标识信息。
在第二种方式中,第一设备可以从第一备选柔性算法的标识信息和第二备选柔性算法的标识信息中选择一个备选柔性算法的标识信息作为目标柔性算法的标识信息。例如,第一设备可以选择第一备选柔性算法的标识信息作为目标柔性算法的标识信息,和/或,第一设备可以选择第二备选柔性算法的标识信息作为目标柔性算法的标识信息。
可选的,第一设备中保存有地址前缀、掩码与备选柔性算法的标识信息的对应关系;在第二种方式中,可以通过如下3031至3034的操作来实现,该3031至3034的操作分别为:
3031:第一设备从第一报文中获取第一地址前缀,从该对应关系中选择一条记录作为第一记录。
例如,第一设备从该对应关系中的第一条记录开始选择,将选择的第一条记录作为第一记录。
3032:第一设备基于第一记录包括的掩码和第一地址前缀获取第二地址前缀。
第一设备可以将第一记录包括的掩码和第一地址前缀进行与运算,将与运算的结果作为第二地址前缀。
3033:在第二地址前缀与第一记录包括的地址前缀匹配时,第一设备将第一记录包括的备选柔性算法的标识信息作为第一备选柔性算法的标识信息,以得到包括第二地址前缀和第一备选柔性算法的标识信息的第一对应关系,结束返回。
可选的,第一设备确定第二地址前缀与第一记录包括的地址前缀匹配的详细实现过程,可以参见图2所示方法200中的操作2033中的相关内容,在此不再详细说明。
3034:在第二地址前缀与第一记录包括的地址前缀不匹配时,第一设备从该对应关系中选择一条其他记录作为第一记录,返回3032。
例如,假设第一记录为该对应关系中的第一条记录,则第一设备从该对应关系中选择第二条记录作为第一记录,返回3032。即重复上述3032-3034的操作,直至从该对应关系中找出包括与第二地址前缀匹配的地址前缀的记录。
可选的,第一设备还获取第一掩码。其中,在第二地址前缀与第一记录包括的地址前缀匹配时,第一设备将第一记录包括的掩码作为第一掩码,或者,第一设备将第一报文中包括的第二掩码作为第一掩码。
可选的,在第一设备将第一备选柔性算法的标识信息作为目标柔性算法的标识信息时,第一设备可以将第一记录包括的掩码作为第一掩码;或者,在第一设备将第二备选柔性算法的标识信息作为目标柔性算法的标识信息时,第一设备可以将第一报文包括的第二掩码作为第一掩码。
可选的,第一设备中保存有地址前缀与备选柔性算法的标识信息的对应关系;在第二种方式中,第一设备将第一报文中的第一地址前缀作为第二地址前缀,基于第二地址前缀,从地址前缀与备选柔性算法的标识信息的对应关系中获取对应的备选柔性算法的标识信息,将获取的备选柔性算法的标识信息作为第一备选柔性算法的标识信息,以得到包括第二地址前缀和第一备选柔性算法的标识信息的第一对应关系。
步骤304:与图2所示方法200的步骤204相同,在此不再详细说明。
在本申请实施例中,由于对第一报文进行扩展,使得第三设备向第一设备发送的第一报文不仅包括第一地址前缀,还包括第二备选柔性算法的标识信息。这样,第一设备基于第一报文中的第一地址前缀和第二备选柔性算法的标识信息,获取第二地址前缀和目标柔性算法的标识信息,向第一AS域中的设备发送第二报文,第二报文包括第二地址前缀和目标柔性算法的标识信息,第二地址前缀用于向第二设备发送报文,目标柔性算法用于计算该报文的路径。这样使得第一AS域内的设备可以得到目标柔性,在第一AS域内的设备需要向第二设备发送报文时,基于该报文的目的地址获取第二地址前缀,基于第二地址前缀确定目标柔性算法对应的路径,使用目标柔性算法对应的路径向第二设备发送该报文。该路径位于目标柔性算法对应的网络分片中,从而可以提高网络部署的灵活性。
参见图4,本申请实施例提供了一种发送报文的装置400,所述装置400部署在上述任意实施提供的第一设备上,例如部署在图1所示的SR网络100的第一设备(设备3或设备4)、图2所示方法200中的第一设备或图3所示方法300中的第一设备上,包括:
接收单元401,用于接收第一报文,第一报文包括第一地址前缀,所述装置400是第一自治系统AS域的边界设备,第一地址前缀是基于第二设备发布的地址前缀得到的,第二设备位于第二AS域,第一AS域和第二AS域不同,第一地址前缀用于向第二设备发送报文;
处理单元402,用于基于第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,第二地址前缀用于向第二设备发送报文;
发送单元403,用于向第一AS域内的设备发送第二报文,第二报文包括第二地址前缀和目标柔性算法的标识信息,以使得第一AS域内的设备通过目标柔性算法对应的路径转发匹配所述第二地址前缀的报文。
可选的,接收单元401接收第一报文的详细实现过程,参见上述图2所示方法200的步骤203,图3所示方法300的步骤303中的相关内容,在此不再详细说明。
可选的,处理单元402获取第二地址前缀和目标柔性算法的标识信息的详细实现过程,参见上述图2所示方法200的步骤203,图3所示方法300的步骤303中的相关内容,在此不再详细说明。
可选的,发送单元403发送第二报文的详细实现过程,参见上述图2所示方法200的步骤204,图3所示方法300的步骤304中的相关内容,在此不再详细说明。
可选的,处理单元402,用于基于第一地址前缀确定第一对应关系,第一对应关系包括第二地址前缀和第一备选柔性算法的标识信息的对应关系。
可选的,处理单元402获取第一对应关系的详细实现过程,参见上述图3所示方法300的步骤303中的相关内容,在此不再详细说明。
可选的,处理单元402,还用于将第一备选柔性算法作为目标柔性算法。
可选的,第一报文还包括第二备选柔性算法的标识信息,处理单元402,还用于从第一备选柔性算法和第二备选柔性算法中确定目标柔性算法。
可选的,处理单元402确定目标柔性算法的标识信息的详细实现过程,参见上述图3所示方法300的步骤303中的相关内容,在此不再详细说明。
可选的,第二地址前缀为分段路由互联网协议第六版定位符SRv6 Locator中的前缀,第二报文包括定位符类型长度值Locator TLV,Locator TLV包括第二地址前缀和目标柔性算法的标识信息。
可选的,关于第二报文包括的Locator TLV的详细说明,参见上述图2所示方法200的步骤204,图3所示方法300的步骤304中的相关内容,在此不再详细说明。
可选的,第二备选柔性算法的标识信息携带在第一报文的类型长度值TLV中。
可选的,第一地址前缀与第二地址前缀匹配。
可选的,第一报文为边界网关协议BGP报文。
在本申请实施例中,接收单元接收第一报文,第一报文包括第一地址前缀,第一地址前缀是基于第二设备发布的地址前缀得到的,第二设备位于第二AS域。处理单元基于第一报文中的第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,这样发送单元向第一AS域内的设备发送第二地址前缀和目标柔性算法的标识信息,而第二地址前缀用于向第二设备发送报文,使得第一AS域内的设备也可以得到位于第二AS域的设备对应目标柔性算法。如此第一AS域内的设备在需要发送与第二地址前缀匹配的报文时,可以使用目标柔性算法对应的路径发送该报文,从而提高了网络部署的灵活性。
参见图5,本申请实施例提供了一种发送报文的装置500,所述装置500部署在上述任意实施提供的第三设备上,例如部署在图1所示的SR网络100的第三设备(设备5或设备6)、图2所示方法200中的第三设备或图3所示方法300中的第三设备上,包括:
发送单元501,用于向第一AS域的设备发送第一报文,第一报文包括第一地址前缀和柔性算法的标识信息,以使得第一AS域内的设备通过柔性算法对应的路径转发报文,该报文与标识第二设备的地址前缀相匹配;
其中,所述装置500是第二AS域的边界设备,第一AS域和第二AS域不同,第一地址前缀用于标识第二AS域内的第二设备,该柔性算法对应的报文转发路径用于在第二AS域内向第二设备转发报文。
可选的,发送单元501发送第一报文的详细实现过程,参见上述图3所示方法300的步骤302中的相关内容,在此不再详细说明。
可选的,所述装置500还包括接收单元502:
接收单元502,用于接收第三报文,第三报文包括第二设备发布的地址前缀和柔性算法的标识信息,第一地址前缀是基于第二设备发布的地址前缀得到的。
可选的,接收单元502接收第三报文的详细实现过程,参见上述图3所示方法300的步骤301中的相关内容,在此不再详细说明。
可选的,所述装置500还包括处理单元503;
第一地址前缀是所述处理单元503基于第二设备发布的地址前缀得到的。
可选的,处理单元503获取第一地址前缀的详细实现过程,参见上述图3所示方法300的步骤301中的相关内容,在此不再详细说明。
可选的,第一报文为边界网关协议BGP报文。
可选的,该柔性算法的标识信息携带在第一报文的类型长度值TLV。
可选的,第三报文包括定位符类型长度值Locator TLV,Locator TLV包括第二设备发布的地址前缀和柔性算法的标识信息。
可选的,关于第二报文包括的Locator TLV的详细说明,参见上述图3所示方法300的步骤301中的相关内容,在此不再详细说明。
可选的,所述第二设备发布的地址前缀与第一地址前缀不同。
可选的,所述第二设备与所述装置相同。
在本申请实施例中,发送单元向第一AS域内的设备发送的第一报文包括柔性算法的标识信息,这样保证第一AS域的边界设备可以获取与第二设备相对应的目标柔性算法,以向第一AS域内的设备发送目标柔性算法的标识信息。如此第一AS域内的设备需要向第二设备发送报文时,可以使用目标柔性算法对应的路径发送该报文,从而提高了网络部署的灵活性。
参见图6,本申请实施例提供了一种发送报文的装置600示意图。所述装置600可以是上述任意实施例提供的第一设备,例如,可以是图1所示的SR网络100的第一设备(设备3或设备4)、图2所示方法200中的第一设备或图3所示方法300中的第一设备。所述装置600包括至少一个处理器601,内部连接602,存储器603以及至少一个收发器604。
所述装置600是一种硬件结构的装置,可以用于实现图4所述的装置400中的功能模块。例如,本领域技术人员可以想到图4所示的装置400中的处理单元402可以通过该至少一个处理器601调用存储器603中的代码来实现,图4所示的装置400中的接收单元401和发送单元403可以通过该至少一个收发器604来实现。
所述装置600还可以用于实现上述任一实施例中第一设备的功能。
上述处理器601可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
上述内部连接602可包括一通路,在上述组件之间传送信息。内部连接602可以为单板或总线等。
上述至少一个收发器604,用于与其他设备或通信网络通信。
上述存储器603可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器603用于存储执行本申请方案的应用程序代码,并由处理器601来控制执 行。处理器601用于执行存储器603中存储的应用程序代码,以及配合至少一个收发器604,从而使得所述装置600实现本专利方法中的功能。
在具体实现中,作为一种实施例,处理器601可以包括一个或多个CPU,例如图6中的CPU0和CPU1。
在具体实现中,作为一种实施例,所述装置600可以包括多个处理器,例如图6中的处理器601和处理器607。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
参见图7,本申请实施例提供了一种发送报文的装置700示意图。所述装置700可以是上述任意实施例提供的第三设备,例如,可以是图1所示的SR网络100的第三设备(设备5或设备6)、图2所示方法200中的第三设备或图3所示方法300中的第三设备。所述装置700包括至少一个处理器701,内部连接702,存储器703以及至少一个收发器704。
所述装置700是一种硬件结构的装置,可以用于实现图5所述的装置500中的功能模块。例如,本领域技术人员可以想到图5所示的装置500中的处理单元503可以通过该至少一个处理器701调用存储器703中的代码来实现,图5所示的装置500中的发送单元501和接收单元502可以通过该至少一个收发器704来实现。
所述装置700还可以用于实现上述任一实施例中第三设备的功能。
上述处理器701可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
上述内部连接702可包括一通路,在上述组件之间传送信息。内部连接702可以为单板或总线等。
上述至少一个收发器704,用于与其他设备或通信网络通信。
上述存储器703可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器703用于存储执行本申请方案的应用程序代码,并由处理器701来控制执行。处理器701用于执行存储器703中存储的应用程序代码,以及配合至少一个收发器704,从而使得所述装置700实现本专利方法中的功能。
在具体实现中,作为一种实施例,处理器701可以包括一个或多个CPU,例如图7中的CPU0和CPU1。
在具体实现中,作为一种实施例,所述装置700可以包括多个处理器,例如图7中的处理器701和处理器707。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用 于处理数据(例如计算机程序指令)的处理核。
参见图8,本申请实施例提供了一种发送报文的系统800,所述系统800包括如图4所示的装置400和如图5所示的装置500,或者,所述系统800包括如图6所示的装置600和如图7所示的装置700。
其中,如图4所示的装置400或如图6所示的装置600可以为第一设备801,如图5所示的装置500或如图7所示的装置700可以为第三设备802。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第n”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种所述示例的范围的情况下,第一图像可以被称为第二图像,并且类似地,第二图像可以被称为第一图像。第一图像和第二图像都可以是图像,并且在某些情况下,可以是单独且不同的图像。
还应理解,在本申请的各个实施例中,各个过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (26)

  1. 一种发送报文的方法,其特征在于,所述方法包括:
    第一设备接收第一报文,所述第一报文包括第一地址前缀,所述第一设备是第一自治系统AS域的边界设备,所述第一地址前缀是基于第二设备发布的地址前缀得到的,所述第二设备位于第二AS域,所述第一AS域和所述第二AS域不同,所述第一地址前缀用于向所述第二设备发送报文;
    所述第一设备基于所述第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,所述第二地址前缀用于向所述第二设备发送报文;
    所述第一设备向所述第一AS域内的设备发送第二报文,所述第二报文包括所述第二地址前缀和所述目标柔性算法的标识信息,以使得所述第一AS域内的设备通过所述目标柔性算法对应的路径转发匹配所述第二地址前缀的报文。
  2. 如权利要求1所述的方法,其特征在于,所述第一设备基于所述第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,包括:
    所述第一设备基于所述第一地址前缀确定第一对应关系,所述第一对应关系包括所述第二地址前缀和第一备选柔性算法的标识信息的对应关系。
  3. 如权利要求2所述的方法,其特征在于,所述第一设备基于所述第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,还包括:
    所述第一设备将所述第一备选柔性算法作为所述目标柔性算法。
  4. 如权利要求2所述的方法,其特征在于,所述第一报文还包括所述第二备选柔性算法的标识信息,所述第一设备基于所述第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,还包括:
    所述第一设备从所述第一备选柔性算法和所述第二备选柔性算法中确定所述目标柔性算法。
  5. 如权利要求4所述的方法,其特征在于,所述第二备选柔性算法的标识信息携带在所述第一报文的类型长度值TLV中,所述第二备选柔性算法对应的路径用于在所述第二AS域内向所述第二设备发送报文。
  6. 如权利要求1至5任一项所述的方法,其特征在于,所述第二地址前缀为分段路由互联网协议第六版定位符SRv6 Locator中的前缀,所述第二报文包括定位符类型长度值Locator TLV,所述Locator TLV包括所述第二地址前缀和所述目标柔性算法的标识信息。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述第一地址前缀与所述第二地址前缀匹配。
  8. 如权利要求1-7任一项所述的方法,其特征在于,所述第一报文为边界网关协议BGP报文。
  9. 一种发送报文的方法,其特征在于,所述方法包括:
    第三设备向第一自治系统AS域的设备发送第一报文,所述第一报文包括第一地址前缀和柔性算法的标识信息,以使得所述第一AS域内的设备通过所述柔性算法对应的路径转发报文,所述报文与所述第一地址前缀相匹配;
    其中,所述第三设备是第二AS域的边界设备,所述第一AS域和所述第二AS域不同, 所述第一地址前缀用于标识第二AS域内的第二设备,所述柔性算法对应的报文转发路径用于在所述第二AS域内向所述第二设备转发报文。
  10. 如权利要求9所述的方法,其特征在于,所述第二设备与所述第三设备不同,所述第三设备向第一AS域的设备发送第一报文之前,所述方法还包括:
    所述第三设备接收第三报文,所述第三报文包括所述第二设备发布的地址前缀和所述柔性算法的标识信息,所述第一地址前缀是基于所述第二设备发布的地址前缀得到的。
  11. 如权利要求10所述的方法,其特征在于,所述第三报文包括定位符类型长度值Locator TLV,所述Locator TLV包括所述第二设备发布的地址前缀和柔性算法的标识信息。
  12. 如权利要求11所述的方法,其特征在于,所述第二设备发布的地址前缀与所述第一地址前缀不同。
  13. 如权利要求11所述的方法,其特征在于,所述第二设备与所述第三设备相同。
  14. 如权利要求9至13任一项所述的方法,其特征在于,所述第一报文为边界网关协议BGP报文。
  15. 如权利要求9至14任一项所述的方法,其特征在于,所述柔性算法的标识信息携带在所述第一报文的类型长度值TLV。
  16. 一种发送报文的装置,其特征在于,所述装置包括:
    接收单元,用于接收第一报文,所述第一报文包括第一地址前缀,所述装置是第一自治系统AS域的边界设备,所述第一地址前缀是基于第二设备发布的地址前缀得到的,所述第二设备位于第二AS域,所述第一AS域和所述第二AS域不同,所述第一地址前缀用于向所述第二设备发送报文;
    处理单元,用于基于所述第一地址前缀获取第二地址前缀和目标柔性算法的标识信息,所述第二地址前缀用于向所述第二设备发送报文;
    发送单元,用于向所述第一AS域内的设备发送第二报文,所述第二报文包括所述第二地址前缀和所述目标柔性算法的标识信息,以使得所述第一AS域内的设备通过所述目标柔性算法对应的路径转发匹配所述第二地址前缀的报文。
  17. 如权利要求16所述的装置,其特征在于,所述处理单元,用于基于所述第一地址前缀确定第一对应关系,所述第一对应关系包括所述第二地址前缀和第一备选柔性算法的标识信息的对应关系。
  18. 如权利要求17所述的装置,其特征在于,所述处理单元,还用于将所述第一备选柔性算法作为所述目标柔性算法。
  19. 如权利要求17所述的装置,其特征在于,所述第一报文还包括所述第二备选柔性算法的标识信息,所述处理单元,还用于从所述第一备选柔性算法和所述第二备选柔性算法中确定所述目标柔性算法。
  20. 如权利要求16至19任一项所述的装置,其特征在于,所述第二地址前缀为分段路由互联网协议第六版定位符SRv6 Locator中的前缀,所述第二报文包括定位符类型长度值Locator TLV,所述Locator TLV包括所述第二地址前缀和所述目标柔性算法的标识信息。
  21. 一种发送报文的装置,其特征在于,所述装置包括:
    发送单元,用于向第一AS域的设备发送第一报文,所述第一报文包括第一地址前缀和柔性算法的标识信息,以使得所述第一AS域内的设备通过所述柔性算法对应的路径转发报 文,所述报文与标识所述第二设备的地址前缀相匹配;
    其中,所述装置是所述第二AS域的边界设备,所述第一AS域和所述第二AS域不同,所述第一地址前缀用于标识第二AS域内的第二设备,所述柔性算法对应的报文转发路径用于在所述第二AS域内向所述第二设备转发报文。
  22. 如权利要求21所述的装置,其特征在于,所述装置还包括接收单元:
    所述接收单元,用于接收第三报文,所述第三报文包括所述第二设备发布的地址前缀和柔性算法的标识信息,所述第一地址前缀是基于所述第二设备发布的地址前缀得到的。
  23. 如权利要求22所述的装置,其特征在于,所述第三报文包括定位符类型长度值Locator TLV,所述Locator TLV包括所述第二设备发布的地址前缀和柔性算法的标识信息。
  24. 如权利要求21至23任一项所述的装置,其特征在于,所述第一报文为边界网关协议BGP报文。
  25. 一种发送报文的系统,其特征在于,所述系统包括如权利要求16至20任一项所述的装置和如权利要求21至24任一项所述的装置。
  26. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现如权利要求1-15任一项所述的方法。
PCT/CN2022/073045 2021-02-03 2022-01-20 发送报文的方法、装置、系统及存储介质 WO2022166607A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22748886.3A EP4277235A4 (en) 2021-02-03 2022-01-20 METHOD, APPARATUS AND SYSTEM FOR SENDING PACKETS AND STORAGE MEDIUM
US18/363,783 US20230388232A1 (en) 2021-02-03 2023-08-02 Packet sending method, apparatus, and system, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110151946.8 2021-02-03
CN202110151946.8A CN114866470A (zh) 2021-02-03 2021-02-03 发送报文的方法、装置、系统及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/363,783 Continuation US20230388232A1 (en) 2021-02-03 2023-08-02 Packet sending method, apparatus, and system, and storage medium

Publications (1)

Publication Number Publication Date
WO2022166607A1 true WO2022166607A1 (zh) 2022-08-11

Family

ID=82623709

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/073045 WO2022166607A1 (zh) 2021-02-03 2022-01-20 发送报文的方法、装置、系统及存储介质

Country Status (4)

Country Link
US (1) US20230388232A1 (zh)
EP (1) EP4277235A4 (zh)
CN (1) CN114866470A (zh)
WO (1) WO2022166607A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801654A (zh) * 2021-09-08 2023-03-14 中兴通讯股份有限公司 路由通告方法、路径建立方法、业务数据的传输方法
CN117640484A (zh) * 2022-08-09 2024-03-01 华为技术有限公司 一种路由信息传输方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588343A (zh) * 2008-05-20 2009-11-25 中国人民解放军信息工程大学 前缀与as映射关系的管理方法、报文处理方法和装置
CN101902474A (zh) * 2010-07-21 2010-12-01 清华大学 基于标签替换的自治域间IPv6真实源地址验证方法
US20150341310A1 (en) * 2014-05-26 2015-11-26 Electronics And Telecommunications Research Institute Method and apparatus for inter-domain routing based on as architecture
CN110944357A (zh) * 2018-09-25 2020-03-31 中兴通讯股份有限公司 一种网络切片的方法及装置
CN111131038A (zh) * 2018-10-31 2020-05-08 中国电信股份有限公司 跨域报文转发方法、系统以及存储系统

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7746865B2 (en) * 2004-12-07 2010-06-29 Intel Corporation Maskable content addressable memory
US9503365B2 (en) * 2014-08-11 2016-11-22 Palo Alto Research Center Incorporated Reputation-based instruction processing over an information centric network
US10601724B1 (en) * 2018-11-01 2020-03-24 Cisco Technology, Inc. Scalable network slice based queuing using segment routing flexible algorithm
CN112054960B (zh) * 2019-02-13 2024-04-26 华为技术有限公司 一种路径计算方法、装置及设备
CN113726652B (zh) * 2020-05-26 2022-12-06 华为技术有限公司 一种通告信息的处理方法、装置及存储介质
CN113839859B (zh) * 2020-06-23 2023-05-23 华为技术有限公司 一种报文通告的方法以及相关装置
EP4175248A4 (en) * 2020-07-17 2023-11-22 Huawei Technologies Co., Ltd. ROUTING ANNOUNCEMENT METHOD AND ASSOCIATED DEVICE
CN115134297A (zh) * 2021-03-29 2022-09-30 华为技术有限公司 一种BIERv6报文的处理方法、设备以及系统
US11909622B1 (en) * 2023-05-15 2024-02-20 Ciena Corporation Extended protection in segment routing flexible algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588343A (zh) * 2008-05-20 2009-11-25 中国人民解放军信息工程大学 前缀与as映射关系的管理方法、报文处理方法和装置
CN101902474A (zh) * 2010-07-21 2010-12-01 清华大学 基于标签替换的自治域间IPv6真实源地址验证方法
US20150341310A1 (en) * 2014-05-26 2015-11-26 Electronics And Telecommunications Research Institute Method and apparatus for inter-domain routing based on as architecture
CN110944357A (zh) * 2018-09-25 2020-03-31 中兴通讯股份有限公司 一种网络切片的方法及装置
CN111131038A (zh) * 2018-10-31 2020-05-08 中国电信股份有限公司 跨域报文转发方法、系统以及存储系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4277235A4

Also Published As

Publication number Publication date
US20230388232A1 (en) 2023-11-30
EP4277235A4 (en) 2024-03-27
CN114866470A (zh) 2022-08-05
EP4277235A1 (en) 2023-11-15

Similar Documents

Publication Publication Date Title
US6968393B1 (en) Method and apparatus for an attribute oriented routing update
US11431633B2 (en) Label forwarding entry generation method and apparatus, packet sending method and apparatus, and device
WO2022166607A1 (zh) 发送报文的方法、装置、系统及存储介质
US20220407801A1 (en) Forwarding entry generation method, packet sending method, network device, and system
WO2018099394A1 (zh) 报文传输
WO2017193733A1 (zh) 路由散播的方法和节点
WO2020156090A1 (zh) 一种建立跨域转发路径的方法、装置及系统
WO2021143279A1 (zh) 段路由业务处理方法和装置、路由设备及存储介质
US20230155937A1 (en) Route Advertisement Method and Related Device
US20160112315A1 (en) Communication apparatus, communication method, and computer-readable recording medium
WO2023125239A1 (zh) 一种泛洪攻击防御方法及相关装置
WO2021088561A1 (zh) 位索引显式复制网络中负载分担的方法、装置及设备
WO2022111372A1 (zh) 报文传输方法、装置、设备及计算机可读存储介质
US20190394115A1 (en) Area abstraction extensions to routing protocols
CN109218182B (zh) 一种路由信息的同步方法及装置
WO2021175309A1 (zh) 一种路由发送方法及设备
WO2022142932A1 (zh) 一种路由处理方法、相关装置以及网络系统
WO2022188530A1 (zh) 一种路由处理方法及网络设备
US20100080169A1 (en) Hierarchical mobility label-based network
WO2022062956A1 (zh) 一种流量处理方法、装置和网络设备
JP2023547485A (ja) 次ホップ決定方法および装置
JP2023551262A (ja) ルートアドバタイズメント方法、装置、及びシステム
US20220123994A1 (en) System and Method for Abstracting an IGP Zone
US20230155938A1 (en) Route Advertisement Method and Related Device
WO2023016550A1 (zh) 一种路由发送方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22748886

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022748886

Country of ref document: EP

Effective date: 20230811

NENP Non-entry into the national phase

Ref country code: DE