WO2021043216A1 - 分段路由方法及装置 - Google Patents

分段路由方法及装置 Download PDF

Info

Publication number
WO2021043216A1
WO2021043216A1 PCT/CN2020/113260 CN2020113260W WO2021043216A1 WO 2021043216 A1 WO2021043216 A1 WO 2021043216A1 CN 2020113260 W CN2020113260 W CN 2020113260W WO 2021043216 A1 WO2021043216 A1 WO 2021043216A1
Authority
WO
WIPO (PCT)
Prior art keywords
fid
function
message
address
egress
Prior art date
Application number
PCT/CN2020/113260
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 EP20860682.2A priority Critical patent/EP4024781A4/en
Publication of WO2021043216A1 publication Critical patent/WO2021043216A1/zh
Priority to US17/686,798 priority patent/US20220231948A1/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/02Topology update or discovery
    • H04L45/036Updating the topology between route computation elements, e.g. between OpenFlow controllers
    • H04L45/037Routes obligatorily traversing service-related nodes
    • 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/036Updating the topology between route computation elements, e.g. between OpenFlow controllers
    • H04L45/037Routes obligatorily traversing service-related nodes
    • H04L45/0377Routes obligatorily traversing service-related nodes for service chaining
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source 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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • 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
    • 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
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/76Routing in software-defined topologies, e.g. routing between virtual machines

Definitions

  • This application relates to the field of communication technology, and in particular to a segmented routing method and device.
  • Segment Routing (SR)v6 is a new generation of IPv6 network routing technology. SRv6 is based on source address routing and maintains state only at the edge of the network. This makes SRv6 very suitable for super-large-scale software-defined networking (SDN) Deployment has now become a standard network transmission technology supporting the development of 5G, Internet of Things, multi-cloud and microservices. Therefore, SRv6 can be applied to the field of multi-cloud interconnection such as edge computing or cloud computing.
  • SDN software-defined networking
  • Figure 1 is a business diagram of applying SRv6 to the field of multi-cloud interconnection.
  • SRv6 is essentially a "Early Binding" technology.
  • Prior binding means that the "name-address mapping" is determined in advance before the routing phase, that is, the controller must bind the service name to be processed to a
  • the list of IPv6 addresses corresponding to the sequenced segment list is then issued to the first SRv6 router on the SRv6 service processing path.
  • the present application provides a segmented routing method and device to solve the problem of address inconsistency caused by the dynamic change of the service location of a computing host.
  • an embodiment of the present application provides a segmented routing method, including:
  • the ingress routing device receives the message sent by the terminal device
  • the ingress routing device obtains a functional function program corresponding to the message of the terminal device, and the functional function program is used to instruct one or a plurality of sequential calculation processing steps/instructions, service processing steps/instructions, or network processing steps /Instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing step/instruction;
  • the ingress routing device determines one of the IP address prefix, the egress routing device address or the egress port corresponding to the first FID placed in sequence according to the forwarding information base FIB or the routing information base RIB, and according to the determined IP address prefix or One of the egress routing device address or the egress port forwards the message.
  • the function function program corresponding to the message of the terminal device is obtained, and the function function program is used to indicate n calculation processing in sequence Steps/instructions, service processing steps/instructions or network processing steps/instructions.
  • the functional function program includes multiple FIDs.
  • the ingress routing device determines the IP address prefix or egress route corresponding to the first FID according to the forwarding information base FIB or the routing information base RIB. Device address or egress port, and forward the packet according to the determined IP address prefix or egress routing device address or egress port.
  • the "name and address mapping" is postponed to the routing stage, and the controller only sends the FID list that the user cares about to the ingress routing device instead of the IPv6 address list.
  • the "name” of the "name and address mapping” is the FID
  • the "name and address mapping” is the IPv6 address.
  • the ingress routing device performs addressing or routing according to the FID to obtain the computing host/service IP address with the shortest actual delay or the strongest computing power, instead of the destination IP address assigned in advance before the routing stage. Therefore, the address inconsistency problem caused by the dynamic change of the service location of the computing host is solved.
  • the message of the terminal device does not carry the FID
  • the obtaining the functional function program corresponding to the message of the terminal device includes:
  • the ingress routing device obtains the function function program corresponding to the message of the terminal device from the controller/network management system, and puts the obtained function function program into the message.
  • the message of the terminal device carries the FID
  • the obtaining the functional function program corresponding to the message of the terminal device includes:
  • the ingress routing device obtains a function function program from a message of the terminal device, and the function function program is for the terminal device to obtain a response message sent by a domain name server DNS and put it into the message, so The response message is sent by the DNS according to the received request message carrying the universal resource identifier URI or application software name or service name.
  • the functional function program is put into the IPv6 extension header; or,
  • the functional function program is put into the destination address field of the IPv6 message header or the destination address field of the IPv6 message header and the IPv6 extension header.
  • the transmission efficiency can be improved.
  • the calculation-related data used by the functional function program is put into the payload field or the IPv6 extension header, or,
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • the ingress routing device determines one of the IP address prefix, the egress routing device address, or the egress port corresponding to the first FID placed in order according to the forwarding information base FIB or the routing information base RIB, and Forwarding the message according to one of the determined IP address prefix or egress routing device address or egress port includes:
  • the ingress routing device searches the FIB or RIB for the IP address prefix corresponding to the FID;
  • the ingress routing device searches the FIB or RIB for the egress routing device address corresponding to the FID, uses the egress routing device address as the tunnel destination address to add tunnel encapsulation to the message, and adds the tunnel encapsulation
  • the message is sent from the ingress routing device to the egress routing device;
  • the ingress routing device searches for an egress port corresponding to the FID from the FIB or RIB, and outputs the message according to the egress port.
  • the method before forwarding the message using the IP address as the IP destination address, or before forwarding the message according to the IP address prefix, the method further includes:
  • the ingress routing device performs a hash operation according to the tuple to obtain a hash value, and puts the hash value in an IPv6 extension header or an IPv6 packet header other than the destination address;
  • the ingress routing device obtains the hash value carried in the message, and searches for the output IP address prefix corresponding to the hash value in the hash table stored by the ingress routing device according to the hash value or Egress routing device address or outgoing port.
  • the FIB includes: the correspondence between the FID and the output IP address prefix and the outgoing port, or the correspondence between the FID and the egress routing device address and the outgoing port, or the correspondence between the FID and the outgoing port Relationship, or the corresponding relationship between FID and hash table related parameters, where the hash table related parameters include the starting position of the hash table and/or the total number of items;
  • the RIB includes: the correspondence between the FID and the calculated metric value, the output IP address prefix and the egress port, or the correspondence between the FID and the calculated metric value, the egress routing device address and the egress port, and the FID and the calculated metric value and the egress port.
  • the ingress routing device obtains from the computing container the FID, IP address prefix or egress routing device address of the functional function instance supported by the computing container and the computing capacity or computing state of the computing container,
  • the computing container is a server, computing site, virtual machine or container;
  • the ingress routing device generates a corresponding calculation metric value according to the calculation capacity or calculation state of the calculation container;
  • the ingress routing device generates the RIB according to the calculated metric value, the FID of the functional function instance supported by the calculation container, the IP address prefix, or the egress routing device address;
  • the ingress routing device generates the FIB according to the RIB.
  • an embodiment of the present application provides a segmented routing method, including:
  • the egress routing device receives a message from an ingress routing device or an intermediate routing device, the message carrying a function function program, and the function function program is used to instruct one or multiple sequential calculation processing steps/instructions, service processing steps/ Instructions or network processing steps/instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing step/ instruction;
  • the egress routing device determines the first FID placed in order and/or the egress port corresponding to the IP address prefix corresponding to the FID according to the forwarding information base FIB or the routing information base RIB;
  • the egress routing device outputs the message from the egress port to a computing container for the computing container to perform functional function processing corresponding to the FID, and the computing container is a server, a computing site, a virtual machine, or a container .
  • a message from an ingress routing device or an intermediate routing device is received through an egress routing device, and the message carries a function function program, which is used to indicate m calculation processing steps in sequence/ Instructions, service processing steps/instructions or network processing steps/instructions, functional function programs include multiple FIDs, and the export routing device determines the corresponding IP address prefix corresponding to the first FID and/or FID according to the forwarding information base FIB or the routing information base RIB
  • the egress routing device outputs the message from the egress port to the computing container, and the computing container is used to process the function corresponding to the FID.
  • the computing container is a server, computing site, virtual machine or container.
  • the "name-address mapping” is postponed to the routing stage.
  • the "name” of the "name-address mapping” is the FID
  • the "address” of the "name-address mapping” is the IPv6 address.
  • the egress routing device performs addressing or routing according to the FID to obtain
  • the actual computing host/service IP address with the shortest delay or the strongest computing capability is not the destination IP address assigned in advance during the routing phase. Therefore, the problem of address inconsistency caused by the dynamic change of the computing host's service location is solved.
  • the method further includes:
  • the exit routing device shifts the multiple FIDs included in the functional function program, deletes the processed FID, and adds 0 after the last shift; or,
  • the exit routing device shifts the multiple FIDs included in the function function program, deletes the processed FID, adds 0 after the last bit shift, and deletes the function after all the function functions corresponding to the FID are processed
  • the IPv6 extension header where the function program is located.
  • the method further includes:
  • the egress routing device obtains the hash value carried in the message, and searches for the IP address prefix and/or the egress port corresponding to the hash value in the hash table stored by the egress routing device according to the hash value .
  • the FIB includes: the corresponding relationship between the FID and the input IP address prefix and the outgoing port, or the corresponding relationship between the FID and the outgoing port, or the corresponding relationship between the FID and the related parameters of the hash table,
  • the related parameters of the hash table include the starting position of the hash table and/or the total number of items;
  • the RIB includes: the corresponding relationship between the FID and the calculated metric value, the input IP address prefix and the egress port, or the corresponding relationship between the FID and the calculated metric value and the egress port, or the FID and the calculated metric value and the related parameters of the hash table
  • the relevant parameters of the hash table include the starting position of the hash table and/or the total number of items.
  • the functional function program is put into the IPv6 extension header; or,
  • the functional function program is put into the destination address field of the IPv6 message header or the destination address field of the IPv6 message header and the IPv6 extension header.
  • the transmission efficiency can be improved.
  • the calculation-related data used by the functional function program is put into the payload field or the IPv6 extension header, or,
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • the egress routing device obtains from the computing container the FID, IP address prefix or egress routing device address of the functional function instance supported by the computing container and the computing capacity or computing capacity of the computing container. status;
  • the egress routing device generates a corresponding calculation metric value according to the calculation capacity or calculation state of the calculation container;
  • the egress routing device generates the RIB according to the calculated metric value, the FID of the functional function instance supported by the calculation container, the IP address prefix, or the egress routing device address;
  • the egress routing device generates the FIB according to the RIB.
  • an embodiment of the present application provides a segment routing device, including:
  • Receiving module for receiving messages from terminal equipment
  • the obtaining module is used to obtain the function function program corresponding to the message of the terminal device, and the function function program is used to instruct one or multiple sequential calculation processing steps/instructions, service processing steps/instructions or network processing steps /Instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing step/instruction;
  • the forwarding processing module is used to determine one of the IP address prefix, the egress routing device address or the egress port corresponding to the first FID placed in order according to the forwarding information base FIB or the routing information base RIB, and according to the determined IP address prefix Or one of the egress routing device address or the egress port forwards the message.
  • the message of the terminal device does not carry FID
  • the acquisition module is used to:
  • the message of the terminal device carries the FID
  • the acquisition module is used to:
  • the ingress routing device obtains a function function program from a message of the terminal device, and the function function program is for the terminal device to obtain a response message sent by a domain name server DNS and put it into the message, so The response message is sent by the DNS according to the received request message carrying the universal resource identifier URI or application software name or service name.
  • the functional function program is put into the IPv6 extension header; or,
  • the functional function program is put into the destination address field of the IPv6 message header or the destination address field of the IPv6 message header and the IPv6 extension header.
  • the calculation-related data used by the functional function program is put into the payload field or the IPv6 extension header, or,
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • the forwarding processing module is used to:
  • the FIB includes: the correspondence between the FID and the output IP address prefix and the outgoing port, or the correspondence between the FID and the egress routing device address and the outgoing port, or the correspondence between the FID and the outgoing port relationship;
  • the RIB includes: the correspondence between the FID and the calculated metric value, the output IP address prefix and the egress port, or the correspondence between the FID and the calculated metric value, the egress routing device address and the egress port, and the FID and the calculated metric value and the egress port. The corresponding relationship.
  • an embodiment of the present application provides a segment routing device, including:
  • the receiving module is used to receive a message from an ingress routing device or an intermediate routing device, the message carrying a function function program, and the function function program is used to instruct one or multiple sequential calculation processing steps/instructions, service processing Steps/instructions or network processing steps/instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing Steps/instructions;
  • the determining module is configured to determine the first FID placed in order and/or the outgoing port corresponding to the IP address prefix corresponding to the FID according to the forwarding information base FIB or the routing information base RIB;
  • the output module is used to output the message from the output port to a computing container for the computing container to process the functional function corresponding to the FID.
  • the computing container is a server, a computing site, a virtual machine, or a container .
  • the device further includes:
  • the processing module is used to shift multiple FIDs included in the functional function program, delete the processed FIDs, and add 0 after the last shift; or,
  • the device further includes:
  • the obtaining module is configured to obtain the hash value carried in the message, and search for the IP address prefix and/or the egress port corresponding to the hash value in the hash table stored by the egress routing device according to the hash value .
  • the FIB includes: the corresponding relationship between the FID and the input IP address prefix and the outgoing port, or the corresponding relationship between the FID and the outgoing port, or the corresponding relationship between the FID and the related parameters of the hash table,
  • the related parameters of the hash table include the starting position of the hash table and/or the total number of items;
  • the RIB includes: the corresponding relationship between the FID and the calculated metric value, the input IP address prefix and the egress port, or the corresponding relationship between the FID and the calculated metric value and the egress port, or the FID and the calculated metric value and the related parameters of the hash table
  • the relevant parameters of the hash table include the starting position of the hash table and/or the total number of items.
  • the functional function program is put into the IPv6 extension header; or,
  • the functional function program is put into the destination address field of the IPv6 message header or the destination address field of the IPv6 message header and the IPv6 extension header.
  • the calculation-related data used by the functional function program is put into the payload field or the IPv6 extension header, or,
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • the device further includes:
  • a generating module configured to obtain the FID, IP address prefix or egress routing device address of the functional function instance supported by the computing container and the computing capacity or computing state of the computing container from the virtual router running in the computing container;
  • the FIB is generated according to the RIB.
  • an embodiment of the present application provides a device, including: a memory and a processor;
  • a memory for storing executable instructions of the processor
  • the processor is configured to execute the segment routing in any possible design of the first aspect and the first aspect or any possible design of the second aspect and the second aspect by executing the executable instruction method.
  • the above-mentioned device may be a routing device or a chip.
  • the present application provides a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute the methods described in the foregoing aspects.
  • the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the methods described in the above aspects.
  • Figure 1 is a business diagram of applying SRv6 to the field of multi-cloud interconnection
  • FIG. 2 is a schematic diagram of the in-band state of the client/server session state and client context transmitted in the network by simplifying and uninstalling the client/server session state through the function function program provided by this application;
  • Fig. 3 is a schematic structural diagram of an SRv6 routing system provided by the present application.
  • Figure 4 is a schematic structural diagram of an ingress/egress router provided by this application.
  • FIG. 5 is a flowchart of an embodiment of a segmented routing method provided by this application.
  • FIG. 6 is a schematic diagram of an IPv6 packet header provided by this application.
  • FIG. 7 is a schematic diagram of another IPv6 packet header provided by this application.
  • FIG. 8a is a schematic diagram of the format of an IPv6 packet header provided by this application.
  • Figure 8b is a schematic diagram of the format of an IPv6 packet header provided by this application.
  • Figure 8c is a schematic diagram of the format of an IPv6 packet header provided by this application.
  • Fig. 9a is a schematic diagram of an operation on the function function list field
  • Figure 9b is a schematic diagram of an operation on the function function list field
  • FIG. 10 is a flowchart of an embodiment of a segmented routing method provided by this application.
  • FIG. 11 is a schematic diagram of a routing table design of an SRv6 system provided by this application.
  • Figure 12 is a schematic diagram of shifting and deleting FID1 in the function function list in SRH;
  • FIG. 13 is a flowchart of the first part of an embodiment of a segmented routing method provided by this application.
  • Figure 14a is a schematic diagram of an IPv6 packet header
  • Figure 14b is a schematic diagram of an operation of a function list of an IP header
  • Fig. 14c is a schematic diagram of an operation of a function list of an IP header
  • Figure 14d is a schematic diagram of an operation of a function list of an IP header
  • 16 is a flowchart of the third part of an embodiment of a segmented routing method provided by this application.
  • FIG. 17 is a flowchart of the first part of an embodiment of another segmented routing method provided by this application.
  • FIG. 19 is a flowchart of the third part of an embodiment of another segmented routing method provided by this application.
  • FIG. 21 is a flowchart of the second part of another segment routing method embodiment provided by this application.
  • FIG. 22 is a flowchart of the third part of another segment routing method embodiment provided by this application.
  • FIG. 23 is a schematic structural diagram of an embodiment of a segment routing device provided by this application.
  • FIG. 24 is a schematic structural diagram of an embodiment of a segment routing device provided by this application.
  • FIG. 25 is a schematic structural diagram of an embodiment of a segment routing device provided by this application.
  • FIG. 26 is a schematic structural diagram of an embodiment of a segment routing device provided by this application.
  • FIG. 27 is a schematic structural diagram of an embodiment of a segment routing device provided by this application.
  • FIG. 28 is a schematic structural diagram of a device provided by this application.
  • words such as “exemplary” or “for example” are used to represent examples, illustrations or illustrations, and any embodiment or solution described as “exemplary” or “for example” in the embodiments of this application It should not be construed as being more preferable or advantageous than other embodiments or solutions. To be precise, words such as “exemplary” or “for example” are used to present related concepts in a specific manner.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an "or” relationship.
  • fk(x,...,y) represents a functional function fk, whose input parameters are x,...,y, and the output value is fk(x,...,y).
  • Calculation related data is the input parameters of f1, such as images, videos, audios, files, values, etc. Therefore, in this application, the functional function program is used as a special network input request message to replace the existing series of independent calculation or service or application request request messages.
  • Figure 2 is a schematic diagram of the simplification and uninstallation of the client/server session state and the client context as the in-band state transmitted in the network through the functional function program provided by this application.
  • the router of the functional function program is below
  • the first layer represented by the diamond quadrilateral in Figure 2
  • base layer can be called the basic layer (Basic layer).
  • On the upper layer represented by the diamond quadrilateral in Figure 2) software-based computing programs, functional programs, business software, or microcomputers are deployed.
  • f represents the deployment of software-based computing programs, functional programs, business software or microservices, that is, f1...fm...fn in Figure 2.
  • Hardware accelerators can also be used for f to improve processing performance.
  • the terminal device of the embodiment of the present application may be a wireless terminal, a wireless terminal may be a device that provides voice and/or other service data connectivity to a user, a handheld device with a wireless connection function, or other connected to a wireless modem Processing equipment.
  • a wireless terminal can communicate with one or more core networks via a radio access network (RAN).
  • the wireless terminal can be a mobile terminal, such as a mobile phone (or called a "cellular" phone) and a computer with a mobile terminal, for example, They are portable, pocket-sized, handheld, computer built-in or vehicle-mounted mobile devices that exchange language and/or data with the wireless access network.
  • Wireless terminals can also be called systems, subscriber units (Subscriber Unit), subscriber stations (Subscriber Station), mobile stations (Mobile Station), mobile stations (Mobile), remote stations (Remote Station), remote terminals (Remote Terminal), The access terminal (Access Terminal), user terminal (User Terminal), user agent (User Agent), and user equipment (User Device or User Equipment) are not limited here.
  • the terminal device in the embodiment of the present application may also be a client.
  • the "name-address mapping" is determined in advance before the routing stage.
  • the calculation delay is usually much longer than the network Time delay, the dynamic change of the service location of the computing host will cause the actual optimal computing host/service IP in the routing phase to be inconsistent with the destination IP address allocated in advance in the routing phase.
  • this application provides a segmented routing method and The device adopts a delayed binding mechanism to postpone the "name-address mapping" to the routing stage.
  • the controller only issues the functional function identifier list that the user cares about to the ingress router (that is, the first SRv6 router) instead of the IPv6 address list;
  • the "name" of the "name-address mapping” is the functional function identifier (FID),
  • the "address” of the "name-address mapping” is the IPv6 address.
  • the router obtains the computing host/service IP address with the shortest actual delay or the strongest computing power through the routing mechanism, instead of the destination IP address assigned in advance during the routing phase. Therefore, the address inconsistency problem caused by the dynamic change of the service location of the computing host is solved.
  • the application-specific integrated circuit (ASIC)/network process unit (NPU) of the SRv6 router stores the data message in the external memory after receiving the data message ASIC/NPU reads the fixed-length header content (usually 64-128 bytes), and then searches the forwarding table in the local/external memory of the chip and forwards it. Since the SRv6 message header is too long to complete the reading in one processing cycle, two processing cycles are required for reading, which will result in a half-throughput reduction and low transmission efficiency. To solve this problem, a lightweight SRv6 packaging method is adopted in this application, which can improve transmission efficiency.
  • ASIC application-specific integrated circuit
  • NPU network process unit
  • FIG 3 is a schematic structural diagram of an SRv6 routing system provided by this application.
  • the main network elements involved in this application include ingress routers and egress routers. , There are also intermediate routers.
  • Router 1 or router 2 in Figure 3 can be an intermediate router or an egress router.
  • Each router in the system maintains a routing information base (RIB) and a forwarding information base ( forwarding information base, FIB).
  • RIB routing information base
  • FIB forwarding information base
  • FIB For ingress routers, FIB includes: FID, the corresponding relationship between the output IP address prefix and the egress port, or the corresponding relationship between FID, egress router address and egress port; RIB includes: FID and calculated metric value , The corresponding relationship between the output IP address prefix and the egress port, or the corresponding relationship between the FID and the calculated metric value, the egress router address and the egress port.
  • FIB includes: the corresponding relationship between FID and the input IP address prefix and outgoing port, or the corresponding relationship between FID and outgoing port, or the corresponding relationship between FID and hash table related parameters;
  • RIB includes: FID and calculation The corresponding relationship between the metric value, the input IP address prefix and the outgoing port, or the corresponding relationship between the FID and the calculated metric value and the outgoing port, or the corresponding relationship between the FID and the related parameters of the hash table.
  • the ingress router and egress router also store hash tables.
  • the ingress router hash table includes IP address prefixes or egress router addresses or egress ports, and the egress router hash table includes IP address prefixes and/or egress ports.
  • FIB and RIB also include hash table related parameters (such as the starting position of the hash table or the total number of items).
  • routing items can be used for route aggregation to reduce the number of routing items on a large scale, so that the intermediate routers can be unaware of FID, and can also use the data plane hardware of traditional routers and only upgrade the control plane software.
  • the RIB of the intermediate router includes: IP address prefix and egress port, etc.; or, IP address prefix and egress router address, etc.;
  • FIB includes: IP address prefix and egress port, etc.; or, FIB includes IP address prefix and corresponding egress router Address etc.
  • the SRv6 path is divided into two segments as an example.
  • the destination address of the first segment is the egress router such as router 1
  • the destination address of the second segment is the egress router such as router 2, the client or user equipment.
  • the ingress router After the message reaches the ingress router, the ingress router performs addressing or routing according to the FID and FIB or RIB carried in the message.
  • the egress router After the message reaches the egress router, the egress router performs addressing or routing according to the FID and FIB or RIB carried in the message.
  • the ingress and egress in this application are for the client/user equipment, the first device close to the client is called the ingress routing device, and the last device is called the egress routing device. In the following of this application, the ingress router is taken as an example for the ingress routing device, and the egress router is taken as an example for the egress routing device for description.
  • FIG 4 is a schematic structural diagram of an ingress/egress router provided by this application.
  • the ingress/egress router includes a control plane processing module 11 and a data plane processing module 12, and the control plane processing module 11 includes a routing protocol processing unit 110.
  • the data plane processing module 12 includes a forwarding processing unit 121 and multiple interface processing units. It should be noted that the control plane processing module 11 of the egress router does not include the functional function program obtaining unit 114.
  • the routing protocol processing unit 110 is used to obtain the FID, IP address prefix or egress router address of the functional function instance supported by the computing container and the computing capacity or computing state of the computing container from the virtual router running in the computing container, and to set it in the router Announce it from time to time.
  • the RIB generating and maintaining unit 111 is configured to generate RIBs according to the calculated metric value, the FID of the functional function instance supported by the calculation container, the IP address prefix, or the address of the egress router.
  • the route selection or calculation unit 112 is configured to find the IP address prefix or the egress router address or the egress port corresponding to the FID according to the FIB, or select or calculate the route according to the calculated metric value of the RIB to obtain the IP address prefix or the egress router address corresponding to the FID Or out port. That is to achieve load balancing between sites.
  • the FIB generation and maintenance unit 113 is configured to generate a corresponding FIB according to the processing result of the routing or calculation unit, that is, the RIB.
  • the function function program obtaining unit 114 is configured to obtain the function function program corresponding to the message of the client from the controller/network management system, or obtain the function function program from the message of the client.
  • the forwarding processing unit 121 is configured to directly perform IP forwarding when the message carries a traditional IP destination address.
  • the functional function program obtaining unit 114 obtains the functional function program corresponding to the message
  • the IPv6 extension header is added, and the obtained function function program is put into the IPv6 extension header, the destination address field of the IPv6 message header, or the IPv6 message header
  • the forwarding information base FIB or routing information base RIB determine the IP address prefix or egress routing device address or egress port corresponding to the first FID, and according to the determined IP address prefix or egress routing device The address or outgoing port forwards the message.
  • the forwarding processing unit 121 is used to determine the egress port corresponding to the IP address prefix corresponding to the first FID and/or FID according to the FIB or RIB, and output the packet from the egress port to the computing container for the computing container to make FID
  • the computing container is a server, computing site, virtual machine or container.
  • the FIB or RIB is checked according to the IP address prefix corresponding to the first FID and/or FID to obtain the egress port or virtual egress port, and the packet is forwarded from the egress port or virtual egress port; the forwarding processing unit 121 is also configured to Shift multiple FIDs included in the function function program, delete the processed FID, and add 0 after the last bit shift; or shift multiple FIDs included in the function function program to delete the processed FID, and the last bit Add 0 after shifting, and delete the IPv6 extension header where the function function program is located after completing the processing of all the function functions corresponding to the FID.
  • the interface processing unit 122 is used for interface input or output processing.
  • FIG. 5 is a flowchart of an embodiment of a segmented routing method provided by this application.
  • the execution subject of this embodiment may be an ingress routing device, such as an ingress router.
  • the method of this embodiment may include:
  • the ingress routing device receives the message sent by the terminal device, and obtains the function function program corresponding to the message of the terminal device.
  • the function function program is used to indicate one or multiple sequential calculation processing steps/instructions and service processing steps/instructions. Or network processing steps/instructions, the functional function program includes one or multiple FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing step/instruction.
  • multiple FIDs are placed in sequence, such as FID1, FID2, ..., FIDn, or FIDn, FIDn-1, ..., FID2, FID1.
  • the message of the terminal device does not carry the FID
  • the ingress routing device obtains the functional function program corresponding to the message of the terminal device.
  • the ingress routing device obtains the function program from the controller/network management system Obtain the functional function program corresponding to the message of the terminal device, and put the obtained functional function program into the message, and the message is a received message sent by the terminal device.
  • it may be a function function list field put in the message.
  • the message of the terminal device carries the FID
  • the ingress routing device obtains the function program corresponding to the message of the terminal device.
  • the ingress routing device obtains the function from the message of the terminal device.
  • Function program the function program is the terminal device obtains from the response message sent by the domain name server (Domain Name Server, DNS) and puts it into the message.
  • DNS Domain Name Server
  • the response message is that the DNS carries the universal resource identifier ( Uniform Resource Identifier (URI) or application software name or service name request message is sent.
  • URI Uniform Resource Identifier
  • the terminal device obtains the function function program.
  • the terminal device sends a request message carrying the URI or application software name or service name to the DNS, and the response message from the DNS Obtain the corresponding function function program, and put the function function program into the IPv6 message.
  • it may be the function function list field in the IPv6 message, which is used to carry the function function program to the network or computing container, and then enter the routing device Obtain the function function program from the message of the terminal device.
  • the ingress router may add an IPv6 extension header and copy the function function program from the function function list field placed in the IP message header to the function function list field of the IPv6 extension header.
  • Figure 6 is a schematic diagram of an IPv6 packet header provided by this application.
  • the function function program can be put into the IPv6 extension header.
  • the calculation related data used by the function function program is Put it in the payload field or IPv6 extension header.
  • a lightweight SRv6 packaging method is adopted, which can improve transmission efficiency.
  • FIG. 7 is a schematic diagram of another IPv6 packet header provided by this application. As shown in FIG. 7, it can be that the function function program is put into the destination address field of the IPv6 packet header or The destination address field and the IPv6 extension header of the IPv6 message header, optionally, calculation-related data used by the function function program are put into the payload field or the IPv6 extension header.
  • Figure 8a is a schematic diagram of the format of an IPv6 packet header provided by this application. As shown in Figure 8a, it changes the Destination Address field of the original IPv6 packet header to a function function list field for carrying Function program, indicating n calculation processing steps/instructions, service processing steps/instructions, or network processing steps/instructions in sequence.
  • Each function function has a 4bit, 8bit, or 16bit FID, which is used to represent a calculation, service or network processing step/instruction.
  • a special value such as a value of all 1s per bit
  • the start character is followed by the first FID, that is, FID1...FID7 is the real calculation, service or network processing step/instruction, if FID Set to a special value (for example, the value is all 0s per bit) to indicate the end of the function function program.
  • Figure 8b is a schematic diagram of the format of an IPv6 packet header provided by this application.
  • the Next header of the IPv6 packet header indicates the protocol type of the IPv6 extension header
  • HdrExtLen indicates the length of the IPv6 extension header and the list of function functions.
  • the domain is used to carry a functional function program, indicating n calculation, service or network processing steps/instructions in sequence.
  • Each function function has a 4bit, 8bit, or 16bit FID, which is used to represent a calculation, service or network processing step/instruction.
  • Routing Type field You can use the Routing Type field to set a special value (such as a value of 7) to indicate that the message header supports the function function program; the function function program usually does not need to set the start character here, because it is not necessary to compare the function function program with other traditional functions as shown in Figure 8a.
  • IP addresses are distinguished; if FID is set to a special value (for example, the value is all 0s per bit) to indicate the end of the function program.
  • Flag can optionally be used to store an SR header (SR header, SRH) pointer (FID pointer, used to indicate which FID is valid), or other status.
  • Fig. 8c is a schematic diagram of the format of an IPv6 packet header provided by this application. As shown in Fig. 8c, the difference from Fig. 8b is that before the function function list field, Fig. 8c contains more information, such as Segments left to represent the FID pointer , Used to indicate which FID is valid, Last Entry means the last FID, if Hdr Ext Len exceeds Last Entry, it means Type Length Value object is valid.
  • the placement of the functional function program can be implemented in the following three ways:
  • the function function program is placed in the IPv6 message header function function list field shown in Figure 8a, it is sufficient to support it, and the number of segments is limited to ⁇ 8. At this time, the extension header shown in Figure 8b is not used. If the function function program is placed The function function list field of the IPv6 message header shown in Fig. 8a is not sufficiently supported, and the number of segments is greater than 8. At this time, the function function list field of the extended header shown in Fig. 8b is used to place the remaining function function programs.
  • Figure 9a is a schematic diagram of an operation on the function function list field.
  • the ingress router saves the first FID in the IPv6 header except for the destination address.
  • Other domains such as flow label domain
  • the entrance router Save the second FID in other fields (such as the flow label field) of the IP header except the destination address.
  • Figure 9b is a schematic diagram of an operation on the function function list field, as shown in Figure 9b, and then the second Replace each FID with the corresponding IP address prefix, and then do the second segment routing and the function function processing corresponding to the second FID... Enter the Nth segment, and the ingress router saves the Nth FID in the IPv6 header.
  • Other domains outside the destination address such as the flow label domain, then replace the Nth FID with the corresponding IP address prefix, and then perform the Nth segment routing and the function function processing corresponding to the Nth FID.
  • the function function program is only placed in the function function list field of the extended header in Figure 8b.
  • the function function list field can exceed FID7 (not fully shown in the figure), and the number of segments>8.
  • the destination address field of the IPv6 message header is still Indicates the destination address.
  • the terminal device (such as client/user equipment) places the function function program in the function function list field of the IPv6 packet header shown in Figure 8a, and is used to carry the function function program to the network or computing site. After entering the network, the entrance The router adds the extension header shown in Fig. 8b and copies the function function program to the function function list field.
  • a new addressing method of the SRv6 system is provided. Assuming that a service is represented by a URI or the name of an application software, then: for the client/application (Application), the visible is the URI or application software The name of the function or the name of the function function, which has nothing to do with the location of the function function instance or calculation container.
  • IP subnet/IP address prefix IP address prefix
  • the FID can be expressed in the form of an IP suffix (IP suffix), and can be an Anycast ID (Anycast ID), and one FID can be mapped to a set of functionally equivalent instances.
  • IP suffix IP suffix
  • Anycast ID Anycast ID
  • the IP subnet/IP address prefix is related to the location of the computing container.
  • a virtual router will be introduced on the computing container to obtain the computing status of the computing site.
  • the IP subnet between the leaf switch and the virtual router needs to be configured. This subnet is the computing container where the FID is located. IP subnet/IP address prefix.
  • the number of bits in the IP subnet/prefix should be consistent with the number of FID bits. For example, if the number of FID bits is set to 16bit, the number of bits in the IP subnet/prefix should also be set to 16bit.
  • the router (or virtual router) closest to the functional function instance can see the IP subnet/IP address prefix and a hash value of the FID and the computing container where the FID is located.
  • the ingress routing device determines one of the IP address prefix, the egress routing device address, or the egress port corresponding to the first FID placed in order according to the FIB or RIB, and according to the determined IP address prefix or the egress routing device address or outgoing port.
  • One of the ports forwards the message.
  • S102 may be:
  • the ingress routing device searches the FIB or RIB for the IP address prefix corresponding to the first FID, adds the IP address prefix to the first FID to obtain an IP address, and uses the IP address as the IP destination address to forward the packet, or, Replace the first FID with the IP address prefix corresponding to the first FID, and forward the message according to the IP address prefix, or save the first FID in the IP message header in other fields except the destination address, Replace the first FID with the IP address prefix corresponding to the first FID, and forward the message according to the IP address prefix.
  • the first FID is saved here to avoid loss of the first FID.
  • S102 may be:
  • the ingress routing device searches the FIB or RIB for the egress routing device address corresponding to the FID, uses the egress routing device address as the tunnel destination address to add tunnel encapsulation to the message, and sends the packet after the tunnel encapsulation is added to the egress routing device by the ingress routing device equipment.
  • S102 may be:
  • the ingress routing device searches the FIB or RIB for the outgoing port corresponding to the FID, and outputs the message according to the outgoing port.
  • the ingress routing device determines the IP address prefix or egress routing device address or egress port corresponding to the first FID according to FIB or RIB.
  • the first one here refers to the first valid FID, such as a function function list.
  • the domain stores FID0, FID1,...FID7, FID0 is the start identifier, and the first valid FID is FID1, then the IP address prefix or egress routing device address or outgoing port corresponding to FID1 is determined.
  • the ingress routing device first searches the FIB for the IP address prefix or the egress routing device address or the egress port corresponding to the first FID. It can be checked according to the longest prefix matching rule. If the FIB does not have the first FID Project, then check RIB, select or calculate a routing item according to the size of the calculated metric value, and get the IP address prefix or egress routing device address or outgoing port corresponding to the first FID.
  • the method of this embodiment may further include:
  • the ingress routing device performs a hash operation according to the tuple to obtain a hash value, and puts the hash value into an IPv6 extension header or an IPv6 packet header other than the destination address (such as a flow label field). For example, a hash value is obtained by performing a hash operation based on a five-tuple, and the hash value is used to distinguish multiple functional function instances of the same FID on the same computing container (such as a server). Alternatively, the ingress routing device obtains the hash value carried in the message, and searches for the output IP address prefix corresponding to the hash value in the hash table stored by the ingress routing device according to the hash value or Egress routing device address or outgoing port.
  • mapping can be completed by DNS system upgrade support or through hash mapping.
  • FIB includes: the corresponding relationship between FID and the output IP address prefix and outgoing port, or the corresponding relationship between FID and the egress routing device address and outgoing port, or the corresponding relationship between FID and outgoing port ,
  • the correspondence between FID and hash table related parameters, the hash table related parameters include the starting position of the hash table and/or the total number of items.
  • RIB includes: the correspondence between FID and the calculated metric value, the output IP address prefix and the output port, or the correspondence between the FID and the calculated metric value, the egress routing device address and the egress port, and the correspondence between the FID and the calculated metric value and the egress port.
  • the relationship, or the corresponding relationship between the FID and the related parameters of the hash table, the related parameters of the hash table include the starting position of the hash table and/or the total number of items.
  • the method of this embodiment may further include:
  • the ingress routing device obtains from the computing container the FID, IP address prefix or egress routing device address of the functional function instance supported by the computing container, and the computing capacity or computing status of the computing container, where the computing container is a server, computing Site, virtual machine or container.
  • the ingress routing device generates a corresponding calculation metric value according to the calculation capacity or calculation state of the calculation container.
  • the ingress routing device generates an RIB according to the calculation metric value, the FID of the functional function instance supported by the calculation container, the IP address prefix, or the egress routing device address.
  • the ingress routing device generates a FIB according to the RIB.
  • the function function program corresponding to the message of the terminal device is obtained, and the function function program is used to indicate n calculation processing steps in sequence /Instructions, service processing steps/instructions or network processing steps/instructions, the functional function program includes multiple FIDs, and the ingress routing device determines the IP address prefix or egress routing device corresponding to the first FID according to the forwarding information database FIB or routing information database RIB Address or egress port, and forward the message according to the determined IP address prefix or egress routing device address or egress port.
  • the "name and address mapping" is postponed to the routing stage, and the controller only sends the FID list that the user cares about to the ingress routing device instead of the IPv6 address list.
  • the "name” of the "name and address mapping” is the FID
  • the "name and address mapping” is the IPv6 address.
  • the ingress routing device performs addressing or routing according to the FID to obtain the computing host/service IP address with the shortest actual delay or the strongest computing power, instead of the destination IP address assigned in advance before the routing stage. Therefore, the address inconsistency problem caused by the dynamic change of the service location of the computing host is solved.
  • FIG. 10 is a flowchart of an embodiment of a segmented routing method provided by this application.
  • the execution subject of this embodiment may be an egress routing device, such as an egress router.
  • the method of this embodiment may include:
  • the egress routing device receives a message from the ingress routing device or the intermediate routing device, the message carrying a function function program, and the function function program is used to indicate one or multiple sequential calculation processing steps/instructions and service processing steps/ Instructions or network processing steps/instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing step/instruction.
  • FIG. 6 is a schematic diagram of an IPv6 message header provided by this application. As shown in FIG. 6, it may be a function function.
  • the program is put into the IPv6 extension header.
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • FIG. 7 is a schematic diagram of another IPv6 packet header provided by this application. As shown in FIG. 7, it can be that the function function program is put into the destination address field of the IPv6 packet header or The destination address field and the IPv6 extension header of the IPv6 message header, optionally, calculation-related data used by the function function program are put into the payload field or the IPv6 extension header.
  • the egress routing device determines the first FID placed in order and/or the egress port corresponding to the IP address prefix corresponding to the FID according to the FIB or RIB.
  • the egress routing device first searches the FIB for the outgoing port corresponding to the IP address prefix corresponding to the first FID and/or FID, which can be checked according to the longest prefix matching rule. If the FIB does not have the first FID Item, check RIB, select or calculate a routing item according to the size of the calculated metric value, and obtain the outgoing port corresponding to the IP address prefix corresponding to the first FID and/or FID.
  • the egress routing device outputs the message from the outgoing port to the computing container, which is used for the computing container to perform function function processing corresponding to the FID.
  • the computing container is a server, a computing site, a virtual machine or a container.
  • the exit routing device shifts multiple FIDs included in the functional function program, deletes the processed FID, and adds 0 after the last bit shift; or,
  • the exit routing device shifts multiple FIDs included in the function function program, deletes the processed FID, and adds 0 after the last bit shift. After all the function functions corresponding to the FID are processed, the IPv6 extension where the function function program is located is deleted head.
  • the IPv6 extension header where the delete function program is located may be executed by the egress routing device, or may be executed by the computing container.
  • the egress routing device determines the IP corresponding to the first FID and/or FID according to the forwarding information base FIB or the routing information base RIB.
  • the method of this embodiment may further include:
  • the egress routing device de-tunnels the packet.
  • the method in this embodiment may further include:
  • the egress routing device obtains the hash value carried in the message, and searches for the IP address prefix and/or the outgoing port corresponding to the hash value in the hash table stored by the egress routing device according to the hash value.
  • FIB includes: the correspondence between FID and the input IP address prefix and the outgoing port, or the correspondence between FID and the outgoing port, or the correspondence between FID and hash table related parameters, the hash table Related parameters include the starting position of the hash table and/or the total number of items;
  • the RIB includes: the corresponding relationship between the FID and the calculated metric value, the input IP address prefix and the egress port, or the corresponding relationship between the FID and the calculated metric value and the egress port, or the FID and the calculated metric value and the related parameters of the hash table
  • the relevant parameters of the hash table include the starting position of the hash table and/or the total number of items.
  • the method in this embodiment may further include:
  • the egress routing device obtains the FID, IP address prefix or egress routing device address of the functional function instance supported by the computing container and the computing capacity or computing status of the computing container from the computing container.
  • the egress routing device generates a corresponding calculation metric value according to the calculation capacity or calculation state of the calculation container.
  • the egress routing device generates an RIB according to the calculated metric value, the FID of the functional function instance supported by the calculation container, the IP address prefix, or the egress routing device address.
  • the egress routing device generates a FIB according to the RIB.
  • the segmented routing method provided in this embodiment receives a message from an ingress routing device or an intermediate routing device through an egress routing device, and the message carries a function function program, and the function function program is used to indicate m calculation processing steps/instructions in sequence , Service processing steps/instructions or network processing steps/instructions, the functional function program includes multiple FIDs, the export routing device determines the IP address prefix corresponding to the first FID and/or FID according to the forwarding information database FIB or routing information database RIB Outgoing port, the egress routing device outputs the message from the outgoing port to the computing container, which is used for the computing container to process the function corresponding to the FID.
  • the computing container is a server, computing site, virtual machine or container. Therefore, the "name-address mapping" is postponed to the routing stage.
  • the "name” of the "name-address mapping” is the FID
  • the "address” of the "name-address mapping” is the IPv6 address.
  • the egress routing device performs addressing or routing according to the FID to obtain
  • the actual computing host/service IP address with the shortest delay or the strongest computing capability is not the destination IP address assigned in advance during the routing phase. Therefore, the problem of address inconsistency caused by the dynamic change of the computing host's service location is solved.
  • the ingress routing device is the ingress router and the egress routing device is the egress router as an example. .
  • FIG 11 is a schematic diagram of the routing table design of an SRv6 system provided by this application.
  • each router in the system whether it is a hardware router or a software router (such as a virtual router), maintains an RIB and FIB.
  • the virtual router in Figure 11 is usually an egress router.
  • the SRv6 path is divided into two segments.
  • the destination address of the first segment is Router 1 (router 1 is the egress router), and the destination address of the second segment is the function function y.
  • the virtual router is the egress router).
  • the entrance and exit are for the terminal device.
  • the first router close to the terminal device is called the entrance router, and the last router is called the exit router.
  • the content included in the corresponding RIB and FIB can refer to the description in the foregoing embodiment, and will not be repeated here.
  • Embodiment 1 of a segmented routing method provided for this application.
  • This embodiment writes the processing process for the first segment.
  • the remaining segment processing processes are similar.
  • the method of this embodiment may include :
  • the computing container sends the FID, IP address prefix or export routing device address of the supported function function instance and the computing capacity or computing state of the computing container to the virtual router, and is finally obtained by each router in the network.
  • the virtual router sends the computing container the FID, IP address prefix or export routing device address of the supported function function instance and the computing capacity or computing status of the computing container to other routers connected to the virtual router, the virtual router (In the case of software) It interacts with other routers through routing protocols.
  • the virtual router is hardware, it is directly connected to other routers.
  • Each router in the network generates a corresponding calculation metric value according to the calculation capacity or calculation state of the calculation container, and according to the calculation metric value, the FID, IP address prefix (referred to as sub in Figure 11) or exit of the function function instance supported by the calculation container RIB is generated from the address of the routing device, and FIB is generated according to the RIB.
  • the ingress routing device After receiving the message of the terminal device, the ingress routing device obtains the function function program corresponding to the message of the terminal device.
  • the function function program is used to instruct n calculation processing steps/instructions, service processing steps/instructions or Network processing steps/instructions.
  • the function function program includes multiple function function identification FIDs, and each FID is used to indicate a calculation processing step/instruction, service processing step/instruction, or network processing step/instruction.
  • the ingress router needs to obtain the function function program from the controller or the network management system, and put the function function program into the function function list domain. This requires the controller or network management system to be able to cooperate.
  • the message of the terminal device carries the FID
  • the client directly obtains the function function program, and can send a request message carrying the URI or application software name or service name to the DNS, and obtain the corresponding function function program from the response message of the DNS , Place the function function program in the function function list field of the IPv6 packet header shown in Figure 8a to carry the function function program to the network or computing site, and then add the extension header shown in Figure 8b to the entry router field, and add The function function program is copied from the function function list field of the IPv6 packet header shown in FIG. 8a to the function function list field of the extension header of FIG. 8b.
  • the ingress router adds a prefix to the FID to obtain an IP address, that is, IP sub:FID1 in Figure 11, and then uses this address as the IP destination address to forward the packet; or, the egress router IP address as the tunnel destination address to the packet Add tunnel encapsulation to the text, and send the message from the ingress router to the egress router. At this time, it will bypass S306 and enter S307;
  • the address IP sub: FID1 is the IP address of the function function instance; when there are multiple function function instances of the same FID, FID is equivalent to Anycast ID; usually, the DC plans the IP address prefix according to the leaf switch port, and then calculates the inter-site ,
  • the functional function instances of the same FID between the leaf switch ports are distinguished by the IP address prefix, and the functional function instances of the same FID in the leaf switch port are distinguished by the hash value or by the internal load balancer of the computing site.
  • the ingress router performs a hash (hash) according to the tuple (such as a quintuple) carried in the message to obtain a hash value, which is used to distinguish multiple functional functions of the same FID on the same computing container (such as a server) Example, and the hash value can be carried by the IPv6 extension header or other fields (such as the flow label field) in the IPv6 packet header except the destination address.
  • the ingress routing device obtains the hash value carried in the message according to the above process, and searches the hash table stored by the ingress routing device for the output IP address prefix or exit corresponding to the hash value according to the hash value. Routing device address or outgoing port.
  • the router checks the FIB according to the longest prefix match. If there is no IP sub item in the FIB table, it checks the RIB, and selects or Calculate a routing item to get the best destination IP address prefix and outgoing port corresponding to the FID; since the same IP address prefix items can be aggregated, the FIB containing only the IP address prefix and outgoing port can be obtained, as shown in the middle of Figure 11 Then the router forwards the message from the outgoing port, and subsequent messages enter. The router checks the FIB according to the longest prefix match to obtain the outgoing port and output the message through the outgoing port.
  • the egress router obtains the packet carrying the hash value, and forms the FIB together with the IP address prefix and/or the IP address prefix and the egress port, as shown in the FIB table in the lower right corner of FIG. 11. Then the message is forwarded by the outgoing port and arrives at the computing site for processing by the function function corresponding to FID1.
  • Figure 12 is a schematic diagram of shifting and deleting FID1 in the function function list in SRH. As shown in Figure 12, FID1 is deleted by shifting FID2...FID8 to the left. After the last bit shift Add 0; if the function function list is all 0, it means that all function function processing is completed, and the IPv6 extension header where the function function program is located is deleted.
  • the method of this embodiment may include :
  • the ingress routing device After receiving the message of the terminal device, the ingress routing device obtains the function function program corresponding to the message of the terminal device.
  • the function function program is used to instruct n calculation processing steps/instructions, service processing steps/instructions or Network processing steps/instructions.
  • the function function program includes multiple function function identification FIDs, and each FID is used to indicate a calculation processing step/instruction, service processing step/instruction, or network processing step/instruction.
  • the message of the terminal device carries the FID
  • the client directly obtains the function function program, and can send a request message carrying the URI or application software name or service name to the DNS, and obtain the corresponding function function program from the response message of the DNS , Place the function function program in the function function list field of the IPv6 message header shown in Figure 8a to carry the function function program to the network or computing site.
  • the function function program ⁇ FID1, FID2 ⁇
  • the IPv6 packet header shown in Figure 8a is obtained.
  • the ingress router puts the IP address prefix (such as IP subnet1) into the domain where the original FID1 is located, as shown in Figure 8b, and then forwards the message.
  • IP address prefix such as IP subnet1
  • computing sites or egress routers may need to use FID to find corresponding functional function instances.
  • the ingress router saves the first FID (such as FID1) in the flow label field of the IP packet header, such as Figure 8b, then replace the first FID (such as FID1) with the corresponding IP address prefix (such as IP subnet1);
  • the ingress router hashes according to the tuple (such as a quintuple) carried in the message to obtain a hash value, which is used to distinguish multiple instances of the same FID function on the same computing container (such as a server).
  • the hash value can be carried through the IPv6 extension header or other fields.
  • IP address prefix 1 passes through a certain router in the middle, the router checks FIB according to the longest prefix match. If there is no IP address prefix 1 item in the FIB table, it checks RIB, and calculates the size of the metric value. Select or calculate a routing item to get the best destination IP address prefix and outgoing port corresponding to the FID. Since the same IP address prefix items can be aggregated, a FIB containing only the IP address prefix and outgoing port can be obtained, as shown in Figure 11.
  • the router forwards the message from the egress port, and subsequent messages enter, the router checks the FIB according to the longest prefix match, obtains the egress port, and outputs the message from the egress port.
  • the egress router checks the FIB according to the IP address prefix 1 and/or FID1 carried in the message, and if there is no IP address prefix 1 and/or FID1 item in the FIB table, check RIB selects or calculates a routing item according to the size of the calculated metric value, and obtains the best destination IP address prefix and outgoing port corresponding to the FID.
  • the egress router obtains the packet carrying the hash value, and forms the FIB together with the IP address prefix and/or the IP address prefix and the egress port, as shown in the FIB table in the lower right corner of FIG. 11.
  • the message is forwarded by the outgoing port and arrives at the computing site for processing by the function function corresponding to FID1.
  • Egress routers/computing stations that support SR, delete FID1 by shifting the FID2...FID8 field to the left, and add 0 after the last bit; if the function function list is all 0, it means that all function functions are processed, and the SRv6 extension is deleted head.
  • the egress router checks the FIB according to IP subnet1 and/or FID1 to obtain the outgoing port, and then outputs the packets through the outgoing port, and arrives at the computing site for processing by the functional function corresponding to FID1. Similarly, for egress routers/computing stations that support SR, delete FID1 by shifting the FID2...FID8 field to the left, and add 0 after the last bit shift; if the function function list is all 0, it means that all function function processing is completed, then delete SRv6 extension header.
  • FIG. 13 is a flowchart of the first part of an embodiment of a segmented routing method provided by this application.
  • a metropolitan area network is taken as an example, and the client/user equipment passes through the customer terminal device (customer- premises equipment (CPE) access to the network
  • CPE can be an enterprise network access router, home gateway or micro base station
  • access node (AN) can be a digital subscriber line access multiplexer (Digital Subscriber Line Access Multiplexer, DSLAM), optical line terminal (OLT), or base station.
  • AN is 2 in Figure 13;
  • CPE (1 in Figure 13) is equivalent to an ingress router.
  • the first The segment is from CPE to router 3/server 3 (3 in Figure 13), and then the first function program is processed on server 3, and the second segment is from router 3 to router 5/server 5 (in Figure 13). 5), and then do the processing of the second functional function program on the server 5.
  • the router 3 can run on the server 3, and the router 5 can run on the server 5, which is equivalent to a software-based virtual router.
  • CPE or AN is the ingress router of the first segment
  • router 3 is the egress router of the first segment
  • router 3 is the ingress router of the second segment
  • router 5 is the egress router of the second segment .
  • server 3 Assume that server 3, server 5, router 3, router 4 (ie 4 in Figure 13) and router 5 are located in an edge computing site; in another embodiment, server 3 and router 3 may be located in an edge computing site In the site, server 5 and router 5 are located in another edge computing/cloud computing site, and router 4 connects these two computing sites.
  • the IP subnet assigned to the leaf switch (leaf) port where the server 3 is located is A3
  • the IP subnet assigned to the leaf switch port where the server 5 is located is A5.
  • the method of this embodiment includes:
  • the client/user device outputs a message.
  • IPoE IP over Ethernet
  • the client/user device can directly obtain the function program, and can also send a URI or application to the DNS
  • the corresponding function function program is obtained from the DNS response message, and the function function program is placed in the function function list field of the IPv6 message header shown in Figure 8a to carry the function function program.
  • the corresponding function function program ⁇ A32, A76 ⁇ , where A32, A76 are FIDs executed in sequence, FID1 is A32, FID2 is A76, and the result shown in Figure 14a is obtained.
  • Figure 14a is a schematic diagram of an IPv6 packet header.
  • FIG. 15 is a flowchart of the second part of an embodiment of a segmented routing method provided by this application, as shown in FIG. 15, and then,
  • FIG. 16 is a flowchart of the third part of an embodiment of a segmented routing method provided by this application, as shown in FIG. 16, and then,
  • FIG. 17 is a flowchart of the first part of an embodiment of another segment routing method provided by this application. As shown in FIG. 17, the method in this embodiment includes:
  • the client/user equipment inputs the message, taking IPoE or PPP over Ethernet (PPPoE) message as an example.
  • the message of the client does not carry FID, so it needs to be controlled by the ingress router CPE slave
  • ETH is Ethernet.
  • the AN performs SR and SR snooping, and inserts corresponding identifiers (such as S-ID and C-ID) in the SRH according to the port and service type of the received data message.
  • the identifier ie S in the figure
  • -ID and C-ID optional type, length value and object (Optional Type Length Value object) carried in SRH;
  • S-ID and C-ID are used to replace the service VLAN ID (S-VID) in the broadband access network ) And user VLAN ID (C-VID).
  • FIG. 18 is a flowchart of the second part of an embodiment of another segmented routing method provided by this application, as shown in FIG. 18, and then,
  • FIG. 19 is a flowchart of the third part of an embodiment of another segmented routing method provided by this application, as shown in FIG. 19, and then,
  • FIG. 20 is a flowchart of the first part of another segment routing method embodiment provided by this application. As shown in FIG. 20, the method in this embodiment includes:
  • the client/user device outputs packets, taking (IP over Ethernet, IPoE) packets as an example.
  • the AN performs SR Snooping, and inserts corresponding identifiers (such as S-ID and C-ID) in the SRH according to the port and service type of the received data message.
  • the identifiers ie, the S-ID and C-ID in Figure 20
  • C-ID Optional Type, Length Value and Object (Optional Type Length Value object) carried in SRH; S-ID and C-ID are used to replace S-VID and C-VID in broadband access networks.
  • FIG. 21 is a flowchart of the second part of an embodiment of another segmented routing method provided by this application, as shown in FIG. 21, and then,
  • FIG. 22 is a flowchart of the third part of an embodiment of another segmented routing method provided by this application, as shown in FIG. 22, and then,
  • FIG. 23 is a schematic structural diagram of an embodiment of a segmented routing device provided by this application.
  • the device of this embodiment may include: a receiving module 21, an acquiring module 22, and a forwarding processing module 23, where the receiving module 21 is used to receive messages from terminal equipment.
  • the obtaining module 22 is used to obtain a function function program corresponding to the message of the terminal device, and the function function program is used to indicate one or a plurality of sequential calculation processing steps/instructions, service processing steps/instructions, or network processing steps /Instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing step/instruction;
  • the forwarding processing module 23 is used to determine one of the IP address prefix, the egress routing device address or the outgoing port corresponding to the first FID placed in order according to the forwarding information base FIB or the routing information base RIB, and according to the determined IP address prefix Or one of the egress routing device address or the egress port forwards the message.
  • the message of the terminal device does not carry FID, and the obtaining module 22 is configured to:
  • the message of the terminal device carries the FID
  • the obtaining module 22 is configured to:
  • the ingress routing device obtains a function function program from a message of the terminal device, and the function function program is for the terminal device to obtain a response message sent by a domain name server DNS and put it into the message, so The response message is sent by the DNS according to the received request message carrying the universal resource identifier URI or application software name or service name.
  • the functional function program is put into the destination address field of the IPv6 message header or the destination address field of the IPv6 message header and the IPv6 extension header.
  • calculation-related data used by the functional function program is put into the payload field or the IPv6 extension header, or,
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • forwarding processing module 23 is used for:
  • the FIB includes: the corresponding relationship between the FID and the output IP address prefix and the egress port, or the corresponding relationship between the FID and the egress routing device address and the egress port, or the corresponding relationship between the FID and the egress port;
  • the RIB includes: the correspondence between the FID and the calculated metric value, the output IP address prefix and the egress port, or the correspondence between the FID and the calculated metric value, the egress routing device address and the egress port, and the FID and the calculated metric value and the egress port. The corresponding relationship.
  • the device in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 5, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 24 is a schematic structural diagram of an embodiment of a segmented routing apparatus provided by this application.
  • the apparatus of this embodiment may include: a receiving module 31, a determining module 32, and an output module 33, where:
  • the receiving module 31 is configured to receive a message from an ingress routing device or an intermediate routing device, the message carrying a function function program, and the function function program is used to instruct one or multiple sequential calculation processing steps/instructions, service processing Steps/instructions or network processing steps/instructions, the function function program includes one or multiple function function identification FIDs placed in sequence, and each FID is used to represent a calculation processing step/instruction, service processing step/instruction or network processing Steps/instructions;
  • the determining module 32 is configured to determine the first FID placed in order and/or the out port corresponding to the IP address prefix corresponding to the FID according to the forwarding information base FIB or the routing information base RIB;
  • the output module 33 is configured to output the message from the output port to a computing container for the computing container to perform function function processing corresponding to the FID.
  • the computing container is a server, a computing site, a virtual machine, or a container. .
  • the device in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 10, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 25 is a schematic structural diagram of an embodiment of a segment routing device provided by this application.
  • the device of this embodiment is based on the device structure shown in FIG. 24, and may further include: a processing module 34.
  • the processing module 34 is used to shift multiple FIDs included in the functional function program, delete the processed FIDs, and add 0 after the last bit shift; or, to shift multiple FIDs included in the functional function program Perform shifting, delete the processed FID, add 0 after the last shift bit, and delete the IPv6 extension header where the function function program is located after all the function function processing corresponding to the FID is completed.
  • FIG. 26 is a schematic structural diagram of an embodiment of a segmented routing device provided by this application.
  • the device of this embodiment is based on the device structure shown in FIG. 24, and may further include: an acquisition module 35.
  • the obtaining module 35 is configured to obtain the hash value carried in the message, and search for the IP address prefix and/or corresponding to the hash value in the hash table stored by the egress routing device according to the hash value Out port.
  • the FIB includes: the corresponding relationship between the FID and the input IP address prefix and the outgoing port, or the corresponding relationship between the FID and the outgoing port, or the corresponding relationship between the FID and the hash table related parameters, the hash table related parameters Including the starting position of the hash table and/or the total number of items;
  • the RIB includes: the corresponding relationship between the FID and the calculated metric value, the input IP address prefix and the egress port, or the corresponding relationship between the FID and the calculated metric value and the egress port, or the FID and the calculated metric value and the related parameters of the hash table
  • the relevant parameters of the hash table include the starting position of the hash table and/or the total number of items.
  • the function function program is put into the IPv6 extension header; or,
  • the functional function program is put into the destination address field of the IPv6 message header or the destination address field of the IPv6 message header and the IPv6 extension header.
  • calculation-related data used by the function function program is put into the payload field or the IPv6 extension header, or,
  • the calculation-related data used by the function function program is put into the payload field or the IPv6 extension header.
  • the device in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 10, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 27 is a schematic structural diagram of an embodiment of a segmented routing device provided by this application.
  • the device of this embodiment is based on the device structure shown in FIG. 24, and may further include: a generating module 36.
  • the generating module 36 is used to obtain the FID, IP address prefix or export routing device address of the functional function instance supported by the computing container and the computing capacity or calculation of the computing container from the virtual router running in the computing container. status;
  • the FIB is generated according to the RIB.
  • the present application may divide the segment routing device into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 28 is a schematic structural diagram of an apparatus provided by this application. As shown in FIG. 28, the apparatus 300 includes: a memory 301 and a processor 302;
  • the memory 301 is used to store computer programs
  • the processor 302 is configured to execute a computer program stored in the memory to implement the segment routing method in the foregoing embodiment. For details, refer to the relevant description in the foregoing method embodiment.
  • the memory 301 may be independent or integrated with the processor 302.
  • the apparatus 300 may further include:
  • the bus 303 is used to connect the memory 301 and the processor 302.
  • this embodiment further includes: a communication interface 304, and the communication interface 304 may be connected to the processor 302 through a bus 303.
  • the processor 302 may control the communication interface 303 to implement the aforementioned receiving and sending functions of the apparatus 300.
  • the apparatus may be used to execute various steps and/or processes corresponding to the ingress routing device or the egress routing device in the foregoing method embodiments.
  • the present application also provides a readable storage medium in which an execution instruction is stored.
  • the terminal device executes the segment routing method in the foregoing method embodiment.
  • a person of ordinary skill in the art can understand that: in the foregoing embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to transmit to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

Landscapes

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

Abstract

本申请提供一种分段路由方法及装置。该方法包括:入口路由设备接收终端设备发送的报文,获取与终端设备的报文对应的功能函数程序,功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,入口路由设备根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对报文进行转发。

Description

分段路由方法及装置
本申请要求于2019年09月04日提交中国专利局、申请号为201910834195.2、申请名称为“分段路由方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种分段路由方法及装置。
背景技术
目前,在"联接无处不在,智能无所不及"的大趋势下,未来将有越来越多的数据在边缘侧处理,运营商迫切希望解决边缘云计算或云计算等的多云互联问题。分段路由(Segment Routing,SR)v6是新一代IPv6网络路由技术,SRv6基于源地址路由并且只在网络边缘维持状态,这使得SRv6非常适合于超大规模软件定义网络(software-defined networking,SDN)部署,现已成为支持5G、物联网、多云和微服务发展的标准网络传送技术。因此,可以将SRv6应用到边缘计算或云计算等的多云互联领域。
图1为将SRv6应用到多云互联领域的一种业务示意图,如图1所示,假设一个业务可以被分解为按顺序的n个微服务处理步骤SR:<S1,C1,S2,S3,D>,则SRv6业务处理路径可以被分为n个网络/业务分段,分段1负责完成将报文提交到S1所在站点做S1的处理,分段2负责完成将报文提交到S1所在站点做C1的处理…分段5负责完成将报文提交到S1所在站点做D的处理。SRv6本质是一种“事先绑定(Early Binding)”技术,事先绑定是指“名址映射”在路由阶段之前就已事先确定,也就是控制器要事先将要处理的业务名绑定到一序列顺序的分段列表对应的IPv6地址列表,然后将IPv6地址列表下发给SRv6业务处理路径上的首个SRv6路由器。
但是,将SRv6应用到多云互联领域中时,会出现以下两个问题:首先,在边缘计算或云计算场景,计算时延通常远大于网络时延,如图1所示,经过第一个分段到达S1做计算处理后,后续各计算服务的最佳位置极有可能已经发生变化,导致路由阶段实际最优计算主机/服务IP与路由阶段之前事先分配的目的IP地址不一致。IP地址不一致的变化原因有很多,例如客户端移动、服务/功能移动、负载均衡或故障等原因,导致计算主机的服务位置动态变化,而管理/控制面实时动态更新各分段最优计算主机/服务IP非常困难。
发明内容
本申请提供一种分段路由方法及装置,以解决计算主机的服务位置动态变化导致 的地址不一致问题。
第一方面,本申请实施例提供一种分段路由方法,包括:
入口路由设备接收终端设备发送的报文;
所述入口路由设备获取与所述终端设备的报文对应的功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
所述入口路由设备根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发。
通过第一方面提供的分段路由方法,通过入口路由设备接收到终端设备的报文后,获取与终端设备的报文对应的功能函数程序,功能函数程序用于指示按顺序的n个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括多个FID,入口路由设备根据转发信息库FIB或路由信息库RIB确定第一个FID对应的IP地址前缀或出口路由设备地址或出端口,并根据所确定的IP地址前缀或出口路由设备地址或出端口对报文进行转发。从而,将“名址映射”推迟到路由阶段,控制器仅下发用户关心的FID列表给入口路由设备,而不是IPv6地址列表,“名址映射”的“名”就是FID,“名址映射”的“址”就是IPv6地址,入口路由设备根据FID进行寻址或路由,获取实际时延最短或计算能力最强的计算主机/服务IP地址,而不是路由阶段之前事先分配的目的IP地址,因此,解决了计算主机的服务位置动态变化导致的地址不一致问题。
在一种可能的设计中,所述终端设备的报文未携带FID,所述获取与所述终端设备的报文对应的功能函数程序,包括:
所述入口路由设备从控制器/网管系统获取与所述终端设备的报文对应的功能函数程序,并将所获取的功能函数程序放入所述报文中。
在一种可能的设计中,所述终端设备的报文携带FID,所述获取与所述终端设备的报文对应的功能函数程序,包括:
所述入口路由设备从所述终端设备的报文中获取功能函数程序,所述功能函数程序为所述终端设备从域名服务器DNS发送的响应报文中获取并放入所述报文中,所述响应报文为所述DNS根据接收到的携带通用资源标识符URI或应用软件名称或服务名称的请求报文发送。
在一种可能的设计中,所述功能函数程序被放入IPv6扩展头;或者,
所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
通过本实施方式采用的轻量级SRv6封装方法,可以提升传输效率。
在一种可能的设计中,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
在一种可能的设计中,所述入口路由设备根据转发信息库FIB或路由信息库RIB 确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发,包括:
所述入口路由设备从所述FIB或RIB中查找与所述FID对应的IP地址前缀;
将所述FID添加所述IP地址前缀得到一个IP地址,将所述IP地址作为IP目的地址对所述报文进行转发,或者,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发,或者,将所述FID保存到IP报文头的除目的地址外的其它域,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发;
或者,
所述入口路由设备从所述FIB或RIB中查找与所述FID对应的出口路由设备地址,把所述出口路由设备地址作为隧道目的地址对所述报文添加隧道封装,将添加隧道封装后的报文由入口路由设备送到出口路由设备;
或者,
所述入口路由设备从所述FIB或RIB中查找与所述FID对应的出端口,根据所述出端口将所述报文输出。
在一种可能的设计中,所述将所述IP地址作为IP目的地址对所述报文进行转发之前,或者根据所述IP地址前缀对所述报文进行转发之前,所述方法还包括:
所述入口路由设备根据多元组做哈希运算得到一个哈希值,将所述哈希值放入IPv6扩展头或IPv6报文头的除目的地址外的其它域;
或者,所述入口路由设备获取所述报文携带的哈希值,根据所述哈希值查找所述入口路由设备存储的哈希表中与所述哈希值对应的输出的IP地址前缀或出口路由设备地址或出端口。
在一种可能的设计中,所述FIB包括:FID与输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由设备地址和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
所述RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由设备地址和出端口的对应关系,FID与计算度量值和出端口的对应关系,或者,FID和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
在一种可能的设计中,所述入口路由设备从计算容器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态,所述计算容器为服务器、计算站点、虚拟机或容器;
所述入口路由设备根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
所述入口路由设备根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
所述入口路由设备根据所述RIB生成所述FIB。
第二方面,本申请实施例提供一种分段路由方法,包括:
出口路由设备接收来自入口路由设备或中间路由设备的报文,所述报文携带功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
所述出口路由设备根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID和/或所述FID对应的IP地址前缀对应的出端口;
所述出口路由设备将所述报文从所述出端口输出至计算容器,用于所述计算容器做所述FID对应的功能函数处理,所述计算容器为服务器、计算站点、虚拟机或容器。
通过第二方面提供的分段路由方法,通过出口路由设备接收来自入口路由设备或中间路由设备的报文,报文携带功能函数程序,功能函数程序用于指示按顺序的m个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括多个FID,出口路由设备根据转发信息库FIB或路由信息库RIB确定第一个FID和/或FID对应的IP地址前缀对应的出端口,出口路由设备将报文从出端口输出至计算容器,用于计算容器做FID对应的功能函数处理,计算容器为服务器、计算站点、虚拟机或容器。从而,将“名址映射”推迟到路由阶段,“名址映射”的“名”就是FID,“名址映射”的“址”就是IPv6地址,出口路由设备根据FID进行寻址或路由,获取实际时延最短或计算能力最强的计算主机/服务IP地址,而不是路由阶段之前事先分配的目的IP地址,因此,解决了计算主机的服务位置动态变化导致的地址不一致问题。
在一种可能的设计中,所述方法还包括:
所述出口路由设备将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,
所述出口路由设备将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除所述功能函数程序所在的IPv6扩展头。
在一种可能的设计中,若所述报文携带哈希值,所述方法还包括:
所述出口路由设备获取所述报文携带的哈希值,根据所述哈希值查找所述出口路由设备存储的哈希表中与所述哈希值对应的IP地址前缀和/或出端口。
在一种可能的设计中,所述FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
所述RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID与计算度量值和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
在一种可能的设计中,所述功能函数程序被放入IPv6扩展头;或者,
所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
通过本实施方式采用的轻量级SRv6封装方法,可以提升传输效率。
在一种可能的设计中,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
在一种可能的设计中,所述出口路由设备从所述计算容器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态;
所述出口路由设备根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
所述出口路由设备根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
所述出口路由设备根据所述RIB生成所述FIB。
第三方面,本申请实施例提供一种分段路由装置,包括:
接收模块,用于接收终端设备的报文;
获取模块,用于获取与所述终端设备的报文对应的功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
转发处理模块,用于根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发。
在一种可能的设计中,所述终端设备的报文未携带FID,所述获取模块用于:
从控制器/网管系统获取与所述终端设备的报文对应的功能函数程序,并将所获取的功能函数程序放入所述报文中。
在一种可能的设计中,所述终端设备的报文携带FID,所述获取模块用于:
所述入口路由设备从所述终端设备的报文中获取功能函数程序,所述功能函数程序为所述终端设备从域名服务器DNS发送的响应报文中获取并放入所述报文中,所述响应报文为所述DNS根据接收到的携带通用资源标识符URI或应用软件名称或服务名称的请求报文发送。
在一种可能的设计中,所述功能函数程序被放入IPv6扩展头;或者,
所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
在一种可能的设计中,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
在一种可能的设计中,所述转发处理模块用于:
从所述FIB或RIB中查找与所述FID对应的IP地址前缀;
将所述FID添加所述IP地址前缀得到一个IP地址,将所述IP地址作为IP目的地址对所述报文进行转发,或者,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发,或者,将所述FID保存到IP报文头的除 目的地址外的其它域,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发;
或者,
从所述FIB或RIB中查找与所述FID对应的出口路由设备地址,把所述出口路由设备地址作为隧道目的地址对所述报文添加隧道封装,将添加隧道封装后的报文由入口路由设备送到出口路由设备;
或者,
从所述FIB或RIB中查找与所述FID对应的出端口,根据所述出端口将所述报文输出。
在一种可能的设计中,所述FIB包括:FID与输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由设备地址和出端口的对应关系,或者,FID与出端口的对应关系;
所述RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由设备地址和出端口的对应关系,FID与计算度量值和出端口的对应关系。
上述第三方面以及上述第三方面的各可能的设计中所提供的内存回收装置,其有益效果可以参见上述第一方面和第一方面的各可能的实施方式所带来的有益效果,在此不再赘述。
第四方面,本申请实施例提供一种分段路由装置,包括:
接收模块,用于接收来自入口路由设备或中间路由设备的报文,所述报文携带功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
确定模块,用于根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID和/或所述FID对应的IP地址前缀对应的出端口;
输出模块,用于将所述报文从所述出端口输出至计算容器,用于所述计算容器做所述FID对应的功能函数处理,所述计算容器为服务器、计算站点、虚拟机或容器。
在一种可能的设计中,所述装置还包括:
处理模块,用于将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,
将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除所述功能函数程序所在的IPv6扩展头。
在一种可能的设计中,若所述报文携带哈希值,所述装置还包括:
获取模块,用于获取所述报文携带的哈希值,根据所述哈希值查找所述出口路由设备存储的哈希表中与所述哈希值对应的IP地址前缀和/或出端口。
在一种可能的设计中,所述FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系, 所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
所述RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID与计算度量值和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
在一种可能的设计中,所述功能函数程序被放入IPv6扩展头;或者,
所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
在一种可能的设计中,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
在一种可能的设计中,所述装置还包括:
生成模块,用于从运行在所述计算容器里面的虚拟路由器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态;
根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
根据所述RIB生成所述FIB。
上述第四方面以及上述第四方面的各可能的设计中所提供的内存回收装置,其有益效果可以参见上述第二方面和第二方面的各可能的实施方式所带来的有益效果,在此不再赘述。
第五方面,本申请实施例提供一种装置,包括:存储器和处理器;
处理器;以及
存储器,用于存储所述处理器的可执行指令;
其中,所述处理器配置为经由执行所述可执行指令来执行第一方面及第一方面任一种可能的设计中或第二方面及第二方面任一种可能的设计中的分段路由方法。
在一种可能的设计中,上述装置可以是路由设备,也可以是芯片。
第六方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第七方面,本申请提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
附图说明
图1为将SRv6应用到多云互联领域的一种业务示意图;
图2为本申请提供的通过功能函数程序简化和卸载客户端/服务器的会话状态和客户端上下文为在网络中传递的带内状态的示意图;
图3为一种本申请提供的一种SRv6路由系统结构示意图;
图4为本申请提供的一种入口/出口路由器的结构示意图;
图5为本申请提供的一种分段路由方法实施例的流程图;
图6为本申请提供的一种IPv6报文头的示意图;
图7为本申请提供的另一种IPv6报文头的示意图;
图8a为本申请提供的一种IPv6报文头的格式示意图;
图8b为本申请提供的一种IPv6报文头的格式示意图;
图8c为本申请提供的一种IPv6报文头的格式示意图;
图9a为对功能函数列表域的一种操作示意图;
图9b为对功能函数列表域的一种操作示意图;
图10为本申请提供的一种分段路由方法实施例的流程图;
图11为本申请提供的一种SRv6系统的路由表设计示意图;
图12为SRH中功能函数列表移位删除FID1的示意图;
图13为本申请提供的一种分段路由方法实施例第一部分的流程图;
图14a为一种IPv6报文头的示意图;
图14b为一种IP报文头的功能列表操作示意图;
图14c为一种IP报文头的功能列表操作示意图;
图14d为一种IP报文头的功能列表操作示意图;
图15为本申请提供的一种分段路由方法实施例第二部分的流程图;
图16为本申请提供的一种分段路由方法实施例第三部分的流程图;
图17为本申请提供的另一种分段路由方法实施例第一部分的流程图;
图18为本申请提供的另一种分段路由方法实施例第二部分的流程图;
图19为本申请提供的另一种分段路由方法实施例第三部分的流程图;
图20为本申请提供的又一种分段路由方法实施例第一部分的流程图;
图21为本申请提供的另一种分段路由方法实施例第二部分的流程图;
图22为本申请提供的又一种分段路由方法实施例第三部分的流程图;
图23为本申请提供的一种分段路由装置实施例的结构示意图;
图24为本申请提供的一种分段路由装置实施例的结构示意图;
图25为本申请提供的一种分段路由装置实施例的结构示意图;
图26为本申请提供的一种分段路由装置实施例的结构示意图;
图27为本申请提供的一种分段路由装置实施例的结构示意图;
图28为本申请提供的一种装置结构示意图。
具体实施方式
本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明,本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或方案不应被解释为比其它实施例或方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
首先,下面对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
1、功能函数程序(Functional Program),本申请中引入“功能函数程序”的概念取代了一系列独立的计算或服务或应用请求,用带内(In-band)功能函数程序来简化和卸载客户端/服务器的会话状态和客户端上下文为在网络中传递的带内状态(In-band state),以保持终端/边缘尽可能简单,甚至是无状态,同时也减少了计算处理时延。
由于网络中上一跳路由器路由后的输出结果(IP包)始终作为下一跳路由器的输入,进行下一跳路由,一种业务、计算、服务或应用可以表达为“功能函数程序”,即功能函数程序=fn(…(f3(f2(f1(计算相关数据))))…)。这里fk(x,…,y)表示一个功能函数fk,其输入参数为x,…,y,输出值为fk(x,…,y)。计算相关数据就是f1的输入参数,如图像、视频、音频、文件、数值等。因此,本申请中采用将功能函数程序作为一种特殊的网络的输入请求报文,来取代现有的一系列独立的计算或服务或应用请求的请求报文。图2为本申请提供的通过功能函数程序简化和卸载客户端/服务器的会话状态和客户端上下文为在网络中传递的带内状态的示意图,如图2所示,功能函数程序的路由器在下面一层(如图2中菱形四边形表示),例如可称为基础层(Basic layer),在上面一层(如图2中菱形四边形表示)部署软件化的计算程序、功能程序、业务软件或微服务等,以f代表部署软件化的计算程序、功能程序、业务软件或微服务,即图2中的f1…fm…fn,f也可以采用硬件加速器来提升处理性能。
其中,本申请实施例的终端设备:可以是无线终端,无线终端可以是指向用户提供语音和/或其他业务数据连通性的设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。无线终端可以经无线接入网(RAN)与一个或多个核心网进行通信,无线终端可以是移动终端,如移动电话(或称为“蜂窝”电话)和具有移动终端的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(Personal Communication Service,PCS)电话、无绳电话、会话发起协议(Session Initiation Protocol,SIP)话机、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal Digital Assistant,PDA)等设备。无线终端也可以称为系统、订户单元(Subscriber Unit)、订户站(Subscriber Station),移动站(Mobile Station)、移动台(Mobile)、远程站(Remote Station)、远程终端(Remote Terminal)、接入终端(Access Terminal)、用户终端(User Terminal)、用户代理(User Agent)、用户设备(User Device or User Equipment),在此不作限定。
本申请实施例中的终端设备还可以是客户端。
相关技术中,将SRv6应用到多云互联领域中时,在边缘计算或云计算场景,“名址映射”在路由阶段之前就已事先确定,而在实际路由过程中,计算时延通常远大于网络时延,计算主机的服务位置动态变化会导致路由阶段实际最优计算主机/服务IP与路由阶段之前事先分配的目的IP地址不一致,为解决这一问题,本申请提供一种分段路由方法及装置,采用延后绑定机制,将“名址映射”推迟到路由阶段。具体到SRv6,控制器仅下发用户关心的功能函数标识列表给入口路由器(即首个SRv6路由器),而不是IPv6地址列表;“名址映射”的“名”就是功能函数标识(FID),“名址映射”的“址” 就是IPv6地址,在路由阶段路由器通过路由机制获取实际时延最短或计算能力最强的计算主机/服务IP地址,而不是路由阶段之前事先分配的目的IP地址,因此,解决了计算主机的服务位置动态变化导致的地址不一致问题。
其次,在相关技术中,SRv6路由器的专用集成电路(application-specific integrated circuit,ASIC)/网络处理单元(network process unit,NPU)收到数据报文后,把数据报文存在外置的内存中,ASIC/NPU读取固定长度的报头内容(一般是64-128字节),然后查找芯片本地/外部内存中的转发表,进行转发。由于SRv6报文头太长,无法在一个处理周期完成读取,则需要使用两个处理周期进行读取,将导致吞吐量下降一半,传输效率不高。为解决这一问题,本申请中采用轻量级SRv6封装方法,可以提升传输效率。
下面结合附图详细说明本申请提供的分段路由方法及装置的具体实现过程。
本申请可用于改进的轻量级SRv6路由系统中,图3为一种本申请提供的一种SRv6路由系统结构示意图,如图3所示,本申请涉及的主要网元包括入口路由器和出口路由器,还有中间路由器,图3中的路由器1或路由器2可以为中间路由器,也可以为出口路由器,该系统中每个路由器都会维护一个路由信息库(routing information base,RIB)和转发信息库(forwarding information base,FIB),对于入口路由器,FIB包括:FID,输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由器地址和出端口的对应关系;RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由器地址和出端口的对应关系。对于出口路由器,FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID和出端口的对应关系,或者,FID和哈希表相关参数的对应关系;RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID和哈希表相关参数的对应关系。可选的,入口路由器和出口路由器还存储有哈希表,入口路由器哈希表包括IP地址前缀或出口路由器地址或出端口,出口路由器哈希表包括IP地址前缀和/或出端口,当存储有哈希表时,FIB和RIB还包括哈希表相关参数(如哈希表的起始位置或项目总数)。
对于中间路由器,路由项目可以做路由汇聚,大规模地降低路由项数量,从而中间路由器可以不感知FID,还可以用传统路由器的数据面硬件,仅升级控制面软件即可。其中,中间路由器的RIB包括:IP地址前缀和出端口等;或者,IP地址前缀和出口路由器地址等;FIB包括:IP地址前缀和出端口等;或者,FIB包括IP地址前缀和对应的出口路由器地址等。
图3中以SRv6路径分为两段为例,第一个分段的目的地址为出口路由器如路由器1,第二个分段的目的地址为出口路由器如路由器2,客户端或用户设备的报文到达入口路由器后,入口路由器根据报文携带的FID和FIB或RIB进行寻址或路由,报文到达出口路由器后,出口路由器根据报文携带的FID和FIB或RIB进行寻址或路由。本申请中入口和出口是针对客户端/用户设备来说的,靠近客户端的第一个设备称为入口路由设备,最后一个设备称为出口路由设备。本申请下文中入口路由设备以入口路由器为例,出口路由设备以出口路由器为例进行说明。
图4为本申请提供的一种入口/出口路由器的结构示意图,如图4所示,入口/出口 路由器包括控制面处理模块11和数据面处理模块12,控制面处理模块11包括路由协议处理单元110、RIB生成与维护单元111、路由选择或计算单元112、FIB生成与维护单元113和功能函数程序获取单元114,数据面处理模块12包括转发处理单元121和多个接口处理单元。需要说明的是,出口路由器的控制面处理模块11不包括功能函数程序获取单元114。
其中,路由协议处理单元110用于从运行在计算容器里面的虚拟路由器获取计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由器地址和计算容器的计算容量或计算状态,并在路由器间进行通告。
RIB生成与维护单元111用于根据计算度量值、计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由器地址生成RIB。
路由选择或计算单元112用于根据FIB查找到FID对应的IP地址前缀或出口路由器地址或出端口,或者,根据RIB的计算度量值选择或计算路由,得到FID对应的IP地址前缀或出口路由器地址或出端口。也就是实现站点间负载均衡。
FIB生成与维护单元113用于根据路由选择或计算单元的处理结果即RIB,生成相应的FIB。
功能函数程序获取单元114用于从控制器/网管系统获取与客户端的报文对应的功能函数程序,或从客户端的报文中获取功能函数程序。
对于入口路由器,转发处理单元121用于在报文携带传统IP目的地址的情况下,直接做IP转发。或者,在功能函数程序获取单元114获取到报文对应的功能函数程序后,添加IPv6扩展头,将获得的功能函数程序放入IPv6扩展头、IPv6报文头的目的地址域或者IPv6报文头的目的地址域和IPv6扩展头,根据转发信息库FIB或路由信息库RIB确定第一个FID对应的IP地址前缀或出口路由设备地址或出端口,并根据所确定的IP地址前缀或出口路由设备地址或出端口对报文进行转发。
对于出口路由器,转发处理单元121用于根据FIB或RIB确定第一个FID和/或FID对应的IP地址前缀对应的出端口,将报文从出端口输出至计算容器,用于计算容器做FID对应的功能函数处理,计算容器为服务器、计算站点、虚拟机或容器。具体地,根据第一个FID和/或FID对应的IP地址前缀查FIB或RIB,得到出端口或虚拟出端口,从出端口或虚拟出端口对报文进行转发;转发处理单元121还用于将功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,将功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除功能函数程序所在的IPv6扩展头。
接口处理单元122用于做接口的输入或输出处理。
图5为本申请提供的一种分段路由方法实施例的流程图,如图5所示,本实施例的执行主体可以为入口路由设备,例如入口路由器,本实施例的方法可以包括:
S101、入口路由设备接收终端设备发送的报文,获取与终端设备的报文对应的功能函数程序,功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令。
具体来说,按顺序放置的多个FID,如FID1、FID2、……、FIDn,或者,FIDn、FIDn-1、……、FID2、FID1。
具体地,在一种可能的实施方式中,终端设备的报文未携带FID,入口路由设备获取与终端设备的报文对应的功能函数程序,具体可以为:入口路由设备从控制器/网管系统获取与终端设备的报文对应的功能函数程序,并将所获取的功能函数程序放入所述报文中,所述报文为接收到的终端设备发送的报文。具体可以是放入所述报文中的功能函数列表域。
在另一种可能的实施方式中,终端设备的报文携带FID,入口路由设备获取与终端设备的报文对应的功能函数程序,具体可以为:入口路由设备从终端设备的报文中获取功能函数程序,功能函数程序为终端设备从域名服务器(Domain名称Server,DNS)发送的响应报文中获取并放入所述报文中,响应报文为DNS根据接收到的携带通用资源标识符(Uniform Resource Identifier,URI)或应用软件名称或服务名称的请求报文发送。具体地,若终端设备的报文携带FID,则是由终端设备获取功能函数程序,具体可以是终端设备向DNS发送携带URI或应用软件名称或服务名称的请求报文,从DNS的响应报文获得对应的功能函数程序,将功能函数程序放入IPv6报文中,具体可以是放入IPv6报文中的功能函数列表域,用于将功能函数程序携带给网络或计算容器,然后入口路由设备从终端设备的报文中获取功能函数程序,具体可以是入口路由器添加IPv6扩展头,并将功能函数程序由放置于IP报文头功能函数列表域拷贝至IPv6扩展头的功能函数列表域。
本实施例中,入口路由设备将所获取的功能函数程序放入IPv6报文中,或者,终端设备将所获取的功能函数程序放入IPv6报文中,可选的,在一种可能的实施方式,图6为本申请提供的一种IPv6报文头的示意图,如图6所示,可以是功能函数程序被放入IPv6扩展头,可选的,功能函数程序用到的计算相关数据被放入净荷域或IPv6扩展头中。本申请中采用轻量级SRv6封装方法,可以提升传输效率。
在另一种可能的实施方式,图7为本申请提供的另一种IPv6报文头的示意图,如图7所示,可以是,功能函数程序被放入IPv6报文头的目的地址域或IPv6报文头的目的地址域和IPv6扩展头,可选的,功能函数程序用到的计算相关数据被放入净荷域或IPv6扩展头中。
具体地,图8a为本申请提供的一种IPv6报文头的格式示意图,如图8a所示,其改变了原IPv6报文头的目的地址(Destination Address)域为功能函数列表域用于携带功能函数程序,指示按顺序的n个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令。每个功能函数都有一个4bit、8bit、或16bit的FID,用于表示一个计算、服务或网络处理步骤/指令。可以用版本(version)域设置为特殊值(如值为7)表明该报文头支持功能函数程序;或者,将FID0设置为特殊值(如值为每比特位全1)来作为功能函数程序的开始符,因为需要将功能函数程序与其它传统的IP地址区分开来,开始符其后为第一个FID,即FID1…FID7才是真正表示计算、服务或网络处理步骤/指令,若FID设置为特殊值(如值为每比特位全0)来表明功能函数程序的结束。
图8b为本申请提供的一种IPv6报文头的格式示意图,如图8b所示,IPv6报文头的Next header表明IPv6扩展头协议类型、Hdr Ext Len表明IPv6扩展头的长度、功 能函数列表域用于携带功能函数程序,指示按顺序的n个计算、服务或网络处理步骤/指令。每个功能函数都有一个4bit、8bit、或16bit的FID,用于表示一个计算、服务或网络处理步骤/指令。可以用Routing Type域设置为特殊值(如值为7)表明该报文头支持功能函数程序;功能函数程序在此通常不用设置开始符,因为不用象图8a那样将功能函数程序与其它传统的IP地址区分开来;若FID设置为特殊值(如值为每比特位全0)来表明功能函数程序的结束。Flag可选用来存放SR报文头(SR header,SRH)指针(FID指针,用于说明第几个FID有效),或其它状态。
图8c为本申请提供的一种IPv6报文头的格式示意图,如图8c所示,与图8b的差别在于功能函数列表域之前,图8c包含更多信息,如用Segments left来表示FID指针,用于说明第几个FID有效,Last Entry表示最后一个FID,如Hdr Ext Len超出Last Entry表明Type Length Value object有效。
在本申请实施例中,功能函数程序的放置可以有如下三种可实施的方式:
一、若功能函数程序放置于图8a所示的IPv6报文头功能函数列表域就已足够支持,限制分段数≤8,此时不用图8b中所示的扩展头,若功能函数程序放置于图8a所示的IPv6报文头功能函数列表域不足够支持,分段数>8,此时继续使用图8b中所示的扩展头的功能函数列表域放置剩余的功能函数程序。
需要强调说明的是,为了避免FID丢失,计算站点或出口路由器可能需要用到FID来寻找相应的功能函数实例。所以,可选地,报文进入网络后,图9a为对功能函数列表域的一种操作示意图,如图9a所示,入口路由器将第一个FID保存到IPv6报文头的除目的地址外的其它域(如流标签域),然后将第一个FID置换为对应的IP地址前缀,然后做第一分段路由和第一个FID对应的功能函数处理;进入第二分段,入口路由器将第二个FID保存到IP报文头的除目的地址外的其它域(如流标签域),图9b为对功能函数列表域的一种操作示意图,如图9b所示,然后将第二个FID置换为对应的IP地址前缀,然后做第二分段路由和第二个FID对应的功能函数处理……进入第N分段,入口路由器将第N个FID保存到IPv6报文头的除目的地址外的其它域(如流标签域),然后将第N个FID置换为对应的IP地址前缀,然后做第N segment路由和第N个FID对应的功能函数处理。
二、功能函数程序仅放置于图8b扩展头功能函数列表域,功能函数列表域可以超过FID7(图中未完全表示出),分段数>8,此时IPv6报文头的目的地址域仍表示目的地址。
三、终端设备(如客户端/用户设备)将功能函数程序放置于图8a所示的IPv6报文头功能函数列表域,用于将功能函数程序携带给网络或计算站点,进入网络后,入口路由器添加图8b所示的扩展头并将功能函数程序拷贝到功能函数列表域。
本申请实施例中,提供一种新的SRv6系统的编址方式,假设,以URI或应用软件的名称代表一个服务,则:对于客户端/应用程序(Application),可见的是URI或应用软件的名称或功能函数名称,这是与功能函数实例或计算容器所在的位置无关的。
对于网络设备(如路由器),可见的是FID和FID所在计算容器的IP子网/IP地址前缀(IP地址前缀)。其中,FID可以以IP后缀(IP suffix)形式来表示,可以是一种任播ID(Anycast ID),一个FID可以映射到一组功能对等的实例。而IP子网 /IP地址前缀是与计算容器位置相关的。本申请中,在计算容器上会引入一个虚拟路由器用于获取计算站点的计算状态,在DC叶子交换机上需要配置叶子交换机与虚拟路由器之间的IP子网,该子网就是FID所在计算容器的IP子网/IP地址前缀。若采用上述方法一或二,则IP子网/前缀的位数应与FID位数保持一致,如FID位数设定为16bit,IP子网/前缀的位数也应设定为16bit。离功能函数实例最近的路由器(或虚拟路由器)可见的是FID和FID所在计算容器的IP子网/IP地址前缀和一个哈希值。
S102、入口路由设备根据FIB或RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发。
具体来说,作为一种可实施的方式,S102可以为:
入口路由设备从FIB或RIB中查找与第一个FID对应的IP地址前缀,将第一个FID添加IP地址前缀得到一个IP地址,将该IP地址作为IP目的地址对报文进行转发,或者,将第一个FID置换为与第一个FID对应的IP地址前缀,根据IP地址前缀对报文进行转发,或者,将第一个FID保存到IP报文头的除目的地址外的其它域,将第一个FID置换为与第一个FID对应的IP地址前缀,根据该IP地址前缀对报文进行转发,此处将第一个FID保存,是为了避免第一个FID丢失。
作为另一种可实施的方式,S102可以为:
入口路由设备从FIB或RIB中查找与FID对应的出口路由设备地址,把出口路由设备地址作为隧道目的地址对报文添加隧道封装,将添加隧道封装后的报文由入口路由设备送到出口路由设备。
作为又一种可实施的方式,S102可以为:
入口路由设备从FIB或RIB中查找与FID对应的出端口,根据出端口将报文输出。
需要说明的是,入口路由设备根据FIB或RIB确定第一个FID对应的IP地址前缀或出口路由设备地址或出端口,此处的第一个是指第一个有效的FID,例如功能函数列表域存储FID0、FID1、……FID7,FID0是开始标识符,第一个有效的FID是FID1,则确定的是FID1对应的IP地址前缀或出口路由设备地址或出端口。
需要说明的是,入口路由设备先从FIB中查找与第一个FID对应的IP地址前缀或出口路由设备地址或出端口,可以是根据最长前缀匹配规则查,若FIB不存在第一个FID项目,则查RIB,根据计算度量值的大小,来选择或计算一条路由项目,得到与第一个FID对应的IP地址前缀或出口路由设备地址或出端口。
进一步地,将IP地址作为IP目的地址对报文进行转发之前,或者根据IP地址前缀对报文进行转发之前,本实施例的方法还可以包括:
入口路由设备根据多元组做哈希运算得到一个哈希值,将哈希值放入IPv6扩展头或IPv6报文头的除目的地址外的其它域(如流标签域)。例如,根据五元组做哈希运算得到一个哈希值,哈希值用于区分同一个计算容器(如服务器)上的多个相同FID的功能函数实例。或者,所述入口路由设备获取所述报文携带的哈希值,根据所述哈希值查找所述入口路由设备存储的哈希表中与所述哈希值对应的输出的IP地址前缀或出口路由设备地址或出端口。
需要说明的是,本申请提供的SRv6系统需要做URI或应用软件的名称或功能函 数程序名称到FID的映射时,该映射可以由DNS系统升级支持完成,或通过哈希映射完成。
本实施例中,对于入口路由器,FIB包括:FID与输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由设备地址和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系,哈希表相关参数包括哈希表的起始位置和/或项目总数。RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由设备地址和出端口的对应关系,FID与计算度量值和出端口的对应关系,或者,FID与哈希表相关参数的对应关系,哈希表相关参数包括哈希表的起始位置和/或项目总数。
进一步地,在S101之前,本实施例的方法还可以包括:
S103、入口路由设备从计算容器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态,所述计算容器为服务器、计算站点、虚拟机或容器。
S104、入口路由设备根据计算容器的计算容量或计算状态生成相应的计算度量值。
S105、入口路由设备根据计算度量值、计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成RIB。
S106、入口路由设备根据RIB生成FIB。
本实施例提供的分段路由方法,通过入口路由设备接收到终端设备的报文后,获取与终端设备的报文对应的功能函数程序,功能函数程序用于指示按顺序的n个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括多个FID,入口路由设备根据转发信息库FIB或路由信息库RIB确定第一个FID对应的IP地址前缀或出口路由设备地址或出端口,并根据所确定的IP地址前缀或出口路由设备地址或出端口对报文进行转发。从而,将“名址映射”推迟到路由阶段,控制器仅下发用户关心的FID列表给入口路由设备,而不是IPv6地址列表,“名址映射”的“名”就是FID,“名址映射”的“址”就是IPv6地址,入口路由设备根据FID进行寻址或路由,获取实际时延最短或计算能力最强的计算主机/服务IP地址,而不是路由阶段之前事先分配的目的IP地址,因此,解决了计算主机的服务位置动态变化导致的地址不一致问题。
图10为本申请提供的一种分段路由方法实施例的流程图,如图10所示,本实施例的执行主体可以为出口路由设备,例如出口路由器,本实施例的方法可以包括:
S201、出口路由设备接收来自入口路由设备或中间路由设备的报文,所述报文携带功能函数程序,功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令。
本实施例中,报文携带功能函数程序,可选的,在一种可能的实施方式,图6为本申请提供的一种IPv6报文头的示意图,如图6所示,可以是功能函数程序被放入IPv6扩展头,可选的,功能函数程序用到的计算相关数据被放入净荷域或IPv6扩展头中。
在另一种可能的实施方式,图7为本申请提供的另一种IPv6报文头的示意图,如图7所示,可以是,功能函数程序被放入IPv6报文头的目的地址域或IPv6报文头的 目的地址域和IPv6扩展头,可选的,功能函数程序用到的计算相关数据被放入净荷域或IPv6扩展头中。
S202、出口路由设备根据FIB或RIB确定按顺序放置的第一个FID和/或所述FID对应的IP地址前缀对应的出端口。
需要说明的是,出口路由设备先从FIB中查找与第一个FID和/或FID对应的IP地址前缀对应的出端口,可以是根据最长前缀匹配规则查,若FIB不存在第一个FID项目,则查RIB,根据计算度量值的大小,来选择或计算一条路由项目,得到与第一个FID和/或FID对应的IP地址前缀对应的出端口。
S203、出口路由设备将报文从出端口输出至计算容器,用于计算容器做FID对应的功能函数处理,计算容器为服务器、计算站点、虚拟机或容器。
进一步地,还可以包括:
S204、出口路由设备将功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,
出口路由设备将功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除功能函数程序所在的IPv6扩展头。
本实施例中,删除功能函数程序所在的IPv6扩展头可以是出口路由设备来执行,也可以是由计算容器来执行。
可选的,若来自入口路由设备或中间路由设备的报文添加了隧道封装,相应地,在出口路由设备根据转发信息库FIB或路由信息库RIB确定第一个FID和/或FID对应的IP地址前缀对应的出端口之前,本实施例的方法还可以包括:
出口路由设备对报文进行解隧道封装。
可选的,若来自入口路由设备或中间路由设备的报文携带哈希值,本实施例的方法还可以包括:
出口路由设备获取报文携带的哈希值,根据哈希值查找出口路由设备存储的哈希表中与哈希值对应的IP地址前缀和/或出端口。
本实施例中,FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
所述RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID与计算度量值和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
进一步地,在S201之前,本实施例的方法还可以包括:
S205、所述出口路由设备从所述计算容器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态。
S206、出口路由设备根据计算容器的计算容量或计算状态生成相应的计算度量值。
S207、出口路由设备根据计算度量值、计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成RIB。
S208、出口路由设备根据RIB生成FIB。
本实施例提供的分段路由方法,通过出口路由设备接收来自入口路由设备或中间路由设备的报文,报文携带功能函数程序,功能函数程序用于指示按顺序的m个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括多个FID,出口路由设备根据转发信息库FIB或路由信息库RIB确定第一个FID和/或FID对应的IP地址前缀对应的出端口,出口路由设备将报文从出端口输出至计算容器,用于计算容器做FID对应的功能函数处理,计算容器为服务器、计算站点、虚拟机或容器。从而,将“名址映射”推迟到路由阶段,“名址映射”的“名”就是FID,“名址映射”的“址”就是IPv6地址,出口路由设备根据FID进行寻址或路由,获取实际时延最短或计算能力最强的计算主机/服务IP地址,而不是路由阶段之前事先分配的目的IP地址,因此,解决了计算主机的服务位置动态变化导致的地址不一致问题。
下面采几个具体的实施例,对图5和图10所示方法实施例的技术方案进行详细说明,下面的实施例中以入口路由设备为入口路由器,出口路由设备为出口路由器为例进行说明。
首先,对下文中图8a、图8b、图8c、图9a、图9b、图12、图14a、图14b、图14c和图14d中涉及的的英文简称做详细的解释,版本(Version,V),流量类型(Traffic Class,TC),流标签(Flow Label,FL),净荷长度(Payload Length,PL),下一扩展头(Next Header,NH),跳数限制(Hop Limit,HL),下一扩展头长度(Hdr Ext Len,HEL),路由类型(Routing Type),标志(Flags),可选的类型、长度值、对象(Optional Type Length Value objects),剩余段数(Segments Left,SL),最后项目(Last Entry,LE),标签(Tag,T)。
图11为本申请提供的一种SRv6系统的路由表设计示意图,如图11所示,该系统每个路由器,无论是硬件路由器或软件路由器(如虚拟路由器),都会维护一个RIB和FIB。图11中的虚拟路由器通常为出口路由器,例如SRv6路径分为两段,第一个分段的目的地址为路由器1(路由器1为出口路由器),第二个分段的目的地址为功能函数y(虚拟路由器为出口路由器)。这里的入口和出口是针对终端设备来说的,靠近终端设备的第一个路由器称为入口路由器,最后一个路由器称为出口路由器。
对于入口路由器、出口路由器和中间路由器,分别对应的RIB和FIB所包括的内容可参见上述实施例中的描述,此处不再赘述。
结合图11,下面为本申请提供的一种分段路由方法实施例一的过程,本实施例写出对第一分段的处理过程,其余分段处理过程类似,本实施例的方法可以包括:
S301、计算容器将其所支持的所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和计算容器的计算容量或计算状态发给虚拟路由器,最终被网络中各个路由器所获得。
具体是虚拟路由器将计算容器将其所支持的所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和计算容器的计算容量或计算状态发给与虚拟路由器连接的其它路由器,虚拟路由器(是软件的话)与其他路由器通过路由协议交互,虚拟路由器是硬件时与其他路由器直接连接。
S302、网络中各个路由器根据计算容器的计算容量或计算状态生成相应的计算度量值,根据计算度量值、计算容器所支持的功能函数实例的FID、IP地址前缀(图11 中简称sub)或出口路由设备地址生成RIB,根据RIB生成FIB。
S303、入口路由设备接收到终端设备的报文后,获取与终端设备的报文对应的功能函数程序,功能函数程序用于指示按顺序的n个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令。
具体地,可选的,终端设备的报文并不携带FID,则需由入口路由器从控制器或网络管理系统获得功能函数程序,将功能函数程序放入功能函数列表域。这要求控制器或网络管理系统能够配合。
可选的,终端设备的报文携带FID,客户端直接获取功能函数程序,可以向DNS发送携带URI或应用软件名称或服务名称的请求报文,从DNS的响应报文获得对应的功能函数程序,将功能函数程序放置于图8a所示的IPv6报文头的功能函数列表域,用于将功能函数程序携带给网络或计算站点,然后入口路由器域添加图8b所示的扩展头,并将功能函数程序由放置于图8a所示的IPv6报文头功能函数列表域拷贝至图8b扩展头的功能函数列表域。
S304、当入口路由器获取到功能函数程序={FID1,FID2…}后,入口路由器根据FID查FIB(数据面),若FIB表不存在FID1项目,则查RIB,具体是根据计算度量值的大小,来选择或计算一条路由项目,得到FID对应的IP地址前缀或出口路由器地址或出端口;例如,可以选择最小计算度量值对应的IP地址前缀;以此形成基于FID转发的FIB项目,如图11左下角所示的FIB。
后续报文进入,入口路由器采用最长前缀匹配规则的方式查FIB,(因为此时相应的FIB项目已经存在)得到FID=FID1相应的IP地址前缀(如IP地址前缀1),则可直接执行S305;
S305、入口路由器将FID添加前缀得到一个IP地址,即图11中的IP sub:FID1,然后将该地址作为IP目的地址对报文进行转发;或者,把出口路由器IP地址作为隧道目的地址对报文添加隧道封装,将报文由入口路由器送到出口路由器,此时将绕过S306,进入S307;
通常,该地址IP sub:FID1即为功能函数实例的IP地址;当有多个相同FID的功能函数实例时,FID相当于Anycast ID;通常DC按leaf交换机端口规划IP地址前缀,则计算站点间、leaf交换机端口间的相同FID的功能函数实例由IP地址前缀区分,leaf交换机端口内的相同FID的功能函数实例由哈希值区分或由计算站点内部负载均衡器区分。
可选地,入口路由器根据报文携带的多元组(如五元组)进行hash(哈希)得到一个hash值,用于区分同一个计算容器(如服务器)上的多个相同FID的功能函数实例,并将hash值可以通过IPv6扩展头或IPv6报文头的除目的地址外的其它域(如流标签域)进行携带。入口路由设备按上述过程获取所述报文携带的哈希值,根据所述哈希值查找所述入口路由设备存储的哈希表中与所述哈希值对应的输出的IP地址前缀或出口路由设备地址或出端口。
S306、当携带IP sub:FID1的报文经过中间某个路由器时,路由器根据最长前缀匹配查FIB,若FIB表不存在IP sub项目,则查RIB,根据计算度量值的大小,来选择 或计算一条路由项目,得到FID对应的最佳目的地IP地址前缀、出端口;由于可以把相同IP地址前缀项目进行汇聚,所以可以得到仅包含IP地址前缀和出端口的FIB,如图11下面中间的FIB表;然后路由器将报文由出端口转发,后续报文进入,路由器根据最长前缀匹配查FIB,得到出端口,将报文由出端口输出。
S307、当携带IP sub:FID1的报文经过出口路由器,若有隧道封装,则去除隧道封装,出口路由器根据报文携带的IP地址前缀(subnet)和/或FID查FIB,若FIB表不存在IP sub和/或FID1项目,则查RIB,根据计算度量值的大小,来选择或计算一条路由项目,得到FID对应的最佳目的地IP地址前缀、出端口。
可选地,出口路由器获得报文携带hash值,并将其与上述IP地址前缀和/或IP地址前缀、出端口,共同组成FIB,如图11右下角的FIB表。然后将报文由出端口转发,到达计算站点做FID1对应的功能函数处理。
S308、出口路由器或计算容器,将FID2…FID8域向左移位删除FID1,末位移位后补0;如果功能函数列表全为0,则表示完成所有功能函数处理,则删除功能函数程序所在的IPv6扩展头。
后续报文进入,出口路由器根据IP地址前缀和/或FID查FIB,得到出端口,然后将报文由出端口输出,到达计算站点做FID1对应的功能函数处理。同样,出口路由器/支持SR的计算站点,图12为SRH中功能函数列表移位删除FID1的示意图,如图12所示,通过将FID2…FID8域向左移位删除FID1,末位移位后补0;如果功能函数列表全为0,则表示完成所有功能函数处理,则删除功能函数程序所在的IPv6扩展头。
结合图11,下面为本申请提供的一种分段路由方法实施例二的过程,本实施例写出对第一分段的处理过程,其余分段处理过程类似,本实施例的方法可以包括:
S401-S402与S301-S302相同,详细可参见相同描述,此处不再赘述。可选的,本实施例中要求计算容器的IP地址前缀应为FID0:IP subnet::/32,即1111:IP subnet1::/32,也就是IP子网以开始符FID0=1111::/16为前缀,这里假设FID为16bit,8位或32雷同。
S403、入口路由设备接收到终端设备的报文后,获取与终端设备的报文对应的功能函数程序,功能函数程序用于指示按顺序的n个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,功能函数程序包括多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令。
具体地,可选的,终端设备的报文并不携带FID,则需由入口路由器从控制器或网络管理系统获得功能函数程序,将功能函数程序放入功能函数列表域。这要求控制器或网络管理系统能够配合。假设SR路径分为两段,功能函数程序={FID1,FID2},得到图8a所示的IPv6报文头。
可选的,终端设备的报文携带FID,客户端直接获取功能函数程序,可以向DNS发送携带URI或应用软件名称或服务名称的请求报文,从DNS的响应报文获得对应的功能函数程序,将功能函数程序放置于图8a所示的IPv6报文头的功能函数列表域,用于将功能函数程序携带给网络或计算站点,假设SR路径分为两段,功能函数程序={FID1,FID2},得到图8a所示的IPv6报文头。
S404、当入口路由器得到功能函数程序={FID1,FID2},入口路由器根据最长前缀 匹配规则查FIB(本例是用FID0:FID1=1111:FID2去做最长前缀匹配,下同),若FIB表不存在FID1项目(本例是不存在1111:FID1项目),则查RIB,根据计算度量值的大小,来选择或计算一条路由项目,得到FID对应的IP地址前缀或出端口;例如,可以选择最小计算度量值对应的IP地址前缀(如IP subnet1);以此形成基于FID转发的FIB项目,如图11角的FIB。
后续报文进入,根据最长前缀匹配规则查FIB,(因为此时相应的FIB项目已经存在)得到FID=FID1相应的IP地址前缀(如IP subnet1),则可直接执行S305。
S405、入口路由器将IP地址前缀(如IP subnet1)放入原FID1所在的域,如图8b,然后将报文进行转发。
为了避免FID丢失,计算站点或出口路由器可能需要用到FID来寻找相应的功能函数实例,可选地,入口路由器将第一个FID(如FID1)保存到IP报文头的流标签域,如图8b,然后才将第一个FID(如FID1)置换为对应的IP地址前缀(如IP subnet1);
可选地,入口路由器根据报文携带的多元组(如五元组)进行哈希得到一个哈希值,用于区分同一个计算容器(如服务器)上的多个相同FID的功能函数实例,并将哈希值可以通过IPv6扩展头或其它域携带。
S406、当携带IP地址前缀1的报文经过中间某个路由器时,路由器根据最长前缀匹配查FIB,若FIB表不存在IP地址前缀1项目,则查RIB,根据计算度量值的大小,来选择或计算一条路由项目,得到FID对应的最佳目的地IP地址前缀、出端口,由于可以把相同IP地址前缀项目进行汇聚,所以可以得到仅包含IP地址前缀和出端口的FIB,如图11下面中间的FIB表;然后路由器将报文由出端口转发,后续报文进入,路由器根据最长前缀匹配查FIB,得到出端口,将报文由出端口输出。
S407、当携带IP地址前缀1的报文经过出口路由器,出口路由器根据报文携带的IP地址前缀1和/或FID1查FIB,若FIB表不存在IP地址前缀1和/或FID1项目,则查RIB,根据计算度量值的大小,来选择或计算一条路由项目,得到FID对应的最佳目的地IP地址前缀、出端口。
可选地,出口路由器获得报文携带hash值,并将其与上述IP地址前缀和/或IP地址前缀、出端口,共同组成FIB,如图11右下角的FIB表。
然后将报文由出端口转发,到达计算站点做FID1对应的功能函数处理。
出口路由器/支持SR的计算站点,通过将FID2…FID8域向左移位删除FID1,末位移位后补0;如果功能函数列表全为0,则表示完成所有功能函数处理,则删除SRv6扩展头。
后续报文进入,出口路由器根据IP subnet1和/或FID1查FIB,得到出端口,然后将报文由出端口输出,到达计算站点做FID1对应的功能函数处理。同样,出口路由器/支持SR的计算站点,通过将FID2…FID8域向左移位删除FID1,末位移位后补0;如果功能函数列表全为0,则表示完成所有功能函数处理,则删除SRv6扩展头。
图13为本申请提供的一种分段路由方法实施例第一部分的流程图,如图13所示,本实施例中以城域网为例,客户端/用户设备经客户终端设备(customer-premises equipment,CPE)接入网络,CPE可以是企业网接入路由器、家庭网关或微基站,接入节点(Access node,AN)可以是数字用户线接入复接器(Digital subscriber line access  multiplexer,DSLAM)、光线路终端(ptical line terminal,OLT)或基站,AN即图13中的②;CPE(图13中的①)相当于入口路由器,假设一条SRv6路径包含两个分段,第一个分段由CPE到路由器3/服务器3(图13中的③),然后在服务器3做第一个功能函数程序的处理,第二个分段由路由器3到路由器5/服务器5(图13中的⑤),然后在服务器5做第二个功能函数程序的处理。其中,路由器3可以运行于服务器3,路由器5可以运行于服务器5,相当于软件化的虚拟路由器。则,CPE或AN为第一个分段的入口路由器,路由器3为第一个分段的出口路由器;路由器3为第二个分段的入口路由器,路由器5为第二个分段的出口路由器。
假设,服务器3、服务器5、路由器3、路由器4(即图13中的④)和路由器5位于一个边缘计算站点内;在另一种实施例中,可以是服务器3和路由器3位于一个边缘计算站点内,服务器5和路由器5位于另一个边缘计算/云计算站点内,路由器4联通这两个计算站点。假设,服务器3所在叶子交换机(leaf)端口分配的IP子网为A3,服务器5所在叶子交换机端口分配的IP子网为A5。
如图13所示,本实施例的方法包括:
S401、客户端/用户设备输出报文,以以太网承载IP协议(IP over Ethernet,IPoE)报文为例,客户端/用户设备可以直接获取功能函数程序,还可以向DNS发携带URI或应用软件名称或服务名称的请求报文,从DNS的响应报文获得对应的功能函数程序,将功能函数程序放置于图8a所示的IPv6报文头功能函数列表域,用于将功能函数程序携带给网络或计算站点;假设SR路径分为两段,对应的功能函数程序={A32,A76},其中,A32,A76为按顺序执行的FID,FID1为A32,FID2为A76,得到图14a所示的IPv6报文头,图14a为一种IPv6报文头的示意图。
S402、入口路由器CPE获取功能函数程序={A32,A76},根据FID=A32查入口路由器的RIB,假设计算状态为服务器负载,则按最轻负载来选择路由项目,即选择IP地址前缀=A3的路由项目,生成FIB;然后,图14b为一种IP报文头的功能列表操作示意图,如图14b所示,入口路由器将FID=A32拷贝到IP报文头的流标签域,将IP地址前缀=A3放入原FID1所在的域,即图13中的功能列表={A3,A76},然后将报文进行转发。
S403、报文到达出口路由器(路由器3),出口路由器根据IP地址前缀=A3和/或FID=A32查FIB,得到虚拟出端口=App32,然后将报文由出端口输出,转给App32容器(Container)做FID=A32对应的功能函数处理。若FID1对应的功能函数不支持SRv6,图14c为一种IP报文头的功能列表操作示意图,则如图14c所示,出口路由器通过将FID2…FID8域向左移位删除FID1,末位移位后补0,即图13中的功能列表={A76,0}。图14c的删除操作可以在FID=A32对应的功能函数处理结束后才做,也可以结束前提前操作以加快处理速度。
图15为本申请提供的一种分段路由方法实施例第二部分的流程图,如图15所示,接着,
S404、若FID1对应的功能函数支持SRv6,则经过如图14c计算站点功能函数处理后,通过将FID2…FID8域向左移位删除FID1,末位移位后补0,即图11中的功能函数列表={A76,0};计算站点App32容器(Container)可选根据流标签域中的FID1 来选择相应的功能函数实例做相应的功能函数处理。
S405、入口路由器获取功能函数程序={A76,0},根据FID=A76查FIB,得到A76对应的IP地址前缀=A5,出端口=端口2;然后,图14d为一种IP报文头的功能列表操作示意图,如图14d所示,入口路由器将FID=A76拷贝到IP报文头的流标签域,将IP地址前缀=A5放入原FID1所在的域,即图11中的功能函数列表={A5,0},然后将报文由端口2进行转发。
图16为本申请提供的一种分段路由方法实施例第三部分的流程图,如图16所示,接着,
S406、中间路由器(路由器4)根据最长前缀匹配查FIB,得到出端口=端口2,将报文由端口2输出。
S407、报文到达出口路由器,出口路由器(路由器5)根据IP地址前缀=A5和/或FID=A76查FIB,得到虚拟出端口=App76,然后将报文由出端口输出,转给App76容器(Container)做FID=A76对应的功能函数处理。若FID1对应的功能函数不支持SRv6,则如图14c,出口路由器通过将FID2…FID8域向左移位删除FID1,末位移位后补0,即得到功能函数列表={0,0},因为功能函数列表全为0,则表示完成所有功能函数处理,则删除可能存在的SRv6扩展头;若FID1对应的功能函数支持SRv6,则由计算站点做删除操作。
图17为本申请提供的另一种分段路由方法实施例第一部分的流程图,如图17所示,本实施例的方法包括:
S501、客户端/用户设备输入报文,以IPoE或以太网承载点到点协议(PPP over Ethernet,PPPoE)报文为例,客户端的报文并不携带FID,则需由入口路由器CPE从控制器或网络管理系统获得功能函数程序={A32,A76},然后把功能函数程序放入功能函数列表域构成SR报文头(SR header,SRH),根据FID=A32查入口路由器的RIB,假设计算状态为服务器负载,则按最轻负载来选择路由项目,即选择IP子网为A3的路由项目,生成FIB项目,然后,入口路由器CPE将FID=A32添加前缀A3得到一个IP地址,即图11中的A3:A32,然后将该地址作为IP目的地址对报文进行转发。其中,ETH为Ethernet(以太网)。
可选的,AN做SR SR监听(Snooping),根据接收数据报文的端口和业务类型,在SRH中插入相应的标识(如S-ID和C-ID),该标识(即图中的S-ID和C-ID)携带于SRH的可选类型、长度值和对象(Optional Type Length Value object);S-ID和C-ID用于取代宽带接入网络中的服务VLAN ID(S-VID)和用户VLAN ID(C-VID)。
图18为本申请提供的另一种分段路由方法实施例第二部分的流程图,如图18所示,接着,
S502、出口路由器(路由器3)接收SR报文,查FIB得到虚拟端口=App32,将报文由出端口转给App32容器做FID=A32的处理;处理完后,出口路由器Router3/计算站点服务器3移位去除SRH中的A32,或者,SRH指针计数指向下一个FID=A76,转发修改后的SR报文。
S503、入口路由器(路由器3)根据SRH中的FID=A76查FIB,得到IP地址前缀=A5,出端口=端口2,入口路由器将FID=A76添加前缀A5得到一个IP地址,即图 12中的A5:A76,然后将该地址作为IP目的地址对报文由端口2进行转发。
图19为本申请提供的另一种分段路由方法实施例第三部分的流程图,如图19所示,接着,
S504、中间路由器(路由器4)根据最长前缀匹配查FIB,得到出端口=端口2,将报文由端口2输出。
S505、出口路由器(路由器5)接收SR报文,根据IP地址前缀=A5和/或FID=A76查FIB得到虚拟端口=App76,然后将报文由出端口输出,转给App76容器做FID=A76对应的功能函数处理。若FID1对应的功能函数不支持SRv6,出口路由器通过将FID2…FID8域向左移位删除FID1,末位移位后补0,即得到功能函数列表={0,0},因为功能函数列表全为0,则表示完成所有功能函数处理,则删除SRv6扩展头;若FID1对应的功能函数列表支持SRv6,则由计算站点做删除操作。
图20为本申请提供的又一种分段路由方法实施例第一部分的流程图,如图20所示,本实施例的方法包括:
S601、客户端/用户设备输出报文,以(IP over Ethernet,IPoE)报文为例。客户端/用户设备的输出报文携带功能函数程序={A32,A76},功能函数程序可以从DNS系统得到,则入口路由器把功能函数程序放入功能函数列表域构成SR报文头,根据FID=A32查入口路由器RIB,假设计算状态为服务器负载,则按最轻负载来选择路由项目,即选择IP子网为A3的路由项目,生成FIB项目;然后,入口路由器将FID=A32添加前缀A3得到一个IP地址,即图20中的A3:A32,然后将该地址作为IP目的地址对报文进行转发。
可选地,AN做SR Snooping,根据接收数据报文的端口和业务类型,在SRH中插入相应的标识(如S-ID和C-ID),该标识(即图20中的S-ID和C-ID)携带于SRH的可选类型、长度值和对象(Optional Type Length Value object);S-ID和C-ID用于取代宽带接入网络中的S-VID和C-VID。
图21为本申请提供的另一种分段路由方法实施例第二部分的流程图,如图21所示,接着,
S602、出口路由器Router3接收SR报文,查FIB得到虚拟端口=App32,将报文由出端口转给App32容器做FID=A32的处理;处理完后,出口路由器Router3/计算站点服务器3移位去除SRH中的A32,或者,SRH指针计数指向下一个FID=A76,转发修改后的SR报文。
S603、入口路由器Router3根据SRH中的FID=A76查FIB,得到IP地址前缀=A5,出端口=端口2;入口路由器将FID=A76添加前缀A5得到一个IP地址,即图21中的A5:A76,然后将该地址作为IP目的地址对报文由端口2进行转发。
图22为本申请提供的又一种分段路由方法实施例第三部分的流程图,如图22所示,接着,
S604、中间路由器(路由器4)根据最长前缀匹配查FIB,得到出端口=端口2,将报文由端口2输出。
S605、出口路由器(路由器5)接收SR报文,根据IP地址前缀=A5和/或FID=A76查FIB得到虚拟端口=App76,然后将报文由出端口输出,转给App76容器做FID=A76 对应的功能函数处理。若FID1对应的功能函数不支持SRv6,出口路由器通过将FID2…FID8域向左移位删除FID1,末位移位后补0,即得到功能函数列表={0,0},因为功能函数列表全为0,则表示完成所有功能函数处理,则删除SRv6扩展头;若FID1对应的功能函数列表支持SRv6,则由计算站点做删除操作。
图23为本申请提供的一种分段路由装置实施例的结构示意图,如图23所示,本实施例的装置可以包括:接收模块21、获取模块22和转发处理模块23,其中,接收模块21用于接收终端设备的报文。
获取模块22用于获取与所述终端设备的报文对应的功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
转发处理模块23用于根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发。
进一步地,所述终端设备的报文未携带FID,所述获取模块22用于:
从控制器/网管系统获取与所述终端设备的报文对应的功能函数程序,并将所获取的功能函数程序放入所述报文中。
进一步地,所述终端设备的报文携带FID,所述获取模块22用于:
所述入口路由设备从所述终端设备的报文中获取功能函数程序,所述功能函数程序为所述终端设备从域名服务器DNS发送的响应报文中获取并放入所述报文中,所述响应报文为所述DNS根据接收到的携带通用资源标识符URI或应用软件名称或服务名称的请求报文发送。
进一步地,所述功能函数程序被放入IPv6扩展头;或者,
所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
进一步地,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
进一步地,所述转发处理模块23用于:
从所述FIB或RIB中查找与所述FID对应的IP地址前缀;
将所述FID添加所述IP地址前缀得到一个IP地址,将所述IP地址作为IP目的地址对所述报文进行转发,或者,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发,或者,将所述FID保存到IP报文头的除目的地址外的其它域,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发;
或者,
从所述FIB或RIB中查找与所述FID对应的出口路由设备地址,把所述出口路由设备地址作为隧道目的地址对所述报文添加隧道封装,将添加隧道封装后的报文由入口路由设备送到出口路由设备;
或者,
从所述FIB或RIB中查找与所述FID对应的出端口,根据所述出端口将所述报文输出。
进一步地,所述FIB包括:FID与输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由设备地址和出端口的对应关系,或者,FID与出端口的对应关系;
所述RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由设备地址和出端口的对应关系,FID与计算度量值和出端口的对应关系。
本实施例的装置,可以用于执行图5所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图24为本申请提供的一种分段路由装置实施例的结构示意图,如图24所示,本实施例的装置可以包括:接收模块31、确定模块32和输出模块33,其中,
接收模块31用于接收来自入口路由设备或中间路由设备的报文,所述报文携带功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
确定模块32用于根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID和/或所述FID对应的IP地址前缀对应的出端口;
输出模块33用于将所述报文从所述出端口输出至计算容器,用于所述计算容器做所述FID对应的功能函数处理,所述计算容器为服务器、计算站点、虚拟机或容器。
本实施例的装置,可以用于执行图10所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图25为本申请提供的一种分段路由装置实施例的结构示意图,如图25所示,本实施例的装置在图24所示装置结构的基础上,进一步地,还可以包括:处理模块34,该处理模块34用于将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除所述功能函数程序所在的IPv6扩展头。
图26为本申请提供的一种分段路由装置实施例的结构示意图,如图26所示,本实施例的装置在图24所示装置结构的基础上,进一步地,还可以包括:获取模块35,获取模块35用于获取所述报文携带的哈希值,根据所述哈希值查找所述出口路由设备存储的哈希表中与所述哈希值对应的IP地址前缀和/或出端口。
进一步地,FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
所述RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID与计算度量值和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
进一步地,功能函数程序被放入IPv6扩展头;或者,
所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
进一步地,功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
本实施例的装置,可以用于执行图10所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图27为本申请提供的一种分段路由装置实施例的结构示意图,如图27所示,本实施例的装置在图24所示装置结构的基础上,进一步地,还可以包括:生成模块36,生成模块36用于从运行在所述计算容器里面的虚拟路由器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态;
根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
根据所述RIB生成所述FIB。
本申请可以根据上述方法示例对分段路由装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请各实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图28为本申请提供的一种装置结构示意图,如图28所示,该装置300包括:存储器301和处理器302;
存储器301,用于存储计算机程序;
处理器302,用于执行存储器存储的计算机程序,以实现上述实施例中的分段路由方法。具体可以参见前述方法实施例中的相关描述。
可选地,存储器301既可以是独立的,也可以跟处理器302集成在一起。
当存储器301是独立于处理器302之外的器件时,装置300还可以包括:
总线303,用于连接存储器301和处理器302。
可选地,本实施例还包括:通信接口304,该通信接口304可以通过总线303与处理器302连接。处理器302可以控制通信接口303来实现装置300的上述的接收和发送的功能。
该装置可以用于执行上述方法实施例中入口路由设备或出口路由设备对应的各个步骤和/或流程。
本申请还提供一种可读存储介质,可读存储介质中存储有执行指令,当上述装置的至少一个处理器执行该执行指令时,终端设备执行上述方法实施例中的分段路由方法。
本领域普通技术人员可以理解:在上述实施例中,可以全部或部分地通过软件、 硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。

Claims (27)

  1. 一种分段路由方法,其特征在于,包括:
    入口路由设备接收终端设备发送的报文;
    所述入口路由设备获取与所述终端设备的报文对应的功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
    所述入口路由设备根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发。
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备的报文未携带FID,所述获取与所述终端设备的报文对应的功能函数程序,包括:
    所述入口路由设备从控制器/网管系统获取与所述终端设备的报文对应的功能函数程序,并将所获取的功能函数程序放入所述报文中。
  3. 根据权利要求1所述的方法,其特征在于,所述终端设备的报文携带FID,所述获取与所述终端设备的报文对应的功能函数程序,包括:
    所述入口路由设备从所述终端设备的报文中获取功能函数程序,所述功能函数程序为所述终端设备从域名服务器DNS发送的响应报文中获取并放入所述报文中,所述响应报文为所述DNS根据接收到的携带通用资源标识符URI或应用软件名称或服务名称的请求报文发送。
  4. 根据权利要求2或3所述的方法,其特征在于,所述功能函数程序被放入IPv6扩展头;或者,
    所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
  5. 根据权利要求4所述的方法,其特征在于,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
    所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述入口路由设备根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发,包括:
    所述入口路由设备从所述FIB或RIB中查找与所述FID对应的IP地址前缀;
    将所述FID添加所述IP地址前缀得到一个IP地址,将所述IP地址作为IP目的地址对所述报文进行转发,或者,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发,或者,将所述FID保存到IP报文头的除目的地址外的其它域,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发;
    或者,
    所述入口路由设备从所述FIB或RIB中查找与所述FID对应的出口路由设备地址, 把所述出口路由设备地址作为隧道目的地址对所述报文添加隧道封装,将添加隧道封装后的报文由入口路由设备送到出口路由设备;
    或者,
    所述入口路由设备从所述FIB或RIB中查找与所述FID对应的出端口,根据所述出端口将所述报文输出。
  7. 根据权利要求6所述的方法,其特征在于,所述将所述IP地址作为IP目的地址对所述报文进行转发之前,或者根据所述IP地址前缀对所述报文进行转发之前,所述方法还包括:
    所述入口路由设备根据多元组做哈希运算得到一个哈希值,将所述哈希值放入IPv6扩展头或IPv6报文头的除目的地址外的其它域;
    或者,所述入口路由设备获取所述报文携带的哈希值,根据所述哈希值查找所述入口路由设备存储的哈希表中与所述哈希值对应的输出的IP地址前缀或出口路由设备地址或出端口。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,
    所述FIB包括:FID与输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由设备地址和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
    所述RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由设备地址和出端口的对应关系,FID与计算度量值和出端口的对应关系,或者,FID和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述入口路由设备从计算容器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态,所述计算容器为服务器、计算站点、虚拟机或容器;
    所述入口路由设备根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
    所述入口路由设备根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
    所述入口路由设备根据所述RIB生成所述FIB。
  10. 一种分段路由方法,其特征在于,包括:
    出口路由设备接收来自入口路由设备或中间路由设备的报文,所述报文携带功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
    所述出口路由设备根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID和/或所述FID对应的IP地址前缀对应的出端口;
    所述出口路由设备将所述报文从所述出端口输出至计算容器,用于所述计算容器做所述FID对应的功能函数处理,所述计算容器为服务器、计算站点、虚拟机或容器。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    所述出口路由设备将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,
    所述出口路由设备将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除所述功能函数程序所在的IPv6扩展头。
  12. 根据权利要求10所述的方法,其特征在于,若所述报文携带哈希值,所述方法还包括:
    所述出口路由设备获取所述报文携带的哈希值,根据所述哈希值查找所述出口路由设备存储的哈希表中与所述哈希值对应的IP地址前缀和/或出端口。
  13. 根据权利要求10-12任一项所述的方法,其特征在于,
    所述FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
    所述RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID与计算度量值和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
  14. 根据权利要求10-13任一项所述的方法,其特征在于,
    所述功能函数程序被放入IPv6扩展头;或者,
    所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
  15. 根据权利要求14所述的方法,其特征在于,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
    所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
  16. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    所述出口路由设备从所述计算容器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态;
    所述出口路由设备根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
    所述出口路由设备根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
    所述出口路由设备根据所述RIB生成所述FIB。
  17. 一种分段路由装置,其特征在于,包括:
    接收模块,用于接收终端设备发送的报文;
    获取模块,用于获取与所述终端设备的报文对应的功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一 个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
    转发处理模块,用于根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID对应的IP地址前缀、出口路由设备地址或出端口中的一个,并根据所确定的IP地址前缀或出口路由设备地址或出端口中的一个对所述报文进行转发。
  18. 根据权利要求17所述的装置,其特征在于,所述终端设备的报文未携带FID,所述获取模块用于:
    从控制器/网管系统获取与所述终端设备的报文对应的功能函数程序,并将所获取的功能函数程序放入所述报文中。
  19. 根据权利要求17所述的装置,其特征在于,所述终端设备的报文携带FID,所述获取模块用于:
    所述入口路由设备从所述终端设备的报文中获取功能函数程序,所述功能函数程序为所述终端设备从域名服务器DNS发送的响应报文中获取并放入所述报文中,所述响应报文为所述DNS根据接收到的携带通用资源标识符URI或应用软件名称或服务名称的请求报文发送。
  20. 根据权利要求18或19所述的装置,其特征在于,所述功能函数程序被放入IPv6扩展头;或者,
    所述功能函数程序被放入IPv6报文头的目的地址域或所述IPv6报文头的目的地址域和IPv6扩展头。
  21. 根据权利要求20所述的装置,其特征在于,所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中,或者,
    所述功能函数程序用到的计算相关数据被放入净荷域或所述IPv6扩展头中。
  22. 根据权利要求17-21任一项所述的装置,其特征在于,所述转发处理模块用于:
    从所述FIB或RIB中查找与所述FID对应的IP地址前缀;
    将所述FID添加所述IP地址前缀得到一个IP地址,将所述IP地址作为IP目的地址对所述报文进行转发,或者,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发,或者,将所述FID保存到IP报文头的除目的地址外的其它域,将所述FID置换为与所述FID对应的IP地址前缀,根据所述IP地址前缀对所述报文进行转发;
    或者,
    从所述FIB或RIB中查找与所述FID对应的出口路由设备地址,把所述出口路由设备地址作为隧道目的地址对所述报文添加隧道封装,将添加隧道封装后的报文由入口路由设备送到出口路由设备;
    或者,
    从所述FIB或RIB中查找与所述FID对应的出端口,根据所述出端口将所述报文输出。
  23. 根据权利要求17-22任一项所述的装置,其特征在于,
    所述FIB包括:FID与输出的IP地址前缀和出端口的对应关系,或者,FID与出口路由设备地址和出端口的对应关系,或者,FID与出端口的对应关系;
    所述RIB包括:FID与计算度量值、输出的IP地址前缀和出端口的对应关系,或者,FID与计算度量值、出口路由设备地址和出端口的对应关系,FID与计算度量值和出端口的对应关系。
  24. 一种分段路由装置,其特征在于,包括:
    接收模块,用于接收来自入口路由设备或中间路由设备的报文,所述报文携带功能函数程序,所述功能函数程序用于指示一个或按顺序的多个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令,所述功能函数程序包括一个或按顺序放置的多个功能函数标识FID,每一个FID用于表示一个计算处理步骤/指令、服务处理步骤/指令或网络处理步骤/指令;
    确定模块,用于根据转发信息库FIB或路由信息库RIB确定按顺序放置的第一个FID和/或所述FID对应的IP地址前缀对应的出端口;
    输出模块,用于将所述报文从所述出端口输出至计算容器,用于所述计算容器做所述FID对应的功能函数处理,所述计算容器为服务器、计算站点、虚拟机或容器。
  25. 根据权利要求24所述的装置,其特征在于,所述装置还包括:
    处理模块,用于将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0;或者,
    将所述功能函数程序包括的多个FID进行移位,删除已处理的FID,末位移位后补0,在完成所有的FID对应的功能函数处理后,删除所述功能函数程序所在的IPv6扩展头。
  26. 根据权利要求24或25所述的装置,其特征在于,
    所述FIB包括:FID与输入的IP地址前缀和出端口的对应关系,或者,FID与出端口的对应关系,或者,FID与哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数;
    所述RIB包括:FID与计算度量值、输入的IP地址前缀和出端口的对应关系,或者,FID与计算度量值和出端口的对应关系,或者,FID与计算度量值和哈希表相关参数的对应关系,所述哈希表相关参数包括哈希表的起始位置和/或项目总数。
  27. 根据权利要求24所述的装置,其特征在于,所述装置还包括:
    生成模块,用于从运行在所述计算容器里面的虚拟路由器获取所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址和所述计算容器的计算容量或计算状态;
    根据所述计算容器的计算容量或计算状态生成相应的计算度量值;
    根据所述计算度量值、所述计算容器所支持的功能函数实例的FID、IP地址前缀或出口路由设备地址生成所述RIB;
    根据所述RIB生成所述FIB。
PCT/CN2020/113260 2019-09-04 2020-09-03 分段路由方法及装置 WO2021043216A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20860682.2A EP4024781A4 (en) 2019-09-04 2020-09-03 METHOD AND DEVICE FOR SEGMENT ROUTING
US17/686,798 US20220231948A1 (en) 2019-09-04 2022-03-04 Segment routing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910834195.2 2019-09-04
CN201910834195.2A CN112448887B (zh) 2019-09-04 2019-09-04 分段路由方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/686,798 Continuation US20220231948A1 (en) 2019-09-04 2022-03-04 Segment routing method and apparatus

Publications (1)

Publication Number Publication Date
WO2021043216A1 true WO2021043216A1 (zh) 2021-03-11

Family

ID=74734145

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/113260 WO2021043216A1 (zh) 2019-09-04 2020-09-03 分段路由方法及装置

Country Status (4)

Country Link
US (1) US20220231948A1 (zh)
EP (1) EP4024781A4 (zh)
CN (1) CN112448887B (zh)
WO (1) WO2021043216A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11812362B2 (en) * 2021-03-01 2023-11-07 Juniper Networks, Inc. Containerized router with a disjoint data plane
CN115604186A (zh) * 2021-07-09 2023-01-13 华为技术有限公司(Cn) 路由方法及相关设备
WO2023179457A1 (zh) * 2022-03-21 2023-09-28 华为技术有限公司 业务连接的标识方法、装置、系统及存储介质
CN114500453B (zh) * 2022-03-31 2022-06-17 北京邮电大学 一种标识解析方法和装置
CN117675693A (zh) * 2024-01-08 2024-03-08 北京瑞和云图科技有限公司 网络流量处理方法、装置、设备及计算机可读存储介质
CN117675694A (zh) * 2024-01-08 2024-03-08 北京瑞和云图科技有限公司 网络流量处理方法、装置、设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857422A (zh) * 2012-09-13 2013-01-02 烽火通信科技股份有限公司 基于ospf路由协议实现olt语音双上联保护的系统及方法
CN105049350A (zh) * 2014-04-17 2015-11-11 思科技术公司 分段路由-出口对等工程(sp-epe)
WO2018152019A1 (en) * 2017-02-17 2018-08-23 Cisco Technology, Inc. System and method to facilitate content delivery to multiple recipients in a network environment
CN109257278A (zh) * 2017-07-12 2019-01-22 瞻博网络公司 用于非分段路由启用的路由器的分段路由标签交换路径
US20190215267A1 (en) * 2018-01-09 2019-07-11 Cisco Technology, Inc. Segment Routing Network Processing of Packets including Packets having a Segment Identifier Structure Providing Processing and/or Memory Efficiencies

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2993821B1 (en) * 2013-04-28 2018-11-21 Huawei Technologies Co., Ltd. Stream classifier, service routing trigger, and message processing method and system
CN104380667B (zh) * 2013-06-14 2017-09-12 华为技术有限公司 一种数据报文的路由方法和设备
US11218405B2 (en) * 2017-01-25 2022-01-04 Nec Corporation Method and system for service function chaining

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857422A (zh) * 2012-09-13 2013-01-02 烽火通信科技股份有限公司 基于ospf路由协议实现olt语音双上联保护的系统及方法
CN105049350A (zh) * 2014-04-17 2015-11-11 思科技术公司 分段路由-出口对等工程(sp-epe)
WO2018152019A1 (en) * 2017-02-17 2018-08-23 Cisco Technology, Inc. System and method to facilitate content delivery to multiple recipients in a network environment
CN109257278A (zh) * 2017-07-12 2019-01-22 瞻博网络公司 用于非分段路由启用的路由器的分段路由标签交换路径
US20190215267A1 (en) * 2018-01-09 2019-07-11 Cisco Technology, Inc. Segment Routing Network Processing of Packets including Packets having a Segment Identifier Structure Providing Processing and/or Memory Efficiencies

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP4024781A4
VENTRE, PIER LUIGI ET AL.: "SDN Architecture and Southbound APIs for IPv6 Segment Routing Enabled Wide Area Networks", IEEE TRANSACTIONS ON NETWORK AND SERVICE MANAGEMENT, vol. 15, no. 4, 31 December 2018 (2018-12-31), XP011700553, DOI: 20201116165159A *

Also Published As

Publication number Publication date
CN112448887A (zh) 2021-03-05
EP4024781A1 (en) 2022-07-06
US20220231948A1 (en) 2022-07-21
EP4024781A4 (en) 2022-10-26
CN112448887B (zh) 2024-04-16

Similar Documents

Publication Publication Date Title
WO2021043216A1 (zh) 分段路由方法及装置
CN107819663B (zh) 一种实现虚拟网络功能服务链的方法和装置
CN107113241B (zh) 路由确定方法、网络配置方法以及相关装置
US10361954B2 (en) Method and apparatus for processing modified packet
KR101995145B1 (ko) Ue들 및 고정 액세스 네트워크에서 작동하는 방법
IL230406A (en) Cloud computing method and system for executing g3 package on cloud computer with open flow science and control planes
WO2015014187A1 (zh) 一种支持多租户的数据转发方法和装置
JPWO2011037105A1 (ja) コンテンツベーススイッチシステム、及びコンテンツベーススイッチ方法
WO2011029343A1 (zh) 身份位置分离网络的名址映射系统及数据传输方法
US11419171B2 (en) Method for establishing subflow of multipath connection, apparatus, and system
WO2019071995A1 (zh) 内容分发方法、设备及系统
WO2011015106A1 (zh) 用于上行传输流模板的管理方法和装置
CN108400922B (zh) 虚拟局域网络配置系统与方法及其计算机可读存储介质
US20070104200A1 (en) Network device with routing function and policy route setting method thereof
CN110022263B (zh) 一种数据传输的方法及相关装置
JP7298606B2 (ja) 通信システム及び通信方法
CN101115017A (zh) 一种删除mac地址的方法及装置
US11611508B2 (en) Packet forwarding method and network device
CN113395206B (zh) 路由确定方法、装置和网络设备
CN108810182B (zh) 一种基于openflow系统的NAT流表动态学习及配置方法
WO2011012081A1 (zh) 一种通信设备路由转发表的压缩方法和装置
WO2015100644A1 (zh) 一种处理报文的方法和装置
JP6307906B2 (ja) パケット転送装置、パケット転送システム及びパケット転送方法
WO2023193432A1 (zh) 一种数据转发方法及相关设备
WO2023169364A1 (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: 20860682

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020860682

Country of ref document: EP

Effective date: 20220329