CN106533700B - Method and device for realizing interface function - Google Patents

Method and device for realizing interface function Download PDF

Info

Publication number
CN106533700B
CN106533700B CN201610930395.4A CN201610930395A CN106533700B CN 106533700 B CN106533700 B CN 106533700B CN 201610930395 A CN201610930395 A CN 201610930395A CN 106533700 B CN106533700 B CN 106533700B
Authority
CN
China
Prior art keywords
interface
communication
equipment
virtual
forwarding module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610930395.4A
Other languages
Chinese (zh)
Other versions
CN106533700A (en
Inventor
李文群
郭玮维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610930395.4A priority Critical patent/CN106533700B/en
Publication of CN106533700A publication Critical patent/CN106533700A/en
Application granted granted Critical
Publication of CN106533700B publication Critical patent/CN106533700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention discloses a method and a device for realizing an interface function, which are applied to an upper connection device connected with a communication device; the method comprises the following steps: when a communication interface of the communication equipment does not have a functional module corresponding to the interface function to be realized, creating a virtual network card corresponding to the communication equipment according to interface information of the communication interface, and setting a virtual communication interface corresponding to the communication interface on the virtual network card; sending an interface state setting request aiming at the virtual communication interface to a forwarding module of the communication equipment through the forwarding module of the uplink equipment so as to enable the communication equipment to set the interface state of the communication interface; receiving a protocol message which is sent by the communication equipment through a forwarding module of the communication equipment and is matched with the interface state through the forwarding module of the uplink equipment; and processing the protocol message through a functional module of the uplink equipment. By applying the embodiment of the invention, the communication equipment with simpler hardware and software realizes the complex interface function and improves the user experience.

Description

Method and device for realizing interface function
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for implementing an interface function.
Background
Some communication devices with relatively simple hardware and software exist in the communication device, such as a panel AP (Access Point), a FitAP, a sensor, an internet of things node, and the like.
Communication interfaces of these communication devices often can only implement some simple interface functions, and cannot implement complex interface functions, resulting in low user experience. For example, the LAN port of the panel AP cannot realize a complicated interface function such as an STP (Spanning Tree Protocol) function or an 802.1X authentication function.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for realizing an interface function, which are used for realizing a complex interface function by communication equipment with simpler hardware and software, thereby improving user experience.
In order to achieve the above object, the embodiment of the present invention discloses a method for implementing an interface function, which is applied to an uplink device connected to a communication device; the method comprises the following steps:
when the communication equipment does not have a functional module corresponding to the interface function to be realized, creating a virtual network card corresponding to the communication equipment according to the interface information of the communication interface of the communication equipment, and setting a virtual communication interface corresponding to the communication interface on the virtual network card;
sending an interface state setting request aiming at the virtual communication interface to a forwarding module of the communication equipment through the forwarding module of the uplink equipment so that the communication equipment sets the interface state of the communication interface according to the obtained interface state setting request;
receiving, by a forwarding module of the uplink device, a protocol packet that is sent by the communication device through the forwarding module of the communication device and matches the interface state;
and processing the protocol message through a functional module of the uplink equipment.
In order to achieve the above object, an embodiment of the present invention further discloses an implementation method of an interface function, which is applied to a communication device, and the method includes:
when the communication equipment does not have a functional module corresponding to the interface function to be realized, sending interface information of a communication interface of the communication equipment to the uplink equipment of the communication equipment, so that the uplink equipment creates a virtual network card corresponding to the communication equipment according to the interface information of the communication interface, and sets a virtual communication interface corresponding to the communication interface on the virtual network card;
receiving, by a forwarding module of the communication device, an interface state setting request for the virtual communication interface, which is sent by the uplink device through the forwarding module of the uplink device;
setting the interface state of the communication interface according to the interface state setting request through a forwarding module of the communication equipment;
and sending the protocol message which is received by the communication interface and matched with the interface state to a forwarding module of the upper connection equipment through the forwarding module of the communication equipment so that the upper connection equipment obtains the protocol message and processes the protocol message through a functional module of the upper connection equipment.
In order to achieve the above object, the embodiment of the present invention further discloses an implementation apparatus of an interface function, which is applied to an uplink device connected to a communication device; the device comprises:
the creating module is used for creating a virtual network card corresponding to the communication equipment according to the interface information of the communication interface of the communication equipment when the communication equipment does not have a functional module corresponding to the interface function to be realized, and setting a virtual communication interface corresponding to the communication interface on the virtual network card;
a forwarding module, configured to send an interface state setting request for the virtual communication interface to a forwarding module of the communication device, so that the communication device sets an interface state of the communication interface according to the obtained interface state setting request; receiving a protocol message which is sent by the communication equipment through a forwarding module of the communication equipment and is matched with the interface state;
and the functional module is used for processing the protocol message received by the forwarding module.
In order to achieve the above object, an embodiment of the present invention further discloses an apparatus for implementing an interface function, which is applied to a communication device, and the apparatus includes:
the sending module is used for sending the interface information of the communication interface of the communication equipment to the uplink equipment of the communication equipment when the communication equipment does not have a functional module corresponding to the interface function to be realized, so that the uplink equipment creates a virtual network card corresponding to the communication equipment according to the interface information of the communication interface and sets a virtual communication interface corresponding to the communication interface on the virtual network card;
and the forwarding module is used for receiving an interface state setting request aiming at the virtual communication interface sent by the upper equipment through the forwarding module of the upper equipment, setting the interface state of the communication interface according to the interface state setting request, and sending a protocol message which is received by the communication interface and is matched with the interface state to the forwarding module of the upper equipment, so that the upper equipment obtains the protocol message and processes the protocol message through a functional module of the upper equipment.
The embodiment of the invention provides a method and a device for realizing an interface function, wherein a virtual network card corresponding to a communication device is arranged on an upper connection device of the communication device, a virtual communication interface corresponding to the communication interface is arranged on the virtual network card, when the interface function of the communication interface of the communication device is realized, the communication between the upper connection device and the communication device is realized through a forwarding module, the work conversion between the communication device and a virtual network card on the upper connection device is completed, the upper connection device considers that the virtual network card is the communication device, the complex interface function of the communication device with simpler hardware and software is realized, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the following descriptions of the embodiments or the prior art need to be provided
The drawings used are briefly described, it is obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings can be derived from them by a person skilled in the art without inventive effort.
Fig. 1 is a schematic flowchart of a method for implementing an interface function according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a communication structure according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another communication structure according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another method for implementing an interface function according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for implementing an interface function according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another interface function implementation apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The present invention will be described in detail below with reference to specific examples.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for implementing an interface function according to an embodiment of the present invention, where the method is applied to an uplink device connected to a communication device. Among these, the communication device can be understood as: the hardware and the software are simple communication equipment and do not have functional modules corresponding to the interface functions to be realized; the uplink device can be understood as: the communication equipment is provided with a functional module corresponding to the interface function to be realized.
Generally, a CPU (Central Processing Unit) and a memory of a communication device, both hardware and software of which are relatively simple, are relatively weak, and may cause a device crash when Processing relatively complex data calculation, while a CPU and a memory of an uplink device are relatively strong, and may process relatively complex data calculation, and a complex interface function is more easily implemented by using the uplink device.
In one embodiment of the present invention, the communication device may be an AP, a sensor, an internet of things node, or the like; the uplink device may be a switching device, an Access Controller (AC), or a convergence device.
Specifically, the method for implementing the interface function includes:
s101: when the communication equipment does not have a functional module corresponding to the interface function to be realized, creating a virtual network card corresponding to the communication equipment according to the interface information of the communication interface of the communication equipment, and setting a virtual communication interface corresponding to the communication interface on the virtual network card;
after the connection between the uplink device and the communication device is established, if the communication device needs to implement an interface function (which may be understood as an interface function to be implemented), but the communication device does not have a functional module corresponding to the interface function to be implemented, and the uplink device has a functional module corresponding to the interface function to be implemented, the uplink device may acquire interface information of a communication interface of the communication device from the communication device, for example: the number of communication interfaces, the load state of the communication interfaces, and the like; according to the acquired interface information, the uplink device can create a virtual network card corresponding to the communication device, and set a virtual communication interface corresponding to the communication interface of the communication device on the virtual network card. Here, the interface information of the virtual communication interface of the virtual network card matches the interface information of the communication interface of the communication device.
In an embodiment of the present invention, each functional module may implement one interface function, and in order to implement multiple interface functions, at least one functional module is configured on the uplink device; in addition, the uplink device may be connected to at least one communication device, so that when the interface function of the communication device is implemented, that is, when the interface function of the communication interface of the communication device is implemented, the network construction cost may be reduced. For example, n communication devices are connected with the uplink device, and n virtual network cards can be created on the uplink device, so that the number of the uplink devices configured for realizing the interface function of the communication device is reduced, and the network construction cost is reduced; in addition, from the perspective of the uplink device, creating a virtual network card on the uplink device can be understood that the communication device is inserted into an expansion card of the uplink device, so that the interface function on the communication device is very easily implemented when the uplink device has a function module corresponding to the interface function required by the communication device.
S102: sending an interface state setting request aiming at the virtual communication interface to a forwarding module of the communication equipment through the forwarding module of the uplink equipment;
in this case, the communication device may obtain the interface state setting request, and further set the interface state of the communication interface according to the interface state setting request.
Generally, the interface state is set to realize the interface function, which is only specific to the local device, that is, the uplink device can only set the interface state of the communication interface or the virtual communication interface of the local device, realize the interface function of the communication interface or the virtual communication interface of the local device, and cannot realize the interface function of the communication interface of the communication device connected to the local device. In this case, in order to implement the interface function of the communication interface of the communication device through the uplink device, a forwarding module may be disposed on both the uplink device and the communication device, and the work conversion between the real communication interface of the communication device and the virtual communication interface of the uplink device is completed through the communication between the forwarding modules, that is, the difference between the real communication interface of the communication device and the virtual communication interface of the uplink device is shielded, so that the uplink device considers that the virtual communication interface is the real communication interface.
In an embodiment of the present invention, referring to fig. 2, the structures of the uplink device and the communication device provided with the forwarding module may be that the virtual network card 200 corresponds to the communication device, and the virtual communication interface 500 corresponds to the communication interface 600. In this case, the interface state setting request may be understood as that the function module 100 creates and transmits to the virtual network card 200, and then the virtual network card 200 transmits to the forwarding module 300 of the uplink device. Based on the above, S102 may be:
the function module 100 creates an interface state setting request and sends the interface state setting request to the virtual network card 200;
the virtual network card 200 then sends the interface state setting request to the forwarding module 300 of the uplink device;
the forwarding module 300 then sends the interface state setting request to the forwarding module 400 of the communication device.
Thus, the communication device can obtain the interface state setting request through the forwarding module 400, and further set the interface state of the communication interface 600 according to the interface state setting request. For example, the interface status setting request is a BLOCK status setting request, and the communication device may set the communication interface to a BLOCK status. After the communication device sets the interface state of the communication interface 600, the communication interface 600 may filter the received message, that is, discard the message that does not match the interface state, and keep the message that matches the interface state.
It should be noted that the communication device may include at least one communication interface, and at this time, the virtual network card established on the uplink device for the communication device is provided with the corresponding at least one virtual communication interface. In addition, the interface function may be for a certain communication interface, in this case, in order to accurately set the interface state of the communication interface and implement the interface function of the communication interface, the forwarding module may receive an interface state setting request of which virtual communication interface from the virtual network card, and the communication device corresponding to the virtual network card may set only the interface state of the communication interface corresponding to the virtual communication interface.
S103: receiving, by a forwarding module of the uplink device, a protocol packet that is sent by the communication device through the forwarding module of the communication device and matches the interface state;
after a communication interface of the communication equipment obtains a protocol message matched with the interface state, the communication interface sends the protocol message to a forwarding module of the communication equipment, and the forwarding module of the communication equipment sends the protocol message to a forwarding module of the uplink equipment. Referring to fig. 2, the forwarding module 300 may send the protocol message to the virtual network card 200, and then the virtual network card 200 sends the protocol message to the function module 100; at this time, the functional module 100 considers that the protocol message is received by the virtual communication interface 500 of the virtual network card 200, and the virtual communication interface 500 of the virtual network card 200 needs to implement an interface function.
S104: and processing the protocol message through a functional module of the uplink equipment.
In this case, the interface function of the communication interface of the communication device is completed by the upper link device, for example, the interface state setting request is issued by the upper link device, the protocol packet is processed by the upper link device, and the like, so that the auxiliary communication device realizes the complex interface function of the communication interface of the communication device.
After receiving the protocol message, the function module of the uplink device processes the protocol message, determines the next interface state of the virtual communication on the virtual network card according to the information in the protocol message, and sends the setting request of the next interface state to the forwarding module of the communication device through the forwarding module of the uplink device so as to set the next interface state of the communication interface of the communication device.
The following describes in detail the implementation process of the interface function, taking the switch device as an uplink device, the panel AP as a communication device, and the switch device assists the panel AP to implement an STP (Spanning Tree Protocol) function of the LAN interface, specifically:
A. after the switching equipment establishes connection with the panel AP, the switching equipment acquires interface information of an LAN port of the panel AP, creates a virtual network card corresponding to the panel AP, and sets a virtual LAN port corresponding to the LAN port on the virtual network card;
here, the switching device may always store the virtual network card and the related virtual LAN port created for the panel AP, so that the virtual network card and the related virtual LAN port do not need to be created again when being reconnected after being disconnected from the panel AP, and can be directly used; of course, the created virtual network card and the relevant virtual LAN port may be deleted after the connection with the panel AP is disconnected, and the virtual network card and the relevant virtual LAN port may be created again by using the step a when the connection with the panel AP is made again.
B. The switching equipment starts an STP function module, the STP function module sends an interface state setting request for setting the interface state of a virtual LAN port to be a BLOCK state to a virtual network card, and the virtual network card sends the interface state setting request to a forwarding module of the switching equipment;
C. the forwarding module of the switching equipment sends the interface state setting request to the forwarding module of the panel AP;
D. and the forwarding module of the panel AP sets the LAN port of the panel AP to be in a BLOCK state according to the interface state setting request. At this time, the LAN port of the panel AP discards the received messages except for the BPDU (Bridge Protocol Data Unit) Protocol message, and sends the received BPDU Protocol message to the forwarding module of the panel AP, where the forwarding module of the panel AP forwards the BPDU Protocol message to the forwarding module of the switching device instead of processing the BPDU Protocol message.
E. After receiving the BPDU protocol message, a FORWARDING module of the switching device sends the BPDU protocol message to a virtual network card, and then the virtual network card sends the BPDU protocol message to an STP functional module, and the STP functional module considers that the BPDU protocol message is received by the virtual network card, and performs STP calculation according to the BPDU protocol message to obtain a next interface state (e.g., rwforward state) of the virtual LAN interface;
E. the STP function module sends an interface state setting request for setting the interface state of the virtual LAN port to a FORWARDING state to the virtual network card, the virtual network card sends the interface state setting request to a FORWARDING module of the switching equipment, the FORWARDING module of the switching equipment forwards the interface state setting request to a FORWARDING module of the panel AP, the FORWARDING module of the panel AP sets the LAN port of the panel AP to the FORWARDING state, the subsequent processing process is similar to the processing process after the panel AP sets the LAN port to a BLOCK state, and the FORWARDING module of the panel AP forwards a protocol message matched with the FORWARDING state to the FORWARDING module of the switching equipment and finally the protocol message is processed by the STP function module.
As can be seen from the above example, by setting the forwarding module and creating the virtual network card on the switching device, the LAN port on the remote panel AP can be virtualized on the switching device, so that the complex interface function of the LAN port can be realized by using the existing functional module with the complex interface function on the switching device and the auxiliary panel AP, thereby improving the user experience.
In an embodiment of the present invention, by applying the implementation method of the interface function, an authentication function of the panel AP LAN port may also be implemented, for example, an 802.1X authentication function of the panel AP LAN port needs to be implemented, which is similar to the above-mentioned process of implementing the STP function of the panel AP LAN port, and is different from the following steps:
01. the function module is an authentication function module, and the interface function is an 802.1X authentication function;
02. the message matched with the interface state is an EAPOL (Extensible Authentication protocol overlay Lan, based on the local area network) message;
03. the Authentication function module needs to communicate with an AAA (Authentication Authorization Accounting) server according to the EAPOL message to determine the state of the relevant interface.
It should be noted that the interface function may also be other complex interface functions, which are not listed here.
The embodiment of the invention provides a method for realizing an interface function, wherein a virtual network card corresponding to a communication device is arranged on an upper connection device of the communication device, a virtual communication interface corresponding to the communication interface is arranged on the virtual network card, when the interface function of the communication interface of the communication device is realized, the communication between the upper connection device and the communication device is realized through a forwarding module, the work conversion between the communication device and a virtual network card on the upper connection device is completed, the upper connection device considers that the virtual network card is the communication device, the communication device with simpler hardware and software realizes the complex interface function, and the user experience is improved.
It should be noted that, the step 101 may be implemented by a creating module separately disposed on the uplink device (that is, creating a virtual network card by the creating module and disposing a virtual communication interface on the virtual network card), and the communication interface of the communication device is assisted to implement a complex interface function through interaction between the function module of the uplink device and the creating module, interaction between the creating module and the forwarding module of the uplink device, and interaction between the forwarding module of the uplink device and the forwarding module of the communication device.
Of course, the step 101 may also be implemented by the forwarding module on the uplink device (i.e., creating a virtual network card by the forwarding module and setting a virtual communication interface on the virtual network card), and the communication interface of the communication device is assisted to implement a complex interface function through interaction between the function module of the uplink device and the forwarding module, and interaction between the forwarding module and the forwarding module of the communication device.
For example, in another embodiment of the present invention, the structures of the uplink device and the communication device provided with the forwarding module may refer to fig. 3, where the virtual network card 200 corresponds to the communication device, and the virtual communication interface 500 corresponds to the communication interface 600. In this case, the interface state setting request is created for the function module 100 and transmitted to the forwarding module 300 of the connected device. Based on the above, S102 may be:
the function module 100 creates an interface state setting request and sends the interface state setting request to the forwarding module 300 of the uplink device;
the forwarding module 300 then sends the interface state setting request to the forwarding module 400 of the communication device.
Thus, the communication device can obtain the interface state setting request through the forwarding module 400, and further set the interface state of the communication interface 600 according to the interface state setting request.
Here, before the forwarding module 300 sends the interface state setting request to the forwarding module 400, the forwarding module 300 may determine the virtual network card 200 corresponding to the interface state setting request according to the interface information of the virtual network card 200 created by the forwarding module 300 (this situation is suitable for the case where the forwarding module 300 creates a plurality of virtual network cards), further determine the communication device corresponding to the interface state setting request, and then send the interface state setting request to the forwarding module 400 of the determined communication device.
It should be noted that the communication device may include at least one communication interface, and at this time, the virtual network card established on the uplink device for the communication device is provided with the corresponding at least one virtual communication interface. In addition, the interface function may be for a certain communication interface, and in this case, in order to accurately set the interface state of the communication interface and implement the interface function of the communication interface, the forwarding module may determine, according to the interface information of the virtual network card created by the forwarding module, the virtual network card corresponding to the interface state setting request and the virtual communication interface of the virtual network card corresponding to the interface state setting request, further determine the communication device corresponding to the interface state setting request and the communication interface of the communication device corresponding to the interface state setting request, and then send the interface state setting request to the forwarding module of the determined communication device. In this way, the forwarding module can set only the determined interface state of the communication interface.
In addition, after the communication interface of the communication device obtains the protocol message matched with the interface state, the communication interface sends the protocol message to the forwarding module of the communication device, and the forwarding module of the communication device sends the protocol message to the forwarding module of the uplink device. Based on fig. 3, the forwarding module 300 may directly send the protocol packet to the functional module 100; at this time, the functional module 100 considers that the protocol packet is received by the virtual communication interface of the virtual network card 200 created by the forwarding module 300, and the virtual communication interface of the virtual network card 200 needs to implement an interface function.
Referring to fig. 4, fig. 4 is a flowchart illustrating another implementation method of an interface function according to an embodiment of the present invention, where the method is applied to a communication device. Among these, the communication device can be understood as: hardware and software are simple communication devices, and do not have functional modules corresponding to the interface functions to be realized.
S401: when the communication equipment does not have a functional module corresponding to the interface function to be realized, sending interface information of a communication interface of the communication equipment to the uplink equipment of the communication equipment;
therefore, the uplink device can create a virtual network card corresponding to the communication device according to the interface information of the communication interface, and set a virtual communication interface corresponding to the communication interface on the virtual network card.
Here, the uplink device may be understood as: the communication equipment is provided with a functional module corresponding to the interface function to be realized.
In one embodiment of the present invention, the communication device may be an AP, a sensor, an internet of things node, or the like; the uplink device can be a switching device, an AC or a convergence device, etc.
S402: receiving, by a forwarding module of the communication device, an interface state setting request for the virtual communication interface sent by the uplink device through the forwarding module of the uplink device
S403: setting the interface state of the communication interface according to the interface state setting request through a forwarding module of the communication equipment;
after the communication device sets the interface state of the communication interface, the communication interface can filter the received message, that is, discard the message that does not match the interface state, and keep the message that matches the interface state.
S404: and sending the protocol message which is received by the communication interface and matched with the interface state to a forwarding module of the uplink equipment through the forwarding module of the communication equipment.
It should be noted that, in the embodiment of the present invention, the structures of the uplink device and the communication device and the specific interaction process between the uplink device and the communication device have been described in the above embodiment, and are not described in detail here.
The embodiment of the invention provides a method for realizing an interface function, wherein a virtual network card corresponding to a communication device is arranged on an upper connection device of the communication device, a virtual communication interface corresponding to the communication interface is arranged on the virtual network card, when the interface function of the communication interface of the communication device is realized, the communication between the upper connection device and the communication device is realized through a forwarding module, the work conversion between the communication device and a virtual network card on the upper connection device is completed, the upper connection device considers that the virtual network card is the communication device, the communication device with simpler hardware and software realizes the complex interface function, and the user experience performance is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus for implementing an interface function according to an embodiment of the present invention, which corresponds to fig. 1 and is applied to an uplink device connected to a communication device; the device comprises:
a creating module 501, configured to, when the communication device does not have a functional module corresponding to an interface function to be implemented, create a virtual network card corresponding to the communication device according to interface information of a communication interface of the communication device, and set a virtual communication interface corresponding to the communication interface on the virtual network card;
a forwarding module 502, configured to send an interface state setting request for the virtual communication interface to a forwarding module of the communication device, so that the communication device sets an interface state of the communication interface according to the obtained interface state setting request, and receives a protocol packet that is sent by the communication device through the forwarding module of the communication device and matches with the interface state;
a function module 504, configured to process the protocol packet received by the forwarding module.
In an embodiment of the present invention, the interface state setting request is created for the functional module and sent to the virtual network card, and then sent to the forwarding module of the uplink device by the virtual network card, which is applicable to the case that the creating module 501 and the forwarding module 502 are two separate modules, as shown in fig. 5; or a forwarding module is created for the functional module and sent to the uplink device, which is applicable to the case that the creating module 501 and the forwarding module 502 are the same module, that is, both forwarding modules.
In an embodiment of the present invention, the communication device is an AP, and the uplink device is a switching device, an AC, or an aggregation device.
The embodiment of the invention provides an implementation device of an interface function, wherein a virtual network card corresponding to a communication device is arranged on an upper connection device of the communication device, a virtual communication interface corresponding to the communication interface is arranged on the virtual network card, when the interface function of the communication interface of the communication device is implemented, the communication between the upper connection device and the communication device is implemented through a forwarding module, the work conversion between the communication device and a virtual network card on the upper connection device is completed, the upper connection device considers that the virtual network card is the communication device, and therefore the communication device with simpler hardware and software realizes a complex interface function, and the user experience performance is improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an apparatus for implementing an interface function according to an embodiment of the present invention, which corresponds to fig. 4 and is applied to a communication device, where the apparatus includes:
a sending module 601, configured to send, when the communication device does not have a function module corresponding to an interface function to be implemented, interface information of a communication interface of the communication device to an uplink device of the communication device, so that the uplink device creates a virtual network card corresponding to the communication device according to the interface information of the communication interface, and sets a virtual communication interface corresponding to the communication interface on the virtual network card;
a forwarding module 602, configured to receive an interface state setting request, sent by the uplink device through the forwarding module of the uplink device, for the virtual communication interface, set an interface state of the communication interface according to the interface state setting request, and send a protocol packet received by the communication interface and matched with the interface state to the forwarding module of the uplink device, so that the uplink device obtains the protocol packet and processes the protocol packet through a function module of the uplink device.
In an embodiment of the present invention, the communication device is an AP, and the uplink device is a switching device, an AC, or an aggregation device.
The embodiment of the invention provides an implementation device of an interface function, wherein a virtual network card corresponding to a communication device is arranged on an upper connection device of the communication device, a virtual communication interface corresponding to the communication interface is arranged on the virtual network card, when the interface function of the communication interface of the communication device is implemented, the communication between the upper connection device and the communication device is implemented through a forwarding module, the work conversion between the communication device and a virtual network card on the upper connection device is completed, the upper connection device considers that the virtual network card is the communication device, and therefore the communication device with simpler hardware and software realizes a complex interface function, and the user experience performance is improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. The method for realizing the interface function is characterized by being applied to an uplink device connected with a communication device; the method comprises the following steps:
when the communication equipment does not have a functional module corresponding to the interface function to be realized, creating a virtual network card corresponding to the communication equipment according to the interface information of the communication interface of the communication equipment, and setting a virtual communication interface corresponding to the communication interface on the virtual network card;
sending an interface state setting request aiming at the virtual communication interface to a forwarding module of the communication equipment through the forwarding module of the uplink equipment, so that the communication equipment sets the interface state of the communication interface corresponding to the virtual communication interface according to the obtained interface state setting request, wherein the interface state after the communication interface corresponding to the virtual communication interface is set is the interface state specified by the interface state setting request;
receiving, by a forwarding module of the uplink device, a protocol packet that is sent by the communication device through the forwarding module of the communication device and matches the interface state;
and processing the protocol message through a functional module of the uplink equipment.
2. The method according to claim 1, wherein the interface state setting request is created for the functional module and sent to the virtual network card, and then sent to a forwarding module of the uplink device by the virtual network card, or created for the functional module and sent to a forwarding module of the uplink device.
3. The method of claim 1, wherein the communication device is an Access Point (AP), and wherein the uplink device is a switching device, an Access Controller (AC), or an aggregation device.
4. A method for implementing interface function is applied to communication equipment, and the method comprises the following steps:
when the communication equipment does not have a functional module corresponding to the interface function to be realized, sending interface information of a communication interface of the communication equipment to the uplink equipment of the communication equipment, so that the uplink equipment creates a virtual network card corresponding to the communication equipment according to the interface information of the communication interface, and sets a virtual communication interface corresponding to the communication interface on the virtual network card;
receiving, by a forwarding module of the communication device, an interface state setting request for the virtual communication interface, which is sent by the uplink device through the forwarding module of the uplink device;
setting an interface state of a communication interface corresponding to the virtual communication interface according to the interface state setting request through a forwarding module of the communication equipment, wherein the interface state after the communication interface corresponding to the virtual communication interface is set is an interface state specified by the interface state setting request;
and sending the protocol message which is received by the communication interface and matched with the interface state to a forwarding module of the upper connection equipment through the forwarding module of the communication equipment so that the upper connection equipment obtains the protocol message and processes the protocol message through a functional module of the upper connection equipment.
5. The method of claim 4, wherein the communication device is an Access Point (AP), and wherein the uplink device is a switching device, an Access Controller (AC), or an aggregation device.
6. The device for realizing the interface function is characterized by being applied to an upper connection device connected with a communication device; the device comprises:
the creating module is used for creating a virtual network card corresponding to the communication equipment according to the interface information of the communication interface of the communication equipment when the communication equipment does not have a functional module corresponding to the interface function to be realized, and setting a virtual communication interface corresponding to the communication interface on the virtual network card;
a forwarding module, configured to send an interface state setting request for the virtual communication interface to a forwarding module of the communication device, so that the communication device sets an interface state of a communication interface corresponding to the virtual communication interface according to the obtained interface state setting request, where the interface state after setting the communication interface corresponding to the virtual communication interface is an interface state specified by the interface state setting request, and receives a protocol packet, which is sent by the communication device through the forwarding module of the communication device and matches the interface state;
and the functional module is used for processing the protocol message received by the forwarding module.
7. The apparatus according to claim 6, wherein the interface state setting request is created for the functional module and sent to the virtual network card, and then sent to the forwarding module of the uplink device by the virtual network card, or created for the functional module and sent to the forwarding module of the uplink device.
8. The apparatus of claim 6, wherein the communication device is an Access Point (AP), and the uplink device is a switch device, an Access Controller (AC), or an aggregation device.
9. An apparatus for implementing interface function, applied to a communication device, the apparatus comprising:
the sending module is used for sending the interface information of the communication interface of the communication equipment to the uplink equipment of the communication equipment when the communication equipment does not have a functional module corresponding to the interface function to be realized, so that the uplink equipment creates a virtual network card corresponding to the communication equipment according to the interface information of the communication interface and sets a virtual communication interface corresponding to the communication interface on the virtual network card;
and the forwarding module is used for receiving an interface state setting request aiming at the virtual communication interface sent by the upper equipment through the forwarding module of the upper equipment, setting the interface state of the communication interface corresponding to the virtual communication interface according to the interface state setting request, wherein the interface state after the communication interface corresponding to the virtual communication interface is set is the interface state appointed by the interface state setting request, and sending a protocol message received by the communication interface and matched with the interface state to the forwarding module of the upper equipment, so that the upper equipment obtains the protocol message and processes the protocol message through the functional module of the upper equipment.
10. The apparatus of claim 9, wherein the communication device is an access point AP, and the uplink device is a switch device, an access controller AC, or an aggregation device.
CN201610930395.4A 2016-10-31 2016-10-31 Method and device for realizing interface function Active CN106533700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610930395.4A CN106533700B (en) 2016-10-31 2016-10-31 Method and device for realizing interface function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610930395.4A CN106533700B (en) 2016-10-31 2016-10-31 Method and device for realizing interface function

Publications (2)

Publication Number Publication Date
CN106533700A CN106533700A (en) 2017-03-22
CN106533700B true CN106533700B (en) 2021-03-02

Family

ID=58292748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610930395.4A Active CN106533700B (en) 2016-10-31 2016-10-31 Method and device for realizing interface function

Country Status (1)

Country Link
CN (1) CN106533700B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532756B (en) * 2019-09-17 2023-10-24 华为技术有限公司 Interface expansion method, device and system
CN112532540A (en) * 2019-09-17 2021-03-19 华为技术有限公司 Interface management method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932174A (en) * 2012-10-25 2013-02-13 华为技术有限公司 Method, device and physical host for managing physical network card
CN103957242A (en) * 2014-04-16 2014-07-30 北京大学工学院南京研究院 Internet-of-things gateway achieving IP virtualization conversion
CN104158768A (en) * 2014-07-01 2014-11-19 汉柏科技有限公司 Method and system for extending network interfaces, and method for receiving and sending message
WO2015109478A1 (en) * 2014-01-23 2015-07-30 华为技术有限公司 Method, switch, and controller for implementing arp

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932174A (en) * 2012-10-25 2013-02-13 华为技术有限公司 Method, device and physical host for managing physical network card
WO2015109478A1 (en) * 2014-01-23 2015-07-30 华为技术有限公司 Method, switch, and controller for implementing arp
CN105379228A (en) * 2014-01-23 2016-03-02 华为技术有限公司 Method, switch, and controller for implementing ARP
CN103957242A (en) * 2014-04-16 2014-07-30 北京大学工学院南京研究院 Internet-of-things gateway achieving IP virtualization conversion
CN104158768A (en) * 2014-07-01 2014-11-19 汉柏科技有限公司 Method and system for extending network interfaces, and method for receiving and sending message

Also Published As

Publication number Publication date
CN106533700A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN105634956B (en) A kind of message forwarding method, device and system
US20180261089A1 (en) Vehicle navigation under control of an interactive terminal
CN105657746B (en) A kind of wireless terminal fast roaming system and method based on AP syntople
US9749320B2 (en) Method and system for wireless local area network user to access fixed broadband network
CN108616431A (en) A kind of message processing method, device, equipment and machine readable storage medium
EP2999250B1 (en) Method and apparatus for interconnection between terminal device and gateway device
CN111817869B (en) Network configuration recovery method and related equipment thereof
EP3267759A1 (en) Gateway device automatic networking method and device
CN101262350A (en) A realization method, system and device for Portal dual host hot swap
CN111865736A (en) Equipment control method and device
CN103179100A (en) Method and device for preventing the attack on a domain name system tunnel
CN101621527B (en) Method, system and device for realizing safety certificate based on Portal in VPN
CN109104475A (en) Connect restoration methods, apparatus and system
CN105939519A (en) Authentication method and device
CN106533700B (en) Method and device for realizing interface function
CN108966363A (en) A kind of connection method for building up and device
CN113873491A (en) Communication apparatus, system, and computer-readable storage medium
CN107645570A (en) Client loading method and device
CN101860551A (en) Multi-user authentication method and system under single access port
CN103199990B (en) A kind of method and apparatus of Routing Protocol certification migration
CN108600225B (en) Authentication method and device
CN103546286A (en) Authentication processing method and device
CN109327375B (en) Method, device and system for establishing VXLAN tunnel
CN107566418B (en) Security management method and access device
CN110191008A (en) The method of self-service Configuration network equipment, user terminal, server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou science and Technology Industrial Park, high tech Industrial Development Zone, Zhejiang Province, No. six and road, No. 310

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant