[go: up one dir, main page]

CN113055228B - A wireless network card-based non-aware network bridging method and device thereof - Google Patents

A wireless network card-based non-aware network bridging method and device thereof Download PDF

Info

Publication number
CN113055228B
CN113055228B CN202110246964.4A CN202110246964A CN113055228B CN 113055228 B CN113055228 B CN 113055228B CN 202110246964 A CN202110246964 A CN 202110246964A CN 113055228 B CN113055228 B CN 113055228B
Authority
CN
China
Prior art keywords
virtual machine
wireless network
network card
protocol
data
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
CN202110246964.4A
Other languages
Chinese (zh)
Other versions
CN113055228A (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.)
Shenzhen Onething Technologies Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technologies Co Ltd filed Critical Shenzhen Onething Technologies Co Ltd
Priority to CN202110246964.4A priority Critical patent/CN113055228B/en
Publication of CN113055228A publication Critical patent/CN113055228A/en
Application granted granted Critical
Publication of CN113055228B publication Critical patent/CN113055228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/20Network management software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

本申请公开了一种基于无线网卡的无感知网络桥接方法,无感知网络桥接方法包括:在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议;利用驱动监听虚拟机是否有数据待发送至无线网卡,或无线网卡端是否接收到待发送给虚拟机的数据;如果通过驱动监听有虚拟机或无线网卡有数据待发送,将发送方的源地址以及网络协议按照设定条件进行转换后,将数据发送至接收方,通过上述基于windows内核中无线网卡的协议驱动建立无感知网络桥接,在虚拟机通过宿主机的无线网卡进行网络传输时,不影响宿主机的上网正常上网功能,实现了虚拟机的无感知网络数据连接。

The present application discloses a non-perceived network bridging method based on a wireless network card. The non-perceived network bridging method includes: installing a driver network protocol corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located; using the driver to monitor whether the virtual machine has data to be sent to the wireless network card, or whether the wireless network card end has received data to be sent to the virtual machine; The above-mentioned protocol driver based on the wireless network card in the windows kernel establishes a non-aware network bridge. When the virtual machine performs network transmission through the wireless network card of the host machine, it does not affect the normal Internet access function of the host machine, and realizes the non-aware network data connection of the virtual machine.

Description

一种基于无线网卡的无感知网络桥接方法及其装置A wireless network card-based non-aware network bridging method and device thereof

技术领域technical field

本发明涉及无线通信技术领域,特别是涉及一种基于无线网卡的无感知网络桥接方法及其装置。The invention relates to the technical field of wireless communication, in particular to a wireless network card-based non-perception network bridging method and a device thereof.

背景技术Background technique

虚拟机是指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。在实体计算机中能够完成的工作在虚拟机中都能够实现。在计算机中创建虚拟机时,需要将实体机的部分硬盘和内存容量作为虚拟机的硬盘和内存容量。每个虚拟机都有独立的CMOS、硬盘和操作系统,可以像使用实体机一样对虚拟机进行操作。A virtual machine refers to a complete computer system that is simulated by software and has complete hardware system functions and runs in a completely isolated environment. Everything that can be done on a physical computer can be done on a virtual machine. When creating a virtual machine on a computer, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent CMOS, hard disk and operating system, and the virtual machine can be operated like a physical machine.

在基于windows qemu虚拟机中,想要让虚拟机上网,有两种方式,一种是NAT(网络地址转换)的方式,但是使用NAT方式实现上网需要对虚拟网和局域网的IP地址进行统一规划,该方法由于是由纯软件实现,并且功能不全(例:不支持icmp协议,无法ping),因此,大部分人会选择使用桥接的方式使虚拟机实现上网功能。In a Windows-based qemu virtual machine, there are two ways to allow the virtual machine to access the Internet. One is the NAT (Network Address Translation) method. However, using NAT to achieve Internet access requires unified planning of the IP addresses of the virtual network and the LAN. This method is implemented by pure software and has incomplete functions (for example: does not support the icmp protocol and cannot ping). Therefore, most people will choose to use bridging to enable the virtual machine to achieve Internet access.

现有技术中,通常需要借助TAP虚拟网卡,再借助windows创建网桥的方法进行网络桥接,以实现windows qemu虚拟机上网,但是该方法在实践中经常会导致断网一会或者断网后不可恢复,应用到产品中非常有风险。In the prior art, it is usually necessary to use the TAP virtual network card, and then use the method of windows to create a bridge for network bridging to realize the windows qemu virtual machine to access the Internet. However, in practice, this method often leads to disconnection of the network for a while or cannot be restored after the disconnection. It is very risky to apply it to products.

发明内容Contents of the invention

本申请提供一种基于无线网卡的无感知网络桥接方法及其装置,本申请基于windows内核中网卡的协议驱动进行研究,实现了一套无感知的桥接方案,以克服现有技术中的桥接网络创建过程中出现的断网现象。The present application provides a wireless network card-based non-perceptual network bridging method and its device. The present application conducts research based on the protocol driver of the network card in the windows kernel, and implements a set of non-perceptual bridging solutions to overcome the disconnection phenomenon that occurs during the creation of the bridged network in the prior art.

为解决上述技术问题,本申请采用的一个技术方案是提供提供一种基于无线网卡的无感知网络桥接方法,该无感网络桥接方法包括:在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议;利用所述驱动监听所述虚拟机是否有数据待发送至所述无线网卡,或所述无线网卡端是否接收到待发送给所述虚拟机的数据;如果通过所述驱动监听所述虚拟机或所述无线网卡有数据待发送,将发送方的源地址以及网络协议按照设定条件进行转换后,将所述数据发送至接收方。In order to solve the above-mentioned technical problems, a technical solution adopted by the present application is to provide a wireless network card-based non-sensing network bridging method, the non-sensing network bridging method comprising: installing a driver network protocol corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located; using the driver to monitor whether the virtual machine has data to be sent to the wireless network card, or whether the wireless network card terminal has received data to be sent to the virtual machine; After converting the source address and network protocol according to the set conditions, the data is sent to the receiver.

在一实施方式中,如果通过所述驱动监听所述虚拟机或所述无线网卡有数据待发送,将发送方的源地址以及网络协议按照设定条件进行转换后,将数据发送至接收方的步骤包括:如果通过所述驱动监听到所述虚拟机有数据待发送至所述无线网卡,通过所述驱动将所述虚拟机的源mac地址修改为所述无线网卡的源mac地址;如果通过所述驱动监听到所述无线网卡端接收到待发送给所述虚拟机的数据,通过所述驱动将所述无线网卡的源mac地址修改为所述虚拟机的源mac地址。In one embodiment, if the driver monitors that the virtual machine or the wireless network card has data to be sent, after converting the source address of the sender and the network protocol according to the set conditions, the step of sending the data to the receiver includes: if the driver detects that the virtual machine has data to be sent to the wireless network card, modify the source mac address of the virtual machine to the source mac address of the wireless network card through the driver; The source mac address is changed to the source mac address of the virtual machine.

在一实施方式中,所述如果通过所述驱动监听所述虚拟机或所述无线网卡有数据待发送,将发送方的源地址以及网络协议安装设定条件进行转换后,将所述数据发送至接收方的步骤包括:如果通过所述驱动监听所述虚拟机或所述无线网卡有数据待发送,通过所述windows系统的nwifi.sys驱动文件将发送方的网络协议进行修改。In one embodiment, if the virtual machine or the wireless network card has data to be sent through the driver monitoring, after converting the source address of the sender and the network protocol installation setting conditions, the step of sending the data to the receiver includes: if the driver monitors the virtual machine or the wireless network card has data to be sent, modify the network protocol of the sender through the nwifi.sys driver file of the windows system.

在一实施方式中,所述通过所述windows系统的nwifi.sys驱动文件将发送方的网络协议进行修改的步骤包括:如果通过所述驱动监听到所述虚拟机有数据待发送至所述无线网卡,通过所述nwifi.sys驱动文件将802.3网络协议转换为802.11网络协议,利用所述802.11网络协议将所述数据发送至所述无线网卡;如果通过所述驱动监听到所述无线网卡端接收到待发送给所述虚拟机的数据,通过所述nwifi.sys驱动文件将802.11网络协议转换为802.3网络协议,利用所述802.3网络协议将所述数据发送至所述虚拟机。In one embodiment, the step of modifying the network protocol of the sender through the nwifi.sys driver file of the windows system includes: if it is detected through the driver that the virtual machine has data to be sent to the wireless network card, converting the 802.3 network protocol into an 802.11 network protocol through the nwifi.sys driver file, and using the 802.11 network protocol to send the data to the wireless network card; , converting the 802.11 network protocol into an 802.3 network protocol through the nwifi.sys driver file, and using the 802.3 network protocol to send the data to the virtual machine.

在一实施方式中,所述利用所述802.3网络协议将所述数据发送至所述虚拟机的步骤之后包括:通过所述驱动将所述无线网卡的源地址转换为所述虚拟机的源地址,以使所述虚拟机接收所述数据。In one embodiment, after the step of sending the data to the virtual machine using the 802.3 network protocol, the step includes: converting the source address of the wireless network card to the source address of the virtual machine through the driver, so that the virtual machine can receive the data.

在一实施方式中,所述在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议的步骤包括:在所述虚拟机所在的所述windows系统的虚拟网卡上安装混杂模式对应的网络协议的驱动,以在所述windows系统的无线网卡上安装所述网络协议。In one embodiment, the step of installing the driver network protocol corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located includes: installing the driver of the network protocol corresponding to the promiscuous mode on the virtual network card of the windows system where the virtual machine is located, so as to install the network protocol on the wireless network card of the windows system.

在一实施方式中,所述在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议的步骤包括:在所述虚拟机同一网段的虚拟网卡上安装混杂模式对应的网络协议的驱动,以在所有所述无线网卡上安装所述网络协议。In one embodiment, the step of installing the driver network protocol corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located includes: installing the driver of the network protocol corresponding to the promiscuous mode on the virtual network card on the same network segment of the virtual machine, so as to install the network protocol on all the wireless network cards.

为解决上述技术问题,本申请采用的另一个技术方案是提供一种基于无线网卡的无感知网络桥接装置,包括:虚拟机;协议驱动单元,与所述虚拟机连接,用于将混杂模式对应的网络协议的驱动安装到所述无线网卡上,并利用所述驱动监听所述虚拟机与所述无线网卡是否有数据待发送;协议转换单元,与协议驱动单元连接,用于将发送方的源地址以及网络协议按照设定条件进行转换;无线接口收发单元,与所述协议驱动单元连接,用于识别通过所述接口接收或发送的数据。In order to solve the above technical problems, another technical solution adopted by the present application is to provide a wireless network card-based non-aware network bridging device, including: a virtual machine; a protocol driver unit, connected to the virtual machine, for installing a network protocol driver corresponding to the promiscuous mode on the wireless network card, and using the driver to monitor whether the virtual machine and the wireless network card have data to be sent; a protocol conversion unit, connected to the protocol driver unit, for converting the source address of the sender and the network protocol according to the set conditions; a wireless interface transceiver unit, connected to the protocol driver unit, for identifying Data received or sent through the interface.

在一实施方式中,协议驱动单元还用于将混杂模式对应的协议安装到所有与虚拟机在同一网段的系统上。In one embodiment, the protocol driver unit is further configured to install the protocol corresponding to the promiscuous mode on all systems on the same network segment as the virtual machine.

在一实施方式中,协议转换单元用于将发送方的源mac地址转换为接收方的源mac地址以及控制802.3网络协议与802.11网络协议的相互转换。In one embodiment, the protocol conversion unit is used to convert the source mac address of the sender into the source mac address of the receiver and control the mutual conversion between the 802.3 network protocol and the 802.11 network protocol.

本申请的有益效果是:在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议;利用驱动监听虚拟机是否有数据待发送至无线网卡,或无线网卡端是否接收到待发送给虚拟机的数据;如果通过驱动监听有虚拟机或无线网卡有数据待发送,将发送方的源地址以及网络协议按照设定条件进行转换后,将数据发送至接收方,通过上述基于windows内核中无线网卡的协议驱动建立无感知网络桥接,在虚拟机通过宿主机的网卡进行网络传输时,不影响宿主机的上网正常上网功能,实现了虚拟机的无感知网络桥接。The beneficial effects of the present application are: install the network protocol of the driver corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located; use the driver to monitor whether the virtual machine has data to be sent to the wireless network card, or whether the wireless network card end has received data to be sent to the virtual machine; Bridging, when the virtual machine performs network transmission through the network card of the host machine, it does not affect the normal Internet access function of the host machine, and realizes the non-aware network bridging of the virtual machine.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.

图1是本申请基于无线网卡的无感知网络系统一实施方式的结构示意图;Fig. 1 is a schematic structural diagram of an embodiment of a non-aware network system based on a wireless network card in the present application;

图2是本申请基于无线网卡的无感知网络桥接方法一实施方式的流程示意图;FIG. 2 is a schematic flow diagram of an embodiment of a non-aware network bridging method based on a wireless network card in the present application;

图3为本申请基于无线网卡的无感知网络桥接装置一实施方式的结构示意图。FIG. 3 is a schematic structural diagram of an embodiment of a wireless network card-based non-aware network bridging device of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,均属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。Terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "the", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the above clearly expresses other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used herein is only an association relationship describing associated objects, which means that there may be three kinds of relationships, for example, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.

应当理解,本文中使用的术语“包括”、“包含”或者其他任何变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be understood that the terms "comprising", "comprising", or any other variation thereof as used herein are intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements but also other elements not expressly listed or which are inherent in such a process, method, article or apparatus. Without further limitations, an element defined by the statement "comprising..." does not exclude the presence of additional same elements in the process, method, article or device comprising said element.

需要说明的是,传统意义上的网卡是一块被设计用来允许计算机在计算机网络上进行通讯的计算机硬件。由于其拥有mac地址,因此属于OSI模型的第2层。它使得用户可以通过电缆或无线相互连接的重要物理硬件。在一台电脑中可以将计算机硬件分成多个物理硬件,以实现计算机同时包含有线网卡和无线网卡等多个上网物理硬件。本申请的网卡至少包括有线网卡、无线网卡、以及多个虚拟网卡等。在本申请中无线网卡是指计算机通过无线连接网络进行上网使用的硬件。It should be noted that a network card in the traditional sense is a piece of computer hardware designed to allow computers to communicate on a computer network. Because it has a mac address, it belongs to layer 2 of the OSI model. It enables users to connect vital physical hardware to each other via cables or wirelessly. In a computer, the computer hardware can be divided into multiple physical hardware, so that the computer simultaneously includes multiple physical hardware such as wired network cards and wireless network cards. The network card in this application includes at least a wired network card, a wireless network card, and multiple virtual network cards. In this application, a wireless network card refers to hardware used by a computer to access the Internet through a wireless connection network.

通常所说的无感知认证是指用户使用一台设备上网时,只有首次登录需要进行Web认证,再次使用时就不需要再输入用户名密码了,即使用户异常掉线,如:关机重启、意外断网或离开校园无线网区域,当终端再次连接有线网或进入无线网络覆盖区域时均可自动认证,实现用户永远在线。这一过程由系统自动完成,对用户“无感知”。在本申请中的无感知网络桥接是指虚拟机使用宿主机的网卡进行上网时,不影响宿主机的原网卡上网情况,从而实现宿主机的无感知上网。The so-called non-aware authentication means that when a user uses a device to access the Internet, only the first login requires web authentication, and there is no need to enter the user name and password again when using it again. Even if the user is offline abnormally, such as: shutdown and restart, accidental network disconnection or leaving the campus wireless network area, when the terminal connects to the wired network again or enters the wireless network coverage area, it can be automatically authenticated, so that the user is always online. This process is done automatically by the system and is "insensitive" to the user. The non-aware network bridging in this application means that when the virtual machine uses the network card of the host machine to access the Internet, it does not affect the network connection of the original network card of the host machine, thereby realizing the non-aware Internet access of the host machine.

802.3是一种支持IEEE802.3网络架构的技术。IEEE802.3是工作组和工作组制定的电气和电子工程师协会(IEEE)标准的集合,该工作组定义了有线以太网的物理层和数据链路层的介质访问控制(mac)。IEEE802.11是现今无线局域网通用的标准,它是由电气和电子工程师协会(IEEE)所定义的无线网络通信的标准。802.3 is a technology that supports IEEE802.3 network architecture. IEEE802.3 is a collection of Institute of Electrical and Electronics Engineers (IEEE) standards developed by working groups and working groups that define media access control (mac) for the physical layer and data link layer of wired Ethernet. IEEE802.11 is a common standard for wireless local area networks today, and it is a standard for wireless network communication defined by the Institute of Electrical and Electronics Engineers (IEEE).

网络桥接(Bridging)是指依据OSI网络模型的链路层的地址,对网络数据包进行转发的过程。通过网桥可以把两个不同的物理局域网连接起来,是一种在链路层实现局域网互连的存储转发设备。具体地,网桥从一个局域网接收mac帧,拆封、校对、校验之后,按另一个局域网的格式重新组装,发往它的物理层,通俗地说就是通过一台设备(可能不止一个)把几个网络串起来形成的连接,在本申请中是通过虚拟网卡使虚拟机的网络与无线网卡的网络建立桥接。Network bridging (Bridging) refers to the process of forwarding network data packets according to the address of the link layer of the OSI network model. Two different physical LANs can be connected through a bridge, and it is a store-and-forward device that realizes LAN interconnection at the link layer. Specifically, the network bridge receives mac frames from one LAN, after unpacking, proofreading, and verification, reassembles them according to the format of another LAN, and sends them to its physical layer. Generally speaking, it is a connection formed by connecting several networks together through one device (maybe more than one). In this application, the network of the virtual machine and the network of the wireless network card are bridged through the virtual network card.

本申请提供一种虚拟机基于无线网卡的无感知上网系统,如图1所示,图1为本申请基于无线网卡的无感知网络桥接方法,该无感知网络桥接方法包括以下步骤:The present application provides a non-perceived network access system based on a wireless network card for a virtual machine, as shown in FIG. 1 , and FIG. 1 is a non-perceived network bridging method based on a wireless network card of the present application. The non-perceived network bridging method includes the following steps:

步骤S11:在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议。Step S11: Install the network protocol of the driver corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located.

具体包括:将混杂模式对应的网络协议的驱动安装至windows系统的虚拟网卡上,再通过虚拟网卡与无线网卡的数据连接关系,将混杂模式对应的网络协议的驱动安装至无线网卡上。在本步骤中,协议驱动的安装可由windows系统的驱动层进行自动安装。在本步骤之前还包括:在windows系统的应用层建立一个虚拟化方案以形成一个独立于windows系统的虚拟机。Specifically include: installing the driver of the network protocol corresponding to the promiscuous mode on the virtual network card of the windows system, and then installing the driver of the network protocol corresponding to the promiscuous mode on the wireless network card through the data connection relationship between the virtual network card and the wireless network card. In this step, the installation of the protocol driver can be automatically installed by the driver layer of the windows system. Before this step, it also includes: establishing a virtualization solution at the application layer of the windows system to form a virtual machine independent of the windows system.

在本步骤中,还包括将混杂模式对应的网络协议的驱动安装至同一网段的系统中,以使同一网段的虚拟机或应用程序通过该协议驱动与无线网卡建立连接,实现接收数据包和发送数据包的功能。In this step, it also includes installing the driver of the network protocol corresponding to the promiscuous mode into the system of the same network segment, so that the virtual machine or application program of the same network segment establishes a connection with the wireless network card through the protocol driver, and realizes the functions of receiving data packets and sending data packets.

本实施例中,通过在无线网卡上安装混杂模式对应的驱动的网络协议以使虚拟与无线网卡建立协议连接,以实现虚拟机与互联网的网络连接。In this embodiment, the network protocol of the driver corresponding to the promiscuous mode is installed on the wireless network card to establish a protocol connection between the virtual machine and the wireless network card, so as to realize the network connection between the virtual machine and the Internet.

具体地在安装混杂模式对应的驱动的网络协议时,将网络协议的驱动设置成混杂模式,以接收所有通过该无线网卡接口的数据,并将接收到的数据发送至虚拟机。其中,需要说明的是,混杂模式是指一台机器能够接收所有经过它的数据流。通常情况下,网卡只接受来自网络端口的目的地址指向自己的数据;而当网卡工作在混杂模式下时,网卡将来自接口的所有数据都捕获并交给相应的驱动程序。Specifically, when the network protocol of the driver corresponding to the promiscuous mode is installed, the driver of the network protocol is set to the promiscuous mode, so as to receive all data passing through the interface of the wireless network card, and send the received data to the virtual machine. Among them, it should be noted that the promiscuous mode means that a machine can receive all data streams passing through it. Normally, the network card only accepts the data whose destination address points to itself from the network port; when the network card works in the promiscuous mode, the network card captures all the data from the interface and hands it to the corresponding driver.

在本步骤之后还包括,无线网卡通过驱动将该混杂模式对应的网络协议安装成功的信息发送至虚拟机。After this step, the wireless network card sends the information that the network protocol corresponding to the promiscuous mode is successfully installed to the virtual machine through the driver.

步骤S12:利用驱动监听虚拟机是否有数据待发送至无线网卡,或无线网卡端是否接收到待发送给虚拟机的数据。Step S12: Use the driver to monitor whether the virtual machine has data to be sent to the wireless network card, or whether the wireless network card has received data to be sent to the virtual machine.

在本步骤中,虚拟机利用驱动监听无线网卡上是否有数据流通,以及数据流通清况,其中包括监听数据包的大小以及数据帧的信息等。具体实施方式是监听虚拟机是否有数据待发送至无线网卡或无线网卡端是否接收到待发送给虚拟机的数据。如果驱动监听到有数据流通,则执行步骤S13。In this step, the virtual machine uses the driver to monitor whether there is data flow on the wireless network card, and the status of the data flow, including monitoring the size of the data packet and the information of the data frame. The specific implementation is to monitor whether the virtual machine has data to be sent to the wireless network card or whether the wireless network card end receives data to be sent to the virtual machine. If the driver detects that there is data flow, step S13 is executed.

步骤S13:如果通过驱动监听有虚拟机或无线网卡有数据待发送,经发送方的源地址以及网络协议按照设定条件进行转换后,将所述数据发送至接收方。Step S13: If the virtual machine or the wireless network card has data to be sent through monitoring through the driver, the data is sent to the receiver after the source address of the sender and the network protocol are converted according to the set conditions.

在本实施例中,发送方和接收方为虚拟机和无线网卡,当虚拟机向无线网卡发送数据包时,发送方为虚拟机,接收方为无线网卡;当无线网卡向虚拟机发送数据包时,发送方为无线网卡,接收方为虚拟机。In this embodiment, the sender and the receiver are a virtual machine and a wireless network card. When the virtual machine sends a data packet to the wireless network card, the sender is the virtual machine and the receiver is the wireless network card; when the wireless network card sends the data packet to the virtual machine, the sender is the wireless network card and the receiver is the virtual machine.

步骤S13具体包括:如果通过驱动监听到虚拟机有数据待发送至无线网卡,则通过驱动将虚拟机的源mac地址修改外无线网卡的源mac地址;如果通过驱动监听到无线网卡接收到待发送给虚拟机的数据,通过驱动将无线网卡的源mac地址修改为虚拟机的源mac地址。Step S13 specifically includes: if it is detected by the driver that the virtual machine has data to be sent to the wireless network card, then the source mac address of the virtual machine is modified by the driver to the source mac address of the external wireless network card; if the wireless network card is detected by the driver.

本步骤还包括:如果通过驱动监听有虚拟机或无线网卡有数据待发送,通过windows系统的nwifi.sys驱动文件将发送方的网络协议进行修改。具体地,如果通过驱动监听到虚拟机有数据待发送至无线网卡,通过nwifi.sys驱动文件将802.3网络协议转换为802.11网络协议,利用802.11网络协议将数据发送至无线网卡;如果通过驱动监听到无线网卡接收到待发送给虚拟机的数据,通过nwifi.sys驱动文件将802.11网络协议转换为802.3网络协议,利用802.3网络协议将数据发送至虚拟机。This step also includes: if a virtual machine or a wireless network card has data to be sent through monitoring through the driver, modify the network protocol of the sender through the nwifi.sys driver file of the windows system. Specifically, if the driver detects that the virtual machine has data to be sent to the wireless network card, convert the 802.3 network protocol to the 802.11 network protocol through the nwifi.sys driver file, and use the 802.11 network protocol to send the data to the wireless network card; .

为了具体说明上述实施方式的实施过程,具体请参阅图2,图2为本申请基于无线网卡的无感知网络系统一实施方式的信号流向示意图;包括:虚拟机100、驱动单元200、协议转换单元300、无线网卡400以及外部网卡500。In order to specifically illustrate the implementation process of the above-mentioned embodiment, please refer to FIG. 2 for details. FIG. 2 is a schematic diagram of the signal flow of an embodiment of the wireless network card-based non-aware network system of the present application;

虚拟机100通过驱动单元200将网络协议发送至无线网卡400,并通过驱动单元200在无线网卡400上安装该网络协议。在本实施例中,网络协议为混杂模式对应的网络协议,具体实现方式是在协议安装过程中将网络协议的驱动设置为混杂模式,以使无线网卡能接收所有流通该接口的所有数据。在无线网卡400上安装成功之后还包括将安装成功的信息通过驱动单元300发送至虚拟机100。虚拟机100通过驱动单元200监听无线网卡400接收或发送的数据情况。The virtual machine 100 sends the network protocol to the wireless network card 400 through the driver unit 200 , and installs the network protocol on the wireless network card 400 through the driver unit 200 . In this embodiment, the network protocol is the network protocol corresponding to the promiscuous mode, and the specific implementation method is to set the driver of the network protocol to the promiscuous mode during the protocol installation process, so that the wireless network card can receive all the data flowing through the interface. After the wireless network card 400 is successfully installed, it also includes sending information about the successful installation to the virtual machine 100 through the drive unit 300 . The virtual machine 100 monitors the data received or sent by the wireless network card 400 through the drive unit 200 .

具体地,如果通过驱动单元200监听到虚拟机有数据待发送至无线网卡,将虚拟机100的发包发送至驱动单元200,通过驱动单元200将虚拟机的源mac地址修改为无线网卡的源mac地址,再将更改后的数据包的源mac地址发往协议转换单元300,通过协议转换单元300将数据包的上网协议标准由802.3转换成802.11,将源mac地址及上网协议标准经过转换的数据包发送至无线网卡400,通过无线网卡400与外部网络500进行通信连接,其中协议转换单元300的功能由windows系统内的nwifi.sys驱动文件完成。在本实施例中,外部网络500是指互联网或是独立于宿主机的数据网络,无线网卡400接收外部网络500的网络数据或向外部网络500发送网络数据。如果通过驱动监听到无线网卡端接收到待发送给虚拟机的数据,其中,该数据包括外部网卡500发送给无线网卡400的收发包;无线网卡400将接收到的数据发送至协议转换单元300,协议转换单元300将数据的802.11网络协议转换为802.3网络协议,并将转换后的数据包发送至驱动单元200,通过驱动单元200将数据包中的无线网卡的源mac地址转换成虚拟网卡的源mac地址,并将转换后的数据发送至虚拟机100以使虚拟机100能接收到无线网卡400发送的数据,避免丢包的现象发生,从而实现虚拟机100与无线网卡400的数据发送和接收的无感知桥接。Specifically, if the drive unit 200 detects that the virtual machine has data to be sent to the wireless network card, the sending packet of the virtual machine 100 is sent to the drive unit 200, the source mac address of the virtual machine is modified to the source mac address of the wireless network card by the drive unit 200, and then the source mac address of the data packet after the change is sent to the protocol conversion unit 300, and the protocol conversion unit 300 converts the Internet access protocol standard of the data packet from 802.3 to 802.11, and converts the source mac address and the Internet access protocol standard through conversion The data packets are sent to the wireless network card 400, and communicated with the external network 500 through the wireless network card 400, wherein the function of the protocol conversion unit 300 is completed by the nwifi.sys driver file in the windows system. In this embodiment, the external network 500 refers to the Internet or a data network independent of the host machine, and the wireless network card 400 receives network data from the external network 500 or sends network data to the external network 500 . If listen to the wireless network card end by driving and receive the data to be sent to the virtual machine, wherein, the data includes the external network card 500 to send to the wireless network card 400 send and receive packets; Convert the source mac address of the virtual network card, and send the converted data to the virtual machine 100 so that the virtual machine 100 can receive the data sent by the wireless network card 400, avoid packet loss, and realize the non-perceptual bridging of data transmission and reception between the virtual machine 100 and the wireless network card 400.

需要说明的是,在本实施例中,驱动单元200的驱动与协议转换单元300的协议转换操作均由软件自动完成,驱动单元200的驱动与协议转换单元300的协议转换操作可在虚拟网卡上完成。It should be noted that, in this embodiment, the driver of the driver unit 200 and the protocol conversion operation of the protocol conversion unit 300 are automatically completed by software, and the driver of the driver unit 200 and the protocol conversion operation of the protocol conversion unit 300 can be completed on the virtual network card.

本实施例中的系统为windows系统。在实现windows系统内的无线网卡无感知桥接之前还包括在windows系统中建立虚拟化方案,虚拟化方案可以为应用软件界面等,在本实施例中,虚拟化方案为虚拟机100,windows系统为宿主机。The system in this embodiment is a windows system. Before realizing the wireless network card non-aware bridging in the windows system, it also includes establishing a virtualization scheme in the windows system. The virtualization scheme can be an application software interface, etc. In this embodiment, the virtualization scheme is a virtual machine 100, and the windows system is a host machine.

在另一实施方式中,通过在虚拟机同一网段的虚拟网卡上安装混杂模式对应的驱动的网络协议,以在所有无线网卡上安装该网络协议。具体地,同一网段的虚拟网卡可以进行信息交互,在传输数据过程中,通过对数据的mac地址和网络协议进行修改可在同一网段的其它设备上进行数据传输。In another embodiment, the network protocol of the driver corresponding to the promiscuous mode is installed on the virtual network card on the same network segment of the virtual machine, so as to install the network protocol on all wireless network cards. Specifically, virtual network cards on the same network segment can exchange information, and during data transmission, data transmission can be performed on other devices on the same network segment by modifying the mac address and network protocol of the data.

需要说明的是,本申请中的网络协议为混杂模式对应的网络协议,在该网络协议的驱动下,所有流经安装有该网络协议的网卡的数据时,都会被该网卡获取。另外,虚拟机100是独立于宿主机的“电脑”,是一个虚拟电脑,可以实现实体电脑所有能实现的功能,虚拟机100也可以使一个应用软件。It should be noted that the network protocol in this application is the network protocol corresponding to the promiscuous mode. Driven by the network protocol, all the data flowing through the network card installed with the network protocol will be obtained by the network card. In addition, the virtual machine 100 is a "computer" independent of the host machine, and is a virtual computer that can realize all functions that can be realized by a physical computer. The virtual machine 100 can also be an application software.

本申请中的网络桥接方法包括网络的应用层、驱动层、协议层和硬件层,无线网卡的功能在硬件层进行实现,具体地包括接收/发送外部网络的数据包,和接收/发送虚拟机和宿主机的数据请求。虚拟机在应用层进行实现,虚拟机本身可以是一个应用软件。驱动层和协议层分别对应驱动单元和协议转换单元,用于驱动网络协议的安装以及网络协议的转换。需要说明的是,在本实施例中的,驱动单元和协议转换单元可在应用层进行实现,并未有具体划分,只是为了具体解释本实施例的虚拟协议的安装过程将其细划为驱动层和协议层,在此不是限定。The network bridging method in this application includes the application layer, driver layer, protocol layer and hardware layer of the network, and the function of the wireless network card is implemented at the hardware layer, specifically including receiving/sending data packets of the external network, and receiving/sending data requests from the virtual machine and the host machine. The virtual machine is implemented at the application layer, and the virtual machine itself can be an application software. The driver layer and the protocol layer respectively correspond to the driver unit and the protocol conversion unit, and are used to drive the installation of the network protocol and the conversion of the network protocol. It should be noted that, in this embodiment, the driver unit and the protocol conversion unit can be implemented at the application layer, and there is no specific division. They are only subdivided into the driver layer and the protocol layer for the purpose of explaining the installation process of the virtual protocol in this embodiment, which is not limited here.

本实施例通过驱动将虚拟机100的上网协议安装到无线网卡400上,并通过该驱动监听无线网卡400的网络数据,并通过该驱动实现虚拟机100与无线网卡400的信息交互,从而实现虚拟机的上网功能,在本实施例中,混杂模式对应的网络协议的驱动安装不会改变宿主机原有的上网协议以及协议驱动,从而实现虚拟机与宿主机的无感知上网,具体相当于在无线网卡上添加一个新的网络协议。一旦该协议安装成功,虚拟机100通过该驱动监听无线网卡400上的网络数据,并获取到无线网卡400上流通的数据,具体包括:如果监听到无线网卡400上有数据待发送,则通过驱动对数据包的信息进行转换以传输给虚拟机100;如果监听到虚拟机有数据待发送出去,则通过驱动对数据包的信息进行转换成无线网卡能接收的数据,以传输给无线网卡400。通过无线网卡400与外部网络500进行数据传输。This embodiment is installed on the Internet card 400 through driving the virtual machine 100, and the network data of the wireless network card 400 through the driver is used to realize the information interaction of the virtual machine 100 and the wireless network card 400 through the driver, so as to realize the Internet access function of the virtual machine. In this example, the driver installation of the mixed mode will not change the original Internet protocol of the host network. And the protocol driver, so as to realize the non -perception of the virtual machine and the host, which is equivalent to adding a new network protocol to the wireless network card. Once the protocol is successfully installed, the virtual machine 100 monitors the network data on the wireless network card 400 through the driver, and obtains the data circulating on the wireless network card 400, specifically including: if the wireless network card 400 is detected to have data to be sent, the information of the data packet is converted by the driver to be transmitted to the virtual machine 100; Data transmission is performed with the external network 500 through the wireless network card 400 .

本实施例的有益效果是:在虚拟机所在的windows系统的无线网卡上安装混杂模式对应的驱动的网络协议;利用驱动监听虚拟机是否有数据待发送至无线网卡,或无线网卡端是否接收到待发送给虚拟机的数据;如果通过驱动监听有虚拟机或无线网卡有数据待发送,将发送方的源地址以及网络协议按照设定条件进行转换后,将数据发送至接收方,通过上述方式能将虚拟机的数据发送至无线网卡,也能接收到无线网卡的数据,而不会出现丢包的现象,实现了虚拟机与无线网卡的无障碍网络连接,另一方面,通过在宿主机的无线网卡上安装混杂模式对应的驱动的网络协议,而不会影响宿主机的原上网功能,从而实现了无感知上网。The beneficial effects of this embodiment are: install the network protocol corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located; use the driver to monitor whether the virtual machine has data to be sent to the wireless network card, or whether the wireless network card end has received data to be sent to the virtual machine; Data to the wireless network card, without packet loss, realizes the barrier-free network connection between the virtual machine and the wireless network card. On the other hand, by installing the network protocol corresponding to the promiscuous mode on the wireless network card of the host machine, it will not affect the original Internet access function of the host machine, thereby realizing the non-perceived Internet access.

本申请还提供一种基于无线网卡的无感知网络桥接装置,具体请参阅图3,图3为本申请基于无线网卡的无感知网络桥接装置一实施方式的结构示意图。如图3所示,该基于无线网卡的无感知网络桥接装置30包括:虚拟机31;协议驱动单元32,与所述虚拟机连接,用于将混杂模式对应的驱动的网络协议安装到无线网卡上,并利用驱动监听虚拟机与无线网卡是否有数据待发送;协议转换单元33,与协议驱动单元连接,用于将发送方的源地址以及网络协议按照设定条件进行转换;无线接口收/发单元34,与所述协议转换单元耦接,用于识别通过无线接口接收或发送的数据。具体地,在本实施例中,协议驱动单元32利用该混杂模式对应的驱动监听虚拟和无线网卡是否有数据待发送的具体过程包括:监听虚拟机是否有数据待发送至无线网卡,或无线网卡端是否接收到待发送给虚拟机的数据;如果监听到虚拟机有数据待发送至无线网卡,则将虚拟机的源mac地址修改为无线网卡的源mac地址,并将通过协议转换单元33将802.3网络协议转换为802.11网络协议,利用802.11网络协议将虚拟机的数据发送至无线网卡;如果监听到无线网卡端接收到待发送给虚拟机的数据,则将无线网卡的源mac地址修改为虚拟机的源mac地址,并通过协议转换单元33将802.11网络协议转换为802.3网络协议,利用802.3网络协议将无线网卡的网络协议发送至虚拟机。协议转换单元33用于控制802.3网络协议与802.11网络协议的相互转换,当虚拟机向无线网卡发送数据时,控制将数据包的网络发送标准改为802.11,当无线网卡向虚拟机发送数据时,控制将数据包的网络发送标准改为802.3。The present application also provides a wireless network card-based non-aware network bridging device, please refer to FIG. 3 for details. FIG. 3 is a schematic structural diagram of an embodiment of the wireless network card-based non-aware network bridging device of the present application. As shown in Figure 3, this wireless network card-based non-perceived network bridging device 30 includes: a virtual machine 31; a protocol driver unit 32, connected to the virtual machine, for installing the network protocol corresponding to the promiscuous mode on the wireless network card, and utilizing the driver to monitor whether the virtual machine and the wireless network card have data to be sent; the protocol conversion unit 33 is connected with the protocol driver unit, and is used to convert the source address of the sender and the network protocol according to the set conditions; or sent data. Specifically, in this embodiment, the protocol driver unit 32 utilizes the drivers corresponding to the promiscuous mode to monitor whether the virtual and wireless network cards have data to be sent. The specific process includes: monitoring whether the virtual machine has data to be sent to the wireless network card, or whether the wireless network card end receives data to be sent to the virtual machine; The network protocol uses the 802.11 network protocol to send the data of the virtual machine to the wireless network card; if the wireless network card terminal receives data to be sent to the virtual machine, the source mac address of the wireless network card is modified to the source mac address of the virtual machine, and the 802.11 network protocol is converted to the 802.3 network protocol by the protocol conversion unit 33, and the network protocol of the wireless network card is sent to the virtual machine by using the 802.3 network protocol. The protocol conversion unit 33 is used to control the mutual conversion between the 802.3 network protocol and the 802.11 network protocol. When the virtual machine sends data to the wireless network card, the control changes the network sending standard of the data packet to 802.11. When the wireless network card sends data to the virtual machine, the control changes the network sending standard of the data packet to 802.3.

在另一实施方式中,协议驱动单元32用于将混杂模式对应的协议安装到所有与虚拟机在同一网段的系统上。通过上述方式,以使与虚拟机在同一网段的系统也能使用无线网卡进行数据传输。具体地,同一网段是指上网的IP地址在同一网段。In another embodiment, the protocol driver unit 32 is configured to install the protocol corresponding to the promiscuous mode on all systems on the same network segment as the virtual machine. Through the above method, the system on the same network segment as the virtual machine can also use the wireless network card for data transmission. Specifically, the same network segment means that the IP addresses for accessing the Internet are in the same network segment.

在本实施例中,无线接口收/发单元34还与无线网卡连接,用于接收或发送通过无线网卡流通的数据或数据包。具体包括:接收虚拟机发送的数据请求并将该数据请求发送至互联网,接收互联网发送的数据并将该数据发送至虚拟机。其中,无线接口收发单元还包括将接收到的数据进行储存到物理网卡上,形成上网记录,在此不作限定。In this embodiment, the wireless interface receiving/sending unit 34 is also connected to the wireless network card, and is used to receive or send data or data packets circulating through the wireless network card. It specifically includes: receiving the data request sent by the virtual machine and sending the data request to the Internet, receiving the data sent by the Internet and sending the data to the virtual machine. Wherein, the wireless interface transceiving unit also includes storing the received data on the physical network card to form an online record, which is not limited here.

需要说明的是,本实施例中的虚拟机31、协议驱动单元32、协议转换单元33、无线接口收/发单元34为虚拟模块,由计算机的软件应用层进行实现,上述的连接关系均为信号的耦接。本实施例中的虚拟机31、协议驱动单元32、协议转换单元33、无线接口收/发单元34与第二实施例中的虚拟机100、驱动单元200、协议转换单元300可以相同也可以不同,在此不作限定。It should be noted that the virtual machine 31, the protocol driver unit 32, the protocol conversion unit 33, and the wireless interface receiving/sending unit 34 in this embodiment are virtual modules, which are implemented by the software application layer of the computer, and the above-mentioned connections are signal couplings. The virtual machine 31, the protocol driver unit 32, the protocol conversion unit 33, and the wireless interface receiving/sending unit 34 in this embodiment may be the same as or different from the virtual machine 100, the driver unit 200, and the protocol conversion unit 300 in the second embodiment, and are not limited here.

本实施例的有益效果是:通过协议驱动单元32将混杂模式对应的网络协议的驱动安装到无线网卡上,并监听虚拟机是否有数据待发送至无线网卡,或无线网卡端是否接收到待发送给虚拟机的数据;如果监听到虚拟机有数据待发送至无线网卡,则将虚拟机的源mac地址修改为无线网卡的源mac地址,并将通过协议转换单元33将802.3网络协议转换为802.11网络协议,利用802.11网络协议将虚拟机的数据发送至无线网卡;如果监听到无线网卡端接收到待发送给虚拟机的数据,则将无线网卡的源mac地址修改为虚拟机的源mac地址,并通过协议转换单元33将802.11网络协议转换为802.3网络协议,利用802.3网络协议将无线网卡的网络协议发送至虚拟机,从而实现虚拟机与无线网卡的无感知桥接,以使虚拟机能上网。The beneficial effects of this embodiment are: the driver of the network protocol corresponding to the promiscuous mode is installed on the wireless network card through the protocol driver unit 32, and whether the virtual machine has data to be sent to the wireless network card is monitored, or whether the wireless network card end receives data to be sent to the virtual machine; 2.11 network protocol sends the data of the virtual machine to the wireless network card; if the wireless network card end receives data to be sent to the virtual machine, the source mac address of the wireless network card is modified to the source mac address of the virtual machine, and the 802.11 network protocol is converted to the 802.3 network protocol by the protocol conversion unit 33, and the network protocol of the wireless network card is sent to the virtual machine by using the 802.3 network protocol, thereby realizing the non-perception bridge between the virtual machine and the wireless network card, so that the virtual machine can access the Internet.

以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only the implementation of the application, and does not limit the patent scope of the application. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the application, or directly or indirectly used in other related technical fields, is also included in the scope of patent protection of the application.

Claims (7)

1. The non-perception network bridging method based on the wireless network card is characterized by comprising the following steps of:
installing a driving network protocol corresponding to the hybrid mode on a wireless network card of a windows system where the virtual machine is located;
monitoring whether the virtual machine has data to be sent to the wireless network card or not by utilizing the drive, or whether the wireless network card terminal receives the data to be sent to the virtual machine or not;
if the virtual machine or the wireless network card is monitored to have data to be sent through the driver, the source address of a sender and a network protocol of the sender are converted according to a set condition through a nwifi.sys driver file of the windows system, and then the data are sent to a receiver; the method specifically comprises the following steps: if the driver monitors that the virtual machine has data to be sent to the wireless network card, converting an 802.3 network protocol into an 802.11 network protocol through the nwifi.sys driver file, and sending the data to the wireless network card by utilizing the 802.11 network protocol; and if the wireless network card is monitored through the driver, receiving data to be sent to the virtual machine, converting an 802.11 network protocol into an 802.3 network protocol through the nwifi.sys driver file, and sending the data to the virtual machine by utilizing the 802.3 network protocol.
2. The method of claim 1, wherein if the driver monitors that the virtual machine or the wireless network card has data to be transmitted, the step of transmitting the data to the receiver after converting the source address and the network protocol of the sender according to the set conditions includes:
if the driver monitors that the virtual machine has data to be sent to the wireless network card, the driver modifies the source mac address of the virtual machine into the source mac address of the wireless network card;
and if the driver monitors that the wireless network card receives the data to be sent to the virtual machine, the driver modifies the source mac address of the wireless network card into the source mac address of the virtual machine.
3. The method of imperceptible network bridging according to claim 1, wherein the step of sending the data to the virtual machine using the 802.3 network protocol is followed by:
and converting the source address of the wireless network card into the source address of the virtual machine through the driver so that the virtual machine receives the data.
4. The method for bridging a non-aware network according to claim 1, wherein the step of installing the network protocol of the driver corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located comprises:
and installing a driver of a network protocol corresponding to the hybrid mode on a virtual network card of the windows system where the virtual machine is located, so as to install the network protocol on a wireless network card of the windows system.
5. The method for bridging a non-aware network according to claim 1, wherein the step of installing the network protocol of the driver corresponding to the promiscuous mode on the wireless network card of the windows system where the virtual machine is located comprises:
and installing the network protocol of the drive corresponding to the promiscuous mode on the virtual network card of the same network segment of the virtual machine so as to install the network protocol on all the wireless network cards.
6. A wireless network card-based non-aware network bridging device, the non-aware network bridging device comprising:
a virtual machine;
the protocol driving unit is connected with the virtual machine and is used for installing a driving network protocol corresponding to the hybrid mode on the wireless network card and monitoring whether the virtual machine and the wireless network card have data to be transmitted or not by utilizing the driving;
the protocol conversion unit is connected with the protocol driving unit and is used for converting the source address of the sender and the network protocol according to set conditions; the method is particularly used for converting the source mac address of a sender into the source mac address of a receiver and controlling the mutual conversion of an 802.3 network protocol and an 802.11 network protocol;
and the wireless interface receiving/transmitting unit is used for identifying the data received or transmitted through the interface.
7. The wireless network card based non-aware network bridging device of claim 6, wherein the protocol driver unit is further configured to install the protocol corresponding to the promiscuous mode on all systems in the same network segment as the virtual machine.
CN202110246964.4A 2021-03-05 2021-03-05 A wireless network card-based non-aware network bridging method and device thereof Active CN113055228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110246964.4A CN113055228B (en) 2021-03-05 2021-03-05 A wireless network card-based non-aware network bridging method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110246964.4A CN113055228B (en) 2021-03-05 2021-03-05 A wireless network card-based non-aware network bridging method and device thereof

Publications (2)

Publication Number Publication Date
CN113055228A CN113055228A (en) 2021-06-29
CN113055228B true CN113055228B (en) 2023-07-21

Family

ID=76510212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110246964.4A Active CN113055228B (en) 2021-03-05 2021-03-05 A wireless network card-based non-aware network bridging method and device thereof

Country Status (1)

Country Link
CN (1) CN113055228B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9203750B2 (en) * 2013-02-13 2015-12-01 Red Hat Israel, Ltd. Ethernet frame translation to internet protocol over infiniband
US20150055562A1 (en) * 2013-08-20 2015-02-26 Wilocity Ltd. Network device interface for supporting a plurality of network interface cards
CN103595826B (en) * 2013-11-01 2016-11-02 国云科技股份有限公司 Method for preventing IP and MAC of virtual machine from being forged
CN108964959B (en) * 2017-05-27 2022-02-25 阿里巴巴集团控股有限公司 Network card direct connection system for virtualization platform and data packet supervision method

Also Published As

Publication number Publication date
CN113055228A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
US8856290B2 (en) Method and apparatus for exchanging configuration information in a wireless local area network
CN101488884B (en) Network multi-computer controller, data processing device and application method
US6977939B2 (en) Method and apparatus for emulating ethernet functionality over a serial bus
KR101098737B1 (en) Dynamic wan port detection
CN102077194B (en) Network controller based pass-through communication mechanism between local host and management controller
US7006467B2 (en) Method and system for simulating multiple independent client devices in a wired or wireless network
US8892723B2 (en) Method and apparatus for enabling communication between iSCSI devices and SAS devices
US8700820B2 (en) Method for accessing USB device attached to home gateway, home gateway and terminal
CN104243210A (en) Method and system for remotely having access to administrative web pages of routers
JPH10117208A (en) Method and device for securing three-way connection among mobile calculation device, fixed calculation device and computer network
JP2007228548A (en) Dynamic construction of VLAN interface based on subscriber information string
JP2011508551A (en) Apparatus and method for simultaneously accessing multiple wireless networks
JP4038221B2 (en) Relay device and connection method between client device and server
JP6665190B2 (en) Network sharing implementation method and apparatus
KR20040066924A (en) Architecture for emulating an ethernet network interface card
US10146721B2 (en) Remote host management over a network
KR20040021305A (en) Secure remote access system and method for universal plug and play
KR20010022731A (en) Wireless coupling of incompatible nodes via a virtual network
US20070288607A1 (en) System and method for loading a network configuration program on a wired/wireless network product
CN112565372A (en) Communication method and system for virtual machine and client during network isolation
CN104348645A (en) Server and data transmission method of server
CN101599834A (en) An authentication deployment method and a management device
US20040172473A1 (en) Wireless modem simulation of a LAN card
CN113055228B (en) A wireless network card-based non-aware network bridging method and device thereof
WO2012155517A1 (en) Terminal expansion device, system, and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant