WO2015067157A1 - Virtual local area network interface processing method and network device - Google Patents

Virtual local area network interface processing method and network device Download PDF

Info

Publication number
WO2015067157A1
WO2015067157A1 PCT/CN2014/090205 CN2014090205W WO2015067157A1 WO 2015067157 A1 WO2015067157 A1 WO 2015067157A1 CN 2014090205 W CN2014090205 W CN 2014090205W WO 2015067157 A1 WO2015067157 A1 WO 2015067157A1
Authority
WO
WIPO (PCT)
Prior art keywords
identifier
local area
area network
virtual local
intersection
Prior art date
Application number
PCT/CN2014/090205
Other languages
French (fr)
Chinese (zh)
Inventor
唐小虎
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015067157A1 publication Critical patent/WO2015067157A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0272Virtual private networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a method and a network device for processing a virtual local area network interface.
  • the virtual local area network (English: virtual local area network, or VLAN) is used to divide the broadcast domain and control the traffic broadcast. In order to enable the network device to work normally through the VLAN, it usually takes at least two steps: creating a VLAN; .
  • the invention provides a processing method and a network device of a virtual local area network interface.
  • a first aspect of the present invention provides a method for processing a virtual local area network interface, including:
  • the second device fixes the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, where the identifier intersection is an identifier set of the virtual local area network included in the first notification message, and the first The intersection between the set of identities of the virtual local area network that the second device has created.
  • the second device where the interface of the second device is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection, includes:
  • the second device performs, according to the identifier intersection, a virtual local area network with an interface fixed to the second device Processing, including the following:
  • the second device sends an alert message
  • the second device configures a virtual local area network fixed to the interface of the second device according to the identifier included in the identifier intersection, and the second device sends an alert message.
  • the second device is configured to perform an interface to the second device according to the identifier included in the identifier intersection
  • Fixed virtual LAN configuration including:
  • the second device configures the virtual local area network fixed by the interface of the second device to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
  • the second device reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
  • the method further includes:
  • the second device generates a second notification message, where the second notification message includes an identifier set of the virtual local area network that the second device has created, where the second device periodically generates the second notification message. Or the second device generates the second notification message when the created virtual local area network changes; wherein the generating the second notification message exceeds a preset duration, where the preset duration is Determining, by the second device, a difference between a current time and a sending time of the previous notification message;
  • the second device sends the second notification message to the first device.
  • a second aspect of the present invention provides a network device, including:
  • a receiving module configured to receive a first notification message that is sent by the first device, where the notification message includes an identifier set of the virtual local area network that the first device has created;
  • a fixed module configured to fix the interface to the virtual local area network corresponding to the identifier included in the identifier intersection, wherein the identifier intersection is an identifier set of the virtual local area network included in the first notification message and an identifier of the created virtual local area network The intersection between the collections.
  • the fixed module is specifically configured to:
  • the fixed module is specifically used in the following manner:
  • the fixed module is specifically configured to:
  • the virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
  • the method further includes:
  • a generating module configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, occurs in the created virtual local area network
  • the second notification message is generated, wherein the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message.
  • a sending module configured to send the notification message to the first device.
  • a third aspect of the present invention provides a network device, including:
  • a processor, an interface circuit, a memory and a bus, the processor, the interface circuit and the memory are connected by a bus and complete communication with each other.
  • the bus can be an industry standard architecture bus, an external device interconnect bus, or an extended industry standard architecture bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like.
  • the memory is for storing executable program code, the program code including computer operating instructions.
  • the memory may include a high speed random access memory and may also include a non-volatile memory such as at least one disk storage.
  • the processor can be a central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the processing method of the virtual local area network interface provided by the embodiment of the present invention is executed by the processor, and the method includes:
  • the interface is fixed to a virtual local area network corresponding to the identifier included in the identifier intersection.
  • the interface is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection, and includes:
  • processing the virtual local area network fixed by the interface according to the identifier intersection including:
  • configuring the virtual local area network with the interface fixed according to the identifier included in the identifier intersection including:
  • the virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
  • generating a notification message including:
  • the notification message is generated when the created virtual local area network changes.
  • the notification message is generated, including:
  • the notification message is generated if the preset duration is exceeded.
  • the identifier of the virtual local area network that the first device has created is notified by the first device, and the identifier of the virtual local area network created by the first device is intersected with the identifier of the virtual local area network created by the first device.
  • the second device can then fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, whereby the interface of the second device and the interface of the first device can be accurately fixed
  • the intersection of the virtual local area network created by the device, the second device may also notify the first device of the identifier of the virtual local area network created by the device, and the first device may take the virtual local area network identifier created by the second device and the identifier of the virtual local area network created by the second device.
  • the first device can fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, thereby solving the inaccuracy of the virtual local area network fixed by the interface between the two devices.
  • the problem is that communication is impossible.
  • Embodiment 1 is a flowchart of Embodiment 1 of a method for processing a virtual local area network interface according to the present invention
  • Embodiment 1 of a network device according to the present invention is a schematic structural diagram of Embodiment 1 of a network device according to the present invention.
  • Embodiment 2 of a network device according to the present invention is a schematic structural diagram of Embodiment 2 of a network device according to the present invention.
  • FIG. 4 is a schematic structural diagram of Embodiment 2 of a network device according to the present invention.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for processing a virtual local area network interface according to the present invention. As shown in FIG. 1 , the method in this embodiment may include:
  • Step 101 The second device receives, by using an interface of the second device, a first notification message that is sent by the first device, where the first notification message includes a set of identifiers of the virtual local area network that the first device has created.
  • Step 102 The second device fixes the interface of the second device to a virtual local area network corresponding to the identifier of the identifier intersection, where the identifier intersection is an identifier of the virtual local area network included in the first notification message. An intersection between the set of identifiers of the virtual local area networks created by the second device.
  • the first device creation (English: create) virtual local area network means that the administrator creates the virtual local area network on the device by creating an instruction; the interface of the second device is fixed (English: fix) to the identification intersection.
  • the VLAN corresponding to the identifier is configured by the administrator to add the interface of the device to the VLAN corresponding to the identifier included in the identifier intersection; wherein the identifier is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection
  • the interface of the second device is an interface that receives the first notification message sent by the first device.
  • the first notification message includes a set of identifiers of all virtual local area networks that the first device has created.
  • the first device may be referred to as device A and the second device may be referred to as device B.
  • the device A has created four VLANs.
  • the identifiers of the four VLANs are, for example, ⁇ 101-200, 301-400, 601-700, and 801-900 ⁇ .
  • the device B has created five VLANs and five VLANs.
  • the set is, for example, ⁇ 201-300, 301-400, 601-700, 701-800, 801-900 ⁇ .
  • the device A may send a notification message to the device B, where the notification message may include a VLAN identifier set ⁇ 101-200, 301-400, 601-700, 801-900 ⁇ , and after receiving the notification message sent by the device A, the device B It can be known that device A has created VLANs with the identifiers 101-200, 301-400, 601-700, and 801-900. Then, device B can determine the identification set of the VLANs that device A has created ⁇ 101-200, 301.
  • the device B can accurately know that it creates a VLAN with the identifiers of 301-400, 601-700, and 801-900 together with the device A. Therefore, the device B can connect it.
  • the port is fixed in the VLAN corresponding to the identifier intersection ⁇ 301-400, 601-700, 801-900 ⁇ , so that communication can be performed in the VLAN corresponding to the device A in the identification intersection ⁇ 301-400, 601-700, 801-900 ⁇ . .
  • device B can also send a notification message to device A, which can include a VLAN identifier set ⁇ 201-300, 301-400, 601-700, 701-800, 801-900 ⁇ , and device A receives After the notification message sent by the device B, it can be known that the device B has created the VLANs of the identifiers 201-300, 301-400, 601-700, 701-800, and 801-900; then, the device A can determine that the device B has The identified set of VLANs ⁇ 201-300, 301-400, 601-700, 701-800, 801-900 ⁇ and the set of VLAN IDs created by device A itself ⁇ 101-200, 301-400, 601-700, The intersection of the logos of 801-900 ⁇ , the intersection of the logos is also ⁇ 301-400, 601-700, 801-900 ⁇ .
  • device A can include a VLAN identifier set ⁇ 201-300, 301-400, 601-700, 70
  • the device A can accurately know that it creates a VLAN with the identifiers of 301-400, 601-700, and 801-900 together with the device B. Therefore, the device A can fix its interface to the identity intersection ⁇ 301-400, 601. -700, 801-900 ⁇ in the corresponding VLAN, so that it can communicate with the device B in the VLAN corresponding to the identification intersection ⁇ 301-400, 601-700, 801-900 ⁇ .
  • the interfaces of device A and device B can accurately fix the intersection of the virtual local area networks created by the two devices, so that reliable communication can be performed between device A and device B.
  • the second device fixes the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, which may be specifically:
  • the second device determines whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface of the second device is fixed, and if not, the interface of the second device is fixed according to the identifier intersection.
  • the virtual LAN is processed.
  • the second device processes the virtual local area network fixed by the interface of the second device according to the identifier intersection, and may be implemented in three manners:
  • Manner 1 The second device configures the virtual local area network fixed by the interface of the second device according to the identifier included in the identifier intersection;
  • the second device configures the virtual local area network fixed by the interface of the second device to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection; or
  • the second device reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
  • the second device may be referred to as device B, and the VLAN ID of the interface of the device B is fixed, for example, 201-300, 301-400, 701-800, and 901-1000, and the identifier included in the identifier intersection is, for example, ⁇ 301-400, 601-700, 801-900 ⁇ , determined by device B, the interface of the device B has a fixed VLAN ID and identifier intersection The included identifiers are inconsistent. Then, the interface of the device B is corrected according to the identifier included in the identifier intersection, and the VLAN identifiers fixed by the interface of the modified device B are 301-400, 601-700, and 801-900, and the intersection with the identifier is Consistent.
  • the VLAN ID of the interface of the device B is fixed, for example, 201-300, 301-400, 701-800, and 901-1000
  • the identifier included in the identifier intersection is, for example, ⁇ 301-400, 601-700
  • the identifiers 201-300, 701-800, and 901-1000 that do not belong to the identifier intersection ⁇ 301-400, 601-700, and 801-900 ⁇ are deleted in the VLAN in which the interface of the second device is fixed, and the modified processing is performed.
  • the VLAN ID fixed on the interface of device B is 301-400.
  • Manner 2 The second device sends an alert message, so that the administrator manually corrects the virtual local area network corresponding to the identifier included in the identifier intersection according to the alarm prompt information to the virtual local area network corresponding to the identifier of the second device. .
  • Manner 3 The second device configures a virtual local area network fixed to the interface of the second device according to the identifier included in the identifier intersection, and the second device sends an alert message.
  • the identifier of the virtual local area network that the first device has created is notified by the first device, and the identifier of the virtual local area network created by the first device is intersected with the identifier of the virtual local area network created by the first device.
  • the second device can fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, whereby the interface of the second device and the interface of the first device can be accurately fixed.
  • the second device may also notify the first device of the identifier of the virtual local area network created by the second device, and the first device may identify the virtual local area network created by the second device and the identifier of the virtual local area network created by the second device.
  • the intersection is obtained, and the identifier intersection is obtained.
  • the first device can fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, thereby solving the virtual local area network fixed by the interface between the two devices. Accurate and unable to communicate problems.
  • the second device generates a second notification message, where the second notification message includes an identifier set of the virtual local area network that the second device has created, where the second device periodically generates the second notification message. Or the second device generates the second notification message when the created virtual local area network changes; wherein the generating the second notification message exceeds a preset duration, where the preset duration is Determining, by the second device, a difference between a current time and a sending time of the previous notification message;
  • the second device sends the second notification message to the first device.
  • the first device generates the notification message in two ways:
  • Manner 1 The first device periodically generates a notification message.
  • a person skilled in the art may preset a sending period of the notification message according to requirements, so that the second device periodically performs interface configuration according to the notification message sent by the first device.
  • Manner 2 The first device generates the notification message when the created virtual local area network changes.
  • the event triggering mode is adopted, that is, when the event that the VLAN changes, the first device can be triggered to generate the notification message.
  • the second method can effectively save the transmission of unnecessary notification messages.
  • the second method may include:
  • the first device determines whether the difference between the current time and the sending time of the previous notification message exceeds a preset duration
  • the sending interval of every two notification messages is too small, the notification message is sent too frequently, which may bring the signaling load of the system. Therefore, the event that the first device changes in the current VLAN occurs.
  • the time may be determined whether the current time and the sending time of the previous notification message have reached a preset time interval. Only when the time interval exceeds the preset time length, the notification message is generated according to the event that the current VLAN changes. Otherwise, Continue to wait for the preset duration to generate a notification message.
  • the second device may generate the notification message periodically and when the created virtual local area network changes, and send the notification message to the first device, so that the first device can identify the virtual local area network created by itself and the second device.
  • the identifier of the virtual local area network created by the device is taken as an intersection, and the intersection of the identifier is obtained, so that the first device fixes the interface of the first device to the virtual local area network corresponding to the identifier included in the identifier intersection, so that the interface of the first device can be made accurate.
  • the intersection of the virtual local area networks created by the two devices is fixed to ensure reliable communication between the first device and the second device.
  • FIG. 2 is a schematic structural diagram of Embodiment 1 of a network device according to the present invention. As shown in FIG. 2, the network device in this embodiment is the second device in the foregoing method embodiment shown in FIG.
  • the receiving module 201 is configured to receive a first notification message that is sent by the first device, where the first notification message includes an identifier set of the virtual local area network that the first device has created;
  • the fixed module 202 is configured to fix the interface to the virtual local area network corresponding to the identifier included in the identifier intersection, where the identifier intersection is an identifier set of the virtual local area network included in the first notification message and the created virtual local area network Identifies the intersection between the collections.
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
  • the fixing module 202 is specifically configured to:
  • the fixing module 202 is specifically configured to:
  • module 202 is specifically configured to:
  • the virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
  • a generating module 203 configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, in the created virtual local area network When the change occurs, the second notification message is generated; wherein the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message;
  • the sending module 204 is configured to send the notification message to the first device.
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
  • the network device in this embodiment may further include: a generating module 303, a sending module, based on the structure of the network device shown in FIG. 304.
  • a generating module 303 configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, in the created virtual local area network When the change occurs, the second notification message is generated; wherein the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message;
  • the sending module 304 is configured to send the notification message to the first device.
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
  • the network device in this embodiment includes: a processor 401 and an interface circuit 402.
  • the memory 403 and the bus 404 are also shown.
  • the processor 401, the interface circuit 402, and the memory 403 are connected by a bus 404 and complete communication with each other.
  • the bus 404 can be an industry standard architecture (English: Industry Standard Architecture, ISA for short) bus, external device interconnection (English: Peripheral Component Interconnect, PCI for short) or internal integrated circuit (English: Inter-Integrated Circuit, short for :I2C) bus, etc.
  • the bus 404 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
  • the memory 403 is for storing executable program code, the program code including computer operating instructions.
  • the memory 403 may be a volatile memory, such as a random-access memory (RAM), or a non-volatile memory (NVM).
  • RAM random-access memory
  • NVM non-volatile memory
  • read-only memory English: read-only memory, ROM
  • flash memory English: flash memory
  • hard disk English: hard disk drive, HDD
  • solid state drive English: solid-state drive, referred to as SSD.
  • the processor 401 can be a central processing unit (English: central processing unit, abbreviated as: CPU).
  • the processor 401 may be configured to execute the processing method of the virtual local area network interface provided by the embodiment of the present invention by using an operation instruction or a program code stored in the memory 403, where the method includes:
  • the processor 401 receives the first notification message sent by the first device by using the interface circuit 402, where the first notification message includes an identifier set of the virtual local area network that the first device has created;
  • the processor 401 fixes the interface corresponding to the interface circuit 402 to the virtual local area network corresponding to the identifier included in the identifier intersection, wherein the identifier intersection is an identifier set of the virtual local area network included in the first notification message and the created virtual The intersection between the set of identifications of the local area network.
  • the interface is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection, and includes:
  • the processor 401 determines whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
  • processing the fixed virtual local area network according to the identifier intersection including the following:
  • the processor 401 configures a virtual local area network with an interface fixed according to the identifier included in the identifier intersection;
  • the processor 401 sends an alert message
  • the processor 401 configures the virtual local area network fixed by the interface according to the identifier included in the identifier intersection and sends an alarm prompt message.
  • configuring the virtual local area network with the interface fixed according to the identifier included in the identifier intersection including:
  • the processor 401 configures the interface-fixed virtual local area network to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
  • the processor 401 reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
  • the processor 401 generates a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or when the created virtual local area network changes And generating the second notification message, where the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message;
  • the processor 401 transmits the notification message to the first device.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Provided in an embodiment of the present invention are a virtual local area network (VLAN) interface processing method and network device, the VLAN interface processing method comprising: a second device receives a first notification message sent by a first device, the first notification message comprising an identifier set of VLANs established by the first device; the second device fixes an interface of the second device to the VLAN corresponding to the identifier contained in an identifier intersection, the identifier intersection being an intersection of the identifier set of the VLANs contained in the first notification message and the identifier set of VLANs established by the second device. The embodiment of the present invention enables reliable communication between a first device and a second device.

Description

虚拟局域网接口的处理方法和网络设备Processing method and network device of virtual local area network interface
本申请要求于2013年11月5日提交中国专利局、申请号为201310542254.1、发明名称为“虚拟局域网接口的处理方法和网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201310542254.1, entitled "Processing Method and Network Device for Virtual Local Area Network Interface", filed on November 5, 2013, the entire contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本发明实施例涉及通信技术,尤其涉及一种虚拟局域网接口的处理方法和网络设备。The embodiments of the present invention relate to communication technologies, and in particular, to a method and a network device for processing a virtual local area network interface.
背景技术Background technique
以太网网络中用虚拟局域网(英文:virtual local area network,简称:VLAN)划分广播域并控制流量广播,为使网络设备能够通过VLAN正常工作,通常至少需要2步操作:创建VLAN;接口固定VLAN。In the Ethernet network, the virtual local area network (English: virtual local area network, or VLAN) is used to divide the broadcast domain and control the traffic broadcast. In order to enable the network device to work normally through the VLAN, it usually takes at least two steps: creating a VLAN; .
但是,网络中会出现两个网络设备接口固定VLAN不准确造成无法实现通信的技术问题。However, there are technical problems in the network where the fixed VLANs of the two network device interfaces are inaccurate and communication cannot be realized.
发明内容Summary of the invention
本发明提供一种虚拟局域网接口的处理方法和网络设备。The invention provides a processing method and a network device of a virtual local area network interface.
本发明的第一方面提供了一种虚拟局域网接口的处理方法,包括:A first aspect of the present invention provides a method for processing a virtual local area network interface, including:
第二设备接收第一设备发送的第一通知消息,所述第一通知消息中包括所述第一设备已创建的虚拟局域网的标识集合;Receiving, by the second device, a first notification message that is sent by the first device, where the first notification message includes an identifier set of the virtual local area network that the first device has created;
所述第二设备将所述第二设备的接口固定到标识交集中包括的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识集合与所述第二设备已创建的虚拟局域网的标识集合之间的交集。The second device fixes the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, where the identifier intersection is an identifier set of the virtual local area network included in the first notification message, and the first The intersection between the set of identities of the virtual local area network that the second device has created.
在第一方面的第一种可能的实现方式中,所述第二设备将所述第二设备的接口固定到所述标识交集中包括的标识对应的虚拟局域网,包括:In a first possible implementation manner of the first aspect, the second device, where the interface of the second device is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection, includes:
所述第二设备确定所述标识交集中包括的标识对应的虚拟局域网与所述第二设备的接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对所述第二设备的接口固定的虚拟局域网进行处理。 Determining, by the second device, whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network on which the interface of the second device is fixed, and if not, according to the identifier intersection, the second device is The fixed virtual LAN of the interface is processed.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第二设备根据所述标识交集对所述第二设备的接口固定的虚拟局域网进行处理,包括以下一种:With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the second device performs, according to the identifier intersection, a virtual local area network with an interface fixed to the second device Processing, including the following:
所述第二设备根据所述标识交集中包括的标识,对所述第二设备的接口固定的虚拟局域网进行配置;And configuring, by the second device, the virtual local area network fixed by the interface of the second device according to the identifier included in the identifier intersection;
所述第二设备发出告警提示信息;The second device sends an alert message;
所述第二设备根据所述标识交集中包括的标识,对所述第二设备的接口固定的虚拟局域网进行配置并且所述第二设备发出告警提示信息。The second device configures a virtual local area network fixed to the interface of the second device according to the identifier included in the identifier intersection, and the second device sends an alert message.
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述第二设备根据所述标识交集中包括的标识,对所述第二设备的接口固定的虚拟局域网进行配置,包括:In conjunction with the second possible implementation of the first aspect, in a third possible implementation manner of the first aspect, the second device is configured to perform an interface to the second device according to the identifier included in the identifier intersection Fixed virtual LAN configuration, including:
所述第二设备将所述第二设备的接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;The second device configures the virtual local area network fixed by the interface of the second device to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
或者,or,
所述第二设备保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The second device reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
结合第一方面以及第一方面的第一种可能的实现方式至第一方面的第三种可能的实现方式中的任意一个,在第一方面的第四种可能的实现方式中,还包括:With reference to the first aspect, and the first possible implementation of the first aspect, to any one of the third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes:
所述第二设备生成第二通知消息,所述第二通知消息中包括所述第二设备已创建的虚拟局域网的标识集合;其中,所述第二设备周期性地生成所述第二通知消息;或者,所述第二设备在已创建的虚拟局域网发生变化时,生成所述第二通知消息;其中,所述生成所述第二通知消息需超过预设时长,所述预设时长为所述第二设备确定当前时间与前一次通知消息的发送时间之差;The second device generates a second notification message, where the second notification message includes an identifier set of the virtual local area network that the second device has created, where the second device periodically generates the second notification message. Or the second device generates the second notification message when the created virtual local area network changes; wherein the generating the second notification message exceeds a preset duration, where the preset duration is Determining, by the second device, a difference between a current time and a sending time of the previous notification message;
所述第二设备向第一设备发送所述第二通知消息。The second device sends the second notification message to the first device.
本发明的第二方面提供了一种网络设备,包括:A second aspect of the present invention provides a network device, including:
接收模块,用于接收第一设备发送的第一通知消息,所述通知消息中包括所述第一设备已创建的虚拟局域网的标识集合;a receiving module, configured to receive a first notification message that is sent by the first device, where the notification message includes an identifier set of the virtual local area network that the first device has created;
固定模块,用于将接口固定到所述标识交集中包括的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识集合与已创建的虚拟局域网的标识集合之间的交集。 a fixed module, configured to fix the interface to the virtual local area network corresponding to the identifier included in the identifier intersection, wherein the identifier intersection is an identifier set of the virtual local area network included in the first notification message and an identifier of the created virtual local area network The intersection between the collections.
在第二方面的第一种可能的实现方式中,所述固定模块,具体用于:In a first possible implementation of the second aspect, the fixed module is specifically configured to:
确定所述标识交集中包括的标识对应的虚拟局域网与接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对接口固定的虚拟局域网进行处理。It is determined whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述固定模块,具体用于以下一种:With reference to the first possible implementation of the second aspect, in the second possible implementation manner of the second aspect, the fixed module is specifically used in the following manner:
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置;Configuring a virtual local area network with a fixed interface according to the identifier included in the identifier intersection;
发出告警提示信息;Send an alert message;
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且发出告警提示信息。And configuring, according to the identifier included in the identifier intersection, a virtual local area network with a fixed interface, and issuing an alert message.
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且发出告警提示信息。And configuring, according to the identifier included in the identifier intersection, a virtual local area network with a fixed interface, and issuing an alert message.
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述固定模块,具体用于:With reference to the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the fixed module is specifically configured to:
将接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;Configuring the virtual local area network that is fixed by the interface to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
或者,or,
保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
结合第二方面以及第二方面的第一种可能的实现方式至第二方面的第三种任一种可能的实现方式,在第二方面的第四种可能的实现方式中,还包括:With reference to the second aspect, and the first possible implementation manner of the second aspect, to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the method further includes:
生成模块,用于生成第二通知消息,所述第二通知消息中包括已创建的虚拟局域网的标识集合,其中,周期性地生成所述第二通知消息;或者,在已创建的虚拟局域网发生变化时,生成所述第二通知消息;其中,所述生成所述第二通知消息需超过预设时长,所述预设时长为确定当前时间与前一次通知消息的发送时间之差。a generating module, configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, occurs in the created virtual local area network The second notification message is generated, wherein the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message.
发送模块,用于向第一设备发送所述通知消息。And a sending module, configured to send the notification message to the first device.
本发明的第三方面提供了一种网络设备,包括:A third aspect of the present invention provides a network device, including:
处理器,接口电路,存储器和总线,所述处理器、接口电路和存储器通过总线连接并完成相互间的通信。A processor, an interface circuit, a memory and a bus, the processor, the interface circuit and the memory are connected by a bus and complete communication with each other.
该总线可以是工业标准体系结构总线、外部设备互连总线或扩展工业标准体系结构总线等。该总线可以分为地址总线、数据总线、控制总线等。 The bus can be an industry standard architecture bus, an external device interconnect bus, or an extended industry standard architecture bus. The bus can be divided into an address bus, a data bus, a control bus, and the like.
存储器用于存储可执行程序代码,该程序代码包括计算机操作指令。存储器可能包括高速随机存储器,也可能还包括非易失性存储器,例如至少一个磁盘存储器。The memory is for storing executable program code, the program code including computer operating instructions. The memory may include a high speed random access memory and may also include a non-volatile memory such as at least one disk storage.
处理器可以是一个中央处理器,或者是特定集成电路,或者是被配置成实施本发明实施例的一个或多个集成电路。The processor can be a central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
其中,处理器可以调用存储器中存储的操作指令或者程序代码,来执行本发明实施例提供的虚拟局域网接口的处理方法,所述方法包括:The processing method of the virtual local area network interface provided by the embodiment of the present invention is executed by the processor, and the method includes:
接收第一设备发送的通知消息,所述通知消息中包括所述第一设备已创建的虚拟局域网的标识;Receiving a notification message sent by the first device, where the notification message includes an identifier of a virtual local area network that the first device has created;
确定所述通知消息中包括的虚拟局域网的标识集合与已创建的虚拟局域网的标识集合之间的交集;Determining an intersection between an identifier set of the virtual local area network included in the notification message and an identifier set of the created virtual local area network;
将接口固定到所述标识交集中包括的标识对应的虚拟局域网。The interface is fixed to a virtual local area network corresponding to the identifier included in the identifier intersection.
进一步地,将接口固定到所述标识交集中包括的标识对应的虚拟局域网,包括:Further, the interface is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection, and includes:
确定所述标识交集中包括的标识对应的虚拟局域网与接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对接口固定的虚拟局域网进行处理。It is determined whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
可选地,根据所述标识交集对接口固定的虚拟局域网进行处理,包括:Optionally, processing the virtual local area network fixed by the interface according to the identifier intersection, including:
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置;Configuring a virtual local area network with a fixed interface according to the identifier included in the identifier intersection;
发出告警提示信息;Send an alert message;
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且发出告警提示信息。And configuring, according to the identifier included in the identifier intersection, a virtual local area network with a fixed interface, and issuing an alert message.
进一步可选地,根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置,包括:Further, optionally, configuring the virtual local area network with the interface fixed according to the identifier included in the identifier intersection, including:
将接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;Configuring the virtual local area network that is fixed by the interface to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
或者,or,
保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
进一步地,还包括:Further, it also includes:
生成通知消息,所述通知消息中包括已创建的虚拟局域网的标识; Generating a notification message, where the notification message includes an identifier of the created virtual local area network;
向第一设备发送所述通知消息,以使所述第一设备确定所述通知消息中包括的虚拟局域网的标识与所述第一设备本地已创建的虚拟局域网的标识之间的交集,并使所述第一设备将所述第一设备的接口固定到所述标识交集中包括的标识对应的虚拟局域网。Sending the notification message to the first device, so that the first device determines an intersection between an identifier of the virtual local area network included in the notification message and an identifier of a virtual local area network that has been locally created by the first device, and The first device fixes an interface of the first device to a virtual local area network corresponding to the identifier included in the identifier intersection.
可选地,生成通知消息,包括:Optionally, generating a notification message, including:
周期性地生成所述通知消息;Generating the notification message periodically;
或者,or,
在已创建的虚拟局域网发生变化时,生成所述通知消息。The notification message is generated when the created virtual local area network changes.
具体来说,在已创建的虚拟局域网发生变化时,生成所述通知消息,包括:Specifically, when the created virtual local area network changes, the notification message is generated, including:
确定当前时间与前一次通知消息的发送时间之差是否超过预设时长;Determining whether the difference between the current time and the sending time of the previous notification message exceeds a preset duration;
若超过预设时长,则生成所述通知消息。The notification message is generated if the preset duration is exceeded.
本发明中,对于第二设备来说,接收第一设备通知的该第一设备已创建的虚拟局域网的标识,将自身创建的虚拟局域网标识与第一设备创建的虚拟局域网的标识取交集,得到标识交集,然后,该第二设备即可将第二设备的接口固定到该标识交集中包括的标识对应的虚拟局域网,由此,第二设备的接口和第一设备的接口可以准确地固定两设备所创建的虚拟局域网的交集,第二设备还可以将其创建的虚拟局域网的标识通知给第一设备,第一设备可以将自身创建的虚拟局域网标识与第二设备创建的虚拟局域网的标识取交集,得到标识交集,然后,该第一设备即可将第二设备的接口固定到该标识交集中包括的标识对应的虚拟局域网,从而解决了两个设备之间因接口固定的虚拟局域网不准确而造成无法通信的问题。In the present invention, for the second device, the identifier of the virtual local area network that the first device has created is notified by the first device, and the identifier of the virtual local area network created by the first device is intersected with the identifier of the virtual local area network created by the first device. Identifying the intersection, the second device can then fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, whereby the interface of the second device and the interface of the first device can be accurately fixed The intersection of the virtual local area network created by the device, the second device may also notify the first device of the identifier of the virtual local area network created by the device, and the first device may take the virtual local area network identifier created by the second device and the identifier of the virtual local area network created by the second device. After the intersection, the identification intersection is obtained, and then the first device can fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, thereby solving the inaccuracy of the virtual local area network fixed by the interface between the two devices. The problem is that communication is impossible.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.
图1为本发明虚拟局域网接口的处理方法实施例一的流程图;1 is a flowchart of Embodiment 1 of a method for processing a virtual local area network interface according to the present invention;
图2为本发明网络设备实施例一的结构示意图;2 is a schematic structural diagram of Embodiment 1 of a network device according to the present invention;
图3为本发明网络设备实施例二的结构示意图;3 is a schematic structural diagram of Embodiment 2 of a network device according to the present invention;
图4为本发明网络设备实施例二的结构示意图。 FIG. 4 is a schematic structural diagram of Embodiment 2 of a network device according to the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly described in conjunction with the drawings in the embodiments of the present invention. Some embodiments, rather than all of the embodiments, are invented. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1为本发明虚拟局域网接口的处理方法实施例一的流程图,如图1所示,本实施例的方法可以包括:FIG. 1 is a flowchart of Embodiment 1 of a method for processing a virtual local area network interface according to the present invention. As shown in FIG. 1 , the method in this embodiment may include:
步骤101、第二设备通过所述第二设备的接口接收第一设备发送的第一通知消息,所述第一通知消息中包括所述第一设备已创建的虚拟局域网的标识的集合;Step 101: The second device receives, by using an interface of the second device, a first notification message that is sent by the first device, where the first notification message includes a set of identifiers of the virtual local area network that the first device has created.
步骤102、所述第二设备将所述第二设备的所述接口固定到标识交集中的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识的集合与所述第二设备创建的虚拟局域网的标识的集合之间的交集。Step 102: The second device fixes the interface of the second device to a virtual local area network corresponding to the identifier of the identifier intersection, where the identifier intersection is an identifier of the virtual local area network included in the first notification message. An intersection between the set of identifiers of the virtual local area networks created by the second device.
具体来说,第一设备创建(英文:create)虚拟局域网是指管理人员通过创建指令在该设备上实现虚拟局域网的创建;第二设备的接口固定(英文:fix)到所述标识交集中包括的标识对应的VLAN是管理人员通过配置指令将该设备的接口加入到所述标识交集中包括的标识对应的VLAN中;其中,所述固定到所述标识交集中包括的标识对应的虚拟局域网的第二设备的接口为接收到第一设备发送的第一通知消息的接口。一般的,所述第一通知消息中包括所述第一设备已创建的所有虚拟局域网的标识的集合。Specifically, the first device creation (English: create) virtual local area network means that the administrator creates the virtual local area network on the device by creating an instruction; the interface of the second device is fixed (English: fix) to the identification intersection. The VLAN corresponding to the identifier is configured by the administrator to add the interface of the device to the VLAN corresponding to the identifier included in the identifier intersection; wherein the identifier is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection The interface of the second device is an interface that receives the first notification message sent by the first device. Generally, the first notification message includes a set of identifiers of all virtual local area networks that the first device has created.
下面举一个例子,对本实施例的技术方案进行说明。The technical solution of this embodiment will be described below by way of an example.
在该示例中,第一设备可以记为设备A,第二设备可以记为设备B。该设备A已创建四个VLAN,四个VLAN的标识集合例如为:{101-200、301-400、601-700、801-900},该设备B已创建五个VLAN,五个VLAN的标识集合例如为:{201-300、301-400、601-700、701-800、801-900}。In this example, the first device may be referred to as device A and the second device may be referred to as device B. The device A has created four VLANs. The identifiers of the four VLANs are, for example, {101-200, 301-400, 601-700, and 801-900}. The device B has created five VLANs and five VLANs. The set is, for example, {201-300, 301-400, 601-700, 701-800, 801-900}.
设备A可以向设备B发送通知消息,该通知消息中可以包括VLAN标识集合{101-200、301-400、601-700、801-900},设备B在接收到设备A发送的通知消息之后,即可获知设备A当前已创建了标识为101-200、301-400、601-700、801-900的VLAN;然后,设备B可以确定设备A已创建的VLAN的标识集合{101-200、301-400、601-700、801-900}与设备B自身在创建的VLAN标识集合{201-300、301-400、601-700、701-800、801-900}的标识交集,该标识交集为{301-400、601-700、801-900}。也即,设备B可以准确地获知其与设备A共同创建了标识为301-400、601-700、801-900的VLAN,因此,设备B可以将其接 口固定到标识交集{301-400、601-700、801-900}对应的VLAN中,从而可以与设备A在标识交集{301-400、601-700、801-900}对应的VLAN中进行通信。The device A may send a notification message to the device B, where the notification message may include a VLAN identifier set {101-200, 301-400, 601-700, 801-900}, and after receiving the notification message sent by the device A, the device B It can be known that device A has created VLANs with the identifiers 101-200, 301-400, 601-700, and 801-900. Then, device B can determine the identification set of the VLANs that device A has created {101-200, 301. -400, 601-700, 801-900} intersects with the identifier of the created VLAN identification set {201-300, 301-400, 601-700, 701-800, 801-900} by the device B itself, and the identifier intersection is {301-400, 601-700, 801-900}. That is, the device B can accurately know that it creates a VLAN with the identifiers of 301-400, 601-700, and 801-900 together with the device A. Therefore, the device B can connect it. The port is fixed in the VLAN corresponding to the identifier intersection {301-400, 601-700, 801-900}, so that communication can be performed in the VLAN corresponding to the device A in the identification intersection {301-400, 601-700, 801-900}. .
同理,设备B也同样可以向设备A发送通知消息,该通知消息中可以包括VLAN标识集合{201-300、301-400、601-700、701-800、801-900},设备A在接收到设备B发送的通知消息之后,即可获知设备B当前已创建了标识201-300、301-400、601-700、701-800、801-900的VLAN;然后,设备A可以确定设备B已创建的VLAN的标识集合{201-300、301-400、601-700、701-800、801-900}与设备A自身在创建的VLAN标识集合{101-200、301-400、601-700、801-900}的标识交集,该标识交集同样为{301-400、601-700、801-900}。也即,设备A可以准确地获知其与设备B共同创建了标识为301-400、601-700、801-900的VLAN,因此,设备A可以将其接口固定到标识交集{301-400、601-700、801-900}对应的VLAN中,从而可以与设备B在标识交集{301-400、601-700、801-900}对应的VLAN中进行通信。Similarly, device B can also send a notification message to device A, which can include a VLAN identifier set {201-300, 301-400, 601-700, 701-800, 801-900}, and device A receives After the notification message sent by the device B, it can be known that the device B has created the VLANs of the identifiers 201-300, 301-400, 601-700, 701-800, and 801-900; then, the device A can determine that the device B has The identified set of VLANs {201-300, 301-400, 601-700, 701-800, 801-900} and the set of VLAN IDs created by device A itself {101-200, 301-400, 601-700, The intersection of the logos of 801-900}, the intersection of the logos is also {301-400, 601-700, 801-900}. That is, the device A can accurately know that it creates a VLAN with the identifiers of 301-400, 601-700, and 801-900 together with the device B. Therefore, the device A can fix its interface to the identity intersection {301-400, 601. -700, 801-900} in the corresponding VLAN, so that it can communicate with the device B in the VLAN corresponding to the identification intersection {301-400, 601-700, 801-900}.
至此,设备A和设备B的接口可以准确地固定两设备所创建的虚拟局域网的交集,从而使得设备A和设备B之间可以进行可靠的通信。So far, the interfaces of device A and device B can accurately fix the intersection of the virtual local area networks created by the two devices, so that reliable communication can be performed between device A and device B.
在具体实现时,第二设备将所述第二设备的接口固定到所述标识交集中包括的标识对应的虚拟局域网,可以具体为:In a specific implementation, the second device fixes the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, which may be specifically:
第二设备确定所述标识交集中包括的标识对应的虚拟局域网与所述第二设备的接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对所述第二设备的接口固定的虚拟局域网进行处理。The second device determines whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface of the second device is fixed, and if not, the interface of the second device is fixed according to the identifier intersection. The virtual LAN is processed.
进一步地,所述第二设备根据所述标识交集对所述第二设备的接口固定的虚拟局域网进行处理,可以采用三种方式实现:Further, the second device processes the virtual local area network fixed by the interface of the second device according to the identifier intersection, and may be implemented in three manners:
方式一:第二设备根据所述标识交集中包括的标识,对所述第二设备的接口固定的虚拟局域网进行配置;Manner 1: The second device configures the virtual local area network fixed by the interface of the second device according to the identifier included in the identifier intersection;
在该方式中,具体来说有两种实现方案,所述第二设备将所述第二设备的接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;或者,所述第二设备保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。In this manner, specifically, there are two implementations, where the second device configures the virtual local area network fixed by the interface of the second device to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection; or The second device reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
举例来说,第二设备可以记为设备B,该设备B的接口已固定的VLAN标识例如为201-300、301-400、701-800、901-1000,标识交集中所包括的标识例如为{301-400、601-700、801-900},通过设备B确定,该设备B的接口已固定的VLAN标识和标识交集中 所包括的标识不一致。则根据该标识交集中所包括的标识将该设备B的接口进行修正处理,修正处理后的设备B的接口所固定的VLAN标识为301-400、601-700、801-900,与标识交集相一致。或者,在第二设备的接口已固定的VLAN中将不属于标识交集{301-400、601-700、801-900}的标识201-300、701-800、901-1000删除,修正处理后的设备B的接口所固定的VLAN标识为301-400。For example, the second device may be referred to as device B, and the VLAN ID of the interface of the device B is fixed, for example, 201-300, 301-400, 701-800, and 901-1000, and the identifier included in the identifier intersection is, for example, {301-400, 601-700, 801-900}, determined by device B, the interface of the device B has a fixed VLAN ID and identifier intersection The included identifiers are inconsistent. Then, the interface of the device B is corrected according to the identifier included in the identifier intersection, and the VLAN identifiers fixed by the interface of the modified device B are 301-400, 601-700, and 801-900, and the intersection with the identifier is Consistent. Alternatively, the identifiers 201-300, 701-800, and 901-1000 that do not belong to the identifier intersection {301-400, 601-700, and 801-900} are deleted in the VLAN in which the interface of the second device is fixed, and the modified processing is performed. The VLAN ID fixed on the interface of device B is 301-400.
方式二:第二设备发出告警提示信息,以使管理员根据所述告警提示信息对所述第二设备的接口固定的虚拟局域网手动根据所述标识交集中包括的标识对应的虚拟局域网进行修正处理。Manner 2: The second device sends an alert message, so that the administrator manually corrects the virtual local area network corresponding to the identifier included in the identifier intersection according to the alarm prompt information to the virtual local area network corresponding to the identifier of the second device. .
方式三:所述第二设备根据所述标识交集中包括的标识,对所述第二设备的接口固定的虚拟局域网进行配置并且所述第二设备发出告警提示信息。Manner 3: The second device configures a virtual local area network fixed to the interface of the second device according to the identifier included in the identifier intersection, and the second device sends an alert message.
本实施例中,对于第二设备来说,接收第一设备通知的该第一设备已创建的虚拟局域网的标识,将自身创建的虚拟局域网标识与第一设备创建的虚拟局域网的标识取交集,得到标识交集,然后,该第二设备即可将第二设备的接口固定到该标识交集中包括的标识对应的虚拟局域网,由此,第二设备的接口和第一设备的接口可以准确地固定两设备所创建的虚拟局域网的交集,第二设备还可以将其创建的虚拟局域网的标识通知给第一设备,第一设备可以将自身创建的虚拟局域网标识与第二设备创建的虚拟局域网的标识取交集,得到标识交集,然后,该第一设备即可将第二设备的接口固定到该标识交集中包括的标识对应的虚拟局域网,从而解决了两个设备之间因接口固定的虚拟局域网不准确而造成无法通信的问题。In this embodiment, for the second device, the identifier of the virtual local area network that the first device has created is notified by the first device, and the identifier of the virtual local area network created by the first device is intersected with the identifier of the virtual local area network created by the first device. Obtaining an identity intersection, and then the second device can fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, whereby the interface of the second device and the interface of the first device can be accurately fixed. The intersection of the virtual local area network created by the two devices, the second device may also notify the first device of the identifier of the virtual local area network created by the second device, and the first device may identify the virtual local area network created by the second device and the identifier of the virtual local area network created by the second device. The intersection is obtained, and the identifier intersection is obtained. Then, the first device can fix the interface of the second device to the virtual local area network corresponding to the identifier included in the identifier intersection, thereby solving the virtual local area network fixed by the interface between the two devices. Accurate and unable to communicate problems.
进一步地,还包括:Further, it also includes:
所述第二设备生成第二通知消息,所述第二通知消息中包括所述第二设备已创建的虚拟局域网的标识集合,其中,所述第二设备周期性地生成所述第二通知消息;或者,所述第二设备在已创建的虚拟局域网发生变化时,生成所述第二通知消息;其中,所述生成所述第二通知消息需超过预设时长,所述预设时长为所述第二设备确定当前时间与前一次通知消息的发送时间之差;The second device generates a second notification message, where the second notification message includes an identifier set of the virtual local area network that the second device has created, where the second device periodically generates the second notification message. Or the second device generates the second notification message when the created virtual local area network changes; wherein the generating the second notification message exceeds a preset duration, where the preset duration is Determining, by the second device, a difference between a current time and a sending time of the previous notification message;
所述第二设备向第一设备发送所述第二通知消息。The second device sends the second notification message to the first device.
具体来说,第一设备生成通知消息可以采用两种方式:Specifically, the first device generates the notification message in two ways:
方式一:第一设备周期性地生成通知消息;Manner 1: The first device periodically generates a notification message.
本领域技术人员可以根据需求,预先设定该通知消息的发送周期,以周期性地让第二设备根据第一设备发送的通知消息进行接口配置。 A person skilled in the art may preset a sending period of the notification message according to requirements, so that the second device periodically performs interface configuration according to the notification message sent by the first device.
方式二:第一设备在已创建的虚拟局域网发生变化时,生成所述通知消息。Manner 2: The first device generates the notification message when the created virtual local area network changes.
该方式二采用事件触发方式,即当VLAN发生变化这一事件发生时,第一设备即可被触发生成该通知消息。该方式二相对于方式一来说,可以有效节约不必要的通知消息的发送。In the second mode, the event triggering mode is adopted, that is, when the event that the VLAN changes, the first device can be triggered to generate the notification message. Compared with the first method, the second method can effectively save the transmission of unnecessary notification messages.
该方式二在具体实现时,可以包括:In the specific implementation, the second method may include:
第一设备确定当前时间与前一次通知消息的发送时间之差是否超过预设时长;The first device determines whether the difference between the current time and the sending time of the previous notification message exceeds a preset duration;
若超过预设时长,则生成通知消息。If the preset duration is exceeded, a notification message is generated.
具体来说,如果每两个通知消息的发送时间间隔太小,则通知消息的发送过于频繁,这可能会带来系统的信令负荷,因此,第一设备在当前VLAN发生变化这一事件发生时,可以先确定当前时间是否与前一次通知消息的发送时间达到了预设的时间间隔,只有在该时间间隔超过预设时长,才依据当前VLAN发生变化这一事件生成通知消息,否则,可以继续等待预设时长后生成通知消息。Specifically, if the sending interval of every two notification messages is too small, the notification message is sent too frequently, which may bring the signaling load of the system. Therefore, the event that the first device changes in the current VLAN occurs. The time may be determined whether the current time and the sending time of the previous notification message have reached a preset time interval. Only when the time interval exceeds the preset time length, the notification message is generated according to the event that the current VLAN changes. Otherwise, Continue to wait for the preset duration to generate a notification message.
本实施例,第二设备可以周期性地或在已创建的虚拟局域网发生变化时,生成所述通知消息并发送给第一设备,从而使得第一设备可以将自身创建的虚拟局域网标识与第二设备创建的虚拟局域网的标识取交集,得到标识交集,进而使得该第一设备将第一设备的接口固定到该标识交集中包括的标识对应的虚拟局域网中,从而可以使得第一设备的接口准确地固定两设备所创建的虚拟局域网的交集,保证第一设备和第二设备之间的可靠通信。In this embodiment, the second device may generate the notification message periodically and when the created virtual local area network changes, and send the notification message to the first device, so that the first device can identify the virtual local area network created by itself and the second device. The identifier of the virtual local area network created by the device is taken as an intersection, and the intersection of the identifier is obtained, so that the first device fixes the interface of the first device to the virtual local area network corresponding to the identifier included in the identifier intersection, so that the interface of the first device can be made accurate. The intersection of the virtual local area networks created by the two devices is fixed to ensure reliable communication between the first device and the second device.
图2为本发明网络设备实施例一的结构示意图,如图2所示,本实施例的网络设备即为上述图1所示方法实施例中的第二设备,可以包括:2 is a schematic structural diagram of Embodiment 1 of a network device according to the present invention. As shown in FIG. 2, the network device in this embodiment is the second device in the foregoing method embodiment shown in FIG.
接收模块201,用于接收第一设备发送的第一通知消息,所述第一通知消息中包括所述第一设备已创建的虚拟局域网的标识集合;The receiving module 201 is configured to receive a first notification message that is sent by the first device, where the first notification message includes an identifier set of the virtual local area network that the first device has created;
固定模块202,用于将接口固定到所述标识交集中包括的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识集合与已创建的虚拟局域网的标识集合之间的交集。The fixed module 202 is configured to fix the interface to the virtual local area network corresponding to the identifier included in the identifier intersection, where the identifier intersection is an identifier set of the virtual local area network included in the first notification message and the created virtual local area network Identifies the intersection between the collections.
本实施例的装置,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
进一步地,固定模块202,具体用于:Further, the fixing module 202 is specifically configured to:
确定所述标识交集中包括的标识对应的虚拟局域网与接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对接口固定的虚拟局域网进行处理。 It is determined whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
进一步地,固定模块202,具体用于:Further, the fixing module 202 is specifically configured to:
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置;Configuring a virtual local area network with a fixed interface according to the identifier included in the identifier intersection;
发出告警提示信息;Send an alert message;
根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且发出告警提示信息。And configuring, according to the identifier included in the identifier intersection, a virtual local area network with a fixed interface, and issuing an alert message.
进一步地,计入模块202,具体用于:Further, the module 202 is specifically configured to:
将接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;Configuring the virtual local area network that is fixed by the interface to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
或者,or,
保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
进一步地,还包括:Further, it also includes:
生成模块203,用于生成第二通知消息,所述第二通知消息中包括已创建的虚拟局域网的标识集合,其中,周期性地生成所述第二通知消息;或者,在已创建的虚拟局域网发生变化时,生成所述第二通知消息;其中,所述生成所述第二通知消息需超过预设时长,所述预设时长为确定当前时间与前一次通知消息的发送时间之差;a generating module 203, configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, in the created virtual local area network When the change occurs, the second notification message is generated; wherein the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message;
发送模块204,用于向第一设备发送所述通知消息。The sending module 204 is configured to send the notification message to the first device.
本实施例的装置,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
图3为本发明网络设备实施例二的结构示意图,如图3所示,本实施例的网络设备在图2所示的网络设备的结构的基础上,还可以包括:生成模块303,发送模块304。3 is a schematic structural diagram of Embodiment 2 of a network device according to the present invention. As shown in FIG. 3, the network device in this embodiment may further include: a generating module 303, a sending module, based on the structure of the network device shown in FIG. 304.
生成模块303,用于生成第二通知消息,所述第二通知消息中包括已创建的虚拟局域网的标识集合,其中,周期性地生成所述第二通知消息;或者,在已创建的虚拟局域网发生变化时,生成所述第二通知消息;其中,所述生成所述第二通知消息需超过预设时长,所述预设时长为确定当前时间与前一次通知消息的发送时间之差;a generating module 303, configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, in the created virtual local area network When the change occurs, the second notification message is generated; wherein the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message;
发送模块304,用于向第一设备发送所述通知消息。The sending module 304 is configured to send the notification message to the first device.
本实施例的装置,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。 The device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
图4为本发明网络设备实施例二的结构示意图,如图4所示,本实施例的网络设备,包括:处理器401和接口电路402,图中还示出了存储器403和总线404,该处理器401、接口电路402和存储器403通过总线404连接并完成相互间的通信。4 is a schematic structural diagram of Embodiment 2 of a network device according to the present invention. As shown in FIG. 4, the network device in this embodiment includes: a processor 401 and an interface circuit 402. The memory 403 and the bus 404 are also shown. The processor 401, the interface circuit 402, and the memory 403 are connected by a bus 404 and complete communication with each other.
该总线404可以是工业标准架构(英文:Industry Standard Architecture,简称:ISA)总线、外部设备互连(英文:Peripheral Component Interconnect,简称:PCI)总线或内部整合电路(英文:Inter-Integrated Circuit,简称:I2C)总线等。该总线404可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 404 can be an industry standard architecture (English: Industry Standard Architecture, ISA for short) bus, external device interconnection (English: Peripheral Component Interconnect, PCI for short) or internal integrated circuit (English: Inter-Integrated Circuit, short for :I2C) bus, etc. The bus 404 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
存储器403用于存储可执行程序代码,该程序代码包括计算机操作指令。存储器403可以是易失性存储器(英文:volatile memory),例如随机存储器(英文:random-access memory,简称:RAM),也可以是非易失性存储器(英文:non-volatile memory,简称:NVM),例如只读存储器(英文:read-only memory,简称ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,简称HDD)或固态硬盘(英文:solid-state drive,简称SSD)。The memory 403 is for storing executable program code, the program code including computer operating instructions. The memory 403 may be a volatile memory, such as a random-access memory (RAM), or a non-volatile memory (NVM). For example, read-only memory (English: read-only memory, ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, HDD) or solid state drive (English: solid-state drive, referred to as SSD).
处理器401可以是中央处理器(英文:central processing unit,简称:CPU)。The processor 401 can be a central processing unit (English: central processing unit, abbreviated as: CPU).
其中,处理器401可以调用存储器403中存储的操作指令或者程序代码,来执行本发明实施例提供的虚拟局域网接口的处理方法,所述方法包括:The processor 401 may be configured to execute the processing method of the virtual local area network interface provided by the embodiment of the present invention by using an operation instruction or a program code stored in the memory 403, where the method includes:
处理器401通过接口电路402接收第一设备发送的第一通知消息,所述第一通知消息中包括所述第一设备已创建的虚拟局域网的标识集合;The processor 401 receives the first notification message sent by the first device by using the interface circuit 402, where the first notification message includes an identifier set of the virtual local area network that the first device has created;
处理器401将接口电路402对应的接口固定到所述标识交集中包括的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识集合与已创建的虚拟局域网的标识集合之间的交集。The processor 401 fixes the interface corresponding to the interface circuit 402 to the virtual local area network corresponding to the identifier included in the identifier intersection, wherein the identifier intersection is an identifier set of the virtual local area network included in the first notification message and the created virtual The intersection between the set of identifications of the local area network.
进一步地,将接口固定到所述标识交集中包括的标识对应的虚拟局域网,包括:Further, the interface is fixed to the virtual local area network corresponding to the identifier included in the identifier intersection, and includes:
处理器401确定所述标识交集中包括的标识对应的虚拟局域网与接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对接口固定的虚拟局域网进行处理。The processor 401 determines whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
可选地,根据所述标识交集对接口固定的虚拟局域网进行处理,包括以下一种:Optionally, processing the fixed virtual local area network according to the identifier intersection, including the following:
处理器401根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置;The processor 401 configures a virtual local area network with an interface fixed according to the identifier included in the identifier intersection;
处理器401发出告警提示信息;The processor 401 sends an alert message;
处理器401根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且发出告警提示信息。 The processor 401 configures the virtual local area network fixed by the interface according to the identifier included in the identifier intersection and sends an alarm prompt message.
进一步可选地,根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置,包括:Further, optionally, configuring the virtual local area network with the interface fixed according to the identifier included in the identifier intersection, including:
处理器401将接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;The processor 401 configures the interface-fixed virtual local area network to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
或者,or,
处理器401保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The processor 401 reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
进一步地,还包括:Further, it also includes:
处理器401生成第二通知消息,所述第二通知消息中包括已创建的虚拟局域网的标识集合,其中,周期性地生成所述第二通知消息;或者,在已创建的虚拟局域网发生变化时,生成所述第二通知消息;其中,所述生成所述第二通知消息需超过预设时长,所述预设时长为确定当前时间与前一次通知消息的发送时间之差;The processor 401 generates a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or when the created virtual local area network changes And generating the second notification message, where the generating the second notification message exceeds a preset duration, where the preset duration is a difference between determining a current time and a sending time of a previous notification message;
处理器401向第一设备发送所述通知消息。The processor 401 transmits the notification message to the first device.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令处理器来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:RAM、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art will appreciate that all or a portion of the steps to implement the various method embodiments described above can be accomplished by a program instruction processor. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims (15)

  1. 一种虚拟局域网接口的处理方法,其特征在于,包括:A method for processing a virtual local area network interface, comprising:
    第二设备通过所述第二设备的接口接收第一设备发送的第一通知消息,所述第一通知消息中包括所述第一设备已创建的虚拟局域网的标识集合;The second device receives the first notification message sent by the first device by using the interface of the second device, where the first notification message includes an identifier set of the virtual local area network that the first device has created;
    所述第二设备将所述接口固定到标识交集中包括的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识集合与所述第二设备已创建的虚拟局域网的标识集合之间的交集。The second device fixes the interface to a virtual local area network corresponding to the identifier included in the identifier intersection, wherein the identifier intersection is an identifier set of the virtual local area network included in the first notification message, and the second device is created. The intersection between the set of identities of the virtual local area network.
  2. 根据权利要求1所述的方法,其特征在于,所述第二设备将所述接口固定到所述标识交集中包括的标识对应的虚拟局域网,包括:The method according to claim 1, wherein the second device fixes the interface to a virtual local area network corresponding to the identifier included in the identifier intersection, and includes:
    所述第二设备确定所述标识交集中包括的标识对应的虚拟局域网与所述接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对所述接口固定的虚拟局域网进行处理。The second device determines whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
  3. 根据权利要求2所述的方法,其特征在于,所述第二设备根据所述标识交集对所述接口固定的虚拟局域网进行处理,包括以下一种:The method according to claim 2, wherein the second device processes the virtual local area network fixed by the interface according to the identifier intersection, and includes the following:
    所述第二设备根据所述标识交集中包括的标识,对所述接口固定的虚拟局域网进行配置;The second device configures the virtual local area network fixed by the interface according to the identifier included in the identifier intersection;
    所述第二设备发出告警提示信息;The second device sends an alert message;
    所述第二设备根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且所述第二设备发出告警提示信息。The second device configures a virtual local area network with an interface fixed according to the identifier included in the identifier intersection, and the second device sends an alert message.
  4. 根据权利要求3所述的方法,其特征在于,所述第二设备根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置,包括:The method according to claim 3, wherein the second device configures the virtual local area network fixed by the interface according to the identifier included in the identifier intersection, including:
    所述第二设备将接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;The second device configures the virtual local area network fixed by the interface to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
    或者,or,
    所述第二设备保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The second device reserves the virtual local area network corresponding to the identifier included in the identifier intersection, and deletes the virtual local area network corresponding to the identifier not included in the identifier intersection.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 4, further comprising:
    所述第二设备生成第二通知消息,所述第二通知消息中包括所述第二设备已创建的虚拟局域网的标识集合,其中,所述第二设备周期性地生成所述第二通知消息;或者,所述第二设备在已创建的虚拟局域网发生变化时,生成所述第二通知消息; The second device generates a second notification message, where the second notification message includes an identifier set of the virtual local area network that the second device has created, where the second device periodically generates the second notification message. Or the second device generates the second notification message when the created virtual local area network changes;
    所述第二设备向第一设备发送所述第二通知消息。The second device sends the second notification message to the first device.
  6. 一种网络设备,其特征在于,包括:A network device, comprising:
    接收模块,用于通过所述网络设备的接口接收另一设备发送的第一通知消息,所述第一通知消息中包括所述另一设备已创建的虚拟局域网的标识集合;a receiving module, configured to receive, by using an interface of the network device, a first notification message sent by another device, where the first notification message includes an identifier set of a virtual local area network that the another device has created;
    固定模块,用于将所述接口固定到所述标识交集中包括的标识对应的虚拟局域网,其中所述标识交集为所述第一通知消息中包括的虚拟局域网的标识集合与已创建的虚拟局域网的标识集合之间的交集。a fixed module, configured to fix the interface to a virtual local area network corresponding to the identifier included in the identifier intersection, where the identifier intersection is an identifier set of the virtual local area network included in the first notification message and the created virtual local area network The intersection between the set of logos.
  7. 根据权利要求6所述的网络设备,其特征在于,所述固定模块,具体用于:The network device according to claim 6, wherein the fixing module is specifically configured to:
    确定所述标识交集中包括的标识对应的虚拟局域网与所述接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对所述接口固定的虚拟局域网进行处理。Determining whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the fixed virtual local area network of the interface, and if not, processing the virtual local area network fixed by the interface according to the identifier intersection.
  8. 根据权利要求7所述的网络设备,其特征在于,所述固定模块,具体用于以下一种:The network device according to claim 7, wherein the fixed module is specifically used for the following:
    根据所述标识交集中包括的标识,对所述接口固定的虚拟局域网进行配置;And configuring, according to the identifier included in the identifier intersection, a virtual local area network fixed by the interface;
    发出告警提示信息;Send an alert message;
    根据所述标识交集中包括的标识,对所述接口固定的虚拟局域网进行配置并且发出告警提示信息。And configuring, according to the identifier included in the identifier intersection, the virtual local area network fixed by the interface, and issuing an alert message.
  9. 根据权利要求8所述的网络设备,其特征在于,所述固定模块,具体用于:The network device according to claim 8, wherein the fixing module is specifically configured to:
    将所述接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;Configuring the virtual local area network fixed by the interface to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
    或者,or,
    保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
  10. 根据权利要求6-9任一项所述的网络设备,其特征在于,还包括:The network device according to any one of claims 6-9, further comprising:
    生成模块,用于生成第二通知消息,所述第二通知消息中包括已创建的虚拟局域网的标识集合,其中,周期性地生成所述第二通知消息;或者,在已创建的虚拟局域网发生变化时,生成所述第二通知消息;a generating module, configured to generate a second notification message, where the second notification message includes an identifier set of the created virtual local area network, where the second notification message is periodically generated; or, occurs in the created virtual local area network Generating the second notification message when the change is made;
    发送模块,用于向所述另一设备发送所述通知消息。And a sending module, configured to send the notification message to the another device.
  11. 一种网络设备,包括:A network device, including:
    处理器,接口电路,存储器和总线,所述处理器、接口电路和存储器通过总线连接;a processor, an interface circuit, a memory and a bus, the processor, the interface circuit and the memory being connected by a bus;
    所述存储器用于存储程序代码; The memory is for storing program code;
    所述处理器用于调用所述存储器中存储的程序代码,并根据所述程序代码执行:The processor is configured to invoke program code stored in the memory and execute according to the program code:
    通过所述网络设备的接口接收另一设备发送的通知消息,所述通知消息中包括所述另一设备已创建的虚拟局域网的标识;Receiving, by the interface of the network device, a notification message sent by another device, where the notification message includes an identifier of a virtual local area network that the another device has created;
    确定标识交集,所述标识交集为所述通知消息中包括的虚拟局域网的标识集合与所述网络设备已创建的虚拟局域网的标识集合之间的交集;Determining an intersection of identifiers, the intersection of the identifier set of the virtual local area network included in the notification message and the identifier set of the virtual local area network that the network device has created;
    将所述接口固定到所述标识交集中包括的标识对应的虚拟局域网。And fixing the interface to a virtual local area network corresponding to the identifier included in the identifier intersection.
  12. 根据权利要求11所述的网络设备,其中,将所述接口固定到所述标识交集中包括的标识对应的虚拟局域网,包括:The network device according to claim 11, wherein the fixing the interface to the virtual local area network corresponding to the identifier included in the identifier intersection comprises:
    确定所述标识交集中包括的标识对应的虚拟局域网与接口已固定的虚拟局域网是否一致,若不一致,则根据所述标识交集对接口固定的虚拟局域网进行处理。It is determined whether the virtual local area network corresponding to the identifier included in the identifier intersection is consistent with the virtual local area network whose interface is fixed. If not, the virtual local area network fixed by the interface is processed according to the identifier intersection.
  13. 根据权利要求12所述的网络设备,其中,根据所述标识交集对接口固定的虚拟局域网进行处理,包括:The network device according to claim 12, wherein the processing of the fixed virtual local area network according to the identifier intersection comprises:
    根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置;Configuring a virtual local area network with a fixed interface according to the identifier included in the identifier intersection;
    发出告警提示信息;Send an alert message;
    根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置并且发出告警提示信息。And configuring, according to the identifier included in the identifier intersection, a virtual local area network with a fixed interface, and issuing an alert message.
  14. 根据权利要求13所述的网络设备,其中,根据所述标识交集中包括的标识,对接口固定的虚拟局域网进行配置,包括:The network device according to claim 13, wherein configuring the virtual local area network fixed by the interface according to the identifier included in the identifier intersection includes:
    将接口固定的虚拟局域网配置为与所述标识交集中包括的标识对应的虚拟局域网一致;Configuring the virtual local area network that is fixed by the interface to be consistent with the virtual local area network corresponding to the identifier included in the identifier intersection;
    或者,or,
    保留包括在所述标识交集中的标识对应的虚拟局域网,并删除未包括在所述标识交集中的标识对应的虚拟局域网。The virtual local area network corresponding to the identifier included in the identifier intersection is reserved, and the virtual local area network corresponding to the identifier not included in the identifier intersection is deleted.
  15. 根据权利要求11-14任一项所述的网络设备,所述处理器还用于根据所述程序代码执行:The network device according to any one of claims 11 to 14, wherein the processor is further configured to execute according to the program code:
    生成第二通知消息,所述第二通知消息中包括已创建的虚拟局域网的标识,其中,所述处理器周期性地生成所述第二通知消息;或者,所述处理器在已创建的虚拟局域网发生变化时,生成所述第二通知消息;Generating a second notification message, where the second notification message includes an identifier of the created virtual local area network, where the processor periodically generates the second notification message; or the processor is in the created virtual Generating the second notification message when the local area network changes;
    向所述另一设备发送所述第二通知消息。 Sending the second notification message to the another device.
PCT/CN2014/090205 2013-11-05 2014-11-04 Virtual local area network interface processing method and network device WO2015067157A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310542254.1A CN104618209A (en) 2013-11-05 2013-11-05 Virtual local area network interface processing method and network device
CN201310542254.1 2013-11-05

Publications (1)

Publication Number Publication Date
WO2015067157A1 true WO2015067157A1 (en) 2015-05-14

Family

ID=53040897

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090205 WO2015067157A1 (en) 2013-11-05 2014-11-04 Virtual local area network interface processing method and network device

Country Status (2)

Country Link
CN (1) CN104618209A (en)
WO (1) WO2015067157A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124760B (en) * 2021-11-23 2024-04-05 江苏信而泰智能装备有限公司 Network test stream number distribution method and device, network tester and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483587A (en) * 2008-12-30 2009-07-15 华为技术有限公司 Method, network node and network system for determining interface effective Tag set
CN102790692A (en) * 2011-05-19 2012-11-21 中兴通讯股份有限公司 Method for calculating network element interface and web master
CN102932342A (en) * 2012-10-26 2013-02-13 华为技术有限公司 Method and network equipment for isolating multi-user virtual local area network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571555B (en) * 2011-11-17 2014-11-05 杭州华三通信技术有限公司 Hello message sending method and device in neighborhood relationship establishing process

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483587A (en) * 2008-12-30 2009-07-15 华为技术有限公司 Method, network node and network system for determining interface effective Tag set
CN102790692A (en) * 2011-05-19 2012-11-21 中兴通讯股份有限公司 Method for calculating network element interface and web master
CN102932342A (en) * 2012-10-26 2013-02-13 华为技术有限公司 Method and network equipment for isolating multi-user virtual local area network

Also Published As

Publication number Publication date
CN104618209A (en) 2015-05-13

Similar Documents

Publication Publication Date Title
EP3128720B1 (en) Post-cluster brain split quorum processing method and quorum storage device and system
CN108712459B (en) Protocol message cross-layer communication method and device and electronic equipment
US10089028B2 (en) Remote secure drive discovery and access
US10511519B2 (en) Loop avoidance for event-driven virtual link aggregation
TWI638260B (en) An operable system when standby power of psu fails and computer-implemented method, non-transitory computer-readable storage medium thereof
US10313380B2 (en) System and method for centralized virtual interface card driver logging in a network environment
US9026629B2 (en) Graceful out-of-band power control of remotely-managed computer systems
US20150026322A1 (en) Configuring a network device
US10470111B1 (en) Protocol to detect if uplink is connected to 802.1D noncompliant device
US20150124814A1 (en) Enabling scalable virtual machine tracking in a data center fabric
TW201216162A (en) Out-of-band access to storage devices through port-sharing hardware
US20140192636A1 (en) Start-up delay for event-driven virtual link aggregation
US11258658B2 (en) Technologies for monitoring networked computing devices using deadman triggers
US9985862B2 (en) MEP configuration method and network device
WO2015067157A1 (en) Virtual local area network interface processing method and network device
WO2016106661A1 (en) Access control method for storage device, storage device, and control system
JP6034368B2 (en) Authentication information processing
WO2017049959A1 (en) Service processing method and equipment
US8930586B2 (en) Identification of electronic devices operating within a computing system
US20230006916A1 (en) Loop prevention system
JP6032024B2 (en) Computer system, computer system startup method, and program
US20110238796A1 (en) Electronic device and method
US20190334935A1 (en) Protocol to Detect a Foreign Device Connected Between Network Modules
WO2012149763A1 (en) Method and device for configuring operation, administration and maintenance attributes
Campbell et al. Providing I 2 C bus over Ethernet

Legal Events

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

Ref document number: 14859460

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14859460

Country of ref document: EP

Kind code of ref document: A1