WO2022143572A1 - Message processing method and related device - Google Patents

Message processing method and related device Download PDF

Info

Publication number
WO2022143572A1
WO2022143572A1 PCT/CN2021/141825 CN2021141825W WO2022143572A1 WO 2022143572 A1 WO2022143572 A1 WO 2022143572A1 CN 2021141825 W CN2021141825 W CN 2021141825W WO 2022143572 A1 WO2022143572 A1 WO 2022143572A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
interface
sub
network device
packet
Prior art date
Application number
PCT/CN2021/141825
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2022143572A1 publication Critical patent/WO2022143572A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3072Packet splitting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • H04L47/724Admission control; Resource allocation using reservation actions during connection setup at intermediate nodes, e.g. resource reservation protocol [RSVP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a message processing method and related equipment.
  • a pair of network devices is shared by multiple processes.
  • the pair of network devices is connected through a pair of physical interfaces, and the network device can deploy multiple sub-interfaces on the physical interface. Each sub-interface is bound to a corresponding process to achieve routing isolation between processes.
  • a sub-interface is usually allocated to each network shard under each process. Assuming that the number of network shards under each process is the same, then the physical interface The number of sub-interfaces that need to be divided is equal to the product of the number of processes to which the pair of network devices belongs and the number of network fragments under each process. In this way, if too many sub-interfaces are allocated on a physical interface, it is not only difficult to deploy, manage and maintain the sub-interfaces, but also because network sharding requires the resources of the bound sub-interfaces, so too many sub-interfaces are allocated. This results in too many resources to be reserved, which greatly reduces the scalability of the physical interface, and may also cause a problem that the resource demands on the physical interface exceed the tolerable range of the physical interface.
  • the embodiments of the present application provide a packet processing method and related equipment.
  • the network fragmentation is combined with a subsection of reserved resources in a physical interface.
  • the interface is bound, and the network device can send the received packet corresponding to the same physical interface according to the sub-interface to which the network fragment is bound. It is not necessary to allocate each network fragment under each process.
  • a sub-interface with reserved resources greatly reduces the number of sub-interfaces to be configured on a physical interface.
  • an embodiment of the present application provides a packet processing method, and the method is applied to a scenario in which a first network device is connected to a second network device through the target physical interface, wherein the first network device and the second network device
  • the device belongs to multiple identical network segments, the multiple network segments include the first network segment, the first network device and the second network device run multiple processes, the multiple processes include the first process and the the second process.
  • the The operations performed by the method may include: the first network device obtains a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, and the first destination address corresponds to The first process, in this way, the first network device determines the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment, and sends the information to the second network device based on the first sub-interface.
  • the first packet is described; the first network device obtains a second packet, the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, and the second destination address corresponds to The second process, the second process is different from the first process, in this way, the first network device determines the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment, and based on the The first sub-interface sends the second packet to the second network device.
  • each network fragment is allocated and bound to a sub-process Interface, which allocates sub-interfaces equal to the number of processes for multiple processes at most.
  • the sub-interface corresponding to the network shard reserves resources that can meet the resource requirements of the network shard, and the sub-interface bound to the process is used for Open the route between the pair of network devices without reserving resources.
  • the sub-interface bound to the process can be different from the sub-interface allocated for the network shard, or it can be reused as the sub-interface allocated for the network shard.
  • Sub-interfaces that reserve resources greatly reduce the number of sub-interfaces to be configured on a physical interface. Therefore, according to the method provided by the embodiment of the present application, when the first network device in the pair of network devices receives a message running in a different process but corresponding to the same network fragment, it can be based on the destination address of the message and the network fragment.
  • the identifier determines the sub-interface bound to the identifier of the network fragment under the physical interface, so that the determined sub-interface is used to send a packet to the second network device in the pair of network devices.
  • the accurate transmission of packets between the pair of network devices can be achieved by configuring fewer sub-interfaces.
  • the multiple processes in the embodiments of the present application are Interior Gateway Protocol (English: Interior Gateway Protocol, referred to as: IGP) processes, for example, may be Intermediate System-to-Intermediate System (English: Intermediate System-to-Intermediate System, referred to as: ISIS) processes ) process or Open Shortest Path First (English: Open Shortest Path First, referred to as: OSPF) process.
  • IGP Interior Gateway Protocol
  • ISIS Intermediate System-to-Intermediate System
  • OSPF Open Shortest Path First
  • the first process may be called a process corresponding to the first destination address. If the second destination address is learned through the IGP route in the second process, the second process may be called a process corresponding to the second destination address.
  • the reserved resources on the first sub-interface meet the resource requirements of the first network slice.
  • the process of determining the sub-interface actually forwarded according to the destination address in the packet and the identifier of the network fragment, taking the first network device forwarding the first packet as an example may include, for example: The first network device first determines a second sub-interface corresponding to the first process for the first packet according to the first destination address, and the second sub-interface belongs to the target physical interface; then, the first network device determines the second sub-interface according to the first network
  • the identifier of the slice is to determine the corresponding first sub-interface in the target physical interface of the first packet.
  • the second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface.
  • the first network device forwarding the second packet may include: the first network device first determines a fourth sub-interface corresponding to the second process for the second packet according to the second destination address, where the fourth sub-interface belongs to the target physical interface; then, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment.
  • the second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface, but the second sub-interface is different from the fourth sub-interface.
  • the second sub-interface or the fourth sub-interface may also be replaced with the target physical interface, so as to achieve the purpose of being routable to the second network device.
  • the operations performed by the method may further include: the first network device obtains the third packet
  • the destination address of the third packet is the third destination address
  • the third packet includes the identifier of the second network fragment
  • the third destination address corresponds to the third process
  • the multiple processes in this embodiment of the present application include all Describe the third process, the third process is different from the first process and the second process; like this, the first network device determines the third sub-interface in the target physical interface according to the third destination address and the identifier of the second network fragment, and, The third packet is sent to the second network device based on the third sub-interface.
  • a sub-interface is allocated and bound to the second network fragment and the first network fragment, and a maximum of sub-interfaces equal to the number of processes are allocated to multiple processes.
  • the sub-interface reserves resources that can meet the resource requirements of the network fragment, and the sub-interface bound to the process is used to open up the route between the pair of network devices. It can be achieved by configuring fewer sub-interfaces without reserving resources. The accurate transmission of messages between the pair of network devices.
  • the methods provided in the embodiments of the present application are applicable to Multi-Protocol Label Switching (English: Multi-Protocol Label Switching, MPLS for short) networks, Internet Protocol version 4 (English: Internet Protocol version 4, IPv4 for short) networks, or the first Internet Protocol version 6 (English: Internet Protocol version 6, referred to as: IPv6) network.
  • the first packet is an IPv6 packet
  • the identifier of the first network fragment can be carried in the Hop by Hop (English: Hop by Hop, abbreviated: HBH) option header of the first packet Or in the Destination Option Header (English: Destination Option Header, DOH for short).
  • the first packet is an IPv4 packet
  • the identifier of the first network fragment can be carried in the Options field of the first packet.
  • the TLV field is extended in the Options field
  • the identifier of the first network fragment is carried by the extended TLV field.
  • the first packet is an MPLS packet
  • the MPLS label stack of the first packet may include an indication label, where the indication label is used to indicate that the next MPLS label of the indication label carries the first MPLS label.
  • An identifier of a network fragment, wherein both the indicating label and the label carrying the identifier of the first network fragment are MPLS identifiers.
  • the label carrying the identifier of the first network segment may be located at the bottom of the MPLS label stack.
  • an embodiment of the present application further provides a packet processing apparatus, the apparatus is applied to a first network device, and the apparatus may include: a first obtaining unit, a first determining unit, a first sending unit, a second obtaining unit unit, a second determining unit and a second sending unit.
  • the first obtaining unit is configured to obtain a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, and the first destination address corresponds to a first process; a first determining unit, configured to determine a first sub-interface in a target physical interface according to the first destination address and the identifier of the first network fragment; a first sending unit, configured to based on the first sub-interface A sub-interface sends the first packet to the second network device; a second obtaining unit is configured to obtain a second packet, the destination address of the second packet is the second destination address, the second packet Including the identifier of the first network fragment, the second destination address corresponds to a second process, and the second process is different from the first process; a second determining unit is configured to The identifier of the first network fragment determines the first sub-interface in the target physical interface; a second sending unit is configured to send the second network device to the second network device based on the first sub-interface message.
  • the first network device is connected to the second network device through the target physical interface, the first network device and the second network device belong to multiple identical network slices, and the multiple network
  • the fragmentation includes the first network fragmentation, and the first network device and the second network device run a plurality of processes, the plurality of processes including the first process and the second process.
  • the reserved resources on the first sub-interface meet the resource requirements of the first network slice.
  • the first determination unit may include: a first determination subunit and a second determination subunit.
  • the first determining subunit is configured to determine, according to the first destination address, a second sub-interface corresponding to the first process for the first packet, where the second sub-interface belongs to the target physical interface and a second determining subunit, configured to determine the corresponding first subinterface in the target physical interface for the first packet according to the identifier of the first network fragment.
  • the second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface.
  • the apparatus may further include: a third obtaining unit, a third determining unit, and a third sending unit.
  • the third obtaining unit is configured to obtain a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, and the third destination
  • the address corresponds to a third process, the plurality of processes include the third process, and the third process is different from the first process and the second process;
  • a third determination unit is used to determine the third process according to the third purpose
  • the address and the identifier of the second network segment determine a third sub-interface in the target physical interface;
  • a third sending unit is configured to send the third sub-interface to the second network device based on the third sub-interface message.
  • the multiple processes are interior gateway protocol IGP processes.
  • the apparatus is suitable for MPLS network, IPv4 network or IPv6 network.
  • the message processing device provided in the second aspect is used to perform the relevant operations mentioned in the first aspect.
  • the relevant description of the first aspect No longer.
  • an embodiment of the present application further provides a network device, including: a memory and a processor.
  • the memory is used for storing program codes or instructions; the processor is used for running the program codes or instructions, so that the network device executes the method provided in the first aspect above.
  • embodiments of the present application further provide a computer-readable storage medium, where program codes or instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any of the above-mentioned first aspects.
  • an embodiment of the present application further provides a computer program product, which, when the computer program product runs on a network device, enables the network device to execute the method provided in any possible implementation manner of the first aspect.
  • the present application provides a network device, the network device comprising: a main control board and an interface board.
  • the main control board includes: a first processor and a first memory.
  • the interface board includes: a second processor, a second memory and an interface card. The main control board and the interface board are coupled.
  • the first memory can be used to store program codes, and the first processor is used to call the program codes in the first memory to perform the following operations: determine the target physical interface according to the first destination address and the identifier of the first network slice. a first sub-interface; determining the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment.
  • the second memory can be used to store program codes
  • the second processor is used to call the program codes in the second memory, triggering the interface card to perform the following operations: obtaining a first message, the destination address of the first message being the first purpose address, the first packet includes the identifier of the first network fragment, the first destination address corresponds to the first process; the first packet is sent to the second network device based on the first sub-interface; the second packet is obtained The destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, the second destination address corresponds to the second process, and the second process Different from the first process; sending the second packet to the second network device based on the first sub-interface.
  • an inter-process communication (inter-process communication, IPC) channel is established between the main control board and the interface board, and the main control board and the interface board communicate through the IPC channel.
  • IPC inter-process communication
  • the present application provides a chip including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the method in the first aspect.
  • the above chip only includes a processor, and the processor is configured to read and execute the computer program stored in the memory, and when the computer program is executed, the processor executes the method in the first aspect.
  • an embodiment of the present application further provides a network system, where the network system may include a first network device and a second network device.
  • the first network device is configured to execute the method in the first aspect; the second network device is configured to receive a packet sent by the first network device based on the determined sub-interface.
  • FIG. 1 is a schematic structural diagram of a network scenario in an embodiment of the present application
  • FIG. 2a is a schematic diagram of a sub-interface between a network device 21 and a network device 22 in an embodiment of the application;
  • FIG. 2b is another schematic diagram of a sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
  • FIG. 3a is another schematic diagram of the sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
  • FIG. 3b is another schematic diagram of the sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
  • FIG. 3c is another schematic diagram of the sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
  • FIG. 4 is a schematic structural diagram of another network scenario in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a packet processing method 100 provided by an embodiment of the present application.
  • 6a is a schematic diagram of a format of a first message in an embodiment of the present application.
  • FIG. 6b is a schematic diagram of still another format of the first message in the embodiment of the present application.
  • FIG. 6c is a schematic diagram of yet another format of the first message in the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a message processing apparatus 700 according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a network device 800 in an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a network device 900 in an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a network system 1000 in an embodiment of the present application.
  • a pair of network devices that can be shared by multiple network topologies is usually deployed between multiple connected network topologies. shared by multiple processes.
  • the network scenario shown in FIG. 1 may include: network devices 11 to 16 , network device 21 and network device 22 , the network scenario includes ring 1 , ring 2 and ring 3 , and ring 1 includes network devices 11.
  • Network device 21 and network device 22 ring 2 includes network device 12, network device 13, network device 14, network device 21 and network device 22, ring 3 includes network device 15, network device 16, network device 21 and network device twenty two.
  • Ring 1, Ring 2, and Ring 3 correspond to Process 1, Process 2, and Process 3, respectively. It can be seen that the process 1 , the process 2 and the process 3 share the network device 21 and the network device 22 , and the network device 21 is connected to the physical interface 2 of the network device 22 through the physical interface 1 .
  • the network device 21 allocates and binds a sub-interface to each process on the physical interface 1.
  • the network device 21 and the network device 22 are divided into two sub-interfaces.
  • a pair of physical interfaces between them may include sub-interface 1, sub-interface 2, and sub-interface 3.
  • the traffic can be sent to the network device 22 at the network device 21 through the sub-interface 3 on the physical interface 1 .
  • the network device 21 When performing network sharding, in order to achieve isolation of allocated resources, the network device 21 allocates and binds a sub-interface to each network shard under each process on the physical interface 1. It is assumed that the network shard under each process If the number of slices is the same, then the number of sub-interfaces to be allocated on a pair of physical interfaces between network device 21 and network device 22 is equal to the product of the number of processes to which the pair of network devices belongs and the number of network slices under each process. . For example, process 1, process 2 and process 3 are all divided into network slice 1 and network slice 2, then, as shown in Figure 2b, a pair of physical interfaces between network device 21 and network device 22 may include sub-interfaces 11.
  • Sub-interface 12 sub-interface 21, sub-interface 22, sub-interface 31 and sub-interface 32, a total of 6 sub-interfaces.
  • the traffic can be sent to the network device 21 at the network device 22 through the sub-interface 32 on the physical interface 2 .
  • the embodiment of the present application provides a sub-interface configuration scheme. Under the physical interface, each network shard is allocated And bind a sub-interface to allocate a maximum of sub-interfaces equal to the number of processes for multiple processes. Among them, the sub-interface corresponding to the network shard reserves resources that can meet the resource requirements of the network shard, and the sub-interfaces bound to the process are reserved. The sub-interface is used to open up the route between the pair of network devices without reserving resources.
  • the sub-interface bound to the process can be different from the sub-interface allocated for the network shard, or it can be reused as the sub-interface allocated for the network shard. In this way, there is no need to allocate a sub-interface for each network shard under each process.
  • Sub-interfaces that reserve resources greatly reduce the number of sub-interfaces to be configured on a physical interface.
  • the first network device in the pair of network devices when the first network device in the pair of network devices receives a packet running in a different process but corresponding to the same network fragment, it can be based on the destination address of the packet and the network The identifier of the fragment determines the sub-interface bound to the identifier of the network fragment under the physical interface, so that the determined sub-interface is used to send a packet to the second network device in the pair of network devices.
  • accurate packet transmission between the pair of network devices can be achieved by configuring fewer sub-interfaces.
  • the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include, but are not limited to, FIG. 3 a . , Figure 3b and Figure 3c.
  • the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include sub-interface 1 to sub-interface 5, 5 sub-interfaces in total.
  • sub-interface 1 to sub-interface 3 correspond to process 1 to process 3 respectively
  • sub-interface 1 to sub-interface 3 do not need to reserve resources
  • sub-interface 4 and sub-interface 5 are bound to network slice 1 and network slice 2 respectively
  • the sub-interface The reserved resources on 4 meet the resource requirements of network slice 1, and the reserved resources on sub-interface 5 meet the resource requirements of network slice 2.
  • the traffic when the traffic carrying network fragment 2 on process 3 is forwarded through network device 22, the traffic first determines sub-interface 2 according to the destination address at network device 22, and determines that sub-interface 2 corresponds to physical interface 2, and then, you can view the physical interface Sub-interface 5 bound to network slice 2 on physical interface 2, so that traffic is sent to network device 21 through sub-interface 5 on physical interface 2.
  • the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include sub-interface 1 to sub-interface 4, 4 sub-interfaces in total.
  • sub-interface 1, sub-interface 2 and physical interface 1 (or physical interface 2) correspond to process 1 to process 3 respectively
  • sub-interface 1 and sub-interface 2 do not need to reserve resources
  • sub-interface 3 and sub-interface 4 are bound to network slices respectively 1 and network slice 2
  • the reserved resources on sub-interface 3 meet the resource requirements of network slice 1
  • the reserved resources on sub-interface 4 meet the resource requirements of network slice 2.
  • the traffic when the traffic carrying network fragment 1 on process 1 is forwarded through network device 22, the traffic first determines physical interface 2 according to the destination address at network device 22, and then, you can view the physical interface 2 bound to network fragment 1. Sub-interface 3, thereby sending traffic to network device 21 through sub-interface 3 on physical interface 2.
  • the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include sub-interface 1 and sub-interface 2, with a total of 2 sub-interfaces.
  • sub-interface 1, sub-interface 2, and physical interface 1 correspond to process 1 to process 3, respectively.
  • the sub-interface 1 and sub-interface 2 do not need to reserve resources, and sub-interface 1 and sub-interface do not need to reserve resources.
  • 2 is also bound to network slice 1 and network slice 2 respectively.
  • the reserved resources on sub-interface 1 meet the resource requirements of network slice 1
  • the reserved resources on sub-interface 2 meet the resource requirements of network slice 2.
  • the traffic when the traffic carrying network fragment 1 on process 3 is forwarded through network device 22, the traffic first determines sub-interface 2 according to the destination address at network device 22, and determines that sub-interface 2 corresponds to physical interface 2, and then, you can view the physical interface Sub-interface 1 bound to network slice 1 on physical interface 2, so that traffic is sent to network device 21 through sub-interface 1 on physical interface 2.
  • the accurate transmission of packets between the pair of network devices can be realized by configuring fewer sub-interfaces, which solves the problem of the current situation. It is necessary to allocate a corresponding sub-interface to the network shard under each process, and too many sub-interfaces are allocated on a physical interface, which is not only difficult to deploy, manage, and maintain the sub-interfaces, but also because the network shards are bound to Therefore, the allocation of too many sub-interfaces leads to too many resources to be reserved, which greatly reduces the scalability of the physical interface, and the resource demands on the physical interface may exceed the availability of the physical interface. Tolerance issues.
  • a sub-interface is a plurality of logical interfaces virtualized from a physical interface (English: interface) through protocols and technologies.
  • the types of sub-interfaces may include: common sub-interfaces, channelized sub-interfaces, and flexible Ethernet (English: Flex Ethernet, FlexE for short) sub-interfaces, wherein the sub-interfaces allocated to processes may be common sub-interfaces, channelized sub-interfaces or FlexE sub-interface, the sub-interface allocated for the network slice can be a channelized sub-interface or a FlexE sub-interface.
  • ring 1 and ring 2 may be access rings
  • ring 3 may be an aggregation ring
  • the network device (such as network device 11) in the access ring may be, for example, an access device (English: Access node, abbreviation: ACC)
  • the shared network device ie, the network device 21 and the network device 22
  • may be an aggregation device English: Aggregation Gateway, AGG for short).
  • the network scenario shown in Figure 1 can also be a structure in which multiple aggregation rings and a backbone ring share a pair of network devices.
  • Ring 1 and Ring 2 can be aggregation rings
  • Ring 3 can be a backbone ring
  • an access ring can be a
  • the network device (eg, network device 11 ) in the device may be, for example, a convergence device
  • the shared network device ie, network device 21 and network device 22
  • core devices also referred to as backbone devices.
  • the network scenario applicable to the embodiments of the present application requires that a pair of network devices are connected through a pair of physical interfaces, the pair of network devices belong to multiple identical network segments, and the pair of network devices run multiple processes.
  • Multiple processes in this embodiment of the present application may correspond one-to-one with multiple ring structures, or may correspond one-to-one with multiple non-ring structures, that is, in the embodiment of the present application, in addition to the network scenario shown in FIG. 1 above, It can also be applied to the network scenario shown in FIG.
  • the network device running process 1 may include network device 11 , network device 17 , network device 21 and network device 22, the network device running process 2 may include network device 12, network device 13, network device 14, network device 21 and network device 22, and the network device running process 3 may include network device 15, network device 16, network Device 18, Network Device 19, Network Device 21, and Network Device 22.
  • Process 1 , process 2 and process 3 share network device 21 and network device 22 , and network device 21 is connected to physical interface 2 of network device 22 through physical interface 1 .
  • FIG. 4 when there is a network fragmentation requirement, the configuration of sub-interfaces and the processing of packets are the same as those in the network scenario shown in FIG. 1 , and details are not repeated here.
  • the technical solutions provided by the embodiments of the present application are described by taking the network scenario shown in FIG. 1 as an example.
  • network devices in the embodiments of the present application refer to devices such as routers, switches, and firewalls that have a function of forwarding packets.
  • FIG. 5 is a signaling flowchart of a packet processing method 100 in an embodiment of the present application.
  • the method 100 is described by taking the interaction process between a first network device and a second network device running in multiple processes and belonging to multiple identical network segments as an example, wherein the first network device passes the target physical
  • the interface is connected to the second network device, the multiple processes include a first process and a second process, the first process and the second process are different processes, and the multiple identical network segments include the first network segment and Second network shard.
  • the first network device may be the network device 21 in FIG. 1 or FIG. 2
  • the second network device may be the network device 22 in FIG. 1 or FIG. 2 .
  • the method 100 may, for example, include the following S101 to S106:
  • a first network device obtains a first packet, the destination address of the first packet is a first destination address, the first packet includes an identifier of a first network fragment, and the first destination address corresponds to a first process.
  • the first packet is a packet received by the first network device and to be sent from the first network device to the second network device, and the first packet enters the network running the first process through the first network device and the second network device topology.
  • the first packet also carries the identifier of the first network fragment, which is used to identify that the first packet corresponds to the first network fragment. Based on this, the first network device can determine the first network fragment.
  • the packet is the traffic corresponding to the first network fragment.
  • the first process may be called the first process corresponding to the first destination address.
  • the network device corresponding to the first destination address (that is, the destination device of the first packet) runs in the first process.
  • the network device corresponding to the first destination address belongs to access ring 1, and access ring 1 corresponds to the first process. It can be expressed that the first destination address corresponds to the first process.
  • the method 100 can be applied to Multi-Protocol Label Switching (English: Multi-Protocol Label Switching, MPLS for short) networks, Internet Protocol version 4 (English: Internet Protocol version 4, IPv4 for short) networks or Internet Protocol version 6 ( English: Internet Protocol version 6, referred to as: IPv6) network.
  • Multi-Protocol Label Switching English: Multi-Protocol Label Switching, MPLS for short
  • Internet Protocol version 4 English: Internet Protocol version 4, IPv4 for short
  • IPv6 English: Internet Protocol version 6, referred to as: IPv6 network.
  • the first packet is an IPv6 packet
  • the identifier of the first network fragment can be carried in the hop-by-hop (English: Hop by Hop, referred to as “Hop by Hop”) of the first packet.
  • HBH Hop by Hop
  • DOH Destination Option Header
  • the first packet may be as shown in FIG. 6a, and the identifier of the first network fragment may be carried in an IPv6 extension header (eg, an HBH option header) of the first packet.
  • the option type (Option Type) field in the HBH option header carrying the identifier of the first network fragment may have a specific value to indicate that the HBH option header carries the first network fragment logo.
  • the identifier of the first network fragment may be carried in any type length value (English: Type Length Value, TLV for short) field extended in the options Options of the IPv6 extension header of the first packet.
  • the first packet is an IPv4 packet
  • the identifier of the first network fragment may be carried in the Options field of the first packet, for example, the first packet is an IPv4 packet.
  • the message may be as shown in FIG. 6b, by extending the TLV field in the Options field of the first message, and using the extended TLV field to carry the identifier of the first network fragment.
  • the first packet is an MPLS packet
  • the MPLS label stack of the first packet may include multiple MPLS labels, carrying the identifier of the first network fragment
  • the label is one of multiple MPLS labels.
  • the multiple MPLS labels may include an indication label, where the indication label is used to indicate that the next MPLS label of the indication label carries the identifier of the first network segment, and the first packet may be, for example, as shown in FIG. 6c .
  • the label carrying the identifier of the first network segment may be located at the bottom of the MPLS label stack.
  • the first network device determines the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment.
  • the network management or controller may configure the first network device and the second network device to prepare for packet forwarding.
  • the configuration contents include but are not limited to the following three examples:
  • the configuration content may include: configuring the corresponding IP address 1 for the second sub-interface on the target physical interface, and joining the first process; configuring the corresponding IP address 2 for the fourth sub-interface on the target physical interface , and join the second process; configure the corresponding IP address 3 for the fifth sub-interface on the target physical interface, and join the third process; bind the first sub-interface on the target physical interface for the first network fragment, the The reserved resources on a sub-interface can meet the resource requirements of the first network fragment; bind the third sub-interface on the target physical interface to the second network fragment, and the reserved resources on the third sub-interface can meet the requirements of the first network fragment. 2. Resource requirements for network sharding.
  • the route between the first network device and the second network device is achieved through the second sub-interface in the first process, and the route between the first network device and the second network device is realized through the fourth sub-interface in the second process.
  • the route between the first network device and the second network device is achieved through the fifth sub-interface. Therefore, the second sub-interface, the fourth sub-interface and the fifth sub-interface do not need to reserve resources.
  • the first network device may store: the first process and the second sub-interface, the second process and the fourth sub-interface, and the correspondence between the third process and the fifth sub-interface, the second sub-interface , the fourth sub-interface, and the fifth sub-interface belong to the target physical interface, and the corresponding relationship between the identifier of the first network fragment and the first sub-interface, and the identifier of the second network fragment and the third sub-interface.
  • various correspondences may be stored in the form of one or more entries.
  • Table 1 and Table 2 may be stored on the first network device as follows:
  • routing prefix subinterface main interface prefix 1 Second sub-interface target physical interface prefix 2 Fourth sub-interface target physical interface prefix 3 Fifth sub-interface target physical interface
  • Table 3 may also be stored on the first network device as follows:
  • the last row in Table 3 is taken as an example, it indicates that the packet whose destination address matches prefix 3 can be routed to the second network device through the fifth sub-interface.
  • the fifth sub-interface belongs to the target physical interface. If the identifier of a network fragment is carried, the packet is sent to the second network device through the first sub-interface; if it carries the identifier of the second network fragment, the packet is sent to the second network device through the third sub-interface .
  • S102 may include: S102a1, the first network device determines a second sub-interface corresponding to the first process for the first packet according to the first destination address, and the second sub-interface belongs to the target physical interface; S102a2, the first The network device determines the corresponding first sub-interface in the target physical interface for the first packet according to the identifier of the first network fragment.
  • S102a1 may be that the first network device determines that the first destination address matches the prefix 1 in Table 1 or Table 3, and therefore, determines the second sub-interface for the first packet.
  • the configuration content may include: configuring the corresponding IP address 1 for the target physical interface and joining the first process; configuring the corresponding IP address 2 for the second sub-interface on the target physical interface and joining the second process ; Configure the corresponding IP address 3 for the fourth sub-interface on the target physical interface, and join the third process; Bind the first sub-interface on the target physical interface for the first network fragment, and the preset on the first sub-interface
  • the reserved resources can meet the resource requirements of the first network fragment; bind the third sub-interface on the target physical interface to the second network fragment, and the reserved resources on the third sub-interface can meet the resources of the second network fragment need.
  • the target physical interface is used to realize the reachability of the route between the first network device and the second network device
  • the route between the first network device and the second network device is realized through the second sub-interface
  • the route between the first network device and the second network device is achieved through the fourth sub-interface. Therefore, the target physical interface, the second sub-interface and the fourth sub-interface do not need to reserve resources.
  • S102 may include, for example: S102b1, the first network device determines the target physical interface corresponding to the first process for the first packet according to the first destination address; S102b2, the first network device determines according to the identifier of the first network fragment A corresponding first sub-interface is determined in the target physical interface for the first packet.
  • the configuration content may include: configuring the corresponding IP address 1 for the target physical interface and joining the first process; configuring the corresponding IP address 2 for the first sub-interface on the target physical interface and joining the second process ; configure the corresponding IP address 3 for the third sub-interface on the target physical interface, and join the third process; bind the first sub-interface on the target physical interface for the first network fragment, and the preset on the first sub-interface
  • the reserved resources can meet the resource requirements of the first network fragment; bind the third sub-interface on the target physical interface to the second network fragment, and the reserved resources on the third sub-interface can meet the resources of the second network fragment need.
  • the target physical interface is used to realize the reachability of the route between the first network device and the second network device
  • the route between the first network device and the second network device is realized through the first sub-interface
  • the route reachability between the first network device and the second network device is realized through the third sub-interface. Therefore, the target physical interface, the first sub-interface and the third sub-interface do not need to be reached when the route is reachable. Reserve resources.
  • S102 may include, for example: S102c1, the first network device determines, according to the first destination address, the target physical interface corresponding to the first process for the first packet; S102c2, the first network device determines according to the identifier of the first network fragment A corresponding first sub-interface is determined in the target physical interface for the first packet.
  • the first network device sends the first packet to the second network device based on the first sub-interface.
  • the first network device sends the first packet to the second network device based on the first sub-interface of the target physical interface. Since the reserved resources of the first sub-interface can meet the resource requirements of the first network fragment, therefore, Forwarding the first packet belonging to the first network fragment based on the first sub-interface enables the first packet to be forwarded to the first network fragment of the first process with reasonable bandwidth and other resources.
  • the first network device obtains a second packet, the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, and the second packet belongs to the second process.
  • the second packet is a packet received by the first network device and about to be sent from the first network device to the second network device.
  • the second packet enters the network running the second process through the first network device and the second network device topology.
  • the second packet also carries the identifier of the first network fragment, which is used to identify that the second packet corresponds to the first network fragment. Based on this, the first network device can determine the second network fragment.
  • the packet is the traffic corresponding to the first network fragment. That is, the second packet and the first packet belong to different processes, but correspond to the same network fragment.
  • the method 100 may be applicable to MPLS networks, IPv4 networks or IPv6 networks.
  • the second packet carries the identifier of the first network fragment under various network types, reference may be made to the description of the manner in which the first packet carries the identifier of the first network fragment in S101, which will not be repeated here.
  • the first network device determines the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment.
  • S105 may include, for example: S105a1, the first network device determines, according to the second destination address, for the second packet The fourth sub-interface corresponding to the second process, the fourth sub-interface belongs to the target physical interface; S105a2, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment interface.
  • S105a1 may be that the first network device determines that the second destination address matches the prefix 2 in Table 1 or Table 3, and therefore, determines the fourth sub-interface for the second packet.
  • S105 may include, for example: S105b1, the first network device determines for the second packet according to the second destination address The second sub-interface corresponding to the second process, the second sub-interface belongs to the target physical interface; S105b2, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment interface.
  • S105 may include, for example: S105c1, the first network device determines for the second packet according to the second destination address The first sub-interface corresponding to the second process, the first sub-interface belongs to the target physical interface; S105c2, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment interface.
  • the first network device sends the second packet to the second network device based on the first sub-interface.
  • the first network device sends the second packet to the second network device based on the first sub-interface of the target physical interface. Since the reserved resources of the first sub-interface can meet the resource requirements of the first network fragment, therefore, Forwarding the second packet belonging to the first network fragment based on the first sub-interface enables the second packet to be forwarded to the first network fragment of the second process with reasonable bandwidth and other resources.
  • S101 ⁇ S103 and S104 ⁇ S106 are not limited in order. You can execute S101 ⁇ S103 first and then execute S104 ⁇ S106, or you can execute S104 ⁇ S106 first and then execute S101 ⁇ S103, and you can also execute S101 ⁇ S103 Executed simultaneously with S104 to S106.
  • the method 100 may further include:
  • the first network device obtains a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, the third destination address corresponds to the third process, and the The plurality of processes also include a third process, which is different from the first process and the second process.
  • the third packet is a packet received by the first network device and about to be sent from the first network device to the second network device.
  • the third packet enters the network running the third process through the first network device and the second network device topology.
  • the third packet also carries the identifier of the second network fragment, which is used to identify that the third packet corresponds to the second network fragment.
  • the first network device can determine the third network fragment.
  • the packet is the traffic corresponding to the second network fragment. That is, the third packet, the second packet, and the first packet belong to different processes, the third packet and the first packet correspond to different network segments, and the third packet and the second packet correspond to different network fragmentation.
  • the method 100 may be applicable to MPLS networks, IPv4 networks or IPv6 networks.
  • the third packet carries the identifier of the second network fragment under various network types, reference may be made to the description of the manner in which the first packet carries the identifier of the first network fragment in S101, which will not be repeated here.
  • the first network device determines a third sub-interface in the target physical interface according to the third destination address and the identifier of the second network fragment.
  • S108 may include, for example: S108a1, the first network device determines for the third packet according to the third destination address The fifth sub-interface corresponding to the third process, the fifth sub-interface belongs to the target physical interface; S108a2, the first network device determines the corresponding third sub-interface in the target physical interface for the third packet according to the identifier of the second network fragment interface.
  • S108a1 may be that the first network device determines that the third destination address matches the prefix 3 in Table 1 or Table 3, so the fifth sub-interface is determined for the third packet.
  • S108 may include, for example: S108b1, the first network device determines for the third packet according to the third destination address The fourth sub-interface corresponding to the third process, the fourth sub-interface belongs to the target physical interface; S108b2, the first network device determines the corresponding third sub-interface in the target physical interface for the third packet according to the identifier of the second network fragment interface.
  • S108 may include, for example: S108c1, the first network device determines, according to the third destination address, for the third packet The second sub-interface corresponding to the third process, the second sub-interface belongs to the target physical interface; S108c2, the first network device determines the corresponding third sub-interface in the target physical interface for the third packet according to the identifier of the second network fragment interface.
  • the first network device sends the third packet to the second network device based on the third sub-interface.
  • the first network device sends a third packet to the second network device based on the third sub-interface of the target physical interface. Since the reserved resources of the third sub-interface can meet the resource requirements of the second network fragment, therefore, Forwarding the third packet belonging to the second network fragment based on the third sub-interface enables the third packet to be forwarded to the second network fragment of the third process with reasonable bandwidth and other resources.
  • S107-S109, S101-S103 and S104-S106 is not limited in order, and can be executed in any order.
  • S101-S103 can be executed first, then S107-S109 can be executed at the end, or S101 can be executed at the same time.
  • S103, S107 ⁇ S109, and S104 ⁇ S106 can be executed at the same time.
  • the processing process of the first network device receiving the packet to be sent to the second network device is used as an example for description.
  • the processing process Reference may be made to the relevant descriptions of the above S101 to S109, which will not be repeated here.
  • the first network device and the second network device run in the first process, the second process, and the third process, and each process corresponds to the first network fragment and the second network fragment as an example.
  • the first network device and the second network device may also run in m processes (m is an integer greater than or equal to 2), and the first network device and the second network device may belong to n the same network shards (n is an integer greater than or equal to 2).
  • At least (m+n) sub-interfaces need to be allocated for the physical interface between the first network device and the second network device ( m-1) sub-interfaces; if m ⁇ n, at least n sub-interfaces need to be allocated for the physical interface between the first network device and the second network device. It can be seen that, by using the method provided by the embodiment of the present application, in the scenario where the first network device and the second network device jointly run in multiple processes and there is a network fragmentation requirement, the number of the first network device and the second network device can be greatly reduced. The number of sub-interfaces needs to be configured between network devices.
  • each network fragment is allocated and bound with a Sub-interface, which allocates sub-interfaces equal to the number of processes for multiple processes at most.
  • the sub-interface corresponding to the network shard reserves resources that can meet the resource requirements of the network shard, and the sub-interface bound to the process is used to get through The route between the pair of network devices does not need to reserve resources. In this way, there is no need to allocate a sub-interface with reserved resources for each network segment under each process, which greatly reduces the number of sub-interfaces to be configured under one physical interface.
  • the first network device in the pair of network devices receives packets running in different processes but corresponding to the same network fragment, or the first network device in the pair of network devices
  • the device can determine the sub-interfaces under the physical interface that are bound to the network fragment IDs based on the destination address of the packets and the network fragment IDs.
  • the determined sub-interface sends a packet to the second network device in the pair of network devices, so that in a network scenario in which a pair of network devices jointly runs multiple processes and corresponds to multiple identical network segments, configure less
  • the sub-interface realizes the accurate transmission of packets between the pair of network devices.
  • an embodiment of the present application further provides a packet processing apparatus 700, and the apparatus 700 has any function of the network device 21 or network device 22 in FIG. 1 and FIG. 4, or the first network device in FIG. 5. .
  • the apparatus 700 is applied to a first network device, and the apparatus 700 may include: a first obtaining unit 701, a first determining unit 702, a first sending unit 703, a second obtaining unit 704, a second determining unit 705, and a second sending unit 706.
  • the first obtaining unit 701 is configured to obtain a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, the first destination address corresponds to the first process.
  • the first obtaining unit 701 may execute S101 shown in FIG. 5 .
  • the first determining unit 702 is configured to determine the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment.
  • the first determining unit 702 may perform S102 shown in FIG. 5 .
  • a first sending unit 703, configured to send the first packet to a second network device based on the first sub-interface.
  • the first sending unit 703 may perform S103 shown in FIG. 5 .
  • a second obtaining unit 704 configured to obtain a second packet, where the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, the second packet The destination address corresponds to a second process, and the second process is different from the first process.
  • the second obtaining unit 704 may perform S104 shown in FIG. 5 .
  • a second determining unit 705, configured to determine the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment.
  • the second determining unit 705 may perform S105 shown in FIG. 5 .
  • a second sending unit 706, configured to send the second packet to the second network device based on the first sub-interface.
  • the second sending unit 706 may perform S106 shown in FIG. 5 .
  • the first network device (or the packet processing apparatus 700 ) is connected to the second network device through the target physical interface, and the first network device and the second network device belong to multiple identical networks Sharding, the multiple network slices include the first network slice, the first network device and the second network device run multiple processes, the multiple processes include the first process and all the Describe the second process.
  • the reserved resources on the first sub-interface meet the resource requirements of the first network slice.
  • the first determining unit 702 may include: a first determining subunit and a second determining subunit.
  • the first determining subunit is configured to determine, according to the first destination address, a second sub-interface corresponding to the first process for the first packet, where the second sub-interface belongs to the target physical interface ; a second determining subunit, configured to determine the corresponding first subinterface in the target physical interface for the first packet according to the identifier of the first network fragment.
  • the second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface.
  • the apparatus 700 may further include: a third obtaining unit, a third determining unit, and a third sending unit.
  • the third obtaining unit is configured to obtain a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, and the third destination
  • the address corresponds to a third process, the plurality of processes include the third process, and the third process is different from the first process and the second process;
  • a third determination unit is used to determine the third process according to the third purpose
  • the address and the identifier of the second network segment determine a third sub-interface in the target physical interface;
  • a third sending unit is configured to send the third sub-interface to the second network device based on the third sub-interface message.
  • the third obtaining unit, the third determining unit and the third sending unit may respectively execute S107 to S109 shown in FIG. 5 .
  • the multiple processes are interior gateway protocol IGP processes.
  • the apparatus is suitable for MPLS network, IPv4 network or IPv6 network.
  • the above-mentioned units with the same function but different serial numbers in the naming may be a unit capable of implementing this function.
  • the above-mentioned first sending unit 703 and second sending unit 706 may be the same unit with sending function.
  • the packet processing apparatus 700 shown in FIG. 7 may be the first network device in the embodiment shown in FIG. 5 . Therefore, various specific embodiments and effects of the apparatus 700 can be found in The related introduction of the method 100 corresponding to FIG. 5 is not repeated in this embodiment.
  • an embodiment of the present application provides a network device 800 .
  • the network device 800 may be the network device in any of the foregoing embodiments, for example, may be the network device 21 or the network device 22 in FIG. 1 or FIG. 4 , or may be the first network device in the embodiment shown in FIG. 5 ,
  • the network device 800 may implement the functions of the first network device, the network device 21 or the network device 22 in the above embodiments.
  • the network device 800 includes at least one processor 801 , a bus system 802 , a memory 803 and at least one transceiver 804 .
  • the network device 800 is an apparatus with a hardware structure, and can be used to implement the functional modules in the packet processing apparatus 700 shown in FIG. 7 .
  • the first determining unit 702 and the second determining unit 705 in the message processing apparatus 700 shown in FIG. 7 can be implemented by calling the code in the memory 803 by the at least one processor 801, and FIG. 7
  • the first obtaining unit 701 , the first sending unit 703 , the second obtaining unit 704 and the second sending unit 706 in the shown packet processing apparatus 700 may be implemented by the transceiver 804 .
  • the network device 800 may also be used to implement the functions of the network device in any of the foregoing embodiments.
  • processor 801 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the bus system 802 described above may include a path to transfer information between the above described components.
  • the above transceiver 804 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 803 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 803 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 801 .
  • the processor 801 is used for executing the application program code stored in the memory 803, so as to realize the functions in the method of the present patent.
  • the processor 801 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 8 .
  • the network device 800 may include multiple processors, for example, the processor 801 and the processor 807 in FIG. 8 .
  • Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • FIG. 9 is a schematic structural diagram of another network device 900 provided by an embodiment of the present application.
  • the network device 900 may be, for example, the network device 21 or the network device 22 in the embodiment shown in FIG. 1 , or may also be the implementation shown in FIG. 4 .
  • the network device 900 includes: a main control board 910 and an interface board 930 .
  • the main control board 910 is also called the main processing unit (main processing unit, MPU) or the route processing card (route processor card).
  • the main control board 910 controls and manages each component in the network device 900, including route calculation, Equipment maintenance, protocol processing functions.
  • the main control board 910 includes: a central processing unit 911 and a memory 912 .
  • the interface board 930 is also referred to as a line processing unit (LPU), a line card or a service board.
  • the interface board 930 is used to provide various service interfaces and realize data packet forwarding.
  • the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
  • the interface board 930 includes: a central processing unit 931 , a network processor 932 , a forwarding table entry storage 934 and a physical interface card (ph8sical interface card, PIC) 933 .
  • the central processing unit 931 on the interface board 930 is used to control and manage the interface board 930 and communicate with the central processing unit 911 on the main control board 910 .
  • the network processor 932 is used to implement packet forwarding processing.
  • the network processor 932 may be in the form of a forwarding chip.
  • the processing of the uplink packet includes: processing of the incoming interface of the packet, and searching of the forwarding table; processing of the downlink packet: searching of the forwarding table, and so on.
  • the physical interface card 933 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 930 through this, and the processed packets are sent from the physical interface card 933 .
  • the physical interface card 933 includes at least one physical interface, and the physical interface is also called a physical port.
  • the physical interface card 933 corresponds to the FlexE physical interface in the system architecture.
  • the physical interface card 933 is also called a daughter card, which can be installed on the interface board 930 and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 932 for processing.
  • the central processor 931 of the interface board 930 can also perform the functions of the network processor 932 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 932 is not required in the physical interface card 933 .
  • the network device 900 includes multiple interface boards.
  • the network device 900 further includes an interface board 940 .
  • the interface board 940 includes a central processing unit 941 , a network processor 942 , a forwarding table entry storage 944 and a physical interface card 943 .
  • the network device 900 further includes a switch fabric board 920 .
  • the switch fabric 920 may also be referred to as a switch fabric unit (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switching network board 920 is used to complete data exchange between the interface boards.
  • the interface board 930 and the interface board 940 can communicate through the switch fabric board 920 .
  • the main control board 910 and the interface board 930 are coupled.
  • the main control board 910 , the interface board 930 , the interface board 940 , and the switching network board 920 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication (inter-process communication, IPC) channel is established between the main control board 910 and the interface board 930, and the main control board 910 and the interface board 930 communicate through the IPC channel.
  • IPC inter-process communication
  • the network device 900 includes a control plane and a forwarding plane
  • the control plane includes the main control board 910 and the central processing unit 931
  • the forwarding plane includes various components that perform forwarding, such as the forwarding entry storage 934, the physical interface card 933 and the network processing device 932.
  • the control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining the status of devices.
  • the control plane delivers the generated forwarding tables to the forwarding plane.
  • the network processor 932 based on the The delivered forwarding table forwards the packets received by the physical interface card 933 by looking up the table.
  • the forwarding table issued by the control plane may be stored in the forwarding table entry storage 934 .
  • the control plane and forwarding plane may be completely separate and not on the same device.
  • the network device 900 is configured as the first network device, the network processor 932 can trigger the physical interface card 933 to obtain the first packet, the destination address of the first packet is the first destination address, and the first packet includes the first network
  • the identifier of the fragment, the first destination address corresponds to the first process, and the first packet is sent to the second network device based on the first sub-interface; the second packet is obtained, and the destination address of the second packet is the first packet.
  • Two destination addresses, the second packet includes the identifier of the first network fragment, and the second destination address corresponds to a second process. The second process is different from the first process. Based on the first sub-interface, the second network Send the second message.
  • the central processing unit 911 may determine the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment; determine the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment. The first sub-interface, and.
  • first obtaining unit 701 , the first sending unit 703 , the second obtaining unit 704 , the second sending unit 706 , etc. in the packet processing apparatus 700 , and the transceiver 804 in the network device 800 may be equivalent to the network device 900
  • the physical interface card 933 or the physical interface card 943 in the device; the first determining unit 702 and the second determining unit 705 in the message processing apparatus 700 , and the processor 801 in the network device 800 may be equivalent to the central processor 911 or central processing unit 931.
  • the operations on the interface board 940 in the embodiments of the present application are the same as the operations on the interface board 930, and for brevity, details are not repeated here.
  • the network device 900 in this embodiment may correspond to the apparatus or network device for establishing a BGP neighbor in each of the above method embodiments, and the main control board 910 , the interface board 930 and/or the interface board 940 in the network device 900 may The functions and/or various steps implemented in the packet processing apparatus 700 or the network device 800 in each of the foregoing method embodiments are implemented, and are not repeated here for brevity.
  • main control boards there may be one or more main control boards, and when there are more than one main control board, it may include an active main control board and a backup main control board.
  • a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture.
  • the form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board.
  • the central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment).
  • the specific architecture used depends on the specific networking deployment scenario.
  • each of the above network devices or network devices may be implemented as virtualized devices.
  • the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending a message, and the virtual machine is deployed on a hardware device (for example, a physical server).
  • a virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
  • a virtual machine can be configured as each of the network devices in Figure 1.
  • each network device or network device may be implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology.
  • NFV Network Functions Virtualization
  • Each network device or network device is a virtual host, a virtual router or a virtual switch.
  • the embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, may be a specific type of the message processing device in the embodiment of the present application
  • the implementation form can be used to execute the above packet processing method.
  • the processor is coupled to a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the chip system enables the method in any of the foregoing method embodiments.
  • the number of processors in the chip system may be one or more.
  • the processor can be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in memory.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips.
  • the setting method of the processor is not particularly limited.
  • the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller).
  • controller unit, MCU it can also be a programmable logic device (PLD) or other integrated chips.
  • an embodiment of the present application further provides a network system 1000, see FIG. 10 .
  • the network system 1000 may include a first network device 1001 and a second network device 1002 .
  • the first network device 1001 is configured to perform all operations performed by the first network device in the method 100 shown in FIG. 5 ;
  • the second network device 1002 is configured to perform all operations performed by the second network device in the method 100 shown in FIG. 5 . operate.
  • an embodiment of the present application also provides a computer-readable storage medium, where program codes or instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer can execute any of the above embodiments shown in FIG. 5 .
  • embodiments of the present application also provide a computer program product, which, when running on a computer, enables the computer to execute the method of any one of the foregoing method 100 implementations.
  • determining B based on A does not mean that B is only determined according to A, and B can also be determined according to A and/or other information.

Landscapes

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

Abstract

Disclosed in embodiments of the present application are a message processing method and a related device. A first network device obtains a first message that comprises a first destination address and the identifier of a first network slice, the first destination address corresponding to a first process, determines a first sub-interface in a target physical interface according to the first destination address and the identifier of the first network slice, and sends the first message to a second network device on the basis of the first sub-interface; the first network device obtains a second message that comprises a second destination address and the identifier of the first network slice, the second destination address corresponding to a second process, determines the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network slice, and sends the second message to the second network device on the basis of the first sub-interface. Hence, in a network scenario where a pair of network devices jointly run multiple processes and correspond to multiple identical network slices, a small number of sub-interfaces are configured to achieve accurate transmission of messages between the pair of network devices.

Description

一种报文处理方法及相关设备A message processing method and related equipment
本申请要求于2020年12月29日提交中国国家知识产权局、申请号为202011598611.2、申请名称为“一种报文处理方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011598611.2 and the application title "A message processing method and related equipment" filed with the State Intellectual Property Office of China on December 29, 2020, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种报文处理方法及相关设备。The present application relates to the field of communication technologies, and in particular, to a message processing method and related equipment.
背景技术Background technique
随着通信技术的发展,存在一对网络设备被多个进程共用的组网形式,该对网络设备之间通过一对物理接口连接,而网络设备可以在该物理接口上部署多个子接口,每个子接口绑定到一个对应的进程中,以实现进程间的路由隔离。With the development of communication technology, there is a networking form in which a pair of network devices is shared by multiple processes. The pair of network devices is connected through a pair of physical interfaces, and the network device can deploy multiple sub-interfaces on the physical interface. Each sub-interface is bound to a corresponding process to achieve routing isolation between processes.
当网络中有分片需求时,为了实现分片资源的隔离,通常为每个进程下的各个网络分片都分配一个子接口,假设每个进程下的网络分片数量一致,则,物理接口上需要划分的子接口的数量等于该对网络设备所属的进程的数量和每个进程下的网络分片数量的乘积。这样,在一个物理接口上分配太多的子接口,不仅部署、管理和维护子接口较为困难,而且,由于网络分片对所绑定的子接口的资源有需求,所以分配过多的子接口导致所要预留的资源过多,大大的降低该物理接口的可扩展性,还可能出现对物理接口的资源诉求超过该物理接口的可承受范围的问题。When there is a need for sharding in the network, in order to isolate shard resources, a sub-interface is usually allocated to each network shard under each process. Assuming that the number of network shards under each process is the same, then the physical interface The number of sub-interfaces that need to be divided is equal to the product of the number of processes to which the pair of network devices belongs and the number of network fragments under each process. In this way, if too many sub-interfaces are allocated on a physical interface, it is not only difficult to deploy, manage and maintain the sub-interfaces, but also because network sharding requires the resources of the bound sub-interfaces, so too many sub-interfaces are allocated. This results in too many resources to be reserved, which greatly reduces the scalability of the physical interface, and may also cause a problem that the resource demands on the physical interface exceed the tolerable range of the physical interface.
基于此,目前亟待提供一种技术方案,解决在一对网络设备共用多个进程且这些进程有网络分片要求的场景下,子接口的配置问题。Based on this, there is an urgent need to provide a technical solution to solve the problem of configuring sub-interfaces in a scenario where a pair of network devices share multiple processes and these processes have network fragmentation requirements.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种报文处理方法及相关设备,在一对网络设备共用多个进程且这些进程有网络分片要求的场景下,将网络分片与物理接口中预留资源的子接口进行绑定,网络设备对所接收到对应于相同物理接口的报文,能够按照该网络分片所绑定的子接口发送该报文,无需为每个进程下的各个网络分片都分配一个预留资源的子接口,大大减少了一个物理接口下所要配置的子接口的数量。The embodiments of the present application provide a packet processing method and related equipment. In a scenario where a pair of network devices share multiple processes and these processes have network fragmentation requirements, the network fragmentation is combined with a subsection of reserved resources in a physical interface. The interface is bound, and the network device can send the received packet corresponding to the same physical interface according to the sub-interface to which the network fragment is bound. It is not necessary to allocate each network fragment under each process. A sub-interface with reserved resources greatly reduces the number of sub-interfaces to be configured on a physical interface.
第一方面,本申请实施例提供了一种报文处理方法,该方法应用于第一网络设备通过所述目标物理接口和第二网络设备连接的场景,其中,第一网络设备和第二网络设备属于多个相同的网络分片,该多个网络分片包括所述第一网络分片,第一网络设备和第二网络设备运行多个进程,该多个进程包括所述第一进程和所述第二进程。具体实现时,以第一网络设备在第一进程上转发携带第一网络分片标识的第一报文以及在第二进程上转发携带第一网络分片标识的第二报文为例,该方法执行的操作可以包括:第一网络设备获得第一报文,该第一报文的目的地址为第一目的地址,该第一报文包括第一网络分片的标识,第一目的地址对应第一进程,这样,第一网络设备根据第一目的地址和第一网络分片的标识确定目标物理接口中的第一子接口,并且,基于所述第一子接口向第二网络设备发送所述第一报文;第一网络设备获得第二报文,该第二报文的目的地址为第二目的地址,第二报文包括所述第一网络分片的标识,第二目的地址对应第二进程,该第二进程与第一进程不同,这样,第一网络设备根据第二目的地址和第一网络分片的标识确定目标物理接口中的 所述第一子接口,并且,基于所述第一子接口向第二网络设备发送所述第二报文。可见,在一对网络设备共同运行多个进程且这些进程有网络分片要求的场景下,本申请实施例提供的方法中,在物理接口下,为每个网络分片分配并绑定一个子接口,为多个进程最多分配与进程数量相等的子接口,其中,与网络分片对应的子接口预留能够满足该网络分片资源需求的资源,而与进程绑定的子接口则用于打通该对网络设备之间的路由,无需预留资源。其中,为进程绑定的子接口可以与为网络分片分配的子接口不同,也可以复用为网络分片分配的子接口,这样,无需为每个进程下的各个网络分片都分配一个预留资源的子接口,大大减少了一个物理接口下所要配置的子接口的数量。从而,按照本申请实施例提供的方法,当该对网络设备中的第一网络设备接收到运行在不同进程但对应相同网络分片的报文时,能够基于报文的目的地址和网络分片的标识确定物理接口下与该网络分片的标识绑定的子接口,从而利用所确定的该子接口向该对网络设备中的第二网络设备发送报文,在一对网络设备共同运行多个进程且对应多个相同的网络分片的网络场景中,配置较少的子接口即可实现该对网络设备之间报文的准确传输。In a first aspect, an embodiment of the present application provides a packet processing method, and the method is applied to a scenario in which a first network device is connected to a second network device through the target physical interface, wherein the first network device and the second network device The device belongs to multiple identical network segments, the multiple network segments include the first network segment, the first network device and the second network device run multiple processes, the multiple processes include the first process and the the second process. In specific implementation, taking the first network device forwarding the first packet carrying the first network fragment identifier on the first process and forwarding the second packet carrying the first network fragment identifier on the second process as an example, the The operations performed by the method may include: the first network device obtains a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, and the first destination address corresponds to The first process, in this way, the first network device determines the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment, and sends the information to the second network device based on the first sub-interface. The first packet is described; the first network device obtains a second packet, the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, and the second destination address corresponds to The second process, the second process is different from the first process, in this way, the first network device determines the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment, and based on the The first sub-interface sends the second packet to the second network device. It can be seen that in a scenario where a pair of network devices jointly run multiple processes and these processes have network fragmentation requirements, in the method provided by this embodiment of the present application, under the physical interface, each network fragment is allocated and bound to a sub-process Interface, which allocates sub-interfaces equal to the number of processes for multiple processes at most. Among them, the sub-interface corresponding to the network shard reserves resources that can meet the resource requirements of the network shard, and the sub-interface bound to the process is used for Open the route between the pair of network devices without reserving resources. Among them, the sub-interface bound to the process can be different from the sub-interface allocated for the network shard, or it can be reused as the sub-interface allocated for the network shard. In this way, there is no need to allocate a sub-interface for each network shard under each process. Sub-interfaces that reserve resources greatly reduce the number of sub-interfaces to be configured on a physical interface. Therefore, according to the method provided by the embodiment of the present application, when the first network device in the pair of network devices receives a message running in a different process but corresponding to the same network fragment, it can be based on the destination address of the message and the network fragment. The identifier determines the sub-interface bound to the identifier of the network fragment under the physical interface, so that the determined sub-interface is used to send a packet to the second network device in the pair of network devices. In a network scenario where one process corresponds to multiple identical network segments, the accurate transmission of packets between the pair of network devices can be achieved by configuring fewer sub-interfaces.
其中,本申请实施例中的多个进程为内部网关协议(英文:Interior Gateway Protocol,简称:IGP)进程,例如可以是中间系统到中间系统(英文:Intermediate System-to-Intermediate System,简称:ISIS)进程或开放最短路径优先(英文:Open Shortest Path First,简称:OSPF)进程。Wherein, the multiple processes in the embodiments of the present application are Interior Gateway Protocol (English: Interior Gateway Protocol, referred to as: IGP) processes, for example, may be Intermediate System-to-Intermediate System (English: Intermediate System-to-Intermediate System, referred to as: ISIS) processes ) process or Open Shortest Path First (English: Open Shortest Path First, referred to as: OSPF) process.
如果第一目的地址是通过第一进程中的IGP路由学习到的,那么,可以称该第一进程为第一目的地址对应的进程。如果第二目的地址是通过第二进程中的IGP路由学习到的,那么,可以称该第二进程为第二目的地址对应的进程。If the first destination address is learned through the IGP route in the first process, the first process may be called a process corresponding to the first destination address. If the second destination address is learned through the IGP route in the second process, the second process may be called a process corresponding to the second destination address.
其中,所述第一子接口上的预留资源满足第一网络分片的资源需求。Wherein, the reserved resources on the first sub-interface meet the resource requirements of the first network slice.
在一种可能的实现方式中,对于根据报文中的目的地址和网络分片的标识,确定实际转发的子接口的过程,以第一网络设备转发第一报文为例,例如可以包括:第一网络设备先根据第一目的地址,为第一报文确定第一进程对应的第二子接口,该第二子接口属于所述目标物理接口;接着,第一网络设备根据第一网络分片的标识为第一报文在目标物理接口中确定对应的第一子接口。其中,第二子接口和所述第一子接口相同,或者,第二子接口和所述第一子接口不同。以第一网络设备转发第二报文为例,例如可以包括:第一网络设备先根据第二目的地址,为第二报文确定第二进程对应的第四子接口,该第四子接口属于所述目标物理接口;接着,第一网络设备根据第一网络分片的标识为第二报文在目标物理接口中确定对应的第一子接口。其中,第二子接口和所述第一子接口相同,或者,第二子接口和所述第一子接口不同,但是,第二子接口和第四子接口不同。在一些例子中,第二子接口或第四子接口也可以替换为所述目标物理接口,实现到第二网络设备路由可达的目的。In a possible implementation manner, the process of determining the sub-interface actually forwarded according to the destination address in the packet and the identifier of the network fragment, taking the first network device forwarding the first packet as an example, may include, for example: The first network device first determines a second sub-interface corresponding to the first process for the first packet according to the first destination address, and the second sub-interface belongs to the target physical interface; then, the first network device determines the second sub-interface according to the first network The identifier of the slice is to determine the corresponding first sub-interface in the target physical interface of the first packet. The second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface. Taking the first network device forwarding the second packet as an example, for example, it may include: the first network device first determines a fourth sub-interface corresponding to the second process for the second packet according to the second destination address, where the fourth sub-interface belongs to the target physical interface; then, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment. The second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface, but the second sub-interface is different from the fourth sub-interface. In some examples, the second sub-interface or the fourth sub-interface may also be replaced with the target physical interface, so as to achieve the purpose of being routable to the second network device.
在一种可能的实现方式中,对于第一网络设备在第三进程上转发携带第二网络分片标识的第三报文,该方法执行的操作还可以包括:第一网络设备获得第三报文,第三报文的目的地址为第三目的地址,第三报文包括第二网络分片的标识,第三目的地址对应第三进程,本申请实施例中的所述多个进程包括所述第三进程,第三进程与第一进程、第二进程 不同;这样,第一网络设备根据第三目的地址和第二网络分片的标识确定目标物理接口中的第三子接口,并且,基于所述第三子接口向第二网络设备发送所述第三报文。可见,在物理接口下,为第二网络分片和第一网络分片分别分配并绑定一个子接口,为多个进程最多分配与进程数量相等的子接口,其中,与网络分片对应的子接口预留能够满足该网络分片资源需求的资源,而与进程绑定的子接口则用于打通该对网络设备之间的路由,无需预留资源,配置较少的子接口即可实现该对网络设备之间报文的准确传输。In a possible implementation manner, for the first network device to forward the third packet carrying the identifier of the second network fragment on the third process, the operations performed by the method may further include: the first network device obtains the third packet The destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, the third destination address corresponds to the third process, and the multiple processes in this embodiment of the present application include all Describe the third process, the third process is different from the first process and the second process; like this, the first network device determines the third sub-interface in the target physical interface according to the third destination address and the identifier of the second network fragment, and, The third packet is sent to the second network device based on the third sub-interface. It can be seen that under the physical interface, a sub-interface is allocated and bound to the second network fragment and the first network fragment, and a maximum of sub-interfaces equal to the number of processes are allocated to multiple processes. The sub-interface reserves resources that can meet the resource requirements of the network fragment, and the sub-interface bound to the process is used to open up the route between the pair of network devices. It can be achieved by configuring fewer sub-interfaces without reserving resources. The accurate transmission of messages between the pair of network devices.
其中,本申请实施例提供的方法适用于多协议标签交换(英文:Multi-Protocol Label Switching,简称:MPLS)网络、第四版互联网协议(英文:Internet Protocol version 4,简称:IPv4)网络或第六版互联网协议(英文:Internet Protocol version 6,简称:IPv6)网络。如果该方法应用于IPv6网络中,则,第一报文为IPv6报文,第一网络分片的标识可以携带在第一报文的逐跳(英文:Hop by Hop,简称:HBH)选项头或目的地址选项头(英文:Destination Option Header,简称:DOH)中。如果该方法应用于IPv4网络中,则,第一报文为IPv4报文,第一网络分片的标识可以携带在第一报文的选项Options字段中,例如,可以通过在第一报文的Options字段中扩展TLV字段,利用扩展的TLV字段携带该第一网络分片的标识。如果该方法应用于MPLS网络,则,第一报文为MPLS报文,该第一报文的MPLS标签栈中可以包括指示标签,该指示标签用于指示该指示标签的下一个MPLS标签携带第一网络分片的标识,其中,指示标签以及携带第一网络分片的标识的标签均为MPLS标识。例如,携带第一网络分片的标识的标签可以位于MPLS标签栈的栈底。The methods provided in the embodiments of the present application are applicable to Multi-Protocol Label Switching (English: Multi-Protocol Label Switching, MPLS for short) networks, Internet Protocol version 4 (English: Internet Protocol version 4, IPv4 for short) networks, or the first Internet Protocol version 6 (English: Internet Protocol version 6, referred to as: IPv6) network. If the method is applied to an IPv6 network, the first packet is an IPv6 packet, and the identifier of the first network fragment can be carried in the Hop by Hop (English: Hop by Hop, abbreviated: HBH) option header of the first packet Or in the Destination Option Header (English: Destination Option Header, DOH for short). If the method is applied to an IPv4 network, the first packet is an IPv4 packet, and the identifier of the first network fragment can be carried in the Options field of the first packet. The TLV field is extended in the Options field, and the identifier of the first network fragment is carried by the extended TLV field. If the method is applied to an MPLS network, the first packet is an MPLS packet, and the MPLS label stack of the first packet may include an indication label, where the indication label is used to indicate that the next MPLS label of the indication label carries the first MPLS label. An identifier of a network fragment, wherein both the indicating label and the label carrying the identifier of the first network fragment are MPLS identifiers. For example, the label carrying the identifier of the first network segment may be located at the bottom of the MPLS label stack.
第二方面,本申请实施例还提供了一种报文处理装置,该装置应用于第一网络设备,该装置可以包括:第一获得单元、第一确定单元、第一发送单元、第二获得单元、第二确定单元和第二发送单元。其中,第一获得单元,用于获得第一报文,所述第一报文的目的地址为第一目的地址,所述第一报文包括第一网络分片的标识,第一目的地址对应第一进程;第一确定单元,用于根据所述第一目的地址和所述第一网络分片的标识确定目标物理接口中的第一子接口;第一发送单元,用于基于所述第一子接口向第二网络设备发送所述第一报文;第二获得单元,用于获得第二报文,所述第二报文的目的地址为第二目的地址,所述第二报文包括所述第一网络分片的标识,所述第二目的地址对应第二进程,所述第二进程与所述第一进程不同;第二确定单元,用于根据所述第二目的地址和所述第一网络分片的标识确定所述目标物理接口中的所述第一子接口;第二发送单元,用于基于所述第一子接口向所述第二网络设备发送所述第二报文。其中,所述第一网络设备通过所述目标物理接口和所述第二网络设备连接,所述第一网络设备和所述第二网络设备属于多个相同的网络分片,所述多个网络分片包括所述第一网络分片,所述第一网络设备和所述第二网络设备运行多个进程,所述多个进程包括所述第一进程和所述第二进程。In a second aspect, an embodiment of the present application further provides a packet processing apparatus, the apparatus is applied to a first network device, and the apparatus may include: a first obtaining unit, a first determining unit, a first sending unit, a second obtaining unit unit, a second determining unit and a second sending unit. The first obtaining unit is configured to obtain a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, and the first destination address corresponds to a first process; a first determining unit, configured to determine a first sub-interface in a target physical interface according to the first destination address and the identifier of the first network fragment; a first sending unit, configured to based on the first sub-interface A sub-interface sends the first packet to the second network device; a second obtaining unit is configured to obtain a second packet, the destination address of the second packet is the second destination address, the second packet Including the identifier of the first network fragment, the second destination address corresponds to a second process, and the second process is different from the first process; a second determining unit is configured to The identifier of the first network fragment determines the first sub-interface in the target physical interface; a second sending unit is configured to send the second network device to the second network device based on the first sub-interface message. The first network device is connected to the second network device through the target physical interface, the first network device and the second network device belong to multiple identical network slices, and the multiple network The fragmentation includes the first network fragmentation, and the first network device and the second network device run a plurality of processes, the plurality of processes including the first process and the second process.
在一种可能的实现方式中,所述第一子接口上的预留资源满足所述第一网络分片的资源需求。In a possible implementation manner, the reserved resources on the first sub-interface meet the resource requirements of the first network slice.
在一种可能的实现方式中,所述第一确定单元,可以包括:第一确定子单元和第二确定子单元。其中,第一确定子单元,用于根据所述第一目的地址,为所述第一报文确定所述第一进程对应的第二子接口,所述第二子接口属于所述目标物理接口;第二确定子单元, 用于根据所述第一网络分片的标识为所述第一报文在所述目标物理接口中确定对应的所述第一子接口。其中,所述第二子接口和所述第一子接口相同,或者,所述第二子接口和所述第一子接口不同。In a possible implementation manner, the first determination unit may include: a first determination subunit and a second determination subunit. The first determining subunit is configured to determine, according to the first destination address, a second sub-interface corresponding to the first process for the first packet, where the second sub-interface belongs to the target physical interface and a second determining subunit, configured to determine the corresponding first subinterface in the target physical interface for the first packet according to the identifier of the first network fragment. The second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface.
在一种可能的实现方式中,该装置还可以包括:第三获得单元、第三确定单元和第三发送单元。其中,第三获得单元,用于获得第三报文,所述第三报文的目的地址为第三目的地址,所述第三报文包括第二网络分片的标识,所述第三目的地址对应第三进程,所述多个进程包括所述第三进程,所述第三进程与所述第一进程、所述第二进程不同;第三确定单元,用于根据所述第三目的地址和所述第二网络分片的标识确定所述目标物理接口中的第三子接口;第三发送单元,用于基于所述第三子接口向所述第二网络设备发送所述第三报文。In a possible implementation manner, the apparatus may further include: a third obtaining unit, a third determining unit, and a third sending unit. The third obtaining unit is configured to obtain a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, and the third destination The address corresponds to a third process, the plurality of processes include the third process, and the third process is different from the first process and the second process; a third determination unit is used to determine the third process according to the third purpose The address and the identifier of the second network segment determine a third sub-interface in the target physical interface; a third sending unit is configured to send the third sub-interface to the second network device based on the third sub-interface message.
在一种可能的实现方式中,所述多个进程为内部网关协议IGP进程。In a possible implementation manner, the multiple processes are interior gateway protocol IGP processes.
在一种可能的实现方式中,该装置适用于MPLS网络、IPv4网络或IPv6网络。In a possible implementation manner, the apparatus is suitable for MPLS network, IPv4 network or IPv6 network.
需要说明的是,该第二方面提供的报文处理装置用于执行上述第一方面提及的相关操作,其具体实现方式以及达到的效果,均可以参见上述第一方面的相关描述,在此不再赘述。It should be noted that the message processing device provided in the second aspect is used to perform the relevant operations mentioned in the first aspect. For the specific implementation and the effect achieved, reference can be made to the relevant description of the first aspect. No longer.
第三方面,本申请实施例还提供了一种网络设备,包括:存储器和处理器。其中,存储器用于存储程序代码或指令;处理器用于运行程序代码或指令,使得网络设备执行以上第一方面提供的方法。In a third aspect, an embodiment of the present application further provides a network device, including: a memory and a processor. The memory is used for storing program codes or instructions; the processor is used for running the program codes or instructions, so that the network device executes the method provided in the first aspect above.
第四方面,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储有程序代码或指令,当其在计算机上运行时,使得计算机执行以上第一方面提供的任意一种可能的实现方式中提供的方法。In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, where program codes or instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any of the above-mentioned first aspects. A method provided in a possible implementation.
第五方面,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行第一方面的任意一种可能的实现方式中提供的方法。In a fifth aspect, an embodiment of the present application further provides a computer program product, which, when the computer program product runs on a network device, enables the network device to execute the method provided in any possible implementation manner of the first aspect.
第六方面,本申请提供了一种网络设备,该网络设备包括:主控板和接口板。主控板包括:第一处理器和第一存储器。接口板包括:第二处理器、第二存储器和接口卡。主控板和接口板耦合。In a sixth aspect, the present application provides a network device, the network device comprising: a main control board and an interface board. The main control board includes: a first processor and a first memory. The interface board includes: a second processor, a second memory and an interface card. The main control board and the interface board are coupled.
第一存储器可以用于存储程序代码,第一处理器用于调用第一存储器中的程序代码执行如下操作:根据所述第一目的地址和所述第一网络分片的标识确定目标物理接口中的第一子接口;根据所述第二目的地址和所述第一网络分片的标识确定所述目标物理接口中的所述第一子接口。The first memory can be used to store program codes, and the first processor is used to call the program codes in the first memory to perform the following operations: determine the target physical interface according to the first destination address and the identifier of the first network slice. a first sub-interface; determining the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment.
第二存储器可以用于存储程序代码,第二处理器用于调用第二存储器中的程序代码,触发接口卡执行如下操作:获得第一报文,所述第一报文的目的地址为第一目的地址,所述第一报文包括第一网络分片的标识,第一目的地址对应第一进程;基于所述第一子接口向第二网络设备发送所述第一报文;获得第二报文,所述第二报文的目的地址为第二目的地址,所述第二报文包括所述第一网络分片的标识,所述第二目的地址对应第二进程,所述第二进程与所述第一进程不同;基于所述第一子接口向所述第二网络设备发送所述第二报文。The second memory can be used to store program codes, and the second processor is used to call the program codes in the second memory, triggering the interface card to perform the following operations: obtaining a first message, the destination address of the first message being the first purpose address, the first packet includes the identifier of the first network fragment, the first destination address corresponds to the first process; the first packet is sent to the second network device based on the first sub-interface; the second packet is obtained The destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, the second destination address corresponds to the second process, and the second process Different from the first process; sending the second packet to the second network device based on the first sub-interface.
在一种可能的实现方式中,主控板和接口板之间建立进程间通信协议(inter-process communication,IPC)通道,主控板和接口板之间通过IPC通道进行通信。In a possible implementation manner, an inter-process communication (inter-process communication, IPC) channel is established between the main control board and the interface board, and the main control board and the interface board communicate through the IPC channel.
第七方面,本申请提供了一种芯片,包括存储器和处理器,存储器用于存储计算机程序,处理器用于从存储器中调用并运行该计算机程序,以执行上述第一方面中的方法。In a seventh aspect, the present application provides a chip including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the method in the first aspect.
可选地,上述芯片仅包括处理器,处理器用于读取并执行存储器中存储的计算机程序,当计算机程序被执行时,处理器执行上述第一方面中的方法。Optionally, the above chip only includes a processor, and the processor is configured to read and execute the computer program stored in the memory, and when the computer program is executed, the processor executes the method in the first aspect.
第八方面,本申请实施例还提供了一种网络系统,该网络系统可以包括第一网络设备和第二网络设备。其中,第一网络设备,用于执行上述第一方面中的方法;第二网络设备,用于接收所述第一网络设备基于所确定的子接口发送的报文。In an eighth aspect, an embodiment of the present application further provides a network system, where the network system may include a first network device and a second network device. The first network device is configured to execute the method in the first aspect; the second network device is configured to receive a packet sent by the first network device based on the determined sub-interface.
附图说明Description of drawings
图1为本申请实施例中一网络场景的结构示意图;FIG. 1 is a schematic structural diagram of a network scenario in an embodiment of the present application;
图2a为本申请实施例中网络设备21和网络设备22之间子接口的一示意图;2a is a schematic diagram of a sub-interface between a network device 21 and a network device 22 in an embodiment of the application;
图2b为本申请实施例中网络设备21和网络设备22之间子接口的另一示意图;FIG. 2b is another schematic diagram of a sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
图3a为本申请实施例中网络设备21和网络设备22之间子接口的又一示意图;FIG. 3a is another schematic diagram of the sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
图3b为本申请实施例中网络设备21和网络设备22之间子接口的再一示意图;FIG. 3b is another schematic diagram of the sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
图3c为本申请实施例中网络设备21和网络设备22之间子接口的又一示意图;FIG. 3c is another schematic diagram of the sub-interface between the network device 21 and the network device 22 in the embodiment of the application;
图4为本申请实施例中又一网络场景的结构示意图;FIG. 4 is a schematic structural diagram of another network scenario in an embodiment of the present application;
图5为本申请实施例提供的一种报文处理方法100的流程示意图;FIG. 5 is a schematic flowchart of a packet processing method 100 provided by an embodiment of the present application;
图6a为本申请实施例中第一报文的一格式示意图;6a is a schematic diagram of a format of a first message in an embodiment of the present application;
图6b为本申请实施例中第一报文的再一格式示意图;FIG. 6b is a schematic diagram of still another format of the first message in the embodiment of the present application;
图6c为本申请实施例中第一报文又一格式示意图;FIG. 6c is a schematic diagram of yet another format of the first message in the embodiment of the present application;
图7为本申请实施例中一种报文处理装置700的结构示意图;FIG. 7 is a schematic structural diagram of a message processing apparatus 700 according to an embodiment of the present application;
图8为本申请实施例中一种网络设备800的结构示意图;FIG. 8 is a schematic structural diagram of a network device 800 in an embodiment of the present application;
图9为本申请实施例中一种网络设备900的结构示意图;FIG. 9 is a schematic structural diagram of a network device 900 in an embodiment of the present application;
图10为本申请实施例中一种网络系统1000的结构示意图。FIG. 10 is a schematic structural diagram of a network system 1000 in an embodiment of the present application.
具体实施方式Detailed ways
为了提高网络的可靠性,通常在多个连通的网络拓扑之间部署一对能够被多个网络拓扑共用的网络设备,该对网络设备之间通过一对物理接口连接,被多个网络拓扑对应的多个进程共用。In order to improve the reliability of the network, a pair of network devices that can be shared by multiple network topologies is usually deployed between multiple connected network topologies. shared by multiple processes.
例如,在图1所示的网络场景中,可以包括:网络设备11~网络设备16、网络设备21和网络设备22,该网络场景中包括环1、环2和环3,环1包括网络设备11、网络设备21和网络设备22,环2包括网络设备12、网络设备13、网络设备14、网络设备21和网络设备22,环3包括网络设备15、网络设备16、网络设备21和网络设备22。环1、环2和环3分别对应进程1、进程2和进程3。可见,进程1、进程2和进程3共用网络设备21和网络设备22,网络设备21通过物理接口1和网络设备22的物理接口2连接。For example, in the network scenario shown in FIG. 1 , it may include: network devices 11 to 16 , network device 21 and network device 22 , the network scenario includes ring 1 , ring 2 and ring 3 , and ring 1 includes network devices 11. Network device 21 and network device 22, ring 2 includes network device 12, network device 13, network device 14, network device 21 and network device 22, ring 3 includes network device 15, network device 16, network device 21 and network device twenty two. Ring 1, Ring 2, and Ring 3 correspond to Process 1, Process 2, and Process 3, respectively. It can be seen that the process 1 , the process 2 and the process 3 share the network device 21 and the network device 22 , and the network device 21 is connected to the physical interface 2 of the network device 22 through the physical interface 1 .
在没有进行网络分片时,为了实现进程间的路由隔离,网络设备21在物理接口1上为每个进程分配并绑定一个子接口,如图2a所示,网络设备21和网络设备22之间的一对物 理接口上可以包括子接口1、子接口2和子接口3。这样,进程1的流量通过网络设备21转发时,流量在网络设备21处可以通过物理接口1上的子接口3发送到网络设备22。When there is no network fragmentation, in order to achieve routing isolation between processes, the network device 21 allocates and binds a sub-interface to each process on the physical interface 1. As shown in Figure 2a, the network device 21 and the network device 22 are divided into two sub-interfaces. A pair of physical interfaces between them may include sub-interface 1, sub-interface 2, and sub-interface 3. In this way, when the traffic of the process 1 is forwarded through the network device 21 , the traffic can be sent to the network device 22 at the network device 21 through the sub-interface 3 on the physical interface 1 .
在进行网络分片时,为了实现分配资源的隔离,网络设备21在物理接口1上为每个进程下的每个网络分片都分配并绑定一个子接口,假设每个进程下的网络分片数量一致,则,网络设备21和网络设备22之间的一对物理接口上需要分配的子接口的数量等于该对网络设备所属的进程的数量和每个进程下的网络分片数量的乘积。例如,进程1、进程2和进程3均划分为网络分片1和网络分片2,则,如图2b所示,网络设备21和网络设备22之间的一对物理接口上可以包括子接口11、子接口12、子接口21、子接口22、子接口31和子接口32,共6个子接口。这样,进程3上携带网络分片2的流量通过网络设备22转发时,流量在网络设备22处可以通过物理接口2上的子接口32发送到网络设备21。When performing network sharding, in order to achieve isolation of allocated resources, the network device 21 allocates and binds a sub-interface to each network shard under each process on the physical interface 1. It is assumed that the network shard under each process If the number of slices is the same, then the number of sub-interfaces to be allocated on a pair of physical interfaces between network device 21 and network device 22 is equal to the product of the number of processes to which the pair of network devices belongs and the number of network slices under each process. . For example, process 1, process 2 and process 3 are all divided into network slice 1 and network slice 2, then, as shown in Figure 2b, a pair of physical interfaces between network device 21 and network device 22 may include sub-interfaces 11. Sub-interface 12, sub-interface 21, sub-interface 22, sub-interface 31 and sub-interface 32, a total of 6 sub-interfaces. In this way, when the traffic carrying the network segment 2 on the process 3 is forwarded through the network device 22 , the traffic can be sent to the network device 21 at the network device 22 through the sub-interface 32 on the physical interface 2 .
可见,在一对网络设备共同运行多个进程且这些进程有网络分片要求的场景下,需要连接该对网络设备的物理接口上分配太多的子接口,不仅部署、管理和维护子接口较为困难,而且,由于网络分片对所绑定的子接口的资源有需求,所以分配过多的子接口导致所要预留的资源过多,大大的降低该物理接口的可扩展性,还可能出现对物理接口的资源诉求超过该物理接口的可承受范围的问题。It can be seen that in a scenario where a pair of network devices jointly runs multiple processes and these processes have network fragmentation requirements, it is necessary to allocate too many sub-interfaces on the physical interface connecting the pair of network devices, not only deploying, managing and maintaining sub-interfaces is relatively difficult. In addition, since network slicing has requirements for the resources of the sub-interfaces bound to it, allocating too many sub-interfaces leads to too many resources to be reserved, which greatly reduces the scalability of the physical interface, and may also occur. The resource requirement for a physical interface exceeds the tolerable range of the physical interface.
基于此,在一对网络设备共同运行多个进程且这些进程有网络分片要求的场景下,本申请实施例提供了一种子接口的配置方案,在物理接口下,为每个网络分片分配并绑定一个子接口,为多个进程最多分配与进程数量相等的子接口,其中,与网络分片对应的子接口预留能够满足该网络分片资源需求的资源,而与进程绑定的子接口则用于打通该对网络设备之间的路由,无需预留资源。其中,为进程绑定的子接口可以与为网络分片分配的子接口不同,也可以复用为网络分片分配的子接口,这样,无需为每个进程下的各个网络分片都分配一个预留资源的子接口,大大减少了一个物理接口下所要配置的子接口的数量。而按照本申请实施例提供的子接口配置方案,当该对网络设备中的第一网络设备接收到运行在不同进程但对应相同网络分片的报文时,可以基于报文的目的地址和网络分片的标识确定物理接口下与该网络分片的标识绑定的子接口,从而利用所确定的该子接口向该对网络设备中的第二网络设备发送报文,在一对网络设备共同运行多个进程且对应多个相同的网络分片的网络场景中,配置较少的子接口即可实现该对网络设备之间报文的准确传输。Based on this, in a scenario where a pair of network devices jointly run multiple processes and these processes require network sharding, the embodiment of the present application provides a sub-interface configuration scheme. Under the physical interface, each network shard is allocated And bind a sub-interface to allocate a maximum of sub-interfaces equal to the number of processes for multiple processes. Among them, the sub-interface corresponding to the network shard reserves resources that can meet the resource requirements of the network shard, and the sub-interfaces bound to the process are reserved. The sub-interface is used to open up the route between the pair of network devices without reserving resources. Among them, the sub-interface bound to the process can be different from the sub-interface allocated for the network shard, or it can be reused as the sub-interface allocated for the network shard. In this way, there is no need to allocate a sub-interface for each network shard under each process. Sub-interfaces that reserve resources greatly reduce the number of sub-interfaces to be configured on a physical interface. However, according to the sub-interface configuration solution provided by the embodiment of the present application, when the first network device in the pair of network devices receives a packet running in a different process but corresponding to the same network fragment, it can be based on the destination address of the packet and the network The identifier of the fragment determines the sub-interface bound to the identifier of the network fragment under the physical interface, so that the determined sub-interface is used to send a packet to the second network device in the pair of network devices. In a network scenario in which multiple processes are running and correspond to multiple identical network segments, accurate packet transmission between the pair of network devices can be achieved by configuring fewer sub-interfaces.
仍然以图1所示的网络场景为例,基于本申请实施例提供的子接口配置方案,网络设备21和网络设备22之间的一对物理接口上分配的子接口包括但不限定于图3a、图3b和图3c所示。Still taking the network scenario shown in FIG. 1 as an example, based on the sub-interface configuration solution provided by the embodiment of the present application, the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include, but are not limited to, FIG. 3 a . , Figure 3b and Figure 3c.
作为一个示例,参见图3a所示,网络设备21和网络设备22之间的一对物理接口上分配的子接口包括子接口1~子接口5,共5个子接口。其中,子接口1~子接口3分别对应进程1~进程3,子接口1~子接口3无需预留资源,子接口4和子接口5分别绑定网络分片1和网络分片2,子接口4上的预留资源满足网络分片1的资源需求,子接口5上的预留资源满足网络分片2的资源需求。这样,进程3上携带网络分片2的流量通过网络设备22转发时,流量在网络设备22处首先根据目的地址确定子接口2,并确定子接口2对应物理接口2,接着,可以查看物理接口2上与网络分片2绑定的子接口5,从而通过物理接口2上 的子接口5将流量发送到网络设备21。As an example, as shown in FIG. 3 a , the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include sub-interface 1 to sub-interface 5, 5 sub-interfaces in total. Among them, sub-interface 1 to sub-interface 3 correspond to process 1 to process 3 respectively, sub-interface 1 to sub-interface 3 do not need to reserve resources, sub-interface 4 and sub-interface 5 are bound to network slice 1 and network slice 2 respectively, and the sub-interface The reserved resources on 4 meet the resource requirements of network slice 1, and the reserved resources on sub-interface 5 meet the resource requirements of network slice 2. In this way, when the traffic carrying network fragment 2 on process 3 is forwarded through network device 22, the traffic first determines sub-interface 2 according to the destination address at network device 22, and determines that sub-interface 2 corresponds to physical interface 2, and then, you can view the physical interface Sub-interface 5 bound to network slice 2 on physical interface 2, so that traffic is sent to network device 21 through sub-interface 5 on physical interface 2.
作为另一个示例,参见图3b所示,网络设备21和网络设备22之间的一对物理接口上分配的子接口包括子接口1~子接口4,共4个子接口。其中,子接口1、子接口2和物理接口1(或物理接口2)分别对应进程1~进程3,子接口1和子接口2无需预留资源,子接口3和子接口4分别绑定网络分片1和网络分片2,子接口3上的预留资源满足网络分片1的资源需求,子接口4上的预留资源满足网络分片2的资源需求。这样,进程1上携带网络分片1的流量通过网络设备22转发时,流量在网络设备22处首先根据目的地址确定物理接口2,接着,可以查看物理接口2上与网络分片1绑定的子接口3,从而通过物理接口2上的子接口3将流量发送到网络设备21。As another example, referring to FIG. 3b , the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include sub-interface 1 to sub-interface 4, 4 sub-interfaces in total. Among them, sub-interface 1, sub-interface 2 and physical interface 1 (or physical interface 2) correspond to process 1 to process 3 respectively, sub-interface 1 and sub-interface 2 do not need to reserve resources, and sub-interface 3 and sub-interface 4 are bound to network slices respectively 1 and network slice 2, the reserved resources on sub-interface 3 meet the resource requirements of network slice 1, and the reserved resources on sub-interface 4 meet the resource requirements of network slice 2. In this way, when the traffic carrying network fragment 1 on process 1 is forwarded through network device 22, the traffic first determines physical interface 2 according to the destination address at network device 22, and then, you can view the physical interface 2 bound to network fragment 1. Sub-interface 3, thereby sending traffic to network device 21 through sub-interface 3 on physical interface 2.
作为又一个示例,参见图3c所示,网络设备21和网络设备22之间的一对物理接口上分配的子接口包括子接口1和子接口2,共2个子接口。其中,子接口1、子接口2和物理接口1(或物理接口2)分别对应进程1~进程3,作为打通路由的功能时该子接口1和子接口2无需预留资源,子接口1和子接口2还分别绑定网络分片1和网络分片2,子接口1上的预留资源满足网络分片1的资源需求,子接口2上的预留资源满足网络分片2的资源需求。这样,进程3上携带网络分片1的流量通过网络设备22转发时,流量在网络设备22处首先根据目的地址确定子接口2,并确定子接口2对应物理接口2,接着,可以查看物理接口2上与网络分片1绑定的子接口1,从而通过物理接口2上的子接口1将流量发送到网络设备21。As another example, referring to FIG. 3c, the sub-interfaces allocated on a pair of physical interfaces between the network device 21 and the network device 22 include sub-interface 1 and sub-interface 2, with a total of 2 sub-interfaces. Among them, sub-interface 1, sub-interface 2, and physical interface 1 (or physical interface 2) correspond to process 1 to process 3, respectively. As the function of opening a route, the sub-interface 1 and sub-interface 2 do not need to reserve resources, and sub-interface 1 and sub-interface do not need to reserve resources. 2 is also bound to network slice 1 and network slice 2 respectively. The reserved resources on sub-interface 1 meet the resource requirements of network slice 1, and the reserved resources on sub-interface 2 meet the resource requirements of network slice 2. In this way, when the traffic carrying network fragment 1 on process 3 is forwarded through network device 22, the traffic first determines sub-interface 2 according to the destination address at network device 22, and determines that sub-interface 2 corresponds to physical interface 2, and then, you can view the physical interface Sub-interface 1 bound to network slice 1 on physical interface 2, so that traffic is sent to network device 21 through sub-interface 1 on physical interface 2.
可见,在一对网络设备共同运行多个进程且对应多个相同的网络分片的网络场景中,能够通过配置较少的子接口实现该对网络设备之间报文的准确传输,解决了目前需要为每个进程下的网络分片分配对应的一个子接口,在一个物理接口上分配太多的子接口,不仅部署、管理和维护子接口较为困难,而且,由于网络分片对所绑定的子接口的资源有需求,所以分配过多的子接口导致所要预留的资源过多,大大的降低该物理接口的可扩展性,还可能出现对物理接口的资源诉求超过该物理接口的可承受范围的问题。It can be seen that in a network scenario in which a pair of network devices jointly runs multiple processes and corresponds to multiple identical network segments, the accurate transmission of packets between the pair of network devices can be realized by configuring fewer sub-interfaces, which solves the problem of the current situation. It is necessary to allocate a corresponding sub-interface to the network shard under each process, and too many sub-interfaces are allocated on a physical interface, which is not only difficult to deploy, manage, and maintain the sub-interfaces, but also because the network shards are bound to Therefore, the allocation of too many sub-interfaces leads to too many resources to be reserved, which greatly reduces the scalability of the physical interface, and the resource demands on the physical interface may exceed the availability of the physical interface. Tolerance issues.
本申请实施例中,子接口(英文:subinterface)是通过协议和技术将一个物理接口(英文:interface)虚拟出来的多个逻辑接口。子接口的类型可以包括:普通子接口、信道化子接口和灵活以太网(英文:Flex Ethernet,简称:FlexE)子接口,其中,为进程分配的子接口可以是普通子接口、信道化子接口或FlexE子接口,为网络分片分配的子接口可以是信道化子接口或FlexE子接口。In the embodiment of the present application, a sub-interface (English: subinterface) is a plurality of logical interfaces virtualized from a physical interface (English: interface) through protocols and technologies. The types of sub-interfaces may include: common sub-interfaces, channelized sub-interfaces, and flexible Ethernet (English: Flex Ethernet, FlexE for short) sub-interfaces, wherein the sub-interfaces allocated to processes may be common sub-interfaces, channelized sub-interfaces or FlexE sub-interface, the sub-interface allocated for the network slice can be a channelized sub-interface or a FlexE sub-interface.
图1所示的网络场景,例如可以是互联网协议的无线接入网(英文:Internet Protocol radio access network,简称IPRAN)组网中,多个接入环和一个汇聚环共用一对网络设备的结构,那么,环1和环2可以是接入环,环3可以是汇聚环,接入环中的网络设备(如网络设备11)例如可以是接入设备(英文:Access node,简称:ACC),共用的网络设备(即网络设备21和网络设备22)可以是汇聚设备(英文:Aggregation Gateway,简称:AGG)。或者,图1所示的网络场景也可以是多个汇聚环和一个骨干环共用一对网络设备的结构,那么,环1和环2可以是汇聚环,环3可以是骨干环,接入环中的网络设备(如网络设备11)例如可以是汇聚设备,共用的网络设备(即网络设备21和网络设备22)可以是核心设 备(也可以称为骨干设备)。需要说明的是,在多个环对应的多个进程共用一对网络设备,能够在环中存在故障时,流量能够通过绕行共用的一对网络设备之间的路径到达目的设备,提高了网络传输流量的可靠性。In the network scenario shown in Figure 1, for example, in the Internet Protocol radio access network (English: Internet Protocol radio access network, IPRAN) networking, multiple access rings and one aggregation ring share the structure of a pair of network devices , then, ring 1 and ring 2 may be access rings, ring 3 may be an aggregation ring, and the network device (such as network device 11) in the access ring may be, for example, an access device (English: Access node, abbreviation: ACC) , the shared network device (ie, the network device 21 and the network device 22 ) may be an aggregation device (English: Aggregation Gateway, AGG for short). Alternatively, the network scenario shown in Figure 1 can also be a structure in which multiple aggregation rings and a backbone ring share a pair of network devices. Then, Ring 1 and Ring 2 can be aggregation rings, Ring 3 can be a backbone ring, and an access ring can be a The network device (eg, network device 11 ) in the device may be, for example, a convergence device, and the shared network device (ie, network device 21 and network device 22 ) may be core devices (also referred to as backbone devices). It should be noted that, when multiple processes corresponding to multiple rings share a pair of network devices, when there is a fault in the ring, traffic can reach the destination device by bypassing the path between the shared pair of network devices, improving the network performance. Reliability of transmitted traffic.
本申请实施例适用的网络场景,要求一对网络设备之间通过一对物理接口连接,该对网络设备属于多个相同的网络分片,并且,该对网络设备运行多个进程。本申请实施例中的多个进程可以与多个环结构一一对应,也可以与多个非环结构一一对应,即,本申请实施例中,除了上述图1所示的网络场景以外,还可以适用于如图4所示的网络场景,包括:网络设备11~网络设备19、网络设备21和网络设备22,运行进程1的网络设备可以包括网络设备11、网络设备17、网络设备21和网络设备22,运行进程2的网络设备可以包括网络设备12、网络设备13、网络设备14、网络设备21和网络设备22,运行进程3的网络设备可以包括网络设备15、网络设备16、网络设备18、网络设备19、网络设备21和网络设备22。进程1、进程2和进程3共用网络设备21和网络设备22,网络设备21通过物理接口1和网络设备22的物理接口2连接。图4所示的网络场景中,在存在网络分片需求的情况下,子接口的配置和报文的处理与上述图1所示的网络场景相同,在此不再赘述。下文中,以图1所示的网络场景为例对本申请实施例提供的技术方案进行描述。The network scenario applicable to the embodiments of the present application requires that a pair of network devices are connected through a pair of physical interfaces, the pair of network devices belong to multiple identical network segments, and the pair of network devices run multiple processes. Multiple processes in this embodiment of the present application may correspond one-to-one with multiple ring structures, or may correspond one-to-one with multiple non-ring structures, that is, in the embodiment of the present application, in addition to the network scenario shown in FIG. 1 above, It can also be applied to the network scenario shown in FIG. 4 , including: network device 11 to network device 19 , network device 21 and network device 22 , the network device running process 1 may include network device 11 , network device 17 , network device 21 and network device 22, the network device running process 2 may include network device 12, network device 13, network device 14, network device 21 and network device 22, and the network device running process 3 may include network device 15, network device 16, network Device 18, Network Device 19, Network Device 21, and Network Device 22. Process 1 , process 2 and process 3 share network device 21 and network device 22 , and network device 21 is connected to physical interface 2 of network device 22 through physical interface 1 . In the network scenario shown in FIG. 4 , when there is a network fragmentation requirement, the configuration of sub-interfaces and the processing of packets are the same as those in the network scenario shown in FIG. 1 , and details are not repeated here. Hereinafter, the technical solutions provided by the embodiments of the present application are described by taking the network scenario shown in FIG. 1 as an example.
需要说明的是,本申请实施例中的网络设备是指具有报文转发功能的路由器、交换机、防火墙等设备。It should be noted that the network devices in the embodiments of the present application refer to devices such as routers, switches, and firewalls that have a function of forwarding packets.
下面结合附图,通过实施例来详细说明本申请实施例中一种报文处理方法的具体实现方式。The specific implementation of a packet processing method in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
图5为本申请实施例中一种报文处理方法100的信令流程图。参见图5,该方法100以属于运行在多个进程且属于多个相同的网络分片的第一网络设备和第二网络设备的交互过程为例进行说明,其中,第一网络设备通过目标物理接口和第二网络设备连接,所述多个进程包括第一进程和第二进程,第一进程和第二进程为不同的进程,所述多个相同的网络分片包括第一网络分片和第二网络分片。例如,第一网络设备可以是图1或图2中的网络设备21,第二网络设备可以是图1或图2中的网络设备22。FIG. 5 is a signaling flowchart of a packet processing method 100 in an embodiment of the present application. Referring to FIG. 5 , the method 100 is described by taking the interaction process between a first network device and a second network device running in multiple processes and belonging to multiple identical network segments as an example, wherein the first network device passes the target physical The interface is connected to the second network device, the multiple processes include a first process and a second process, the first process and the second process are different processes, and the multiple identical network segments include the first network segment and Second network shard. For example, the first network device may be the network device 21 in FIG. 1 or FIG. 2 , and the second network device may be the network device 22 in FIG. 1 or FIG. 2 .
需要说明的是,本申请实施例中的多个进程为内部网关协议(英文:Interior Gateway Protocol,简称:IGP)进程,例如可以是中间系统到中间系统(英文:Intermediate System-to-Intermediate System,简称:ISIS)进程或开放最短路径优先(英文:Open Shortest Path First,简称:OSPF)进程。It should be noted that the multiple processes in the embodiments of the present application are Interior Gateway Protocol (English: Interior Gateway Protocol, IGP for short) processes, for example, may be Intermediate System-to-Intermediate System (English: Intermediate System-to-Intermediate System, Abbreviation: ISIS) process or Open Shortest Path First (English: Open Shortest Path First, Abbreviation: OSPF) process.
具体实现时,该方法100例如可以包括下述S101~S106:During specific implementation, the method 100 may, for example, include the following S101 to S106:
S101,第一网络设备获得第一报文,该第一报文的目的地址为第一目的地址,第一报文包括第一网络分片的标识,第一目的地址对应第一进程。S101, a first network device obtains a first packet, the destination address of the first packet is a first destination address, the first packet includes an identifier of a first network fragment, and the first destination address corresponds to a first process.
第一报文为第一网络设备接收到且待从第一网络设备发送到第二网络设备的报文,该第一报文通过第一网络设备和第二网络设备进入运行第一进程的网络拓扑。为了适应网络分片的场景,该第一报文中还携带第一网络分片的标识,用于标识该第一报文对应第一网络分片,基于此,第一网络设备可以确定第一报文为第一网络分片对应的流量。The first packet is a packet received by the first network device and to be sent from the first network device to the second network device, and the first packet enters the network running the first process through the first network device and the second network device topology. In order to adapt to the scenario of network fragmentation, the first packet also carries the identifier of the first network fragment, which is used to identify that the first packet corresponds to the first network fragment. Based on this, the first network device can determine the first network fragment. The packet is the traffic corresponding to the first network fragment.
其中,如果第一目的地址是通过第一进程中的IGP路由学习到的,那么,可以称该第 一进程为第一目的地址对应的第一进程。第一目的地址对应的网络设备(即第一报文的目的设备)运行在第一进程中,例如,第一目的地址对应的网络设备属于接入环1,接入环1对应第一进程,可以表述为第一目的地址对应第一进程。Wherein, if the first destination address is learned through the IGP route in the first process, then the first process may be called the first process corresponding to the first destination address. The network device corresponding to the first destination address (that is, the destination device of the first packet) runs in the first process. For example, the network device corresponding to the first destination address belongs to access ring 1, and access ring 1 corresponds to the first process. It can be expressed that the first destination address corresponds to the first process.
该方法100可以适用于多协议标签交换(英文:Multi-Protocol Label Switching,简称:MPLS)网络、第四版互联网协议(英文:Internet Protocol version 4,简称:IPv4)网络或第六版互联网协议(英文:Internet Protocol version 6,简称:IPv6)网络。The method 100 can be applied to Multi-Protocol Label Switching (English: Multi-Protocol Label Switching, MPLS for short) networks, Internet Protocol version 4 (English: Internet Protocol version 4, IPv4 for short) networks or Internet Protocol version 6 ( English: Internet Protocol version 6, referred to as: IPv6) network.
作为一个示例,如果该方法100应用于IPv6网络中,则,第一报文为IPv6报文,第一网络分片的标识可以携带在第一报文的逐跳(英文:Hop by Hop,简称:HBH)选项头或目的地址选项头(英文:Destination Option Header,简称:DOH)中。例如,第一报文可以如图6a所示,该第一网络分片的标识可以携带在第一报文的IPv6扩展头(如HBH选项头)中。可选的,携带有该第一网络分片的标识的HBH选项头中的选项类型(Option Type)字段可以具有特定的的取值,以指示该HBH选项头中携带有第一网络分片的标识。并且,该第一网络分片的标识可以携带在第一报文的IPv6扩展头的选项Options中扩展的任意一个类型长度值(英文:Type Length Value,简称:TLV)字段中。As an example, if the method 100 is applied to an IPv6 network, the first packet is an IPv6 packet, and the identifier of the first network fragment can be carried in the hop-by-hop (English: Hop by Hop, referred to as “Hop by Hop”) of the first packet. : HBH) option header or destination address option header (English: Destination Option Header, abbreviation: DOH). For example, the first packet may be as shown in FIG. 6a, and the identifier of the first network fragment may be carried in an IPv6 extension header (eg, an HBH option header) of the first packet. Optionally, the option type (Option Type) field in the HBH option header carrying the identifier of the first network fragment may have a specific value to indicate that the HBH option header carries the first network fragment logo. In addition, the identifier of the first network fragment may be carried in any type length value (English: Type Length Value, TLV for short) field extended in the options Options of the IPv6 extension header of the first packet.
作为另一个示例,如果该方法100应用于IPv4网络中,则,第一报文为IPv4报文,第一网络分片的标识可以携带在第一报文的选项Options字段中,例如,第一报文可以如图6b所示,可以通过在第一报文的Options字段中扩展TLV字段,利用扩展的TLV字段携带该第一网络分片的标识。As another example, if the method 100 is applied to an IPv4 network, the first packet is an IPv4 packet, and the identifier of the first network fragment may be carried in the Options field of the first packet, for example, the first packet is an IPv4 packet. The message may be as shown in FIG. 6b, by extending the TLV field in the Options field of the first message, and using the extended TLV field to carry the identifier of the first network fragment.
作为又一个示例,如果该方法100应用于MPLS网络,则,第一报文为MPLS报文,该第一报文的MPLS标签栈中可以包括多个MPLS标签,携带第一网络分片的标识的标签为多个MPLS标签中的一个标签。可选的,多个MPLS标签中可以包括指示标签,该指示标签用于指示该指示标签的下一个MPLS标签携带第一网络分片的标识,第一报文例如可以如图6c所示。例如,携带第一网络分片的标识的标签可以位于MPLS标签栈的栈底。As another example, if the method 100 is applied to an MPLS network, the first packet is an MPLS packet, and the MPLS label stack of the first packet may include multiple MPLS labels, carrying the identifier of the first network fragment The label is one of multiple MPLS labels. Optionally, the multiple MPLS labels may include an indication label, where the indication label is used to indicate that the next MPLS label of the indication label carries the identifier of the first network segment, and the first packet may be, for example, as shown in FIG. 6c . For example, the label carrying the identifier of the first network segment may be located at the bottom of the MPLS label stack.
S102,第一网络设备根据第一目的地址和第一网络分片的标识确定目标物理接口中的第一子接口。S102, the first network device determines the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment.
需要说明的是,在第一网络设备和第二网络设备进程报文转发之前,网管或控制器可以对第一网络设备和第二网络设备进行配置,为进行报文转发做好准备。配置内容包括但不限于下述三个示例:It should be noted that, before the first network device and the second network device process packet forwarding, the network management or controller may configure the first network device and the second network device to prepare for packet forwarding. The configuration contents include but are not limited to the following three examples:
作为第一个示例,配置内容可以包括:为目标物理接口上的第二子接口配置对应的IP地址1,并加入第一进程;为目标物理接口上的第四子接口配置对应的IP地址2,并加入第二进程;为目标物理接口上的第五子接口配置对应的IP地址3,并加入第三进程;为第一网络分片绑定目标物理接口上的第一子接口,该第一子接口上的预留资源能够满足第一网络分片的资源需求;为第二网络分片绑定目标物理接口上的第三子接口,该第三子接口上的预留资源能够满足第二网络分片的资源需求。其中,在第一进程中通过第二子接口实现第一网络设备与第二网络设备的路由可达,在第二进程中通过第四子接口实现第一网络设备与第二网络设备的路由可达,在第三进程中通过第五子接口实现第一网络设备与第二网络设备的路由可达,因此,第二子接口、第四子接口和第五子接口均无需预留资源。As a first example, the configuration content may include: configuring the corresponding IP address 1 for the second sub-interface on the target physical interface, and joining the first process; configuring the corresponding IP address 2 for the fourth sub-interface on the target physical interface , and join the second process; configure the corresponding IP address 3 for the fifth sub-interface on the target physical interface, and join the third process; bind the first sub-interface on the target physical interface for the first network fragment, the The reserved resources on a sub-interface can meet the resource requirements of the first network fragment; bind the third sub-interface on the target physical interface to the second network fragment, and the reserved resources on the third sub-interface can meet the requirements of the first network fragment. 2. Resource requirements for network sharding. The route between the first network device and the second network device is achieved through the second sub-interface in the first process, and the route between the first network device and the second network device is realized through the fourth sub-interface in the second process. In the third process, the route between the first network device and the second network device is achieved through the fifth sub-interface. Therefore, the second sub-interface, the fourth sub-interface and the fifth sub-interface do not need to reserve resources.
该示例下,第一网络设备上可以保存有:第一进程与第二子接口、第二进程与第四子接口、以及第三进程与第五子接口之间的对应关系,第二子接口、第四子接口、第五子接口属于目标物理接口,第一网络分片的标识与第一子接口、以及第二网络分片的标识与第三子接口之间的对应关系。其中,各种对应关系可以通过一个或多个表项的形式保存,例如,第一网络设备上可以保存表1和表2如下:In this example, the first network device may store: the first process and the second sub-interface, the second process and the fourth sub-interface, and the correspondence between the third process and the fifth sub-interface, the second sub-interface , the fourth sub-interface, and the fifth sub-interface belong to the target physical interface, and the corresponding relationship between the identifier of the first network fragment and the first sub-interface, and the identifier of the second network fragment and the third sub-interface. Wherein, various correspondences may be stored in the form of one or more entries. For example, Table 1 and Table 2 may be stored on the first network device as follows:
表1Table 1
路由前缀routing prefix 子接口subinterface 主接口main interface
前缀1prefix 1 第二子接口Second sub-interface 目标物理接口target physical interface
前缀2prefix 2 第四子接口Fourth sub-interface 目标物理接口target physical interface
前缀3prefix 3 第五子接口Fifth sub-interface 目标物理接口target physical interface
表2Table 2
主接口main interface 网络分片的标识Identification of network shards 子接口subinterface
目标物理接口target physical interface 第一网络分片的标识The identifier of the first network shard 第一子接口first sub-interface
目标物理接口target physical interface 第二网络分片的标识Identification of the second network shard 第三子接口third sub-interface
其中,以表1中最后一行为例,表示目的地址与前缀3匹配的报文,通过第五子接口实现与第二网络设备的路由可达,第五子接口属于目标物理接口;以表2最后一行为例,表示出接口为目标物理接口的报文,如果携带第二网络分片的标识,则,该报文通过第三子接口向第二网络设备发送。Among them, taking the last line in Table 1 as an example, it indicates that a packet whose destination address matches prefix 3 can be routed to the second network device through the fifth sub-interface, and the fifth sub-interface belongs to the target physical interface; Table 2 The last line is taken as an example, indicating that the outgoing interface is a packet of the target physical interface. If the packet carries the identifier of the second network fragment, the packet is sent to the second network device through the third sub-interface.
又例如,第一网络设备上也可以保存表3如下:For another example, Table 3 may also be stored on the first network device as follows:
表3table 3
Figure PCTCN2021141825-appb-000001
Figure PCTCN2021141825-appb-000001
其中,以表3中最后一行为例,表示目的地址与前缀3匹配的报文,通过第五子接口实现与第二网络设备的路由可达,第五子接口属于目标物理接口,如果携带第一网络分片的标识,则,该报文通过第一子接口向第二网络设备发送;如果携带第二网络分片的标识,则,该报文通过第三子接口向第二网络设备发送。The last row in Table 3 is taken as an example, it indicates that the packet whose destination address matches prefix 3 can be routed to the second network device through the fifth sub-interface. The fifth sub-interface belongs to the target physical interface. If the identifier of a network fragment is carried, the packet is sent to the second network device through the first sub-interface; if it carries the identifier of the second network fragment, the packet is sent to the second network device through the third sub-interface .
该示例下,S102可以包括:S102a1,第一网络设备根据第一目的地址,为第一报文确定第一进程对应的第二子接口,该第二子接口属于目标物理接口;S102a2,第一网络设备根据第一网络分片的标识为第一报文在目标物理接口中确定对应的第一子接口。其中, S102a1可以是第一网络设备确定第一目的地址与表1或表3中的前缀1匹配,所以,为第一报文确定第二子接口。In this example, S102 may include: S102a1, the first network device determines a second sub-interface corresponding to the first process for the first packet according to the first destination address, and the second sub-interface belongs to the target physical interface; S102a2, the first The network device determines the corresponding first sub-interface in the target physical interface for the first packet according to the identifier of the first network fragment. Wherein, S102a1 may be that the first network device determines that the first destination address matches the prefix 1 in Table 1 or Table 3, and therefore, determines the second sub-interface for the first packet.
作为第二个示例,配置内容可以包括:为目标物理接口配置对应的IP地址1,并加入第一进程;为目标物理接口上的第二子接口配置对应的IP地址2,并加入第二进程;为目标物理接口上的第四子接口配置对应的IP地址3,并加入第三进程;为第一网络分片绑定目标物理接口上的第一子接口,该第一子接口上的预留资源能够满足第一网络分片的资源需求;为第二网络分片绑定目标物理接口上的第三子接口,该第三子接口上的预留资源能够满足第二网络分片的资源需求。其中,在第一进程中通过目标物理接口实现第一网络设备与第二网络设备的路由可达,在第二进程中通过第二子接口实现第一网络设备与第二网络设备的路由可达,在第三进程中通过第四子接口实现第一网络设备与第二网络设备的路由可达,因此,目标物理接口、第二子接口和第四子接口均无需预留资源。As a second example, the configuration content may include: configuring the corresponding IP address 1 for the target physical interface and joining the first process; configuring the corresponding IP address 2 for the second sub-interface on the target physical interface and joining the second process ; Configure the corresponding IP address 3 for the fourth sub-interface on the target physical interface, and join the third process; Bind the first sub-interface on the target physical interface for the first network fragment, and the preset on the first sub-interface The reserved resources can meet the resource requirements of the first network fragment; bind the third sub-interface on the target physical interface to the second network fragment, and the reserved resources on the third sub-interface can meet the resources of the second network fragment need. Wherein, in the first process, the target physical interface is used to realize the reachability of the route between the first network device and the second network device, and in the second process, the route between the first network device and the second network device is realized through the second sub-interface. , in the third process, the route between the first network device and the second network device is achieved through the fourth sub-interface. Therefore, the target physical interface, the second sub-interface and the fourth sub-interface do not need to reserve resources.
该示例下,S102例如可以包括:S102b1,第一网络设备根据第一目的地址,为第一报文确定第一进程对应的目标物理接口;S102b2,第一网络设备根据第一网络分片的标识为第一报文在目标物理接口中确定对应的第一子接口。In this example, S102 may include, for example: S102b1, the first network device determines the target physical interface corresponding to the first process for the first packet according to the first destination address; S102b2, the first network device determines according to the identifier of the first network fragment A corresponding first sub-interface is determined in the target physical interface for the first packet.
作为第三个示例,配置内容可以包括:为目标物理接口配置对应的IP地址1,并加入第一进程;为目标物理接口上的第一子接口配置对应的IP地址2,并加入第二进程;为目标物理接口上的第三子接口配置对应的IP地址3,并加入第三进程;为第一网络分片绑定目标物理接口上的第一子接口,该第一子接口上的预留资源能够满足第一网络分片的资源需求;为第二网络分片绑定目标物理接口上的第三子接口,该第三子接口上的预留资源能够满足第二网络分片的资源需求。其中,在第一进程中通过目标物理接口实现第一网络设备与第二网络设备的路由可达,在第二进程中通过第一子接口实现第一网络设备与第二网络设备的路由可达,在第三进程中通过第三子接口实现第一网络设备与第二网络设备的路由可达,因此,目标物理接口、第一子接口和第三子接口在实现路由可达功能时均无需预留资源。As a third example, the configuration content may include: configuring the corresponding IP address 1 for the target physical interface and joining the first process; configuring the corresponding IP address 2 for the first sub-interface on the target physical interface and joining the second process ; configure the corresponding IP address 3 for the third sub-interface on the target physical interface, and join the third process; bind the first sub-interface on the target physical interface for the first network fragment, and the preset on the first sub-interface The reserved resources can meet the resource requirements of the first network fragment; bind the third sub-interface on the target physical interface to the second network fragment, and the reserved resources on the third sub-interface can meet the resources of the second network fragment need. Wherein, in the first process, the target physical interface is used to realize the reachability of the route between the first network device and the second network device, and in the second process, the route between the first network device and the second network device is realized through the first sub-interface. , in the third process, the route reachability between the first network device and the second network device is realized through the third sub-interface. Therefore, the target physical interface, the first sub-interface and the third sub-interface do not need to be reached when the route is reachable. Reserve resources.
该示例下,S102例如可以包括:S102c1,第一网络设备根据第一目的地址,为第一报文确定第一进程对应的目标物理接口;S102c2,第一网络设备根据第一网络分片的标识为第一报文在目标物理接口中确定对应的第一子接口。In this example, S102 may include, for example: S102c1, the first network device determines, according to the first destination address, the target physical interface corresponding to the first process for the first packet; S102c2, the first network device determines according to the identifier of the first network fragment A corresponding first sub-interface is determined in the target physical interface for the first packet.
需要说明的是,还可以配置第一网络设备和第二网络设备所运行的多个进程均为三层IGP拓扑闭环,这样,在环上任意链路或网络设备失效的情况下,均可以通过另一个方向的路径到达目的设备,实现流量的有效传输。It should be noted that it is also possible to configure multiple processes run by the first network device and the second network device to be closed loops in a three-layer IGP topology. The path in the other direction reaches the destination device, enabling efficient traffic transmission.
S103,第一网络设备基于第一子接口向第二网络设备发送所述第一报文。S103, the first network device sends the first packet to the second network device based on the first sub-interface.
具体实现时,第一网络设备基于目标物理接口的第一子接口向第二网络设备发送第一报文,由于第一子接口的预留资源能够满足第一网络分片的资源需求,所以,基于第一子接口对属于第一网络分片的第一报文进行转发,能够使得第一报文以合理的带宽等资源转发到第一进程的第一网络分片中。In specific implementation, the first network device sends the first packet to the second network device based on the first sub-interface of the target physical interface. Since the reserved resources of the first sub-interface can meet the resource requirements of the first network fragment, therefore, Forwarding the first packet belonging to the first network fragment based on the first sub-interface enables the first packet to be forwarded to the first network fragment of the first process with reasonable bandwidth and other resources.
S104,第一网络设备获得第二报文,该第二报文的目的地址为第二目的地址,第二报文包括第一网络分片的标识,第二报文属于第二进程。S104, the first network device obtains a second packet, the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, and the second packet belongs to the second process.
第二报文为第一网络设备接收到且即将从第一网络设备发送到第二网络设备的报文,该第二报文通过第一网络设备和第二网络设备进入运行第二进程的网络拓扑。为了适应网络分片的场景,该第二报文中还携带第一网络分片的标识,用于标识该第二报文对应第一网络分片,基于此,第一网络设备可以确定第二报文为第一网络分片对应的流量。即,第二报文和第一报文属于不同的进程,但对应相同的网络分片。The second packet is a packet received by the first network device and about to be sent from the first network device to the second network device. The second packet enters the network running the second process through the first network device and the second network device topology. In order to adapt to the scenario of network fragmentation, the second packet also carries the identifier of the first network fragment, which is used to identify that the second packet corresponds to the first network fragment. Based on this, the first network device can determine the second network fragment. The packet is the traffic corresponding to the first network fragment. That is, the second packet and the first packet belong to different processes, but correspond to the same network fragment.
该方法100可以适用于MPLS网络、IPv4网络或IPv6网络。各种网络类型下第二报文携带第一网络分片的标识的方式,可以参见S101中第一报文携带第一网络分片的标识的方式描述,这里不再赘述。The method 100 may be applicable to MPLS networks, IPv4 networks or IPv6 networks. For the manner in which the second packet carries the identifier of the first network fragment under various network types, reference may be made to the description of the manner in which the first packet carries the identifier of the first network fragment in S101, which will not be repeated here.
S105,第一网络设备根据第二目的地址和第一网络分片的标识确定目标物理接口中的第一子接口。S105, the first network device determines the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment.
第一网络设备和第二网络设备上预先获得的配置内容如S102中第一个示例所示,则,S105例如可以包括:S105a1,第一网络设备根据第二目的地址,为第二报文确定第二进程对应的第四子接口,该第四子接口属于目标物理接口;S105a2,第一网络设备根据第一网络分片的标识为第二报文在目标物理接口中确定对应的第一子接口。其中,S105a1可以是第一网络设备确定第二目的地址与表1或表3中的前缀2匹配,所以,为第二报文确定第四子接口。The pre-obtained configuration content on the first network device and the second network device is as shown in the first example in S102, then, S105 may include, for example: S105a1, the first network device determines, according to the second destination address, for the second packet The fourth sub-interface corresponding to the second process, the fourth sub-interface belongs to the target physical interface; S105a2, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment interface. Wherein, S105a1 may be that the first network device determines that the second destination address matches the prefix 2 in Table 1 or Table 3, and therefore, determines the fourth sub-interface for the second packet.
第一网络设备和第二网络设备上预先获得的配置内容如S102中第二个示例所示,则,S105例如可以包括:S105b1,第一网络设备根据第二目的地址,为第二报文确定第二进程对应的第二子接口,该第二子接口属于目标物理接口;S105b2,第一网络设备根据第一网络分片的标识为第二报文在目标物理接口中确定对应的第一子接口。The pre-obtained configuration content on the first network device and the second network device is shown in the second example in S102, then, S105 may include, for example: S105b1, the first network device determines for the second packet according to the second destination address The second sub-interface corresponding to the second process, the second sub-interface belongs to the target physical interface; S105b2, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment interface.
第一网络设备和第二网络设备上预先获得的配置内容如S102中第三个示例所示,则,S105例如可以包括:S105c1,第一网络设备根据第二目的地址,为第二报文确定第二进程对应的第一子接口,该第一子接口属于目标物理接口;S105c2,第一网络设备根据第一网络分片的标识为第二报文在目标物理接口中确定对应的第一子接口。The configuration content pre-obtained on the first network device and the second network device is shown in the third example in S102, then, S105 may include, for example: S105c1, the first network device determines for the second packet according to the second destination address The first sub-interface corresponding to the second process, the first sub-interface belongs to the target physical interface; S105c2, the first network device determines the corresponding first sub-interface in the target physical interface for the second packet according to the identifier of the first network fragment interface.
S106,第一网络设备基于第一子接口向第二网络设备发送所述第二报文。S106, the first network device sends the second packet to the second network device based on the first sub-interface.
具体实现时,第一网络设备基于目标物理接口的第一子接口向第二网络设备发送第二报文,由于第一子接口的预留资源能够满足第一网络分片的资源需求,所以,基于第一子接口对属于第一网络分片的第二报文进行转发,能够使得第二报文以合理的带宽等资源转发到第二进程的第一网络分片中。During specific implementation, the first network device sends the second packet to the second network device based on the first sub-interface of the target physical interface. Since the reserved resources of the first sub-interface can meet the resource requirements of the first network fragment, therefore, Forwarding the second packet belonging to the first network fragment based on the first sub-interface enables the second packet to be forwarded to the first network fragment of the second process with reasonable bandwidth and other resources.
需要说明的是,S101~S103和S104~S106的执行没有先后顺序的限定,可以先执行S101~S103再执行S104~S106,也可以先执行S104~S106再执行S101~S103,还可以S101~S103和S104~S106同时执行。It should be noted that the execution of S101~S103 and S104~S106 is not limited in order. You can execute S101~S103 first and then execute S104~S106, or you can execute S104~S106 first and then execute S101~S103, and you can also execute S101~S103 Executed simultaneously with S104 to S106.
在一些可能的实现方式中,该方法100还可以包括:In some possible implementations, the method 100 may further include:
S107,第一网络设备获得第三报文,该第三报文的目的地址为第三目的地址,第三报文包括第二网络分片的标识,第三目的地址对应第三进程,所述多个进程还包括第三进程,该第三进程与第一进程、第二进程不同。S107, the first network device obtains a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, the third destination address corresponds to the third process, and the The plurality of processes also include a third process, which is different from the first process and the second process.
第三报文为第一网络设备接收到且即将从第一网络设备发送到第二网络设备的报文, 该第三报文通过第一网络设备和第二网络设备进入运行第三进程的网络拓扑。为了适应网络分片的场景,该第三报文中还携带第二网络分片的标识,用于标识该第三报文对应第二网络分片,基于此,第一网络设备可以确定第三报文为第二网络分片对应的流量。即,第三报文、第二报文和第一报文分别属于不同的进程,第三报文与第一报文对应不同的网络分片,且第三报文与第二报文对应不同的网络分片。The third packet is a packet received by the first network device and about to be sent from the first network device to the second network device. The third packet enters the network running the third process through the first network device and the second network device topology. In order to adapt to the network fragmentation scenario, the third packet also carries the identifier of the second network fragment, which is used to identify that the third packet corresponds to the second network fragment. Based on this, the first network device can determine the third network fragment. The packet is the traffic corresponding to the second network fragment. That is, the third packet, the second packet, and the first packet belong to different processes, the third packet and the first packet correspond to different network segments, and the third packet and the second packet correspond to different network fragmentation.
该方法100可以适用于MPLS网络、IPv4网络或IPv6网络。各种网络类型下第三报文携带第二网络分片的标识的方式,可以参见S101中第一报文携带第一网络分片的标识的方式描述,这里不再赘述。The method 100 may be applicable to MPLS networks, IPv4 networks or IPv6 networks. For the manner in which the third packet carries the identifier of the second network fragment under various network types, reference may be made to the description of the manner in which the first packet carries the identifier of the first network fragment in S101, which will not be repeated here.
S108,第一网络设备根据所述第三目的地址和第二网络分片的标识确定目标物理接口中的第三子接口。S108: The first network device determines a third sub-interface in the target physical interface according to the third destination address and the identifier of the second network fragment.
第一网络设备和第二网络设备上预先获得的配置内容如S102中第一个示例所示,则,S108例如可以包括:S108a1,第一网络设备根据第三目的地址,为第三报文确定第三进程对应的第五子接口,该第五子接口属于目标物理接口;S108a2,第一网络设备根据第二网络分片的标识为第三报文在目标物理接口中确定对应的第三子接口。其中,S108a1可以是第一网络设备确定第三目的地址与表1或表3中的前缀3匹配,所以,为第三报文确定第五子接口。The pre-obtained configuration content on the first network device and the second network device is as shown in the first example in S102, then, S108 may include, for example: S108a1, the first network device determines for the third packet according to the third destination address The fifth sub-interface corresponding to the third process, the fifth sub-interface belongs to the target physical interface; S108a2, the first network device determines the corresponding third sub-interface in the target physical interface for the third packet according to the identifier of the second network fragment interface. Wherein, S108a1 may be that the first network device determines that the third destination address matches the prefix 3 in Table 1 or Table 3, so the fifth sub-interface is determined for the third packet.
第一网络设备和第二网络设备上预先获得的配置内容如S102中第二个示例所示,则,S108例如可以包括:S108b1,第一网络设备根据第三目的地址,为第三报文确定第三进程对应的第四子接口,该第四子接口属于目标物理接口;S108b2,第一网络设备根据第二网络分片的标识为第三报文在目标物理接口中确定对应的第三子接口。The configuration content pre-obtained on the first network device and the second network device is shown in the second example in S102, then, S108 may include, for example: S108b1, the first network device determines for the third packet according to the third destination address The fourth sub-interface corresponding to the third process, the fourth sub-interface belongs to the target physical interface; S108b2, the first network device determines the corresponding third sub-interface in the target physical interface for the third packet according to the identifier of the second network fragment interface.
第一网络设备和第二网络设备上预先获得的配置内容如S102中第三个示例所示,则,S108例如可以包括:S108c1,第一网络设备根据第三目的地址,为第三报文确定第三进程对应的第二子接口,该第二子接口属于目标物理接口;S108c2,第一网络设备根据第二网络分片的标识为第三报文在目标物理接口中确定对应的第三子接口。The configuration content pre-obtained on the first network device and the second network device is shown in the third example in S102, then, S108 may include, for example: S108c1, the first network device determines, according to the third destination address, for the third packet The second sub-interface corresponding to the third process, the second sub-interface belongs to the target physical interface; S108c2, the first network device determines the corresponding third sub-interface in the target physical interface for the third packet according to the identifier of the second network fragment interface.
S109,第一网络设备基于第三子接口向第二网络设备发送所述第三报文。S109, the first network device sends the third packet to the second network device based on the third sub-interface.
具体实现时,第一网络设备基于目标物理接口的第三子接口向第二网络设备发送第三报文,由于第三子接口的预留资源能够满足第二网络分片的资源需求,所以,基于第三子接口对属于第二网络分片的第三报文进行转发,能够使得第三报文以合理的带宽等资源转发到第三进程的第二网络分片中。During specific implementation, the first network device sends a third packet to the second network device based on the third sub-interface of the target physical interface. Since the reserved resources of the third sub-interface can meet the resource requirements of the second network fragment, therefore, Forwarding the third packet belonging to the second network fragment based on the third sub-interface enables the third packet to be forwarded to the second network fragment of the third process with reasonable bandwidth and other resources.
需要说明的是,S107~S109、S101~S103以及S104~S106的执行没有先后顺序的限定,可以以任意顺序先后执行,例如可以先执行S101~S103再执行S107~S109最后执行也可以同时执行S101~S103、S107~S109和S104~S106。It should be noted that the execution of S107-S109, S101-S103 and S104-S106 is not limited in order, and can be executed in any order. For example, S101-S103 can be executed first, then S107-S109 can be executed at the end, or S101 can be executed at the same time. ~S103, S107~S109, and S104~S106.
上述实施例中以第一网络设备接收到要发往第二网络设备的报文的处理过程为例进行说明,对于第二网络设备接收到的要发往第一网络设备的报文,处理过程可以参见上述S101~S109的相关描述,在此不再赘述。In the above-mentioned embodiment, the processing process of the first network device receiving the packet to be sent to the second network device is used as an example for description. For the packet received by the second network device and sent to the first network device, the processing process Reference may be made to the relevant descriptions of the above S101 to S109, which will not be repeated here.
需要说明的是,本申请实施例以第一网络设备和第二网络设备运行在第一进程、第二进程和第三进程,每个进程对应第一网络分片和第二网络分片为例进行说明的,在其他网 络场景中,第一网络设备和第二网络设备也可以运行在m个进程中(m为大于或等于2的整数),第一网络设备和第二网络设备可以属于n个相同的网络分片(n为大于或等于2的整数)。It should be noted that, in this embodiment of the present application, the first network device and the second network device run in the first process, the second process, and the third process, and each process corresponds to the first network fragment and the second network fragment as an example. For illustration, in other network scenarios, the first network device and the second network device may also run in m processes (m is an integer greater than or equal to 2), and the first network device and the second network device may belong to n the same network shards (n is an integer greater than or equal to 2).
以第一网络设备和第二网络设备运行在m个进程中,且第一网络设备和第二网络设备属于n个相同的网络分片为例,如果按照目前为每个进程下的每个网络分片都分配一个子接口的方式,需要为第一网络设备和第二网络设备之间的物理接口分配(m*n)个子接口;但是,利用本申请实施例提供的子接口配置方案,最多需要为第一网络设备和第二网络设备之间的物理接口分配(m+n)个子接口,如果m>n,则最少需要为第一网络设备和第二网络设备之间的物理接口分配(m-1)个子接口;如果m<n,则最少需要为第一网络设备和第二网络设备之间的物理接口分配n个子接口。可见,利用本申请实施例提供的方法,在第一网络设备和第二网络设备共同运行在多个进程中且存在网络分片诉求的场景下,能够大大的减少在第一网络设备和第二网络设备之间需要配置子接口的数量。Taking the first network device and the second network device running in m processes, and the first network device and the second network device belong to the same n network slices as an example, if the current network for each process is In the method of allocating one sub-interface to each fragment, (m*n) sub-interfaces need to be allocated for the physical interface between the first network device and the second network device; (m+n) sub-interfaces need to be allocated for the physical interface between the first network device and the second network device. If m>n, at least (m+n) sub-interfaces need to be allocated for the physical interface between the first network device and the second network device ( m-1) sub-interfaces; if m<n, at least n sub-interfaces need to be allocated for the physical interface between the first network device and the second network device. It can be seen that, by using the method provided by the embodiment of the present application, in the scenario where the first network device and the second network device jointly run in multiple processes and there is a network fragmentation requirement, the number of the first network device and the second network device can be greatly reduced. The number of sub-interfaces needs to be configured between network devices.
可见,通过该方法100,在一对网络设备共同运行多个进程且这些进程有网络分片要求的场景下,在该对网络设备的物理接口中,为每个网络分片分配并绑定一个子接口,为多个进程最多分配与进程数量相等的子接口,与网络分片对应的子接口预留能够满足该网络分片资源需求的资源,而与进程绑定的子接口则用于打通该对网络设备之间的路由,无需预留资源。这样,无需为每个进程下的各个网络分片都分配一个预留资源的子接口,大大减少了一个物理接口下所要配置的子接口的数量。而按照本申请实施例提供的子接口配置方案,无论该对网络设备中的第一网络设备接收到运行在不同进程但对应相同网络分片的报文,还是该对网络设备中的第一网络设备接收到运行在不同进程且对应不同网络分片的报文,均可以基于报文的目的地址和网络分片的标识确定物理接口下与网络分片的标识绑定的子接口,从而利用所确定的该子接口向该对网络设备中的第二网络设备发送报文,以在一对网络设备共同运行多个进程且对应多个相同的网络分片的网络场景中,通过配置较少的子接口实现该对网络设备之间报文的准确传输。It can be seen that, through the method 100, in a scenario where a pair of network devices jointly run multiple processes and these processes have network fragmentation requirements, in the physical interface of the pair of network devices, each network fragment is allocated and bound with a Sub-interface, which allocates sub-interfaces equal to the number of processes for multiple processes at most. The sub-interface corresponding to the network shard reserves resources that can meet the resource requirements of the network shard, and the sub-interface bound to the process is used to get through The route between the pair of network devices does not need to reserve resources. In this way, there is no need to allocate a sub-interface with reserved resources for each network segment under each process, which greatly reduces the number of sub-interfaces to be configured under one physical interface. However, according to the sub-interface configuration solution provided by the embodiment of the present application, whether the first network device in the pair of network devices receives packets running in different processes but corresponding to the same network fragment, or the first network device in the pair of network devices When the device receives packets running in different processes and corresponding to different network fragments, it can determine the sub-interfaces under the physical interface that are bound to the network fragment IDs based on the destination address of the packets and the network fragment IDs. The determined sub-interface sends a packet to the second network device in the pair of network devices, so that in a network scenario in which a pair of network devices jointly runs multiple processes and corresponds to multiple identical network segments, configure less The sub-interface realizes the accurate transmission of packets between the pair of network devices.
相应的,本申请实施例还提供了一种报文处理装置700,该装置700具有上述图1、图4中的网络设备21或网络设备22、或图5中的第一网络设备的任意功能。如图7所示。该装置700应用于第一网络设备,该装置700可以包括:第一获得单元701、第一确定单元702、第一发送单元703、第二获得单元704、第二确定单元705和第二发送单元706。Correspondingly, an embodiment of the present application further provides a packet processing apparatus 700, and the apparatus 700 has any function of the network device 21 or network device 22 in FIG. 1 and FIG. 4, or the first network device in FIG. 5. . As shown in Figure 7. The apparatus 700 is applied to a first network device, and the apparatus 700 may include: a first obtaining unit 701, a first determining unit 702, a first sending unit 703, a second obtaining unit 704, a second determining unit 705, and a second sending unit 706.
其中,第一获得单元701,用于获得第一报文,所述第一报文的目的地址为第一目的地址,所述第一报文包括第一网络分片的标识,第一目的地址对应第一进程。所述第一获得单元701可以执行图5所示的S101。The first obtaining unit 701 is configured to obtain a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, the first destination address corresponds to the first process. The first obtaining unit 701 may execute S101 shown in FIG. 5 .
第一确定单元702,用于根据所述第一目的地址和所述第一网络分片的标识确定目标物理接口中的第一子接口。第一确定单元702可以执行图5所示的S102。The first determining unit 702 is configured to determine the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment. The first determining unit 702 may perform S102 shown in FIG. 5 .
第一发送单元703,用于基于所述第一子接口向第二网络设备发送所述第一报文。第一发送单元703可以执行图5所示的S103。A first sending unit 703, configured to send the first packet to a second network device based on the first sub-interface. The first sending unit 703 may perform S103 shown in FIG. 5 .
第二获得单元704,用于获得第二报文,所述第二报文的目的地址为第二目的地址, 所述第二报文包括所述第一网络分片的标识,所述第二目的地址对应第二进程,所述第二进程与所述第一进程不同。第二获得单元704可以执行图5所示的S104。A second obtaining unit 704, configured to obtain a second packet, where the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, the second packet The destination address corresponds to a second process, and the second process is different from the first process. The second obtaining unit 704 may perform S104 shown in FIG. 5 .
第二确定单元705,用于根据所述第二目的地址和所述第一网络分片的标识确定所述目标物理接口中的所述第一子接口。第二确定单元705可以执行图5所示的S105。A second determining unit 705, configured to determine the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment. The second determining unit 705 may perform S105 shown in FIG. 5 .
第二发送单元706,用于基于所述第一子接口向所述第二网络设备发送所述第二报文。第二发送单元706可以执行图5所示的S106。A second sending unit 706, configured to send the second packet to the second network device based on the first sub-interface. The second sending unit 706 may perform S106 shown in FIG. 5 .
其中,所述第一网络设备(或者报文处理装置700)通过所述目标物理接口和所述第二网络设备连接,所述第一网络设备和所述第二网络设备属于多个相同的网络分片,所述多个网络分片包括所述第一网络分片,所述第一网络设备和所述第二网络设备运行多个进程,所述多个进程包括所述第一进程和所述第二进程。The first network device (or the packet processing apparatus 700 ) is connected to the second network device through the target physical interface, and the first network device and the second network device belong to multiple identical networks Sharding, the multiple network slices include the first network slice, the first network device and the second network device run multiple processes, the multiple processes include the first process and all the Describe the second process.
在一种可能的实现方式中,所述第一子接口上的预留资源满足所述第一网络分片的资源需求。In a possible implementation manner, the reserved resources on the first sub-interface meet the resource requirements of the first network slice.
在一种可能的实现方式中,所述第一确定单元702,可以包括:第一确定子单元和第二确定子单元。其中,第一确定子单元,用于根据所述第一目的地址,为所述第一报文确定所述第一进程对应的第二子接口,所述第二子接口属于所述目标物理接口;第二确定子单元,用于根据所述第一网络分片的标识为所述第一报文在所述目标物理接口中确定对应的所述第一子接口。其中,所述第二子接口和所述第一子接口相同,或者,所述第二子接口和所述第一子接口不同。In a possible implementation manner, the first determining unit 702 may include: a first determining subunit and a second determining subunit. The first determining subunit is configured to determine, according to the first destination address, a second sub-interface corresponding to the first process for the first packet, where the second sub-interface belongs to the target physical interface ; a second determining subunit, configured to determine the corresponding first subinterface in the target physical interface for the first packet according to the identifier of the first network fragment. The second sub-interface is the same as the first sub-interface, or the second sub-interface is different from the first sub-interface.
在一种可能的实现方式中,该装置700还可以包括:第三获得单元、第三确定单元和第三发送单元。其中,第三获得单元,用于获得第三报文,所述第三报文的目的地址为第三目的地址,所述第三报文包括第二网络分片的标识,所述第三目的地址对应第三进程,所述多个进程包括所述第三进程,所述第三进程与所述第一进程、所述第二进程不同;第三确定单元,用于根据所述第三目的地址和所述第二网络分片的标识确定所述目标物理接口中的第三子接口;第三发送单元,用于基于所述第三子接口向所述第二网络设备发送所述第三报文。其中,第三获得单元、第三确定单元和第三发送单元分别可以执行图5所示的S107~S109。In a possible implementation manner, the apparatus 700 may further include: a third obtaining unit, a third determining unit, and a third sending unit. The third obtaining unit is configured to obtain a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, and the third destination The address corresponds to a third process, the plurality of processes include the third process, and the third process is different from the first process and the second process; a third determination unit is used to determine the third process according to the third purpose The address and the identifier of the second network segment determine a third sub-interface in the target physical interface; a third sending unit is configured to send the third sub-interface to the second network device based on the third sub-interface message. The third obtaining unit, the third determining unit and the third sending unit may respectively execute S107 to S109 shown in FIG. 5 .
在一种可能的实现方式中,所述多个进程为内部网关协议IGP进程。In a possible implementation manner, the multiple processes are interior gateway protocol IGP processes.
在一种可能的实现方式中,该装置适用于MPLS网络、IPv4网络或IPv6网络。In a possible implementation manner, the apparatus is suitable for MPLS network, IPv4 network or IPv6 network.
需要说明的是,上述功能相同但命名中序号不同的单元,可以是一个能够实现该功能的单元,例如,上述第一发送单元703和第二发送单元706可以是同一个具有发送功能的单元。It should be noted that the above-mentioned units with the same function but different serial numbers in the naming may be a unit capable of implementing this function. For example, the above-mentioned first sending unit 703 and second sending unit 706 may be the same unit with sending function.
需要说明的是,图7所示的报文处理装置700可以是图5所示的实施例中的第一网络设备,因此,该装置700的各种具体实施例方式以及达到的效果,可以参见图5对应的方法100的相关介绍,本实施例不再赘述。It should be noted that the packet processing apparatus 700 shown in FIG. 7 may be the first network device in the embodiment shown in FIG. 5 . Therefore, various specific embodiments and effects of the apparatus 700 can be found in The related introduction of the method 100 corresponding to FIG. 5 is not repeated in this embodiment.
参见图8,本申请实施例提供了一种网络设备800。该网络设备800可以是上述任一实施例中的网络设备,例如可以是图1或图4中的网络设备21或网络设备22,也可以是图5 所示实施例中的第一网络设备,网络设备800可以实现上述实施例中第一网络设备、网络设备21或网络设备22的功能。该网络设备800包括至少一个处理器801,总线系统802,存储器803以及至少一个收发器804。Referring to FIG. 8 , an embodiment of the present application provides a network device 800 . The network device 800 may be the network device in any of the foregoing embodiments, for example, may be the network device 21 or the network device 22 in FIG. 1 or FIG. 4 , or may be the first network device in the embodiment shown in FIG. 5 , The network device 800 may implement the functions of the first network device, the network device 21 or the network device 22 in the above embodiments. The network device 800 includes at least one processor 801 , a bus system 802 , a memory 803 and at least one transceiver 804 .
该网络设备800是一种硬件结构的装置,可以用于实现图7所示的报文处理装置700中的功能模块。例如,本领域技术人员可以想到图7所示的报文处理装置700中的第一确定单元702和第二确定单元705可以通过该至少一个处理器801调用存储器803中的代码来实现,图7所示的报文处理装置700中的第一获得单元701、第一发送单元703、第二获得单元704和第二发送单元706可以通过该收发器804来实现。The network device 800 is an apparatus with a hardware structure, and can be used to implement the functional modules in the packet processing apparatus 700 shown in FIG. 7 . For example, those skilled in the art can think that the first determining unit 702 and the second determining unit 705 in the message processing apparatus 700 shown in FIG. 7 can be implemented by calling the code in the memory 803 by the at least one processor 801, and FIG. 7 The first obtaining unit 701 , the first sending unit 703 , the second obtaining unit 704 and the second sending unit 706 in the shown packet processing apparatus 700 may be implemented by the transceiver 804 .
可选的,该网络设备800还可用于实现上述任一实施例中网络设备的功能。Optionally, the network device 800 may also be used to implement the functions of the network device in any of the foregoing embodiments.
可选的,上述处理器801可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Optionally, the above-mentioned processor 801 may be a general-purpose central processing unit (central processing unit, CPU), network processor (network processor, NP), microprocessor, application-specific integrated circuit (application-specific integrated circuit, ASIC) , or one or more integrated circuits used to control the execution of the program of this application.
上述总线系统802可包括一通路,在上述组件之间传送信息。The bus system 802 described above may include a path to transfer information between the above described components.
上述收发器804,用于与其他设备或通信网络通信。The above transceiver 804 is used to communicate with other devices or communication networks.
上述存储器803可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The above-mentioned memory 803 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions. Types of dynamic storage devices, which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.
其中,存储器803用于存储执行本申请方案的应用程序代码,并由处理器801来控制执行。处理器801用于执行存储器803中存储的应用程序代码,从而实现本专利方法中的功能。Wherein, the memory 803 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 801 . The processor 801 is used for executing the application program code stored in the memory 803, so as to realize the functions in the method of the present patent.
在具体实现中,作为一种实施例,处理器801可以包括一个或多个CPU,例如图8中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 801 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 8 .
在具体实现中,作为一种实施例,该网络设备800可以包括多个处理器,例如图8中的处理器801和处理器807。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the network device 800 may include multiple processors, for example, the processor 801 and the processor 807 in FIG. 8 . Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
图9是本申请实施例提供的另一种网络设备900的结构示意图,网络设备900例如可以是图1所示实施例中的网络设备21或网络设备22,或者也可以是图4所示实施例中的网络设备21或网络设备22,或者还可以是图5所示实施例中的第一网络设备。FIG. 9 is a schematic structural diagram of another network device 900 provided by an embodiment of the present application. The network device 900 may be, for example, the network device 21 or the network device 22 in the embodiment shown in FIG. 1 , or may also be the implementation shown in FIG. 4 . The network device 21 or the network device 22 in the example, or may also be the first network device in the embodiment shown in FIG. 5 .
网络设备900包括:主控板910和接口板930。The network device 900 includes: a main control board 910 and an interface board 930 .
主控板910也称为主处理单元(main processing unit,MPU)或路由处理卡(route  processor card),主控板910对网络设备900中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板910包括:中央处理器911和存储器912。The main control board 910 is also called the main processing unit (main processing unit, MPU) or the route processing card (route processor card). The main control board 910 controls and manages each component in the network device 900, including route calculation, Equipment maintenance, protocol processing functions. The main control board 910 includes: a central processing unit 911 and a memory 912 .
接口板930也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板930用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板930包括:中央处理器931、网络处理器932、转发表项存储器934和物理接口卡(ph8sical interface card,PIC)933。The interface board 930 is also referred to as a line processing unit (LPU), a line card or a service board. The interface board 930 is used to provide various service interfaces and realize data packet forwarding. The service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc. The Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients). The interface board 930 includes: a central processing unit 931 , a network processor 932 , a forwarding table entry storage 934 and a physical interface card (ph8sical interface card, PIC) 933 .
接口板930上的中央处理器931用于对接口板930进行控制管理并与主控板910上的中央处理器911进行通信。The central processing unit 931 on the interface board 930 is used to control and manage the interface board 930 and communicate with the central processing unit 911 on the main control board 910 .
网络处理器932用于实现报文的转发处理。网络处理器932的形态可以是转发芯片。具体而言,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。The network processor 932 is used to implement packet forwarding processing. The network processor 932 may be in the form of a forwarding chip. Specifically, the processing of the uplink packet includes: processing of the incoming interface of the packet, and searching of the forwarding table; processing of the downlink packet: searching of the forwarding table, and so on.
物理接口卡933用于实现物理层的对接功能,原始的流量由此进入接口板930,以及处理后的报文从该物理接口卡933发出。物理接口卡933包括至少一个物理接口,物理接口也称物理口,物理接口卡933对应于系统架构中的FlexE物理接口。物理接口卡933也称为子卡,可安装在接口板930上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器932处理。在一些实施例中,接口板930的中央处理器931也可执行网络处理器932的功能,比如基于通用CPU实现软件转发,从而物理接口卡933中不需要网络处理器932。The physical interface card 933 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 930 through this, and the processed packets are sent from the physical interface card 933 . The physical interface card 933 includes at least one physical interface, and the physical interface is also called a physical port. The physical interface card 933 corresponds to the FlexE physical interface in the system architecture. The physical interface card 933 is also called a daughter card, which can be installed on the interface board 930 and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 932 for processing. In some embodiments, the central processor 931 of the interface board 930 can also perform the functions of the network processor 932 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 932 is not required in the physical interface card 933 .
可选地,网络设备900包括多个接口板,例如网络设备900还包括接口板940,接口板940包括:中央处理器941、网络处理器942、转发表项存储器944和物理接口卡943。Optionally, the network device 900 includes multiple interface boards. For example, the network device 900 further includes an interface board 940 . The interface board 940 includes a central processing unit 941 , a network processor 942 , a forwarding table entry storage 944 and a physical interface card 943 .
可选地,网络设备900还包括交换网板920。交换网板920也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板930的情况下,交换网板920用于完成各接口板之间的数据交换。例如,接口板930和接口板940之间可以通过交换网板920通信。Optionally, the network device 900 further includes a switch fabric board 920 . The switch fabric 920 may also be referred to as a switch fabric unit (switch fabric unit, SFU). When the network device has multiple interface boards 930, the switching network board 920 is used to complete data exchange between the interface boards. For example, the interface board 930 and the interface board 940 can communicate through the switch fabric board 920 .
主控板910和接口板930耦合。例如。主控板910、接口板930和接口板940,以及交换网板920之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板910和接口板930之间建立进程间通信协议(inter-process communication,IPC)通道,主控板910和接口板930之间通过IPC通道进行通信。The main control board 910 and the interface board 930 are coupled. E.g. The main control board 910 , the interface board 930 , the interface board 940 , and the switching network board 920 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation manner, an inter-process communication (inter-process communication, IPC) channel is established between the main control board 910 and the interface board 930, and the main control board 910 and the interface board 930 communicate through the IPC channel.
在逻辑上,网络设备900包括控制面和转发面,控制面包括主控板910和中央处理器931,转发面包括执行转发的各个组件,比如转发表项存储器934、物理接口卡933和网络处理器932。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器932基于控制面下发的转发表对物理接口卡933收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器934中。在一些实施例中,控制面和转发面可以完全分离,不在同一设备上。Logically, the network device 900 includes a control plane and a forwarding plane, the control plane includes the main control board 910 and the central processing unit 931, and the forwarding plane includes various components that perform forwarding, such as the forwarding entry storage 934, the physical interface card 933 and the network processing device 932. The control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining the status of devices. The control plane delivers the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 932 based on the The delivered forwarding table forwards the packets received by the physical interface card 933 by looking up the table. The forwarding table issued by the control plane may be stored in the forwarding table entry storage 934 . In some embodiments, the control plane and forwarding plane may be completely separate and not on the same device.
网络设备900被配置为第一网络设备,网络处理器932可以触发物理接口卡933获得 第一报文,该第一报文的目的地址为第一目的地址,该第一报文包括第一网络分片的标识,第一目的地址对应第一进程,基于所述第一子接口向第二网络设备发送所述第一报文;获得第二报文,该第二报文的目的地址为第二目的地址,第二报文包括所述第一网络分片的标识,第二目的地址对应第二进程,该第二进程与第一进程不同,基于所述第一子接口向第二网络设备发送所述第二报文。中央处理器911可以根据第一目的地址和第一网络分片的标识确定目标物理接口中的第一子接口;根据第二目的地址和第一网络分片的标识确定目标物理接口中的所述第一子接口,并且。The network device 900 is configured as the first network device, the network processor 932 can trigger the physical interface card 933 to obtain the first packet, the destination address of the first packet is the first destination address, and the first packet includes the first network The identifier of the fragment, the first destination address corresponds to the first process, and the first packet is sent to the second network device based on the first sub-interface; the second packet is obtained, and the destination address of the second packet is the first packet. Two destination addresses, the second packet includes the identifier of the first network fragment, and the second destination address corresponds to a second process. The second process is different from the first process. Based on the first sub-interface, the second network Send the second message. The central processing unit 911 may determine the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment; determine the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment. The first sub-interface, and.
应理解,报文处理装置700中的第一获得单元701、第一发送单元703、第二获得单元704和第二发送单元706等、以及网络设备800中的收发器804可以相当于网络设备900中的物理接口卡933或物理接口卡943;报文处理装置700中的第一确定单元702和第二确定单元705等、以及网络设备800中的处理器801可以相当于网络设备900中的中央处理器911或中央处理器931。It should be understood that the first obtaining unit 701 , the first sending unit 703 , the second obtaining unit 704 , the second sending unit 706 , etc. in the packet processing apparatus 700 , and the transceiver 804 in the network device 800 may be equivalent to the network device 900 The physical interface card 933 or the physical interface card 943 in the device; the first determining unit 702 and the second determining unit 705 in the message processing apparatus 700 , and the processor 801 in the network device 800 may be equivalent to the central processor 911 or central processing unit 931.
应理解,本申请实施例中接口板940上的操作与接口板930的操作一致,为了简洁,不再赘述。应理解,本实施例的网络设备900可对应于上述各个方法实施例中的建立BGP邻居的装置或网络设备,该网络设备900中的主控板910、接口板930和/或接口板940可以实现上述各个方法实施例中的报文处理装置700或网络设备800中所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。It should be understood that the operations on the interface board 940 in the embodiments of the present application are the same as the operations on the interface board 930, and for brevity, details are not repeated here. It should be understood that the network device 900 in this embodiment may correspond to the apparatus or network device for establishing a BGP neighbor in each of the above method embodiments, and the main control board 910 , the interface board 930 and/or the interface board 940 in the network device 900 may The functions and/or various steps implemented in the packet processing apparatus 700 or the network device 800 in each of the foregoing method embodiments are implemented, and are not repeated here for brevity.
应理解,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景。It should be understood that there may be one or more main control boards, and when there are more than one main control board, it may include an active main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There can also be one or more physical interface cards on the interface board. There may be no switch fabric boards, or there may be one or more boards. When there are multiple boards, load sharing and redundancy backup can be implemented together. Under the centralized forwarding architecture, the network device does not need to switch the network board, and the interface board is responsible for the processing function of the service data of the entire system. Under the distributed forwarding architecture, a network device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those in a centralized architecture. Optionally, the form of the network device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board. The central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment). The specific architecture used depends on the specific networking deployment scenario.
在一些可能的实施例中,上述各网络设备或网络设备可以实现为虚拟化设备。例如,虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(英文:Virtual Machine,VM),虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。可以将虚拟机配置为图1中的各网络设备。例如,可以基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现各网络设备或网络设备。各网络设备或网络设备为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的各网络设备或网络设备,此处不再赘述。In some possible embodiments, each of the above network devices or network devices may be implemented as virtualized devices. For example, the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending a message, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. A virtual machine can be configured as each of the network devices in Figure 1. For example, each network device or network device may be implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology. Each network device or network device is a virtual host, a virtual router or a virtual switch. By reading this application, those skilled in the art can virtualize each network device or network device having the above functions on a general physical server in combination with the NFV technology, which will not be repeated here.
应理解,上述各种产品形态的网络设备,分别具有上述方法实施例中各网络设备或网络设备的任意功能,此处不再赘述。It should be understood that the network devices in the above-mentioned various product forms respectively have the network devices or any functions of the network devices in the foregoing method embodiments, and details are not described herein again.
本申请实施例还提供了一种芯片,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器;处理器,例如可以是本申请实施例中报文处理装置的一种具体实现形式,可以用于执行上述报文处理方法。其中,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。The embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, may be a specific type of the message processing device in the embodiment of the present application The implementation form can be used to execute the above packet processing method. The processor is coupled to a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the chip system enables the method in any of the foregoing method embodiments.
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, the number of processors in the chip system may be one or more. The processor can be implemented by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software codes stored in memory.
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, there may also be one or more memories in the chip system. The memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips. The setting method of the processor is not particularly limited.
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。Exemplarily, the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller). controller unit, MCU), it can also be a programmable logic device (PLD) or other integrated chips.
此外,本申请实施例还提供了一种网络系统1000,参见图10。该网络系统1000可以包括第一网络设备1001和第二网络设备1002。其中,第一网络设备1001,用于执行图5所示方法100中第一网络设备执行的所有操作;第二网络设备1002,用于执行图5所示方法100中第二网络设备执行的所有操作。In addition, an embodiment of the present application further provides a network system 1000, see FIG. 10 . The network system 1000 may include a first network device 1001 and a second network device 1002 . The first network device 1001 is configured to perform all operations performed by the first network device in the method 100 shown in FIG. 5 ; the second network device 1002 is configured to perform all operations performed by the second network device in the method 100 shown in FIG. 5 . operate.
需要说明的是,图10所示的网络系统1000的相关说明,可以参见图5对应的方法100的相关介绍,本实施例不再赘述。It should be noted that, for the relevant description of the network system 1000 shown in FIG. 10 , reference may be made to the relevant introduction of the method 100 corresponding to FIG. 5 , and details are not repeated in this embodiment.
此外,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储有程序代码或指令,当其在计算机上运行时,使得计算机执行以上图5所示实施例中任意一种实现方式下的方法。In addition, an embodiment of the present application also provides a computer-readable storage medium, where program codes or instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer can execute any of the above embodiments shown in FIG. 5 . A method under an implementation.
此外,本申请实施例还提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行前述方法100中任意一种实现方式的方法。In addition, the embodiments of the present application also provide a computer program product, which, when running on a computer, enables the computer to execute the method of any one of the foregoing method 100 implementations.
本申请实施例中提到的“第一报文”、“第一网络设备”等名称中的“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”等。The "first" in the names such as "first packet" and "first network device" mentioned in the embodiments of the present application are only used for name identification, and do not represent the first in order. The same rule applies to "second" etc.
应理解,本申请实施例中提到的“基于根据A确定B”并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that "determining B based on A" mentioned in the embodiments of the present application does not mean that B is only determined according to A, and B can also be determined according to A and/or other information.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本申 请的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如只读存储器(英文:read-only memory,ROM)/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如路由器等网络通信设备)执行本申请各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, An optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of the present application.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例和设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiments and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for related parts. The device and system embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
以上所述仅是本申请的优选实施方式,并非用于限定本申请的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the present application, several improvements and modifications can also be made, and these improvements and modifications should also be regarded as the protection scope of the present application.

Claims (16)

  1. 一种报文处理方法,其特征在于,包括:A message processing method, comprising:
    第一网络设备获得第一报文,所述第一报文的目的地址为第一目的地址,所述第一报文包括第一网络分片的标识,第一目的地址对应第一进程;The first network device obtains the first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, and the first destination address corresponds to the first process;
    所述第一网络设备根据所述第一目的地址和所述第一网络分片的标识确定目标物理接口中的第一子接口;The first network device determines the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment;
    所述第一网络设备基于所述第一子接口向第二网络设备发送所述第一报文;sending, by the first network device, the first packet to the second network device based on the first sub-interface;
    所述第一网络设备获得第二报文,所述第二报文的目的地址为第二目的地址,所述第二报文包括所述第一网络分片的标识,所述第二目的地址对应第二进程,所述第二进程与所述第一进程不同;The first network device obtains a second packet, the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, the second destination address Corresponding to a second process, the second process is different from the first process;
    所述第一网络设备根据所述第二目的地址和所述第一网络分片的标识确定所述目标物理接口中的所述第一子接口;The first network device determines the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment;
    所述第一网络设备基于所述第一子接口向所述第二网络设备发送所述第二报文;sending, by the first network device, the second packet to the second network device based on the first sub-interface;
    其中,所述第一网络设备通过所述目标物理接口和所述第二网络设备连接,所述第一网络设备和所述第二网络设备属于多个相同的网络分片,所述多个网络分片包括所述第一网络分片,所述第一网络设备和所述第二网络设备运行多个进程,所述多个进程包括所述第一进程和所述第二进程。The first network device is connected to the second network device through the target physical interface, the first network device and the second network device belong to multiple identical network slices, and the multiple network The fragmentation includes the first network fragmentation, and the first network device and the second network device run a plurality of processes, the plurality of processes including the first process and the second process.
  2. 根据权利要求1所述的方法,其特征在于,所述第一子接口上的预留资源满足所述第一网络分片的资源需求。The method according to claim 1, wherein the reserved resources on the first sub-interface meet the resource requirements of the first network segment.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一网络设备根据所述第一目的地址和所述第一网络分片的标识确定目标物理接口中的第一子接口,包括:The method according to claim 1 or 2, wherein the first network device determines the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network segment, comprising: :
    所述第一网络设备根据所述第一目的地址,为所述第一报文确定所述第一进程对应的第二子接口,所述第二子接口属于所述目标物理接口;determining, by the first network device, a second sub-interface corresponding to the first process for the first packet according to the first destination address, where the second sub-interface belongs to the target physical interface;
    所述第一网络设备根据所述第一网络分片的标识为所述第一报文在所述目标物理接口中确定对应的所述第一子接口。The first network device determines the corresponding first sub-interface in the target physical interface for the first packet according to the identifier of the first network fragment.
  4. 根据权利要求3所述的方法,其特征在于,所述第二子接口和所述第一子接口相同,或者,所述第二子接口和所述第一子接口不同。The method according to claim 3, wherein the second sub-interface is the same as the first sub-interface, or the second sub-interface and the first sub-interface are different.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    所述第一网络设备获得第三报文,所述第三报文的目的地址为第三目的地址,所述第三报文包括第二网络分片的标识,所述第三目的地址对应第三进程,所述多个进程包括所述第三进程,所述第三进程与所述第一进程、所述第二进程不同;The first network device obtains a third packet, the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, and the third destination address corresponds to the third destination address. Three processes, the plurality of processes include the third process, and the third process is different from the first process and the second process;
    所述第一网络设备根据所述第三目的地址和所述第二网络分片的标识确定所述目标物理接口中的第三子接口;The first network device determines the third sub-interface in the target physical interface according to the third destination address and the identifier of the second network fragment;
    所述第一网络设备基于所述第三子接口向所述第二网络设备发送所述第三报文。The first network device sends the third packet to the second network device based on the third sub-interface.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述多个进程为内部网关协议IGP进程。The method according to any one of claims 1-5, wherein the multiple processes are Interior Gateway Protocol (IGP) processes.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法适用于多协议标签交换 MPLS网络、第四版互联网协议IPv4网络或第六版互联网协议IPv6网络。The method according to any one of claims 1-6, wherein the method is applicable to a multi-protocol label switching MPLS network, a fourth version of the Internet Protocol IPv4 network or a sixth version of the Internet Protocol IPv6 network.
  8. 一种报文处理装置,其特征在于,所述装置应用于第一网络设备,包括:A message processing apparatus, wherein the apparatus is applied to a first network device, comprising:
    第一获得单元,用于获得第一报文,所述第一报文的目的地址为第一目的地址,所述第一报文包括第一网络分片的标识,第一目的地址对应第一进程;The first obtaining unit is configured to obtain a first packet, the destination address of the first packet is the first destination address, the first packet includes the identifier of the first network fragment, and the first destination address corresponds to the first destination address. process;
    第一确定单元,用于根据所述第一目的地址和所述第一网络分片的标识确定目标物理接口中的第一子接口;a first determining unit, configured to determine the first sub-interface in the target physical interface according to the first destination address and the identifier of the first network fragment;
    第一发送单元,用于基于所述第一子接口向第二网络设备发送所述第一报文;a first sending unit, configured to send the first packet to a second network device based on the first sub-interface;
    第二获得单元,用于获得第二报文,所述第二报文的目的地址为第二目的地址,所述第二报文包括所述第一网络分片的标识,所述第二目的地址对应第二进程,所述第二进程与所述第一进程不同;a second obtaining unit, configured to obtain a second packet, the destination address of the second packet is the second destination address, the second packet includes the identifier of the first network fragment, the second destination The address corresponds to a second process, and the second process is different from the first process;
    第二确定单元,用于根据所述第二目的地址和所述第一网络分片的标识确定所述目标物理接口中的所述第一子接口;a second determining unit, configured to determine the first sub-interface in the target physical interface according to the second destination address and the identifier of the first network fragment;
    第二发送单元,用于基于所述第一子接口向所述第二网络设备发送所述第二报文;a second sending unit, configured to send the second packet to the second network device based on the first sub-interface;
    其中,所述第一网络设备通过所述目标物理接口和所述第二网络设备连接,所述第一网络设备和所述第二网络设备属于多个相同的网络分片,所述多个网络分片包括所述第一网络分片,所述第一网络设备和所述第二网络设备运行多个进程,所述多个进程包括所述第一进程和所述第二进程。The first network device is connected to the second network device through the target physical interface, the first network device and the second network device belong to multiple identical network slices, and the multiple network The fragmentation includes the first network fragmentation, and the first network device and the second network device run a plurality of processes, the plurality of processes including the first process and the second process.
  9. 根据权利要求8所述的装置,其特征在于,所述第一子接口上的预留资源满足所述第一网络分片的资源需求。The apparatus according to claim 8, wherein the reserved resources on the first sub-interface meet resource requirements of the first network slice.
  10. 根据权利要求8或9所述的装置,其特征在于,所述第一确定单元,包括:The device according to claim 8 or 9, wherein the first determining unit comprises:
    第一确定子单元,用于根据所述第一目的地址,为所述第一报文确定所述第一进程对应的第二子接口,所述第二子接口属于所述目标物理接口;a first determining subunit, configured to determine a second subinterface corresponding to the first process for the first packet according to the first destination address, where the second subinterface belongs to the target physical interface;
    第二确定子单元,用于根据所述第一网络分片的标识为所述第一报文在所述目标物理接口中确定对应的所述第一子接口。A second determining subunit, configured to determine the corresponding first sub-interface in the target physical interface for the first packet according to the identifier of the first network fragment.
  11. 根据权利要求10所述的装置,其特征在于,所述第二子接口和所述第一子接口相同,或者,所述第二子接口和所述第一子接口不同。The apparatus according to claim 10, wherein the second sub-interface is the same as the first sub-interface, or the second sub-interface and the first sub-interface are different.
  12. 根据权利要求8-11任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 8-11, wherein the device further comprises:
    第三获得单元,用于获得第三报文,所述第三报文的目的地址为第三目的地址,所述第三报文包括第二网络分片的标识,所述第三目的地址对应第三进程,所述多个进程包括所述第三进程,所述第三进程与所述第一进程、所述第二进程不同;A third obtaining unit, configured to obtain a third packet, where the destination address of the third packet is the third destination address, the third packet includes the identifier of the second network fragment, and the third destination address corresponds to a third process, the plurality of processes include the third process, and the third process is different from the first process and the second process;
    第三确定单元,用于根据所述第三目的地址和所述第二网络分片的标识确定所述目标物理接口中的第三子接口;a third determining unit, configured to determine the third sub-interface in the target physical interface according to the third destination address and the identifier of the second network fragment;
    第三发送单元,用于基于所述第三子接口向所述第二网络设备发送所述第三报文。A third sending unit, configured to send the third packet to the second network device based on the third sub-interface.
  13. 根据权利要求8-12任一项所述的装置,其特征在于,所述多个进程为内部网关协议IGP进程。The apparatus according to any one of claims 8-12, wherein the multiple processes are Interior Gateway Protocol (IGP) processes.
  14. 根据权利要求8-13任一项所述的装置,其特征在于,所述装置适用于多协议标签交换MPLS网络、第四版互联网协议IPv4网络或第六版互联网协议IPv6网络。The apparatus according to any one of claims 8-13, wherein the apparatus is suitable for a multi-protocol label switching MPLS network, an Internet Protocol version 4 IPv4 network or an Internet Protocol version 6 IPv6 network.
  15. 一种网络系统,其特征在于,所述网络系统包括:第一网络设备和第二网络设备;A network system, characterized in that the network system includes: a first network device and a second network device;
    其中,所述第一网络设备,用于执行权利要求1-7任一项所述的方法;Wherein, the first network device is configured to execute the method of any one of claims 1-7;
    所述第二网络设备,用于接收所述第一网络设备基于所确定的子接口发送的报文。The second network device is configured to receive a packet sent by the first network device based on the determined sub-interface.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码或指令,当所述程序代码或指令在计算机上运行时,使得所述计算机执行以上权利要求1-7中任意一项所述的方法。A computer-readable storage medium, characterized in that, program codes or instructions are stored in the computer-readable storage medium, and when the program codes or instructions are executed on a computer, the computer is made to execute the above claims 1- The method of any one of 7.
PCT/CN2021/141825 2020-12-29 2021-12-28 Message processing method and related device WO2022143572A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011598611.2 2020-12-29
CN202011598611.2A CN114697277A (en) 2020-12-29 2020-12-29 Message processing method and related equipment

Publications (1)

Publication Number Publication Date
WO2022143572A1 true WO2022143572A1 (en) 2022-07-07

Family

ID=82132213

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141825 WO2022143572A1 (en) 2020-12-29 2021-12-28 Message processing method and related device

Country Status (2)

Country Link
CN (1) CN114697277A (en)
WO (1) WO2022143572A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096591A2 (en) * 2006-02-20 2007-08-30 Cramer Systems Limited Configuring devices in a telecommunications network to provide a service
US20180260252A1 (en) * 2017-03-09 2018-09-13 Guardicore Ltd. Automatic segmentation of data-center applications
US10346190B1 (en) * 2016-06-13 2019-07-09 Amazon Technologies, Inc. Interprocess segmentation in virtual machine environments
CN111565113A (en) * 2019-02-13 2020-08-21 烽火通信科技股份有限公司 Flexible Ethernet network topology abstraction method and system for SDN controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096591A2 (en) * 2006-02-20 2007-08-30 Cramer Systems Limited Configuring devices in a telecommunications network to provide a service
US10346190B1 (en) * 2016-06-13 2019-07-09 Amazon Technologies, Inc. Interprocess segmentation in virtual machine environments
US20180260252A1 (en) * 2017-03-09 2018-09-13 Guardicore Ltd. Automatic segmentation of data-center applications
CN111565113A (en) * 2019-02-13 2020-08-21 烽火通信科技股份有限公司 Flexible Ethernet network topology abstraction method and system for SDN controller

Also Published As

Publication number Publication date
CN114697277A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
CN108574616B (en) Method, equipment and system for processing route
EP2945320B1 (en) Method, device and routing system for data transmission of network virtualization
EP2109962B1 (en) Triple-tier anycast addressing
JP2020512638A (en) System and method for providing homogeneous fabric attributes to reduce the need for subnet administrator access in a high performance computing environment
CN111510378A (en) EVPN message processing method, device and system
US20220360525A1 (en) Packet Processing Method, Apparatus, and System
EP2731313A1 (en) Distributed cluster processing system and message processing method thereof
WO2021258823A1 (en) Path creation method, apparatus and system
EP4037265A1 (en) Packet forwarding method, apparatus, storage medium, and system
WO2019080592A1 (en) Method and device for sending messages
WO2021143279A1 (en) Method and device for segment routing service processing, routing equipment, and storage medium
WO2022048418A1 (en) Method, device and system for forwarding message
WO2022007702A1 (en) Message processing method and network device
WO2022188530A1 (en) Route processing method and network device
WO2022166465A1 (en) Message processing method and related apparatus
WO2022063065A1 (en) Routing information transmission method and apparatus
WO2022143572A1 (en) Message processing method and related device
CN114760244B (en) Method, device and network equipment for transmitting Binding Segment Identification (BSID)
WO2022057487A1 (en) Path identifier allocation method, system, apparatus and device, and storage medium
WO2024087691A1 (en) Message processing method and related device
CN112751766A (en) Message forwarding method and device and computer storage medium
WO2022037330A1 (en) Method and device for transmitting virtual private network segment identification (vpn sid), and network device
WO2022061561A1 (en) Packet transmission method and apparatus
WO2022133646A1 (en) Routing transmission method and apparatus
WO2022083610A1 (en) Ip address allocation method, apparatus and system

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: 21914308

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21914308

Country of ref document: EP

Kind code of ref document: A1