CN114615187B - Logic interface data communication method and device - Google Patents
Logic interface data communication method and device Download PDFInfo
- Publication number
- CN114615187B CN114615187B CN202011448182.0A CN202011448182A CN114615187B CN 114615187 B CN114615187 B CN 114615187B CN 202011448182 A CN202011448182 A CN 202011448182A CN 114615187 B CN114615187 B CN 114615187B
- Authority
- CN
- China
- Prior art keywords
- interface
- network card
- logical
- kernel network
- configuration
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/24—Multipath
- H04L45/245—Link aggregation, e.g. trunking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical Field
本申请属于数据通信技术领域,尤其涉及一种基于数据平面开发套件DPDK的逻辑接口数据通信方法及装置。The present application belongs to the field of data communication technology, and in particular, relates to a logical interface data communication method and device based on a data plane development kit DPDK.
背景技术Background technique
数据平面开发套件DPDK(Data Plane Development Kit)主要基于Linux系统运行,用于快速数据包处理的函数库与驱动集合,可以极大提高数据处理性能和吞吐量,提高数据平面应用程序的工作效率。DPDK提供内核网卡接口KNI(Kernel NIC Interface),以便于DPDK应用程序与Linux内核之间的通信。该接口允许报文从用户态接收后转发到Linux协议栈去,即允许用户空间应用进入Linux控制平面,该接口较现有的Linux TUN/TAP接口更快,允许用标准Linux网络工具(如ethtool,ifconfig,tcpdump)对DPDK接口进行管理和自身通信。The Data Plane Development Kit (DPDK) is mainly based on the Linux system. It is a collection of function libraries and drivers for fast data packet processing, which can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications. DPDK provides the kernel network card interface KNI (Kernel NIC Interface) to facilitate communication between DPDK applications and the Linux kernel. This interface allows packets to be received from user mode and then forwarded to the Linux protocol stack, that is, allowing user space applications to enter the Linux control plane. This interface is faster than the existing Linux TUN/TAP interface, and allows standard Linux network tools (such as ethtool, ifconfig, tcpdump) to manage the DPDK interface and communicate with itself.
然而,对于应用了DPDK的网络设备,例如安全准入控制网关等,设备上的逻辑接口如链路聚合接口、VLAN接口、隧道接口等,DPDK并没有提供这样的KNI接口库函数来对接口进行管理和自身通信。因此,如果想要实现对逻辑接口进行管理和自身通信,就必须移植集成封装了自己的协议栈来对接口进行管理。However, for network devices that use DPDK, such as security access control gateways, DPDK does not provide such KNI interface library functions to manage and communicate with logical interfaces on the device, such as link aggregation interfaces, VLAN interfaces, and tunnel interfaces. Therefore, if you want to manage and communicate with logical interfaces, you must transplant and integrate your own protocol stack to manage the interface.
但是由于内核协议栈复杂,重新开发适配逻辑接口承载的虚网卡驱动,工作量大,耗时长。However, due to the complexity of the kernel protocol stack, redeveloping the virtual network card driver carried by the adaptation logic interface is a large workload and time-consuming.
发明内容Summary of the invention
本申请的目的是提供一种逻辑接口数据通信方法及装置,在基于DPDK的网络设备上实现逻辑接口通信,减少自身通信协议栈代码适配和开发的工作量,提升产品化开发效率和产品稳定。The purpose of this application is to provide a logical interface data communication method and device to implement logical interface communication on a DPDK-based network device, reduce the workload of self-communication protocol stack code adaptation and development, and improve product development efficiency and product stability.
为了实现上述目的,本申请技术方案如下:In order to achieve the above purpose, the technical solution of this application is as follows:
一种逻辑接口数据通信方法,应用于基于数据平面开发套件DPDK的网络设备,所述逻辑接口数据通信方法,包括:A logical interface data communication method is applied to a network device based on a data plane development kit DPDK, the logical interface data communication method comprising:
创建逻辑接口,将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口;Create a logical interface and map the interface configuration of the logical interface to the kernel network card interface corresponding to a member interface;
接收访问所述逻辑接口自身的数据报文,将接收的数据报文发送给映射的内核网卡接口;Receive data packets for accessing the logical interface itself, and send the received data packets to the mapped kernel network card interface;
接收所述内核网卡接口的回应报文,通过所述逻辑接口发送。Receive a response message from the kernel network card interface and send it through the logical interface.
可选的,所述将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,包括:Optionally, mapping the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface includes:
在逻辑接口下无成员接口,开始加入成员接口时,将逻辑接口的接口配置映射给第一个成员接口对应的内核网卡接口;If there is no member interface under the logical interface, when adding member interfaces, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to the first member interface;
在逻辑接口下移除成员接口时,判断所移除的成员接口是否是第一个成员接口,如果是第一个成员接口,则删除所移除的成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给新的第一个成员接口对应的内核网卡接口。When removing a member interface under a logical interface, determine whether the removed member interface is the first member interface. If it is the first member interface, delete the interface configuration of the kernel network card interface corresponding to the removed member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to the new first member interface.
可选的,所述将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,包括:Optionally, mapping the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface includes:
在逻辑接口下已有成员接口时,将逻辑接口的接口配置映射给其中一个成员接口对应的内核网卡接口;When there are member interfaces under the logical interface, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to one of the member interfaces;
在逻辑接口下移除成员接口时,判断所移除的成员接口的内核网卡接口是否映射了接口配置,如果是,则删除该成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给另一个成员接口对应的内核网卡接口。When removing a member interface under a logical interface, determine whether the kernel network card interface of the removed member interface has mapped the interface configuration. If so, delete the interface configuration of the kernel network card interface corresponding to the member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to another member interface.
进一步的,所述逻辑接口数据通信方法,还包括:Furthermore, the logical interface data communication method further includes:
在删除逻辑接口的接口配置时,删除映射的内核网卡接口的接口配置。When deleting the interface configuration of a logical interface, the interface configuration of the mapped kernel network card interface is deleted.
进一步的,所述逻辑接口数据通信方法,还包括:Furthermore, the logical interface data communication method further includes:
在删除逻辑接口时,删除映射的内核网卡接口的接口配置。When deleting a logical interface, the interface configuration of the mapped kernel NIC interface is deleted.
本申请还提出了一种逻辑接口数据通信装置,应用于基于数据平面开发套件DPDK的网络设备,所述逻辑接口数据通信装置,包括:The present application also proposes a logical interface data communication device, which is applied to a network device based on a data plane development kit DPDK, and the logical interface data communication device includes:
配置模块,用于创建逻辑接口,将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口;A configuration module is used to create a logical interface and map the interface configuration of the logical interface to the kernel network card interface corresponding to a member interface;
自身通信模块,用于接收访问所述逻辑接口自身的数据报文,将接收的数据报文发送给映射的内核网卡接口;接收所述内核网卡接口的回应报文,通过所述逻辑接口发送。The self-communication module is used to receive data packets accessing the logical interface itself, and send the received data packets to the mapped kernel network card interface; receive the response packets from the kernel network card interface, and send them through the logical interface.
可选的,所述配置模块将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,执行如下操作:Optionally, the configuration module maps the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface, and performs the following operations:
在逻辑接口下无成员接口,开始加入成员接口时,将逻辑接口的接口配置映射给第一个成员接口对应的内核网卡接口;If there is no member interface under the logical interface, when adding member interfaces, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to the first member interface;
在逻辑接口下移除成员接口时,判断所移除的成员接口是否是第一个成员接口,如果是第一个成员接口,则删除所移除的成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给新的第一个成员接口对应的内核网卡接口。When removing a member interface under a logical interface, determine whether the removed member interface is the first member interface. If it is the first member interface, delete the interface configuration of the kernel network card interface corresponding to the removed member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to the new first member interface.
可选的,所述配置模块将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,执行如下操作:Optionally, the configuration module maps the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface, and performs the following operations:
在逻辑接口下已有成员接口时,将逻辑接口的接口配置映射给其中一个成员接口对应的内核网卡接口;When there are member interfaces under the logical interface, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to one of the member interfaces;
在逻辑接口下移除成员接口时,判断所移除的成员接口的内核网卡接口是否映射了接口配置,如果是,则删除该成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给另一个成员接口对应的内核网卡接口。When removing a member interface under a logical interface, determine whether the kernel network card interface of the removed member interface has mapped the interface configuration. If so, delete the interface configuration of the kernel network card interface corresponding to the member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to another member interface.
进一步的,所述配置模块,还用于:Furthermore, the configuration module is also used to:
在删除逻辑接口的接口配置时,删除映射的内核网卡接口的接口配置。When deleting the interface configuration of a logical interface, the interface configuration of the mapped kernel network card interface is deleted.
进一步的,所述配置模块,还用于:Furthermore, the configuration module is also used to:
在删除逻辑接口时,删除映射的内核网卡接口的接口配置。When deleting a logical interface, the interface configuration of the mapped kernel NIC interface is deleted.
本申请提出的一种逻辑接口数据通信方法及装置,通过映射逻辑接口的IP地址给成员接口对应的内核网卡接口,从而采用内核协议栈来处理和响应到自身报文,提高了设备转发性能。同时减少自身通信协议栈代码适配和开发的工作量,提升产品化开发效率和产品稳定性。减少了链路聚合接口、VLAN接口等三层逻辑接口动态路由表项等开发的巨大投入。The present application proposes a method and device for logical interface data communication, which improves the forwarding performance of the device by mapping the IP address of the logical interface to the kernel network card interface corresponding to the member interface, so as to use the kernel protocol stack to process and respond to its own message. At the same time, it reduces the workload of its own communication protocol stack code adaptation and development, improves product development efficiency and product stability, and reduces the huge investment in the development of dynamic routing table entries of three-layer logical interfaces such as link aggregation interfaces and VLAN interfaces.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例逻辑接口数据通信方法流程图;FIG1 is a flow chart of a logical interface data communication method according to an embodiment of the present application;
图2为本申请实施例链路聚合接口通信方法流程图;FIG2 is a flow chart of a link aggregation interface communication method according to an embodiment of the present application;
图3为本申请实施例链路聚合接口网络连接示意图;FIG3 is a schematic diagram of a network connection of a link aggregation interface according to an embodiment of the present application;
图4为本申请实施例VLAN接口网络连接示意图;FIG4 is a schematic diagram of a VLAN interface network connection according to an embodiment of the present application;
图5为本申请实施例逻辑接口数据通信装置结构示意图。FIG5 is a schematic diagram of the structure of a logical interface data communication device according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
本申请提供的一种逻辑接口数据通信方法及装置,应用于基于DPDK的网络设备,在该网络设备上的逻辑接口,按照本申请的方法进行自身通信。在本申请中逻辑接口以链路聚合接口和VLAN接口为例进行说明,对其他逻辑接口同样适用。链路聚合(英语:LinkAggregation)是一个计算机网络术语,指将多个物理接口汇聚在一起,形成一个逻辑接口,每个物理接口在逻辑接口中就是一个成员接口,以实现出/入流量吞吐量在各成员接口的负荷分担,交换机根据用户配置的接口负荷分担策略决定网络封包从哪个成员接口发送到对端的交换机。当交换机检测到其中一个成员接口的链路发生故障时,就停止在此接口上发送封包,并根据负荷分担策略在剩下的链路中重新计算报文的发送接口,故障接口恢复后再次担任收发接口。链路聚合在增加链路带宽、实现链路传输弹性和工程冗余等方面是一项很重要的技术。虚拟局域网接口(VLAN接口)是一组逻辑上的接口,这些接口并不受物理位置的限制,可以根据功能、部门及应用等因素将它们组织起来,相互之间的通信就好像它们在同一个网段中一样。在本申请的实施例中,将链路聚合接口或VLAN接口中各个物理接口统称为成员接口。对于链路聚合接口,其成员接口就是参加链路聚合的各个物理接口;同样对于VLAN接口,其成员接口就是在同一个VLAN的各个物理接口。The present application provides a logical interface data communication method and device, which is applied to a network device based on DPDK. The logical interface on the network device communicates itself according to the method of the present application. In the present application, the logical interface is explained by taking the link aggregation interface and the VLAN interface as examples, which is also applicable to other logical interfaces. Link aggregation (English: LinkAggregation) is a computer network term, which refers to the aggregation of multiple physical interfaces to form a logical interface. Each physical interface is a member interface in the logical interface to achieve load sharing of the inbound/outbound traffic throughput among the member interfaces. The switch determines which member interface the network packet is sent from to the switch at the opposite end according to the interface load sharing strategy configured by the user. When the switch detects that the link of one of the member interfaces fails, it stops sending packets on this interface, and recalculates the sending interface of the message in the remaining links according to the load sharing strategy. After the failed interface is restored, it serves as the sending and receiving interface again. Link aggregation is a very important technology in increasing link bandwidth, achieving link transmission elasticity and engineering redundancy. A virtual local area network interface (VLAN interface) is a group of logical interfaces that are not restricted by physical locations and can be organized based on functions, departments, and applications. The communication between them is as if they are in the same network segment. In the embodiments of the present application, each physical interface in a link aggregation interface or a VLAN interface is collectively referred to as a member interface. For a link aggregation interface, its member interfaces are the physical interfaces participating in the link aggregation; similarly, for a VLAN interface, its member interfaces are the physical interfaces in the same VLAN.
本申请的一个实施例,如图1所示,提供了一种逻辑接口数据通信方法,包括:An embodiment of the present application, as shown in FIG1 , provides a logical interface data communication method, including:
步骤S110、创建逻辑接口,将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口。Step S110: Create a logical interface, and map the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface.
目前应用了DPDK的网络设备,例如安全准入控制网关等,其上的每个物理接口都会有对应KNI接口,然而对于逻辑接口,并没有提供对应的KNI接口。无论是物理接口还是逻辑接口在接收到数据报文后,如果不是访问自身的,就进行转发。而如果是访问接口自身的数据报文,就是自身通信数据报文。对于自身通信数据报文,物理接口通过DPDK提供的KNI接口允许报文从用户态接收后转发到Linux协议栈去实现自身通信,而DPDK并没有为逻辑接口提供这样的KNI接口。因此本申请的技术方案就是希望在逻辑接口上也能利用Linux协议栈来实现逻辑接口的自身通信,而不需要额外开发适配逻辑接口承载的虚网卡驱动。Currently, network devices that use DPDK, such as security access control gateways, etc., have corresponding KNI interfaces for each physical interface on them. However, no corresponding KNI interface is provided for logical interfaces. Whether it is a physical interface or a logical interface, if it does not access itself, it will forward the data packet after receiving it. If it is a data packet for accessing the interface itself, it is its own communication data packet. For its own communication data packet, the physical interface allows the message to be received from the user state and then forwarded to the Linux protocol stack to realize its own communication through the KNI interface provided by DPDK, while DPDK does not provide such a KNI interface for the logical interface. Therefore, the technical solution of the present application is to hope to use the Linux protocol stack on the logical interface to realize the self-communication of the logical interface, without the need to develop additional virtual network card drivers adapted to the logical interface.
通常逻辑接口的创建,一般来说可以先创建逻辑接口,然后将成员接口加入到创建的逻辑接口。例如,在网络设备A上创建链路聚合接口aggregateport1,然后将网络设备A的物理接口Ethernet1、物理接口Ethernet2加入到aggregateport1。又例如,在网络设备A上创建VLAN接口VLAN10,然后将网络设备A的物理接口Ethernet1、物理接口Ethernet2加入到VLAN10。所创建的链路聚合接口aggregateport1、VLAN10就是逻辑接口,物理接口Ethernet1、物理接口Ethernet2是成员接口。Generally, when creating a logical interface, you can first create the logical interface, and then add the member interfaces to the created logical interface. For example, create a link aggregation interface aggregateport1 on network device A, and then add the physical interfaces Ethernet1 and Ethernet2 of network device A to aggregateport1. For another example, create a VLAN interface VLAN10 on network device A, and then add the physical interfaces Ethernet1 and Ethernet2 of network device A to VLAN10. The created link aggregation interface aggregateport1 and VLAN10 are logical interfaces, and the physical interfaces Ethernet1 and Ethernet2 are member interfaces.
逻辑接口的创建过程中,还需要对逻辑接口进行配置,逻辑接口的接口配置通常包括IP地址、接口状态、最大传输单元MTU等。接口状态有up和down两种状态。需要说明的是,逻辑接口的接口配置可以在创建逻辑接口后就进行配置,也可以在将成员接口加入后再进行配置,本申请对此不做限制。During the creation of a logical interface, the logical interface also needs to be configured. The interface configuration of the logical interface usually includes the IP address, interface status, maximum transmission unit MTU, etc. The interface status has two states: up and down. It should be noted that the interface configuration of the logical interface can be configured after the logical interface is created, or it can be configured after the member interface is added. This application does not limit this.
本申请为了在逻辑接口上也能利用Linux协议栈来实现逻辑接口的自身通信,采用将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口来实现。In order to utilize the Linux protocol stack on the logical interface to realize the communication of the logical interface itself, the present application adopts the method of mapping the interface configuration of the logical interface to the kernel network card interface corresponding to a member interface.
在一个具体的示例中,将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,包括:在逻辑接口下无成员接口,开始加入成员接口时,将逻辑接口的接口配置映射给第一个成员接口对应的内核网卡接口;在逻辑接口下移除成员接口时,判断所移除的成员接口是否是第一个成员接口,如果是第一个成员接口,则删除所移除的成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给新的第一个成员接口对应的内核网卡接口。In a specific example, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to a member interface, including: when there is no member interface under the logical interface and member interfaces are started to be added, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to the first member interface; when a member interface is removed under the logical interface, it is determined whether the removed member interface is the first member interface. If it is the first member interface, the interface configuration of the kernel network card interface corresponding to the removed member interface is deleted, and the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to the new first member interface.
具体的,逻辑接口创建后,就配置了逻辑接口的接口配置,此时逻辑接口下还没有成员接口,逻辑接口的接口配置在本地保存。然后为逻辑接口配置成员接口,在第一个成员接口加入时,就将逻辑接口的接口配置映射给第一个成员接口对应的内核网卡接口。也就是说,在第一成员接口加入后,就能够实现将访问逻辑接口自身的自身通信数据报文通过第一个成员接口对应的内核网卡接口转入Linux协议栈去处理。后续成员接口再加入时,无需额外的配置。Specifically, after the logical interface is created, the interface configuration of the logical interface is configured. At this time, there is no member interface under the logical interface, and the interface configuration of the logical interface is saved locally. Then the member interface is configured for the logical interface. When the first member interface is added, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to the first member interface. In other words, after the first member interface is added, it is possible to transfer the communication data packets accessing the logical interface itself to the Linux protocol stack for processing through the kernel network card interface corresponding to the first member interface. When subsequent member interfaces are added, no additional configuration is required.
同样的,在逻辑接口下移除成员接口时,如果移除的是第一成员接口,由于第一成员接口被移除,其对应的内核网卡接口将无法再提供服务,此时需要删除第一个成员接口对应的内核网卡接口的接口配置。重新寻找该逻辑接口下的第一个成员接口,找到新的第一成员接口后,将逻辑接口的接口配置映射给新的第一个成员接口对应的内核网卡接口。为了便于判断谁是新的第一个成员接口,可以对加入逻辑接口的成员接口顺序编号,根据编号来确定新的第一个成员接口,这里不再赘述。Similarly, when removing a member interface under a logical interface, if the first member interface is removed, since the first member interface is removed, its corresponding kernel network card interface will no longer be able to provide services. At this time, it is necessary to delete the interface configuration of the kernel network card interface corresponding to the first member interface. Re-search for the first member interface under the logical interface, and after finding the new first member interface, map the interface configuration of the logical interface to the kernel network card interface corresponding to the new first member interface. In order to facilitate the determination of who is the new first member interface, the member interfaces added to the logical interface can be numbered sequentially, and the new first member interface can be determined based on the numbering. This will not be repeated here.
在本实施例中,在删除逻辑接口的接口配置时,删除映射的内核网卡接口的接口配置;在删除逻辑接口时,删除映射的内核网卡接口的接口配置。In this embodiment, when deleting the interface configuration of the logical interface, the interface configuration of the mapped kernel network card interface is deleted; when deleting the logical interface, the interface configuration of the mapped kernel network card interface is deleted.
具体地,如果删除逻辑接口的接口配置,相应的也删除第一成员接口映射的内核网卡接口的接口配置。如果删除逻辑接口,也相应的删除第一成员接口映射的内核网卡接口的接口配置。Specifically, if the interface configuration of the logical interface is deleted, the interface configuration of the kernel network card interface mapped by the first member interface is also deleted accordingly. If the logical interface is deleted, the interface configuration of the kernel network card interface mapped by the first member interface is also deleted accordingly.
在另一个具体的示例中,将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,包括:在逻辑接口下已有成员接口时,将逻辑接口的接口配置映射给其中一个成员接口对应的内核网卡接口;在逻辑接口下移除成员接口时,判断所移除的成员接口的内核网卡接口是否映射了接口配置,如果是,则删除该成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给另一个成员接口对应的内核网卡接口。In another specific example, the interface configuration of the logical interface is mapped to a kernel network card interface corresponding to a member interface, including: when there is a member interface under the logical interface, mapping the interface configuration of the logical interface to the kernel network card interface corresponding to one of the member interfaces; when removing a member interface under the logical interface, determining whether the kernel network card interface of the removed member interface has mapped the interface configuration, if so, deleting the interface configuration of the kernel network card interface corresponding to the member interface, and mapping the interface configuration of the logical interface to the kernel network card interface corresponding to another member interface.
具体的,逻辑接口创建后,就配置了逻辑接口下的成员接口,此后为该逻辑接口配置对应的接口配置,发现已经有成员接口,则需要将接口配置映射给一个成员接口对应的内核网卡接口。此时,选择用来映射的成员接口,可以根据成员加入的顺序编号选择第一个成员接口,也可以任意选择一个成员接口,或者根据成员接口的优先级来选择。成员接口的优先级可以根据成员接口的可用资源来确定,例如根据其剩余带宽来确定,剩余带宽越高其优先级越高。或者根据成员接口上已有的用户数来确定优先级,用户数越少的优先级越高。本示例对如何选择成员接口不做限制。Specifically, after the logical interface is created, the member interfaces under the logical interface are configured. Thereafter, the corresponding interface configuration is configured for the logical interface. If a member interface already exists, the interface configuration needs to be mapped to the kernel network card interface corresponding to a member interface. At this time, the member interface to be mapped can be selected based on the order number of the member joining, or a member interface can be selected arbitrarily, or based on the priority of the member interface. The priority of the member interface can be determined based on the available resources of the member interface, for example, based on its remaining bandwidth. The higher the remaining bandwidth, the higher its priority. Alternatively, the priority can be determined based on the number of existing users on the member interface. The fewer the number of users, the higher the priority. This example does not restrict how to select the member interface.
相应的,在移除成员接口时,判断所移除的成员接口的内核网卡接口是否映射了接口配置,如果是,则删除该成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给新选择的一个成员接口对应的内核网卡接口。Correspondingly, when removing a member interface, determine whether the kernel network card interface of the removed member interface has mapped the interface configuration. If so, delete the interface configuration of the kernel network card interface corresponding to the member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to a newly selected member interface.
在本实施例中,在删除逻辑接口的接口配置时,删除映射的内核网卡接口的接口配置;在删除逻辑接口时,删除映射的内核网卡接口的接口配置。In this embodiment, when deleting the interface configuration of the logical interface, the interface configuration of the mapped kernel network card interface is deleted; when deleting the logical interface, the interface configuration of the mapped kernel network card interface is deleted.
具体地,如果删除逻辑接口的接口配置,相应的也删除成员接口映射的内核网卡接口的接口配置。如果删除逻辑接口,也相应的删除成员接口映射的内核网卡接口的接口配置,这里不再赘述。Specifically, if the interface configuration of the logical interface is deleted, the interface configuration of the kernel network card interface mapped by the member interface is also deleted accordingly. If the logical interface is deleted, the interface configuration of the kernel network card interface mapped by the member interface is also deleted accordingly, which will not be repeated here.
步骤S120、接收访问所述逻辑接口自身的数据报文,将接收的数据报文发送给映射的内核网卡接口。Step S120: Receive a data message for accessing the logical interface itself, and send the received data message to the mapped kernel network card interface.
在前面的步骤中,已经将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,因此当逻辑接口接收到访问自身的数据报文时,此数据报文的目的地址是逻辑接口的地址,内核网卡接口就会将数据报文转发到Linux协议栈进行处理。In the previous steps, the interface configuration of the logical interface has been mapped to the kernel network card interface corresponding to a member interface. Therefore, when the logical interface receives a data packet accessing itself, the destination address of this data packet is the address of the logical interface, and the kernel network card interface will forward the data packet to the Linux protocol stack for processing.
步骤S130、接收所述内核网卡接口的回应报文,通过所述逻辑接口发送。Step S130: Receive a response message from the kernel network card interface, and send it through the logical interface.
网络设备的Linux协议栈对接收的数据报文进行处理后,进行回应,回应报文经过内核网卡接口重新送入逻辑接口,匹配已经建立的转发表项,通过逻辑接口发送出去,回应报文的目的地址是原访问自身的数据报文的源地址。After processing the received data message, the Linux protocol stack of the network device responds. The response message is re-sent to the logical interface through the kernel network card interface, matches the established forwarding table entry, and is sent out through the logical interface. The destination address of the response message is the source address of the original data message accessing itself.
本申请的另一个实施例,本实施例可以与上述一个或者多个实施例中各个可选方案结合,以链路聚合接口为例详细阐述本申请的一种逻辑接口数据通信方法,如图2所示,包括:Another embodiment of the present application, which can be combined with each optional solution in one or more of the above embodiments, takes a link aggregation interface as an example to describe a logical interface data communication method of the present application in detail, as shown in FIG2, including:
步骤S201、创建链路聚合接口,配置链路聚合的IP地址。Step S201: Create a link aggregation interface and configure the IP address of the link aggregation.
本实施例链路聚合接口的接口配置以IP地址为例进行说明,例如在网络设备A上创建链路聚合接口aggregateport1,然后将网络设备A的物理接口Ethernet1、物理接口Ethernet2加入到aggregateport1。为链路聚合接口aggregateport1配置IP地址,例如配置的IP地址为192.168.1.110。The interface configuration of the link aggregation interface in this embodiment is described by taking the IP address as an example, for example, a link aggregation interface aggregateport1 is created on network device A, and then the physical interface Ethernet1 and the physical interface Ethernet2 of network device A are added to aggregateport1. An IP address is configured for the link aggregation interface aggregateport1, for example, the configured IP address is 192.168.1.110.
步骤S202、判断链路聚合接口下是否有成员接口,如果没有成员接口,则将链路聚合接口的IP地址保存在本地,如果有成员接口,则将链路聚合接口的IP地址映射给第一成员接口对应的内核网卡接口。Step S202: determine whether there is a member interface under the link aggregation interface. If there is no member interface, save the IP address of the link aggregation interface locally. If there is a member interface, map the IP address of the link aggregation interface to the kernel network card interface corresponding to the first member interface.
具体地,本实施例先判断链路聚合接口下是否有成员接口,如果没有成员接口,则将链路聚合接口的IP地址保存在本地。后续发现开始有成员接口加入到链路聚合接口,则将链路聚合接口的IP地址映射给第一成员接口对应的内核网卡接口。例如,Ethernet1是第一个加入的成员接口,则将IP地址192.168.1.110映射给Ethernet1对应的内核网卡接口。Specifically, this embodiment first determines whether there is a member interface under the link aggregation interface. If there is no member interface, the IP address of the link aggregation interface is saved locally. If it is found that a member interface begins to be added to the link aggregation interface, the IP address of the link aggregation interface is mapped to the kernel network card interface corresponding to the first member interface. For example, Ethernet1 is the first member interface to be added, and the IP address 192.168.1.110 is mapped to the kernel network card interface corresponding to Ethernet1.
如果链路聚合接口下有成员接口,则根据成员接口的加入顺序编号,将链路聚合接口的IP地址映射给第一成员接口对应的内核网卡接口。例如,Ethernet1是第一个加入的成员接口,则将IP地址192.168.1.110映射给Ethernet1对应的内核网卡接口。If there are member interfaces under the link aggregation interface, the IP address of the link aggregation interface is mapped to the kernel NIC interface corresponding to the first member interface according to the order in which the member interfaces are added. For example, if Ethernet1 is the first member interface to be added, the IP address 192.168.1.110 is mapped to the kernel NIC interface corresponding to Ethernet1.
步骤S203、在链路聚合接口下移除成员接口时,判断移除的是否是第一成员接口,如果是第一成员接口,则删除所移除的成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给新的第一个成员接口对应的内核网卡接口。Step S203: When removing a member interface under the link aggregation interface, determine whether the removed member interface is the first member interface. If it is the first member interface, delete the interface configuration of the kernel network card interface corresponding to the removed member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to the new first member interface.
如果从链路聚合接口下移除成员接口,例如从链路聚合接口aggregateport1中移除成员接口Ethernet1,由于成员接口Ethernet1是第一成员接口,其对应的内核网卡接口映射了链路聚合接口的IP地址192.168.1.110,此时需要删除成员接口Ethernet1对应的内核网卡接口的接口配置。重新在链路聚合接口下的成员接口中查找到新的第一成员接口,假设此时成员接口Ethernet2是第一成员接口,则将链路聚合接口aggregateport1的IP地址192.168.1.110映射给Ethernet2对应的内核网卡接口。此时始终保持了链路聚合接口的IP地址映射给了一个成员接口对应的内核网卡接口,能够实现链路聚合接口自身通信。If you remove a member interface from a link aggregation interface, for example, remove member interface Ethernet1 from link aggregation interface aggregateport1, since member interface Ethernet1 is the first member interface, its corresponding kernel NIC interface maps the IP address 192.168.1.110 of the link aggregation interface. At this time, you need to delete the interface configuration of the kernel NIC interface corresponding to member interface Ethernet1. Find a new first member interface in the member interfaces under the link aggregation interface again. Assuming that member interface Ethernet2 is the first member interface at this time, map the IP address 192.168.1.110 of link aggregation interface aggregateport1 to the kernel NIC interface corresponding to Ethernet2. At this time, the IP address of the link aggregation interface is always mapped to the kernel NIC interface corresponding to a member interface, so that the link aggregation interface can communicate with itself.
容易理解的是,如果移除的成员接口不是第一成员接口,或者说移除的成员接口对应的内核网卡接口未被映射链路聚合接口的IP地址,则不用做任何处理。It is easy to understand that if the removed member interface is not the first member interface, or the kernel network card interface corresponding to the removed member interface is not mapped to the IP address of the link aggregation interface, no processing is required.
特殊地,如果移除成员接口后,链路聚合接口下没有任何成员接口时,则链路聚合接口配置的IP地址保存在本地,此时没有映射的内核网卡接口,不能实现链路聚合接口的自身通信。In particular, if there is no member interface under the link aggregation interface after the member interface is removed, the IP address configured for the link aggregation interface is saved locally. At this time, there is no mapped kernel network card interface, and the link aggregation interface cannot achieve its own communication.
而在删除链路接口的IP地址,或者删除链路聚合接口时,相应的也删除第一成员接口映射的内核网卡接口的IP地址。When the IP address of the link interface is deleted, or the link aggregation interface is deleted, the IP address of the kernel network card interface mapped by the first member interface is also deleted accordingly.
步骤S204、接收访问所述链路聚合接口自身的数据报文,将接收的数据报文发送给映射的第一个成员接口对应的内核网卡接口。Step S204: Receive a data message for accessing the link aggregation interface itself, and send the received data message to the kernel network card interface corresponding to the first member interface of the mapping.
本实施例中,第一成员接口Ethernet1对应的内核网卡接口映射了链路聚合接口的IP地址192.168.1.110,因此当链路聚合接口接收的数据报文的目的IP地址为192.168.1.110时,是对链路聚合接口的自身通信数据报文。由于,第一成员接口Ethernet1对应的内核网卡接口映射了链路聚合接口的IP地址192.168.1.110,数据报文被发往第一成员接口Ethernet1对应的内核网卡接口,从而数据报文被转发到Linux协议栈进行处理,Linux协议栈对数据报文进行处理后,返回回应报文。In this embodiment, the kernel network card interface corresponding to the first member interface Ethernet1 maps the IP address 192.168.1.110 of the link aggregation interface. Therefore, when the destination IP address of the data message received by the link aggregation interface is 192.168.1.110, it is the communication data message of the link aggregation interface itself. Since the kernel network card interface corresponding to the first member interface Ethernet1 maps the IP address 192.168.1.110 of the link aggregation interface, the data message is sent to the kernel network card interface corresponding to the first member interface Ethernet1, and the data message is forwarded to the Linux protocol stack for processing. After the Linux protocol stack processes the data message, it returns a response message.
步骤S205、接收第一个成员接口对应的内核网卡接口返回的回应报文,通过链路聚合接口发送。Step S205: Receive a response message returned by the kernel network card interface corresponding to the first member interface, and send it through the link aggregation interface.
Linux协议栈对数据报文进行处理后,返回回应报文,该回应报文被链路聚合接口转发,转发的目的地址是原数据报文(访问所述链路聚合接口自身的数据报文)的源IP地址。After processing the data message, the Linux protocol stack returns a response message, which is forwarded by the link aggregation interface, and the forwarding destination address is the source IP address of the original data message (the data message accessing the link aggregation interface itself).
例如,访问所述链路聚合接口自身的数据报文的目的地址是192.168.1.110,源IP地址是192.168.220。则回应报文的目的地址是192.168.220,从而成功对访问自身的自身通信进行了响应处理。For example, the destination address of the data message accessing the link aggregation interface itself is 192.168.1.110, and the source IP address is 192.168.220. Then the destination address of the response message is 192.168.220, thereby successfully responding to the communication accessing itself.
容易理解的是,图2实施例是以链路聚合接口为例进行的说明,对于其他逻辑接口,例如VLAN接口也同样适用,这里不再赘述。It is easy to understand that the embodiment of FIG. 2 is described by taking a link aggregation interface as an example, and is also applicable to other logical interfaces, such as a VLAN interface, and will not be described in detail here.
本申请一种逻辑接口数据通信方法,通过映射逻辑接口的IP地址给成员接口对应的内核网卡接口,从而采用内核协议栈来处理和响应到自身报文,提高了设备转发性能。同时减少自身通信协议栈代码适配和开发的工作量,提升产品化开发效率和产品稳定性。减少了链路聚合接口、VLAN接口等三层逻辑接口动态路由表项等开发的巨大投入。The present application discloses a logical interface data communication method, which improves the forwarding performance of the device by mapping the IP address of the logical interface to the kernel network card interface corresponding to the member interface, thereby using the kernel protocol stack to process and respond to its own message. At the same time, it reduces the workload of its own communication protocol stack code adaptation and development, improves product development efficiency and product stability, and reduces the huge investment in the development of dynamic routing table items of three-layer logical interfaces such as link aggregation interfaces and VLAN interfaces.
图3是链路聚合接口自身通信的一个实施例,在该实施例中,应用了DPDK的安全准入控制网关FW2和FW3的三个物理接口以成员接口的方式加入到一个链路聚合接口,并分别给FW2、FW3的链路聚合接口配置各自的IP地址,由于FW2和FW3本身没有集成协议栈,网络流量到自身的通信承载在自带的Linux系统上,配置的链路聚合接口的IP地址也同步映射到3个物理接口其中一个对应的内核网卡接口上,一般是链路聚合接口的第一个成员接口对应的内核网卡接口。Figure 3 is an embodiment of the link aggregation interface's own communication. In this embodiment, the three physical interfaces of the DPDK-enabled security access control gateways FW2 and FW3 are added to a link aggregation interface as member interfaces, and the link aggregation interfaces of FW2 and FW3 are configured with their own IP addresses. Since FW2 and FW3 do not have an integrated protocol stack, the communication from network traffic to themselves is carried on their own Linux system. The IP address of the configured link aggregation interface is also synchronously mapped to the kernel network card interface corresponding to one of the three physical interfaces, generally the kernel network card interface corresponding to the first member interface of the link aggregation interface.
以FW2为例,三个物理接口Ethernet1、Ethernet2、Ethernet3以成员接口的方式加入到链路聚合接口中,假设FW2链路聚合接口的IP地址为IP1,映射的内核网卡接口为物理接口Ethernet1对应的内核网卡接口KNI1。Taking FW2 as an example, the three physical interfaces Ethernet1, Ethernet2, and Ethernet3 are added to the link aggregation interface as member interfaces. Assume that the IP address of the FW2 link aggregation interface is IP1, and the mapped kernel NIC interface is the kernel NIC interface KNI1 corresponding to the physical interface Ethernet1.
在移除成员接口时,如果移除的是物理接口Ethernet1,则要删除KNI1映射的IP地址,重新映射内核网卡接口,例如映射给物理接口Ethernet2对应的内核网卡接口KNI2。When removing a member interface, if the physical interface Ethernet1 is removed, delete the IP address mapped by KNI1 and remap the kernel network card interface, for example, map it to the kernel network card interface KNI2 corresponding to the physical interface Ethernet2.
在删除链路聚合接口的IP地址时,或删除链路聚合接口时,要删除KNI1映射的IP地址。When deleting the IP address of a link aggregation interface or deleting a link aggregation interface, you must delete the IP address mapped by KNI1.
PC和FW2链路聚合接口通信的数据报文全部送往KNI1接口,由Linux协议栈来回应报文交互。而其他经过链路聚合接口转发的数据报文,则由链路聚合接口正常转发。All data packets communicated between the PC and FW2 link aggregation interface are sent to the KNI1 interface, and the Linux protocol stack responds to the message interaction. Other data packets forwarded by the link aggregation interface are forwarded normally by the link aggregation interface.
图4是VLAN接口自身通信的一个实施例,在该实施例中,应用了DPDK的安全准入控制网关FW1上创建VLAN接口,FW1选择物理接口Ethernet4、Ethernet5、Ethernet6加入VLAN,分别连接PC1、PC2、PC3。VLAN接口配置IP地址时,IP地址同步映射给一个物理接口对应的内核网卡接口,可以选择映射给物理接口Ethernet4、Ethernet5、Ethernet6口中第一个加入VLAN的物理接口对应的内核网卡接口。假设FW1上VLAN接口的IP地址为IP10,映射的内核网卡接口为物理接口Ethernet4对应的内核网卡接口KNI4。Figure 4 is an embodiment of VLAN interface self-communication. In this embodiment, a VLAN interface is created on the secure access control gateway FW1 that uses DPDK. FW1 selects physical interfaces Ethernet4, Ethernet5, and Ethernet6 to join the VLAN and connects PC1, PC2, and PC3 respectively. When the VLAN interface is configured with an IP address, the IP address is synchronously mapped to the kernel network card interface corresponding to a physical interface. You can choose to map it to the kernel network card interface corresponding to the first physical interface added to the VLAN among the physical interfaces Ethernet4, Ethernet5, and Ethernet6. Assume that the IP address of the VLAN interface on FW1 is IP10, and the mapped kernel network card interface is the kernel network card interface KNI4 corresponding to the physical interface Ethernet4.
物理接口Ethernet4、Ethernet5、Ethernet6其中一个移除或者工作状态变为down,需要检测判断是否重新映射内核网卡接口。例如移除Ethernet4,则要删除KNI4映射的IP地址,重新映射内核网卡接口,例如映射给物理接口Ethernet5对应的内核网卡接口KNI5。If one of the physical interfaces Ethernet4, Ethernet5, and Ethernet6 is removed or the working status changes to down, it is necessary to detect and determine whether to remap the kernel network card interface. For example, if Ethernet4 is removed, the IP address mapped by KNI4 must be deleted and the kernel network card interface must be remapped, such as mapping it to the kernel network card interface KNI5 corresponding to the physical interface Ethernet5.
VLAN接口IP地址修改或者删除时,需要删除映射的内核网卡接口的IP地址,例如要删除KNI4映射的IP地址。When the VLAN interface IP address is modified or deleted, the mapped IP address of the kernel network card interface needs to be deleted, for example, the IP address mapped by KNI4 needs to be deleted.
PC1、PC2、PC3配置和VLAN接口同网段的IP地址,PC1、PC2、PC3和VLAN接口通信时,全部送往KNI4接口,由Linux协议栈来回应报文交互。而其他经过VLAN接口转发的数据报文,则由VLAN接口正常转发。PC1, PC2, PC3 are configured with IP addresses in the same network segment as the VLAN interface. When PC1, PC2, PC3 communicate with the VLAN interface, all messages are sent to the KNI4 interface, and the Linux protocol stack responds to the message interaction. Other data messages forwarded by the VLAN interface are forwarded normally by the VLAN interface.
本申请的另一个实施例,如图5所示,还提供了一种逻辑接口数据通信装置,应用于基于数据平面开发套件DPDK的网络设备,所述逻辑接口数据通信装置,包括:Another embodiment of the present application, as shown in FIG. 5 , further provides a logical interface data communication device, which is applied to a network device based on a data plane development kit DPDK, and the logical interface data communication device includes:
配置模块,用于创建逻辑接口,将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口;A configuration module is used to create a logical interface and map the interface configuration of the logical interface to the kernel network card interface corresponding to a member interface;
自身通信模块,用于接收访问所述逻辑接口自身的数据报文,将接收的数据报文发送给映射的内核网卡接口;接收所述内核网卡接口的回应报文,通过所述逻辑接口发送。The self-communication module is used to receive data packets accessing the logical interface itself, and send the received data packets to the mapped kernel network card interface; receive the response packets from the kernel network card interface, and send them through the logical interface.
关于逻辑接口数据通信装置的具体限定可以参见上文中对于逻辑接口数据通信方法的限定,在此不再赘述。上述逻辑接口数据通信装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the logical interface data communication device, please refer to the definition of the logical interface data communication method above, which will not be repeated here. Each module in the above-mentioned logical interface data communication device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
与上述逻辑接口数据通信方法对应的,可选的,所述配置模块将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,执行如下操作:Corresponding to the above logical interface data communication method, optionally, the configuration module maps the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface, and performs the following operations:
在逻辑接口下无成员接口,开始加入成员接口时,将逻辑接口的接口配置映射给第一个成员接口对应的内核网卡接口;If there is no member interface under the logical interface, when adding member interfaces, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to the first member interface;
在逻辑接口下移除成员接口时,判断所移除的成员接口是否是第一个成员接口,如果是第一个成员接口,则删除所移除的成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给新的第一个成员接口对应的内核网卡接口。When removing a member interface under a logical interface, determine whether the removed member interface is the first member interface. If it is the first member interface, delete the interface configuration of the kernel network card interface corresponding to the removed member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to the new first member interface.
可选的,所述配置模块将逻辑接口的接口配置映射给一个成员接口对应的内核网卡接口,执行如下操作:Optionally, the configuration module maps the interface configuration of the logical interface to a kernel network card interface corresponding to a member interface, and performs the following operations:
在逻辑接口下已有成员接口时,将逻辑接口的接口配置映射给其中一个成员接口对应的内核网卡接口;When there are member interfaces under the logical interface, the interface configuration of the logical interface is mapped to the kernel network card interface corresponding to one of the member interfaces;
在逻辑接口下移除成员接口时,判断所移除的成员接口的内核网卡接口是否映射了接口配置,如果是,则删除该成员接口对应的内核网卡接口的接口配置,将逻辑接口的接口配置映射给另一个成员接口对应的内核网卡接口。When removing a member interface under a logical interface, determine whether the kernel network card interface of the removed member interface has mapped the interface configuration. If so, delete the interface configuration of the kernel network card interface corresponding to the member interface, and map the interface configuration of the logical interface to the kernel network card interface corresponding to another member interface.
与上述逻辑接口数据通信方法对应的,本申请所述配置模块,还用于:Corresponding to the above-mentioned logical interface data communication method, the configuration module described in this application is also used for:
在删除逻辑接口的接口配置时,删除映射的内核网卡接口的接口配置。When deleting the interface configuration of a logical interface, the interface configuration of the mapped kernel network card interface is deleted.
与上述逻辑接口数据通信方法对应的,本申请所述配置模块,还用于:Corresponding to the above-mentioned logical interface data communication method, the configuration module described in this application is also used for:
在删除逻辑接口时,删除映射的内核网卡接口的接口配置。When deleting a logical interface, the interface configuration of the mapped kernel NIC interface is deleted.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011448182.0A CN114615187B (en) | 2020-12-09 | 2020-12-09 | Logic interface data communication method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011448182.0A CN114615187B (en) | 2020-12-09 | 2020-12-09 | Logic interface data communication method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114615187A CN114615187A (en) | 2022-06-10 |
CN114615187B true CN114615187B (en) | 2024-04-26 |
Family
ID=81856258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011448182.0A Active CN114615187B (en) | 2020-12-09 | 2020-12-09 | Logic interface data communication method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114615187B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN120474859A (en) * | 2024-02-08 | 2025-08-12 | 华为云计算技术有限公司 | A data transmission method and related device based on bus technology |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110224929A (en) * | 2019-04-17 | 2019-09-10 | 西安交大捷普网络科技有限公司 | The data packet forwarding method of link aggregation interface based on DPDK |
CN111934894A (en) * | 2019-05-13 | 2020-11-13 | 烽火通信科技股份有限公司 | Method and system for managing wireless network interface based on DPDK |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10587434B2 (en) * | 2017-07-14 | 2020-03-10 | Nicira, Inc. | In-band management interface with user space datapath |
-
2020
- 2020-12-09 CN CN202011448182.0A patent/CN114615187B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110224929A (en) * | 2019-04-17 | 2019-09-10 | 西安交大捷普网络科技有限公司 | The data packet forwarding method of link aggregation interface based on DPDK |
CN111934894A (en) * | 2019-05-13 | 2020-11-13 | 烽火通信科技股份有限公司 | Method and system for managing wireless network interface based on DPDK |
Also Published As
Publication number | Publication date |
---|---|
CN114615187A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107222353B (en) | Support protocol-independent software-defined network virtualization management platform | |
TWI393401B (en) | System, apparatus, method and memory having computer program embodied thereon for managing multicast routing | |
CN101601232B (en) | Triple-tier anycast addressing | |
US7444405B2 (en) | Method and apparatus for implementing a MAC address pool for assignment to a virtual interface aggregate | |
US8984114B2 (en) | Dynamic session migration between network security gateways | |
WO2020073685A1 (en) | Forwarding path determining method, apparatus and system, computer device, and storage medium | |
CN111556110B (en) | Automatic adaptation method for different physical service networks of private cloud system | |
WO2016184283A1 (en) | Data stream management method and system for virtual machine | |
CN108023736A (en) | Communication means, server device, client device, apparatus and system | |
WO2022063249A1 (en) | Address management method, apparatus and system | |
WO2023165137A1 (en) | Cross-cluster network communication system and method | |
CN114615187B (en) | Logic interface data communication method and device | |
CN114389967A (en) | Link detection method, device, equipment and storage medium | |
JP2001211190A (en) | Communication management device and communication management method | |
CN104468389A (en) | Message processing method, servers and server system | |
CN115361443A (en) | Message processing method and system | |
CN112866107B (en) | IP address notification method, traffic guidance method and network equipment | |
CN102255799B (en) | Internal network interface mapping method and device supporting separation of forwarding and control | |
CN111130978B (en) | Network traffic forwarding method and device, electronic equipment and machine-readable storage medium | |
US12003417B2 (en) | Communication method and apparatus | |
US20080056263A1 (en) | Efficient transport layer processing of incoming packets | |
CN117499293A (en) | Routing table maintenance method, path selection method, device, system and storage medium | |
CN113765799A (en) | Method for sending and receiving container messages, storage medium, and container communication system | |
CN118784401A (en) | Data transmission method and device | |
CN114172841B (en) | Message forwarding method and device, electronic equipment and read storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |