Network equipment communication method and network equipment communication device

文档序号:1925216 发布日期:2021-12-03 浏览:25次 中文

阅读说明:本技术 网络设备通信方法及网络设备通信装置 (Network equipment communication method and network equipment communication device ) 是由 张余 于 2021-09-07 设计创作,主要内容包括:本发明公开了一种网络设备通信方法及网络设备通信装置,涉及通信技术领域。该方法应用于跨设备链路聚合组中的网络设备;该方法包括:接收第一挂载设备发送的数据包,并判断数据包中携带的对端网络设备标识对应的对端网络设备是否属于跨设备链路聚合组,其中,第一挂载设备为单挂设备;若是,则判断对端网络设备下的第二挂载设备是否为单挂设备;若是,则剥离数据包中的虚拟局域网VLAN标识,以使对端网络设备通过传输隧道接收数据包,并将数据包发送给第二挂载设备。该方法能够在两个网络设备下的单挂设备进行通信时,使数据包使用源端网络设备和对端网络设备建立的传输隧道进行传输,从而能够避免浪费网络设备的链路资源和处理能力。(The invention discloses a network equipment communication method and a network equipment communication device, and relates to the technical field of communication. The method is applied to network equipment in a cross-equipment link aggregation group; the method comprises the following steps: receiving a data packet sent by a first mounting device, and judging whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to a cross-device link aggregation group, wherein the first mounting device is a single mounting device; if yes, judging whether a second mounting device under the opposite-end network device is a single mounting device or not; if yes, stripping the VLAN identification in the data packet so that the opposite-end network equipment receives the data packet through the transmission tunnel and sends the data packet to the second mounting equipment. The method can enable the data packet to be transmitted by using the transmission tunnel established by the source end network device and the opposite end network device when the single hanging device under the two network devices communicates, thereby avoiding wasting the link resource and the processing capacity of the network devices.)

1. A network device communication method, wherein the method is applied to network devices in a cross-device link aggregation group; the method comprises the following steps:

receiving a data packet sent by a first mount device, and judging whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to the cross-device link aggregation group, wherein the first mount device is a single mount device;

if yes, judging whether a second mounting device under the opposite-end network device is a single mounting device or not;

if yes, stripping the VLAN identification in the data packet so that the opposite terminal network equipment receives the data packet through a transmission tunnel and sends the data packet to the second mounting equipment.

2. The method of claim 1, wherein if so, after stripping off the VLAN id in the packet, the method further comprises: establishing the transmission tunnel with the opposite terminal network equipment; wherein the content of the first and second substances,

sending a neighbor establishing request to the opposite terminal network equipment;

responding to a message of receiving and establishing a neighbor returned by the opposite terminal network equipment, and establishing a Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) neighbor with the opposite terminal network equipment by adopting a network address different from that of the opposite terminal network equipment;

sending a first type3 type route to the opposite end network device, so that the opposite end network device establishes the transmission tunnel according to the first type3 type route, wherein the Private Mobile Subscriber Identity (PMSI) attribute of the first type3 type route comprises a first cross-device link aggregation group number;

receiving a second type3 type route sent by the opposite end network device, and establishing the transmission tunnel according to the second type3 type route, wherein the PMSI attribute of the second type3 type route includes a second cross-device link aggregation group number.

3. The method of claim 1, wherein if the determination result is yes, determining whether the second mounted device under the peer network device is a single mounted device comprises:

acquiring a physical address table item of the opposite terminal network equipment carried in a pre-stored synchronous message;

and determining whether the second mount device is a single mount device or not according to mount information in a mount device sub-table of the opposite-end network device stored in the physical address table.

4. The method of any of claims 1-3, wherein if so, stripping the VLAN ID in the packet comprises:

judging whether an output interface of the second mounting equipment is a peer-link or not;

if yes, stripping the VLAN identification in the data packet.

5. The method of claim 4, wherein the determining whether the outgoing interface of the second mount device is a peer-link comprises:

acquiring a physical address table item of the opposite terminal network equipment carried in a pre-stored synchronous message;

and determining whether the output interface of the second mounting device is a peer-link according to the output interface information in the mounting device sub-table of the opposite-end network device stored in the physical address table.

6. A network device communication method, wherein the method is applied to network devices in a cross-device link aggregation group; the method comprises the following steps:

receiving a data packet sent by the source end network device through the transmission tunnel, and sending the data packet to the second mounting device; the data packet is a data packet that is sent by the source network device after being processed according to the method of claim 1.

7. The method of claim 6, wherein before receiving the packet sent by the source network device through the transport tunnel and sending the packet to the second mount device, the method further comprises: establishing the transmission tunnel with the source end network device; wherein the content of the first and second substances,

receiving a neighbor establishing request sent by the source end network equipment;

responding to the neighbor establishing request, sending a neighbor establishing receiving message to the source end network device, and enabling the source end network device to establish a Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) neighbor with the opposite end network device by adopting a network address different from that of the opposite end network device;

receiving a first type3 type route sent by the source network device, and establishing the transmission tunnel according to the first type3 type route, wherein a Private Mobile Subscriber Identity (PMSI) attribute of the first type3 type route includes a first cross-device link aggregation group number;

and sending a second type3 type route to the source network device, so that the source network device establishes the transmission tunnel according to the second type3 type route, wherein the PMSI attribute of the second type3 type route includes a second cross-device link aggregation group number.

8. A network device communication apparatus, comprising:

a first determining unit, configured to receive a data packet sent by a first mounted device, and determine whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to a cross-device link aggregation group, where the first mounted device is a single mounted device;

a second determining unit, configured to determine whether a second mounted device under the peer network device is a single mounted device if the second mounted device is the single mounted device;

and if so, stripping the VLAN identifier in the data packet to enable the opposite-end network device to receive the data packet through a transmission tunnel and send the data packet to the second mounting device.

9. A network device communication apparatus, comprising:

the receiving and sending unit is used for receiving the data packet sent by the source end network device through the transmission tunnel and sending the data packet to the second mounting device; the data packet is a data packet that is sent by the source network device after being processed according to the method of claim 1.

10. An electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5 or to perform the method of any one of claims 6-7.

11. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-5 or to perform the method of any one of claims 6-7.

Technical Field

The present invention relates to the field of communications technologies, and in particular, to a network device communication method and a network device communication apparatus.

Background

In a VXLAN (Virtual eXtensible Local Area Network) Network, two VTEP (VXLAN Tunnel End Point) devices in a cross-device link aggregation mode include, for example, two VTEP1 and VTEP2 devices, and after configuration and normal operation between VTEP1 and VTEP2 are completed, data is transmitted through a peer-link. In some cases, for example, a first mount device which is a single mount device under VTEP1 and a second mount device which is a single mount device under VTEP2 are provided, if communication is performed between the first mount device and the second mount device, the first mount device sends a packet to VTEP1, VTEP1 sends the packet to VTEP1, VXLAN encapsulates the packet, that is, puts a VLAN id in the packet, and sends the packet to VTEP2 through a peer-link, VTEP2 sends the packet to the second mount device after decapsulating the packet to complete communication, the flow of data transmission through the peer-link is complicated, and data transmission can be performed between the single mount devices without using a peer-link, so this transmission method wastes link resources and processing capacity between VTEP1 and VTEP 2.

Disclosure of Invention

Therefore, the invention provides a network device communication method and a network device communication device, which are used for solving the problem that link resources and processing capacity of network devices are wasted due to the fact that a peer-link is adopted for communication when single-hanging devices under two network devices communicate in the prior art.

In order to achieve the above object, in a first aspect, the present invention provides a network device communication method, which is applied to a network device in a cross-device link aggregation group; the method comprises the following steps:

receiving a data packet sent by a first mount device, and judging whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to the cross-device link aggregation group, wherein the first mount device is a single mount device;

if yes, judging whether a second mounting device under the opposite-end network device is a single mounting device or not;

if yes, stripping the VLAN identification in the data packet so that the opposite terminal network equipment receives the data packet through a transmission tunnel and sends the data packet to the second mounting equipment.

In some examples, if yes, after stripping the VLAN id in the packet, the method further includes: establishing the transmission tunnel with the opposite terminal network equipment; wherein the content of the first and second substances,

sending a neighbor establishing request to the opposite terminal network equipment;

responding to a message of receiving and establishing a neighbor returned by the opposite terminal network equipment, and establishing a Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) neighbor with the opposite terminal network equipment by adopting a network address different from that of the opposite terminal network equipment;

sending a first type3 type route to the opposite end network device, so that the opposite end network device establishes the transmission tunnel according to the first type3 type route, wherein the Private Mobile Subscriber Identity (PMSI) attribute of the first type3 type route comprises a first cross-device link aggregation group number;

receiving a second type3 type route sent by the opposite end network device, and establishing the transmission tunnel according to the second type3 type route, wherein the PMSI attribute of the second type3 type route includes a second cross-device link aggregation group number.

In some examples, if yes, the determining whether the second mount device under the peer network device is a single mount device includes:

acquiring a physical address table item of the opposite terminal network equipment carried in a pre-stored synchronous message;

and determining whether the second mount device is a single mount device or not according to mount information in a mount device sub-table of the opposite-end network device stored in the physical address table.

In some examples, if yes, stripping the VLAN id in the packet comprises:

judging whether an output interface of the second mounting equipment is a peer-link or not;

if yes, stripping the VLAN identification in the data packet.

In some examples, the determining whether the outgoing interface of the second mount device is a peer-link includes:

acquiring a physical address table item of the opposite terminal network equipment carried in a pre-stored synchronous message;

and determining whether the output interface of the second mounting device is a peer-link according to the output interface information in the mounting device sub-table of the opposite-end network device stored in the physical address table.

In a second aspect, the present invention further provides a network device communication method, which is applied to a network device in a cross-device link aggregation group; the method comprises the following steps:

receiving a data packet sent by the source end network device through the transmission tunnel, and sending the data packet to the second mounting device; the data packet is a data packet sent by the source network device after being processed by the method.

In some examples, before receiving the data packet sent by the source network device through the transport tunnel and sending the data packet to the second mount device, the method further includes: establishing the transmission tunnel with the source end network device; wherein the content of the first and second substances,

receiving a neighbor establishing request sent by the source end network equipment;

responding to the neighbor establishing request, sending a neighbor establishing receiving message to the source end network device, and enabling the source end network device to establish a Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) neighbor with the opposite end network device by adopting a network address different from that of the opposite end network device;

receiving a first type3 type route sent by the source network device, and establishing the transmission tunnel according to the first type3 type route, wherein a Private Mobile Subscriber Identity (PMSI) attribute of the first type3 type route includes a first cross-device link aggregation group number;

and sending a second type3 type route to the source network device, so that the source network device establishes the transmission tunnel according to the second type3 type route, wherein the PMSI attribute of the second type3 type route includes a second cross-device link aggregation group number.

In a third aspect, the present invention provides a network device communication apparatus, including:

a first determining unit, configured to receive a data packet sent by a first mounted device, and determine whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to the cross-device link aggregation group, where the first mounted device is a single mounted device;

a second determining unit, configured to determine whether a second mounted device under the peer network device is a single mounted device if the second mounted device is the single mounted device;

and if so, stripping the VLAN identifier in the data packet to enable the opposite-end network device to receive the data packet through a transmission tunnel and send the data packet to the second mounting device.

In a fourth aspect, the present invention provides a network device communication apparatus, including:

the receiving and sending unit is used for receiving the data packet sent by the source end network device through the transmission tunnel and sending the data packet to the second mounting device; the data packet is a data packet sent by the source network device after being processed according to the method.

In a fifth aspect, the present invention provides an electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.

In a sixth aspect, the present invention provides a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the above-described method.

The invention has at least the following advantages:

in the network device communication method provided by the embodiment of the present invention, when two network devices communicate with each other, it is determined whether an opposite-end network device that is to send a data packet belongs to a cross-device link aggregation group, if so, it is further determined whether a second mounted device under the opposite-end network device is a single mounted device, and if so, a VLAN identifier in the data packet is stripped, so that the data packet is not sent to the opposite-end network device through a peer-link of the cross-device link aggregation group, but is transmitted by using a transmission tunnel established by a source-end network device and the opposite-end network device, thereby avoiding wasting link resources and processing capabilities of the network devices (including the source-end network device and the opposite-end network device).

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.

FIG. 1 is a simplified architecture diagram of an M-LAG system;

fig. 2 is a flowchart illustrating an embodiment of a network device communication method according to the present invention;

fig. 3 is a second flowchart illustrating a network device communication method according to an embodiment of the present invention;

fig. 4 is a flowchart illustrating another embodiment of a network device communication method according to the present invention;

fig. 5 is a second flowchart illustrating a communication method of a network device according to another embodiment of the present invention;

fig. 6 is a schematic structural diagram of an embodiment of a network device communication device provided in the present invention;

fig. 7 is a schematic structural diagram of another embodiment of a network device communication device provided in the present invention;

fig. 8 is a schematic structural diagram of an electronic device provided in the present invention.

Detailed Description

In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.

It is to be understood that the specific embodiments and figures described herein are merely illustrative of the invention and are not limiting of the invention.

It is to be understood that the embodiments and features of the embodiments can be combined with each other without conflict.

It is to be understood that, for the convenience of description, only parts related to the present invention are shown in the drawings of the present invention, and parts not related to the present invention are not shown in the drawings.

It should be understood that each unit and module related in the embodiments of the present invention may correspond to only one physical structure, may also be composed of multiple physical structures, or multiple units and modules may also be integrated into one physical structure.

It will be understood that, without conflict, the functions, steps, etc. noted in the flowchart and block diagrams of the present invention may occur in an order different from that noted in the figures.

It is to be understood that the flowchart and block diagrams of the present invention illustrate the architecture, functionality, and operation of possible implementations of systems, apparatus, devices and methods according to various embodiments of the present invention. Each block in the flowchart or block diagrams may represent a unit, module, segment, code, which comprises executable instructions for implementing the specified function(s). Furthermore, each block or combination of blocks in the block diagrams and flowchart illustrations can be implemented by a hardware-based system that performs the specified functions or by a combination of hardware and computer instructions.

It is to be understood that the units and modules involved in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware, for example, the units and modules may be located in a processor.

In the related art, VXLAN (Virtual eXtensible Virtual local area Network) is a two-layer VPN (Virtual Private Network) technology based on an IP Network and adopting a MAC-in-UDP (Media Access Control Address-in-User data Protocol) encapsulation form. VXLAN may provide two-layer interconnection for distributed physical sites based on existing service provider or enterprise IP (Internet Protocol) networks, and may provide service isolation for different tenants. VXLAN is used primarily in data center networks. VXLAN has many characteristics, for example, a large number of tenants are supported, 24-bit identifiers are used, and at most 24 powers (16777216) of VXLAN can be supported, so that the number of the supported tenants is increased in a large scale, and the problem of insufficient resources of the traditional two-layer network VLAN is solved. For example, the network is easy to maintain, a large two-layer network is constructed based on an IP network, so that the network deployment and maintenance are easier, and the existing IP network technology can be fully utilized, for example, equivalent routing is utilized for load sharing and the like; only the edge device of the IP core network needs to carry out VXLAN processing, and the network intermediate device only needs to forward the message according to the IP header, thereby reducing the difficulty and the cost of network deployment. The VXLAN technology takes an existing three-layer physical network as an Underlay network (i.e., an Underlay network), and a virtual two-layer network, i.e., an Overlay network (i.e., a Overlay network), is constructed on the Underlay network. The Overlay network realizes the transfer of the second-layer message of the tenant between different sites across a three-layer network by using a three-layer forwarding path provided by the Underlay network through a packaging technology. The Underlay network is transparent to the tenants, and different sites of the same tenant behave as if they are operating in one local area network. A typical network model for VXLAN may include the following sections:

VM (Virtual Machine): multiple virtual machines can be created on one server, and different virtual machines can belong to different VXLANs. Virtual machines belonging to the same VXLAN are in the same logic two-layer network and are communicated with each other in two layers; two levels of isolation between virtual machines belonging to different VXLANs. VXLAN is identified by VXLAN ID, also known as VNI (VXLAN Network Identifier), which is 24 bits long.

VTEP (VXLAN Tunnel End Point ): edge device of VXLAN. The VXLAN processing is performed on the VTEP, for example, to identify the VXLAN to which the ethernet data frame belongs, to perform two-layer forwarding on the data frame based on the VXLAN, and to encapsulate/decapsulate the packet. The VTEP may be an independent physical device, or may be a server where the virtual machine is located, and is not limited herein.

VXLAN tunnel: a point-to-point logical tunnel between two VTEPs. After encapsulating a VXLAN header, a UDP (User data Protocol) header, and an IP header for a data frame, the VTEP forwards the encapsulated packet to a remote VTEP through a VXLAN tunnel, and the remote VTEP decapsulates the packet.

Core equipment: devices in an IP core network. The core device does not participate in VXLAN processing, and only needs to forward the message in three layers according to the destination IP address of the encapsulated message.

VSI (Virtual Switch Instance): a virtual switching instance on the VTEP provides a two-layer switching service for VXLAN. The VSI can be viewed as a virtual switch on the VTEP that performs layer two forwarding based on VXLAN, and has all the functions of a conventional ethernet switch, including source MAC address learning, MAC address aging, flooding, and the like. VSIs correspond one-to-one to VXLANs.

AC (Attachment Circuit, access Circuit): the VTEP connects physical or virtual circuits of the local site. On a VTEP, the three-tier interface or Ethernet service instance (service instance) associated with a VSI is referred to as the AC. Wherein an ethernet service instance is created on a layer two ethernet interface that defines a series of matching rules for matching data frames received from the layer two ethernet interface. The service instance AC is configured under 1 two-layer physical port.

Furthermore, EVPN (Ethernet Virtual Private Network) is a two-layer VPN technology, where the control plane uses MP-BGP (Border Gateway Protocol) to advertise EVPN routing, and the data plane uses VXLAN encapsulation to forward packets. The EVPN has the advantages of simplifying configuration, realizing VTEP automatic discovery, VXLAN tunnel automatic establishment and VXLAN automatic association through MP-BGP, avoiding manual configuration of a user and reducing network deployment difficulty. And the control plane and the data plane are separated, the control plane is responsible for issuing the route, the data plane is responsible for forwarding the message, the labor division is clear, and the management is easy.

The network device communication method provided by the invention can be applied to the network devices of the same M-LAG (Multi-Link Aggregation Group), and one M-LAG can comprise a plurality of network devices. Fig. 1 shows an architecture diagram of an M-LAG system, and fig. 1 illustrates an example in which an M-LAG includes two network devices (VTEP1 and VTEP2), where one network device (VTEP3) is included in addition to the M-LAG. M-LAG may be understood as a horizontal virtualization technique, which logically virtualizes VTEP1 and VTEP2 that are accessed by two terminals into one device, and then for VTEP3, when accessing M-LAG, it is as if communicating with one VTEP device. The VTEP1 and the VTEP2 show the same state externally, and the VTEP1 and the VTEP2 only need to send synchronization messages to each other to synchronize some table entries, and do not need to synchronize all information on the VTEP equipment, so the flexibility is high. The communication is carried out in an M-LAG mode, so that the complicated STP (Spanning Tree Protocol) configuration can be greatly reduced, the networking and configuration are greatly simplified, the link reliability is improved, the bandwidth is increased, the VTEP1 and the VTEP2 can form a dual-active system, and the two systems can share the load with each other.

In the M-LAG system, a DFS Group (dynamic switching service Group) protocol is configured between VTEP1 and VTEP2, and a dual master detection link and a peer-link are established. The DFS Group protocol is mainly used for deploying pairing between network devices in the M-LAG, and synchronization of information such as interface states and entries between the network devices in the M-LAG needs to be performed by depending on the DFS Group protocol. The double-master detection link is used for checking whether a double-master condition occurs in the M-LAG, and when the M-LAG is in normal operation, the double-master detection link does not participate in any forwarding action of the M-LAG. The dual-master detection link can be carried by an external network, and a three-layer reachable link can be configured independently to serve as the dual-master detection link. The peer-link is a direct link and must perform link aggregation, in order to increase the reliability of the link, multiple links may be used for link aggregation, the peer-link is used for exchanging negotiation messages and transmitting partial traffic between network devices (e.g., VTEP1 and VTEP2) in the M-LAG or between a network device in the M-LAG and a network device outside the M-LAG (e.g., VTEP3), and the peer-link is generally used for transmitting data between VTEP1 and VTEP2 in the M-LAG. When the interface of VTEP1 and the interface of VTEP2 are configured as peer-link interfaces, no other services can be configured on the interfaces.

The network device may adopt various types of network devices, and the network device is described as a VTEP device in this document. One or more mounting devices (including a first mounting device and a second mounting device) can be mounted under one VTEP, each mounting device can be mounted under a plurality of VTEPs simultaneously or only one VTEP, and when one mounting device is mounted under only one VTEP, the mounting device is a single mounting device. The mounted device may include multiple types of devices, and the mounted device is described as a Virtual Machine (VM) as an example. The VTEP device may be a VXLAN-enabled hardware device or a device integrated with VXLAN-enabled software, and the VM may run an operating system OS and various applications thereon. Each VTEP device may be regarded as a switch of a virtual subnet (shortly, subnet), so that all VMs in the subnet corresponding to each VTEP device may communicate with VMs outside the subnet through the VTEP device.

It should be noted that, in the network device communication method provided by the present invention, if the same M-LAG network device performs communication, the network device that is to send a data packet is referred to as a source network device, and the network device that receives the data packet is referred to as an opposite-end network device, and for the network devices in the same M-LAG, the network devices may be used as both the source network device and the opposite-end network device.

The first embodiment,

Referring to fig. 2, fig. 2 is a flowchart illustrating a network device communication method according to an embodiment of the present invention. The embodiment is applied to a source network device side, and the method includes:

s11, receiving a data packet sent by a first mounting device, and judging whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to a cross-device link aggregation group, wherein the first mounting device is a single mounting device.

Specifically, when a first mount device under a source network device needs to communicate with a second mount device under an opposite-end network device through the source network device, a data packet is sent to the source network device, where the data packet carries an opposite-end network device identifier of the opposite-end network device to which the second mount device that needs to receive the data packet belongs. The source end network device searches whether a network device identifier same as the opposite end network identifier exists according to the network device identifier carried in the pre-stored synchronous message, if the same network device identifier is found, then the cross-device link aggregation group number carried in the synchronous message corresponding to the network device identifier is obtained, comparing with the self-stored cross-device link aggregation group number, judging whether the two numbers are the same, if so, determining that the opposite terminal network device to which the second mounting device to send the data packet belongs and the first mounting device belong to the same cross-device link aggregation group, performing the next judgment, if the opposite terminal network device and the second mounting device belong to the same cross-device link aggregation group, determining that the opposite-end network device to which the second mounting device to send the data packet belongs and the second mounting device do not belong to the same cross-device link aggregation group, ending the process of the method, and sending the data packet by adopting a peer-link.

It should be noted that, after the network devices in the same M-LAG normally operate, the network devices send synchronization messages to perform state synchronization, and the synchronization messages may include MAC Address table entries (i.e., physical Address table entries), ARP (Address Resolution Protocol) table entries, cross-device link aggregation group numbers corresponding to the network devices, and the like, and may also include member port states, STP (Spanning Tree Protocol) messages, and VRRP (Virtual Router Redundancy Protocol) messages.

And S12, if the opposite-end network device corresponding to the opposite-end network device identifier carried in the data packet belongs to the cross-device link aggregation group, determining whether the second mounted device under the opposite-end network device is a single mounted device.

Specifically, the source network device further determines to obtain a synchronization packet corresponding to the identifier of the peer network device in the data packet, obtain an MAC address table entry in the synchronization packet, and determine whether the second mount device is a single mount device according to mount information stored in a mount device sub-table of the peer network device in the MAC address table entry. Specifically, mounting information of a second mounting device in the mounting device sub-table entry can be queried, where the mounting information includes network device information mounted by the second mounting device, if the second mounting device is mounted only on an opposite-end network device, it is determined that the second mounting device is a single mounting device, and a next operation can be performed, and if the second mounting device is mounted on a plurality of network devices, it is determined that the second mounting device is a non-single mounting device, and the flow of the method is ended, and a peer-link is used to send a data packet.

And S13, if the second mounting equipment under the opposite-end network equipment is single mounting equipment, stripping the VLAN identification in the data packet so that the opposite-end network equipment receives the data packet through the transmission tunnel and sends the data packet to the second mounting equipment.

Specifically, if it is determined that the second mount device under the peer network device is a single mount device, the source network device strips the VLAN identifier of the packet. Generally, after a source end Network device adds M-LAG for aggregation, based on a mechanism of M-LAG, if a mount device (e.g., a first mount device) under the source end Network device sends a data packet to the source end Network device, the source end Network device performs VXLAN encapsulation on the data packet, that is, adds a Virtual Local Area Network (VLAN) identifier to the data packet, so that after the peer-link identifies the VLAN identifier of the data packet, the peer-link sends the data packet to an opposite end Network device through the peer-link, and after the opposite end Network device decapsulates the data packet, the opposite end Network device sends the data packet to a second mount device. In this step, since the VLAN tag of the packet is stripped, if the peer-link recognizes that there is no VLAN tag in the packet, the packet is not sent through the peer-link. In the subsequent steps, after the source end network device establishes a transmission tunnel (i.e., a VXLAN tunnel) with the opposite end network device, the source end network device can directly send the data packet with the VLAN identifier stripped through the transmission tunnel to the opposite end network device. In the M-LAG, two single mount devices (e.g., a first mount device and a second mount device) communicate with each other, network devices (e.g., a source network device and a peer network device) to which the two single mount devices belong respectively can communicate directly through a transmission tunnel without using a peer-link, and the complexity of communicating through the transmission tunnel is lower than that of communicating using the peer-link, so that waste of link resources and processing capacity of the network devices (e.g., the source network device and the peer network device) can be avoided.

Example II,

Referring to fig. 3, fig. 3 is a flowchart illustrating a network device communication method according to another embodiment of the present invention. The embodiment is applied to a source network device side, and the method includes:

s01, sending a first Hello message carrying the first cross-device link aggregation group number to the opposite terminal network device, receiving a second Hello message carrying the second cross-device link aggregation group number sent by the opposite terminal network, and pairing with the opposite terminal network device according to the first Hello message and the second Hello message.

In some examples, step S01 may include multiple sub-steps:

the first substep: after the source end network device and the opposite end network device in the cross-device link aggregation mode are configured, the source end network device sends a first Hello message to the opposite end network device through a peer-link, and receives a second Hello message sent by the opposite end network device to the source end network device.

The first Hello packet carries a first cross-device link aggregation group number of an M-LAG to which the source end network device belongs, and the second Hello packet carries a second cross-device link aggregation group number of an M-LAG to which the opposite end network device belongs.

And a second substep: and judging whether the first cross-device link aggregation group number is the same as the second cross-device link aggregation group number, and if so, determining that the M-LAG pairing of the source end network device and the opposite end network device is successful.

S02, sending a first device information message of the source end network device to the opposite end network device, receiving a second device information message of the opposite end network device, and negotiating the active/standby state of the network device with the opposite end network device according to the first device information message and the second device information message.

In some examples, step S02 may include multiple sub-steps:

the first substep: the source end network device sends a first device information message of the source end network device to the opposite end network device, and receives a second device information message of the opposite end network device sent by the opposite end network device.

The first device information packet carries an M-LAG priority and a local MAC address of the source-end network device, and the second device information packet carries an M-LAG priority and a local MAC address of the opposite-end network device.

And a second substep: and the source end network equipment determines that the source end network equipment is the main equipment or the standby equipment according to the M-LAG priority and the local MAC address of the opposite end network equipment in the second equipment information.

Specifically, if the cross-device link aggregation group is successfully paired, the source end network device and the opposite end network device may send their own device information packets to each other, and the source end network device and the opposite end network device determine the active/standby state of the cross-device link aggregation group according to the M-LAG priority and the local MAC address carried in the device information packets, thereby determining that they are themselves the master device or the slave device. Taking the source end network device as an example, when the source end network device receives a second device information packet sent by the opposite end network device, the source end network device may check and record the opposite end network device information, then compare the M-LAG priority of the opposite end network device with the M-LAG priority of the source end network device, if the M-LAG priority of the opposite end network device is higher than the M-LAG priority of the source end network device, determine that the opposite end network device is a master device, the source end network device is a slave device, and vice versa. And if the M-LAG priorities of the opposite terminal network device and the source terminal network device are the same, comparing the MAC addresses of the opposite terminal network device and the source terminal network device, and determining that one terminal with a small MAC address or a large MAC address is a main device.

In some examples, step S02 may further include the following sub-steps:

and a third substep: sending a first information message of a source end network device to an opposite end network device, receiving a second information message of the opposite end network device, and negotiating the active/standby state of a member port with the opposite end network device according to the first information message and the second information message.

The first information packet carries configuration information of a member port of the source end network device, and the second information packet carries configuration information of a member port of the opposite end network device.

Specifically, after the source end network device and the peer end network device determine the active/standby states of their own network devices, the source end network device and the peer end network device may send information packets to each other through a peer-link to synchronize member port information, where the information packets carry configuration information of their respective member ports, and after the member port information synchronization is completed, determine the active/standby states of the member ports.

S03, according to a preset period, sending a first dual master detection message to the opposite terminal network equipment, receiving a second dual master detection message sent by the opposite terminal network equipment according to the preset period, and performing dual master detection according to the first dual master detection message and the second dual master detection message.

Specifically, the source end network device and the peer end network device may send the dual primary detection packet according to a preset period through the dual primary detection link, where the preset period may be set as needed, for example, the preset period may be 15 s. And once the source end network device and the opposite end network device sense the peer-link fault, three dual-primary detection link packets are mutually sent according to a fault preset period to accelerate the detection, where the fault preset period may be set as required, for example, the fault preset period may be 100 ms. When the source end network device can normally receive the second dual-master detection packet and the opposite end network device can normally receive the first dual-master detection packet, the dual-active system formed by the source end network device and the opposite end network device starts to work normally.

Step S203 is an optional step, and in some embodiments, step S203 may also be omitted.

S04, sending the first synchronization packet of the source end network device to the peer end network device, and receiving the second synchronization packet sent by the peer end network device.

Specifically, after the dual active system works normally, the source network device and the peer network device send a synchronization packet through a peer-link to synchronize state information of the peer in real time. The first synchronization message may include an MAC address table entry of the source network device, an ARP table entry, a first cross-device link aggregation group number corresponding to the source network device, and the like, and may further include a member port state, an STP packet, and a VRRP packet. The second synchronization message may include an MAC address table entry, an ARP table entry, a second cross-device link aggregation group number corresponding to the peer network device, and the like for the network device, and may further include a member port state, an STP message, and a VRRP message.

S05, receiving a data packet sent by a first mounting device, and judging whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to a cross-device link aggregation group, wherein the first mounting device is a single mounting device.

Specifically, when a first mount device under a source network device needs to communicate with a second mount device under an opposite-end network device through the source network device, a data packet is sent to the source network device, where the data packet carries an opposite-end network device identifier of the opposite-end network device to which the second mount device that needs to receive the data packet belongs. The source end network device searches whether a network device identifier same as the opposite end network identifier exists according to the network device identifier carried in the pre-stored synchronous message, if the same network device identifier is found, then the cross-device link aggregation group number carried in the synchronous message corresponding to the network device identifier is obtained, comparing with the self-stored cross-device link aggregation group number, judging whether the two numbers are the same, if so, determining that the opposite terminal network device to which the second mounting device to send the data packet belongs and the first mounting device belong to the same cross-device link aggregation group, performing the next judgment, if the opposite terminal network device and the second mounting device belong to the same cross-device link aggregation group, determining that the opposite-end network device to which the second mounting device to send the data packet belongs and the second mounting device do not belong to the same cross-device link aggregation group, ending the process of the method, and sending the data packet by adopting a peer-link.

S06, obtaining the physical address table item of the opposite terminal network device carried in the pre-stored synchronous message.

Specifically, the source network device synchronizes the real-time transmission of the synchronization packet after forming an M-LAG with the peer network device and working normally. The source end network device stores a synchronization packet (i.e. the second synchronization packet) sent by the opposite end network device, where the synchronization packet includes an MAC address table entry of the opposite end network device, and the source end network device obtains the MAC address table entry to perform further determination.

S07, determining whether the second mounting device is a single mounting device according to the mounting information in the mounting device sub-table of the opposite terminal network device stored in the physical address table.

Specifically, the MAC address table entry in the synchronization message of the peer network device may include a plurality of sub-table entries, for example, a mount device sub-table entry of the peer network device, where the mount device sub-table entry records mount information and egress interface information of each mount device. And searching mounting information corresponding to the second mounting equipment from the mounting equipment sub-table, wherein the mounting information comprises network equipment information mounted by the second mounting equipment, if the second mounting equipment is only mounted under opposite-end network equipment, the second mounting equipment is determined to be single mounting equipment, the next operation can be carried out, if the second mounting equipment is mounted under a plurality of network equipment, the second mounting equipment is determined to be non-single mounting equipment, the process of the method is ended, and a peer-link is adopted to send the data packet.

Step S06 and step S07 are specific steps of one implementation manner of step S12, and step S12 may also be implemented in other manners, which is not limited herein.

And S08, judging whether the output interface of the second mounting equipment is a peer-link.

In some examples, S08 includes multiple sub-steps:

the first substep: and acquiring a physical address table item of the opposite terminal network equipment carried in the pre-stored synchronous message.

Specifically, the source network device synchronizes the real-time transmission of the synchronization packet after forming an M-LAG with the peer network device and working normally. The source end network device stores a synchronization packet (i.e. the second synchronization packet) sent by the opposite end network device, where the synchronization packet includes an MAC address table entry of the opposite end network device, and the source end network device obtains the MAC address table entry to perform further determination.

And a second substep: and determining whether the output interface of the second mounting equipment is a peer-link or not according to the output interface information in the mounting equipment sub-table of the opposite-end network equipment stored in the physical address table.

Specifically, the MAC address table entry in the synchronization message of the peer network device may include a plurality of sub-table entries, for example, a mount device sub-table entry of the peer network device, where the mount device sub-table entry records mount information and egress interface information of each mount device. And searching the outlet interface information corresponding to the second mounting equipment from the mounting equipment sub-table, if the outlet interface of the second mounting equipment is a peer-link, performing the next operation, and if the outlet interface of the second mounting equipment is a transmission link other than the peer-link, ending the process of the method and not performing the operation.

And S09, if the output interface of the second mounting equipment is a peer-link, stripping the VLAN identification in the data packet.

Specifically, if it is determined that the second mount device under the peer network device is a single mount device and the output interface of the second mount device is a peer-link, the source network device strips the VLAN identifier of the data packet. Generally, after a source end network device joins an M-LAG for aggregation, based on a mechanism of the M-LAG, if a mount device (e.g., a first mount device) under the source end network device sends a data packet to the source end network device, the source end network device performs VXLAN encapsulation on the data packet, that is, adds a VLAN identifier to the data packet, so that after the peer-link identifies the VLAN identifier of the data packet, the peer-link sends the data packet to an opposite end network device, and after the opposite end network device decapsulates the data packet, the opposite end network device sends the data packet to a second mount device. In this step, since the VLAN tag of the packet is stripped, if the peer-link recognizes that there is no VLAN tag in the packet, the packet is not sent through the peer-link.

Step S08 and step S09 are specific steps of one implementation manner of step S13, and step S13 may also be implemented in other manners, which is not limited herein.

And S010, establishing a transmission tunnel with the opposite terminal network equipment.

Specifically, after the source network device and the peer network device establish a transmission tunnel (i.e., a VXLAN tunnel), the data packet with the VLAN identifier stripped can be sent to the peer network device through the transmission tunnel, and the peer network device can directly forward the data packet to the second mount device.

Wherein S010 comprises a plurality of sub-steps:

the first substep: and sending a neighbor establishing request to the opposite-end network equipment.

Specifically, in order to exchange routing information to establish a transmission tunnel, the source network device and the peer network device need to establish a BGP EVPN neighbor with each other, and the source network device sends a neighbor establishment request to the peer network device to request establishment of the BGP EVPN neighbor.

And a second substep: and responding to the receiving and establishing neighbor message returned by the opposite terminal network equipment, and establishing a Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) neighbor with the opposite terminal network equipment by adopting a network address different from that of the opposite terminal network equipment.

Specifically, after receiving a neighbor establishment request sent by a source end network device, an opposite end network device returns a message of receiving neighbor establishment to the source end network device, and the source end network device adopts an actual IP address of itself different from that of the opposite end network device as a BGP peer address to establish a BGP EVPN neighbor with the opposite end network device. And the opposite terminal network device also adopts the self actual IP address different from the source terminal network device as the BGP peer address to establish a BGP EVPN neighbor with the source terminal network device.

And a third substep: and sending a first type3 type route to the opposite network equipment so that the opposite network equipment establishes a transmission tunnel according to the first type3 type route, wherein the private mobile subscriber identity PMSI attribute of the first type3 type route comprises a first cross-equipment link aggregation group number.

The first Type3 Type route includes an IP address of the source network device, the IP address is set as a virtual IP address, and the first Type3 Type route is an Inclusive Multicast route (integrated Multicast route) which is used to establish a transport tunnel. The first Type3 Type route may include an RD value, a VLAN ID, an IP address of the source network device, an IP address mask length of the source network device, a two-layer VNI, and so on. After receiving the first Type3 Type route, the opposite end network device establishes a transmission tunnel (namely VXLAN tunnel) with the source end network device according to the IP address in the first Type3 Type route. In addition, in the method provided by the present invention, an attribute is added to a PMSI (private mobile subscriber identity) attribute of a first Type3 Type route, where the attribute includes a first cross-device link aggregation group number to which the source network device belongs, so that the peer network device can identify, through the first cross-device link aggregation group number, whether the source network device and the peer network device belong to the same cross-device link aggregation group.

And a fourth substep: and receiving a second type3 type route sent by the opposite end network device, and establishing a transmission tunnel according to the second type3 type route, wherein the PMSI attribute of the second type3 type route comprises a second cross-device link aggregation group number.

Wherein, the second Type3 Type route includes the IP address of the opposite terminal network device, and the IP address is set as the virtual IP address. A second Type3 Type route, an Inclusive Multicast route (integrated Multicast route), is used to establish the transport tunnel. The second Type3 Type route may include an RD value, a VLAN ID, an IP address of the correspondent network device, an IP address mask length of the correspondent network device, a layer two VNI, and the like. After receiving the second Type3 Type route, the source end network device establishes a transmission tunnel (namely VXLAN tunnel) with the opposite end network device according to the IP address in the second Type3 Type route. In addition, in the method provided by the present invention, an attribute is added to the PMSI attribute of the second Type3 Type route, where the attribute includes a second cross-device link aggregation group number to which the opposite end network device belongs, so that the source end network device can identify whether the opposite end network device and the source end network device belong to the same cross-device link aggregation group through the second cross-device link aggregation group number.

It should be noted that the transmission tunnel established by the source network device and the transmission tunnel established by the peer network device are logically the same transmission tunnel.

After the source end network device and the opposite end network device synchronize Type3 routes, the source end network device and the opposite end network device can also send Type2 routes of themselves to each other, and the Type2 routes, namely MAC/IP routes, are used for notifying the MAC address, the host ARP and the host route information of the network device (the source end network device or the opposite end network device). Type2 Type routes include: the routing RD value, the identification ESI connected with the opposite end, the VLAN ID, the length of the host MAC address, the mask length of the host IP address, the two-layer VNI, the three-layer VNI and the like.

After the transmission tunnel is established, the source network device may directly send the data packet with the VLAN identifier stripped through the transmission tunnel to the peer network device. In the M-LAG, two single mount devices (e.g., a first mount device and a second mount device) communicate with each other, network devices (e.g., a source network device and a peer network device) to which the two single mount devices belong respectively can communicate directly through a transmission tunnel without using a peer-link, and the complexity of communicating through the transmission tunnel is lower than that of communicating using the peer-link, so that waste of link resources and processing capacity of the network devices (e.g., the source network device and the peer network device) can be avoided.

In some examples, if a network device not belonging to the M-LAG is to communicate with a network device in the M-LAG, the following steps may be included:

step one, establishing BGP EVPN neighbors with each network device in the M-LAG.

Network devices not belonging to the M-LAG are referred to as out-of-group network devices, and it is assumed that the M-LAG includes a source network device and a peer network device. The method comprises the steps that a group external network device sends a neighbor establishment request to a source end network device and an opposite end network device, receives return receiving neighbor establishment messages returned by the source end network device and the opposite end network device respectively, and establishes BGP EVPN neighbors with the source end network device and the opposite end network device.

And step two, synchronizing the routing information with each network device in the M-LAG.

The source end network device sends the Type2 Type route of the source end network device to the external network device, synchronizes the Type2 Type routes such as an MAC address and a host ARP with the external network device, and learns that the opposite end network device and the source end network device belong to the same M-LAG according to the pre-acquired second cross-device link aggregation group number in the second Type3 Type route of the opposite end network device, so that the Type2 Type route does not need to be sent to the opposite end network device which is a BGP EVPN neighbor. Similarly, the opposite-end network device sends the Type2 Type route of the opposite-end network device to the external network device, synchronizes the Type2 Type routes such as the MAC address and the host ARP with the external network device, and learns that the source-end network device and the opposite-end network device belong to the same M-LAG according to the first cross-device link aggregation group number in the first Type3 Type route of the source-end network device, which is obtained in advance, so that the Type2 Type route does not need to be sent to the source-end network device which is a BGP EVPN neighbor. After completing the synchronization of the routing information, the extragroup network device may communicate with the network device in the M-LAG through the peer-link, that is, in the method provided in this embodiment, the single-hanging devices under the network devices belonging to the same M-LAG may communicate with each other through the transmission tunnel without passing through the peer-link, and the extragroup network device not belonging to the M-LAG may communicate with the network device in the M-LAG through the peer-link.

Example III,

Referring to fig. 4, fig. 4 is a flowchart illustrating a network device communication method according to another embodiment of the present invention. The embodiment is applied to an opposite terminal network device side, and the method comprises the following steps:

and S21, receiving the data packet sent by the source end network device through the transmission tunnel, and sending the data packet to the second mounting device. The data packet is a data packet sent by the source network device after being processed according to the method.

Specifically, after cross-device link aggregation is performed on a source end network device and an opposite end network device, when a first mount device under the source end network device needs to communicate with a second mount device under the opposite end network device through the source end network device, a data packet is sent to the source end network device, where the data packet carries an opposite end network device identifier of the opposite end network device to which the second mount device that needs to receive the data packet belongs. The source end network device judges whether the opposite end network device and the source end network device belong to the same M-LAG according to the opposite end network device identification, if so, further judges whether a second mounting device under the opposite end network device is a single mounting device, if so, further judges whether an output interface of the second mounting device is a peer-link, if the output interface of the second mounting device is the peer-link, the source end network device strips the VLAN identification of the data packet, so that the data packet is not sent to the opposite end network device through the peer-link, but the data packet is sent to the opposite end network device through a transmission tunnel established between the source end network device and the opposite end network device, the opposite end network device receives the data packet sent by the source end network device through the transmission tunnel and then sends the data packet to the second mounting device, to enable communication between a first mounted device that is a single mounted device and a second mounted device that is a single mounted device.

In some examples, referring to fig. 5, before S21, the method further comprises:

s100, establishing a transmission tunnel with the source terminal network device.

Specifically, after the source network device and the peer network device establish a transmission tunnel (i.e., a VXLAN tunnel), the data packet with the VLAN identifier stripped can be sent to the peer network device through the transmission tunnel, and the peer network device can directly forward the data packet to the second mount device.

Wherein S100 comprises a plurality of substeps:

the first substep: and receiving a neighbor establishing request sent by the source end network equipment.

Specifically, in order to exchange routing information to establish a transmission tunnel, a source end network device and an opposite end network device need to establish a BGP EVPN neighbor with each other, the source end network device sends a neighbor establishment request to the opposite end network device to request establishment of the BGP EVPN neighbor, and the opposite end network device receives the neighbor establishment request.

And a second substep: responding to the neighbor establishing request, sending a neighbor establishing receiving message to the source end network device, and enabling the source end network device to establish a border gateway protocol BGP Ethernet virtual private network EVPN neighbor with the opposite end network device by adopting a network address different from that of the opposite end network device.

Specifically, after receiving a neighbor establishment request sent by a source end network device, an opposite end network device returns a message of receiving neighbor establishment to the source end network device, and the opposite end network device also adopts an actual IP address of itself different from that of the source end network device as a BGP peer address to establish a BGP EVPN neighbor with the source end network device. And the source end network device adopts the actual IP address of the source end network device different from the opposite end network device as the BGP peer address, and establishes a BGP EVPN neighbor with the opposite end network device.

And a third substep: and receiving a first type3 type route sent by the source network equipment, and establishing a transmission tunnel according to the first type3 type route, wherein the private mobile subscriber identity PMSI attribute of the first type3 type route comprises a first cross-equipment link aggregation group number.

The first Type3 Type route includes an IP address of the source network device, the IP address is set as a virtual IP address, and the first Type3 Type route is an Inclusive Multicast route (integrated Multicast route) which is used to establish a transport tunnel. The first Type3 Type route may include an RD value, a VLAN ID, an IP address of the source network device, an IP address mask length of the source network device, a two-layer VNI, and so on. After receiving the first Type3 Type route, the opposite end network device establishes a transmission tunnel (namely VXLAN tunnel) with the source end network device according to the IP address in the first Type3 Type route. In addition, in the method provided by the present invention, an attribute is added to a PMSI (private mobile subscriber identity) attribute of a first Type3 Type route, where the attribute includes a first cross-device link aggregation group number to which the source network device belongs, so that the peer network device can identify, through the first cross-device link aggregation group number, whether the source network device and the peer network device belong to the same cross-device link aggregation group.

And a fourth substep: and sending a second type3 type route to the source network equipment, so that the source network equipment establishes a transmission tunnel according to the second type3 type route, wherein the PMSI attribute of the second type3 type route comprises a second cross-device link aggregation group number.

Wherein, the second Type3 Type route includes the IP address of the opposite terminal network device, and the IP address is set as the virtual IP address. A second Type3 Type route, an Inclusive Multicast route (integrated Multicast route), is used to establish the transport tunnel. The second Type3 Type route may include an RD value, a VLAN ID, an IP address of the correspondent network device, an IP address mask length of the correspondent network device, a layer two VNI, and the like. After receiving the second Type3 Type route, the source end network device establishes a transmission tunnel (namely VXLAN tunnel) with the opposite end network device according to the IP address in the second Type3 Type route. In addition, in the method provided by the present invention, an attribute is added to the PMSI attribute of the second Type3 Type route, where the attribute includes a second cross-device link aggregation group number to which the opposite end network device belongs, so that the source end network device can identify whether the opposite end network device and the source end network device belong to the same cross-device link aggregation group through the second cross-device link aggregation group number.

It should be noted that the transmission tunnel established by the source network device and the transmission tunnel established by the peer network device are logically the same tunnel.

After the source end network device and the opposite end network device synchronize Type3 routes, the source end network device and the opposite end network device can also send Type2 routes of themselves to each other, and the Type2 routes, namely MAC/IP routes, are used for notifying the MAC address, the host ARP and the host route information of the network device (the source end network device or the opposite end network device). Type2 Type routes include: the routing RD value, the identification ESI connected with the opposite end, the VLAN ID, the length of the host MAC address, the mask length of the host IP address, the two-layer VNI, the three-layer VNI and the like.

After the transmission tunnel is established, the source network device may directly send the data packet with the VLAN identifier stripped through the transmission tunnel to the peer network device. In the M-LAG, two single mount devices (e.g., a first mount device and a second mount device) communicate with each other, network devices (e.g., a source network device and a peer network device) to which the two single mount devices belong respectively can communicate directly through a transmission tunnel without using a peer-link, and the complexity of communicating through the transmission tunnel is lower than that of communicating using the peer-link, so that waste of link resources and processing capacity of the network devices (e.g., the source network device and the peer network device) can be avoided.

Example four,

The present invention provides a network device communication apparatus, referring to fig. 6, the apparatus includes:

a first determining unit 101, configured to receive a data packet sent by a first mount device, and determine whether an opposite-end network device corresponding to an opposite-end network device identifier carried in the data packet belongs to a cross-device link aggregation group, where the first mount device is a single mount device.

A second determining unit 102, configured to determine, if the second mounted device under the peer network device is a single mounted device.

And the identifier processing unit 103 is configured to strip the VLAN identifier in the data packet if the identifier is positive, so that the peer network device receives the data packet through the transmission tunnel and sends the data packet to the second mount device.

The network device communication apparatus provided in the embodiment of the present invention determines, when two network devices communicate with each other, whether an opposite-end network device that is to send a data packet belongs to a cross-device link aggregation group, and if so, further determines whether a second mount device under the opposite-end network device is a single mount device, and if so, peels off a VLAN identifier in the data packet, so that the data packet is not sent to the opposite-end network device through a peer-link of the cross-device link aggregation group, but is transmitted using a transmission tunnel established by a source-end network device and the opposite-end network device, thereby avoiding wasting link resources and processing capabilities of the network devices (including the source-end network device and the opposite-end network device).

Example V,

The present invention provides a network device communication apparatus, referring to fig. 7, the apparatus includes:

a transceiving unit 201, configured to receive the data packet sent by the source network device through the transmission tunnel, and send the data packet to the second mount device. The data packet is a data packet sent by the source end network device after being processed according to the method.

The network device communication apparatus provided in the embodiment of the present invention determines, when two network devices communicate with each other, whether an opposite-end network device that is to send a data packet belongs to a cross-device link aggregation group, and if so, further determines whether a second mount device under the opposite-end network device is a single mount device, and if so, peels off a VLAN identifier in the data packet, so that the data packet is not sent to the opposite-end network device through a peer-link of the cross-device link aggregation group, but is transmitted using a transmission tunnel established by a source-end network device and the opposite-end network device, thereby avoiding wasting link resources and processing capabilities of the network devices (including the source-end network device and the opposite-end network device).

Example six,

The present invention provides an electronic device, including:

at least one processor. And

a memory communicatively coupled to the at least one processor. Wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the network device communication method described above.

In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.

Referring to fig. 8, fig. 8 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.

As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.

A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc. An output unit 807 such as various types of displays, speakers, and the like. A storage unit 808 such as a magnetic disk, optical disk, or the like. And a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.

Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The computing unit 801 executes the respective methods and processes described above, such as the network device communication method. For example, in some embodiments, the network device communication method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When loaded into RAM 803 and executed by computing unit 801, may perform one or more of the steps of the network device communication methods described above. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the network device communication method by any other suitable means (e.g., by way of firmware).

Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

Example seven,

The present invention provides a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to execute the method according to the above.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user. And a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with the user. For example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback). And input from the user may be received in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.

It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.

It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种内容分享的方法、装置及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!