CN1249956C - Method for virtual Ethernet adapter card - Google Patents

Method for virtual Ethernet adapter card Download PDF

Info

Publication number
CN1249956C
CN1249956C CN 02147263 CN02147263A CN1249956C CN 1249956 C CN1249956 C CN 1249956C CN 02147263 CN02147263 CN 02147263 CN 02147263 A CN02147263 A CN 02147263A CN 1249956 C CN1249956 C CN 1249956C
Authority
CN
China
Prior art keywords
virtual
address
mac address
adapter card
adapter
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.)
Expired - Fee Related
Application number
CN 02147263
Other languages
Chinese (zh)
Other versions
CN1490991A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 02147263 priority Critical patent/CN1249956C/en
Publication of CN1490991A publication Critical patent/CN1490991A/en
Application granted granted Critical
Publication of CN1249956C publication Critical patent/CN1249956C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The present invention discloses a method of a virtual Ethernet adapter card, which comprises that a virtual address manager and a software filter are built on the Ethernet physical adapter card, and the filtering mode of the card is set as a miscellaneous mode; the virtual address manager generates a plurality of virtual MAC addresses of a logic adapter card to generate and maintain information of the virtual MAC addresses; filtering classification of the virtual MAC addresses of the logic adapter card is completed by the software filter according to the maintained information of the virtual MAC addresses in the virtual address manager for the receiving groups; the software filter finishes binding the virtual MAC addresses according to the maintained information of the virtual MAC addresses in the virtual address manager for the sending groups. The present invention can realize multiplexing of an Ethernet adapter without adding any extra hardware device and can finish complete intercommunication between the virtual adapter cards and between the virtual adapter card and the physical adapter card.

Description

The method of virtual ethernet adapter
Technical field
The present invention relates to Ethernet adapter technology, particularly a kind of method of virtual ethernet adapter.
Background technology
Ethernet technology is a kind of baseband LAN (Local Area Network, be called for short LAN) technology, the IEEE802.3 standard to describe initial ethernet technology standard, its transmission rate is 10Mbps, Fast Ethernet (100Mbps) and gigabit Ethernet (1000Mbps) have appearred again thereafter, they substantially all are the expansions of IEEE 802.3, have adopted different medium transmission mechanism in physics (PHY) sublayer; Advanced more medium access control and collision detection method adopted in medium access control (MediaAccess Control is called for short MAC) sublayer, improved transmission rate; Still IEEE 802.3 frame formats of standard have all been followed in logic link control (Logic Link Control is called for short LLC) sublayer.
IEEE 802.3 realizes that by the circuit on adapter (network interface card) or the main circuit board in actual applications, common is exactly the Ethernet adapter usually.On general network workstation or router device, all there is such adapter.Usually, an adapter can only be as an independent network Transmit-Receive Unit job, it has comprised a MAC Address by manufacturer's appointment (unique address of 48-bit), and this address appears in the address field of the frame structure that LLC describes, and is used to identify the entity that receives or send.
Solving the multiplexed technical scheme of physics adaptable interface at present normally connects special bifurcated multiplexing equipment or adopts the hardware interface card of support channelizing to realize.The shortcoming of this scheme need to be special hardware device support.
In addition, in the frame structure load data of logic link layer, increase logical channel identifier and number also can realize in logic multiplexed.The shortcoming of this scheme is owing to need the additional logical channel identifier of identification, therefore can only be between the adapter of realizing constructed scheme mutual communication.
Summary of the invention
At the deficiency in the background technology, the object of the present invention is to provide a kind of method of virtual ethernet adapter, do not increasing additional hardware and do not changing any physical connection and guarantee under the situation of original communication mechanism that realization Ethernet adapter is multiplexed to reach
The present invention includes step:
On Ethernet physics adapter, set up virtual address manager and software filter, and the filtered model of the hardware filter of this adapter is set to promiscuous mode;
Generate the virtual mac address of a plurality of logic adapter card by the virtual address manager, generate and these a plurality of virtual mac address information of maintenance;
Dock the contracture group, finish the filtering classification of the virtual mac address of each logic adapter card by software filter according to the virtual mac address information of safeguarding in the virtual address manager;
Finish and send the corresponding virtual mac address binding of logic adapter card of this grouping according to the virtual mac address information of safeguarding in the virtual address manager by software filter to sending grouping.
According to technique scheme:
The high position of virtual mac address adopts international standards to organize still unappropriated sign, and low level adopts the hardware address of IP address or physics adapter itself to obtain by computing; This computing is a Hash operation.
The virtual address manager adopts the address conflict testing mechanism to guarantee the uniqueness of the virtual mac address of generation.
Virtual mac address information comprises an address table, each list item comprise at least a logic adapter card the device identification sequence number and with its corresponding virtual MAC Address.
Further comprise step when receiving grouping:
A. the hardware filter of Ethernet physics adapter passes through software filter with all groupings;
B. software filter is judged the grouping destination-mac address:
To the situation of clean culture, software filter carries out matched and searched with the address table of safeguarding in this MAC Address and the virtual address manager, is grouped into this logic adapter card if find the logic adapter card of coupling then to duplicate this, otherwise abandons;
For broadcast address, software filter duplicates this and is grouped into all logic adapter card;
For multicast address, software filter copies to corresponding logic adapter card according to the multicast member situation;
C. according to the device identification sequence number of logic adapter card, grouping is uploaded.
Further comprise the steps: when sending grouping
A. the upper-layer protocol grouping is imported software filter into by logic adapter card;
B. software filter is searched the source address field of its corresponding virtual MAC Address padding ethernet frames according to the logic adapter card equipment serial number, to finish address binding;
C. hardware filter is imported in the software filter grouping that will finish address binding into.
The invention has the advantages that: do not increase any extra hardware device and realize the multiplexed of Ethernet Adaptation Unit, and can finish between virtual adapter and the virtual adapter the complete intercommunication between virtual adapter and the physics adapter.
Description of drawings
Fig. 1 realizes the schematic diagram of branch group of received for the present invention;
Fig. 2 handles the flow chart that receives grouping for software filter of the present invention;
Fig. 3 handles the flow chart that sends grouping for software filter of the present invention;
Fig. 4 is for generating the schematic diagram of virtual mac address.
Embodiment
Ethernet adopts broadcast mechanism, and all can receive the data of transmitting on the network at the equipment that the same network segment is connected with network by the Ethernet adapter.Each network interface all has a unique hardware address, and this hardware address is exactly the MAC Address of adapter, and most systems is used the address of 48 bits.Ethernet address comprises three classes: unicast address (highest order is 0), multicast address (low level of 8 the highest hytes is 1), broadcast address (being 1 entirely).
After adapter receives data,, determine whether to receive or abandon by checking the destination address that is included in the ethernet frame.If the proof data are issued oneself really, adapter will be handled receiving data and passing to upper-layer protocol.
Because the Ethernet adapter need be accepted all and broadcast the grouping that transmits on the networking, and determine and need therefore comprise a hardware filter, include following several filtered model usually to which data of upper layer transfers:
Clean culture (unicast) pattern: receive the grouping that all destination addresses are oneself.
Broadcasting (broadcast) pattern: receiving all destination addresses is broadcast address groupings.
Multicast (multicast) pattern: receiving destination address is the grouping of multicast address.
Mix (promiscuous) pattern: do not check destination address, receive all groupings on the network.
Usually, the hardware filter of network interface card is set to the grouping that the receiving target address is clean culture, broadcasting and multicast address, can guarantee the correctness of Ethernet in the link layer addressing like this.Because MAC Address is unique being bundled on the adapter, so the uniqueness of the addressing that also guarantees.
When hope is carried out a physics adapter multiplexed the time, can know according to top description, must on adapter, bundle a plurality of MAC Address, and can carry out filtering classification and offer upper-layer protocol using according to different MAC Address, like this, for upper-layer protocol, bottom has just had the adapter of a plurality of logics, MAC Address of the corresponding binding of each logic adapter card, thus the upper strata need not to change to the handling process of grouped data.
For the present invention, because hardware filter is mated filtration according to the hardware mac address of adapter itself, therefore, can not use hardware filter to do address filtering, must be set to promiscuous mode by filtered model, make all grouped datas send upper-layer protocol to by hardware filter.
Simultaneously, on Ethernet physics adapter, set up virtual address manager and software filter, before grouped data sends upper-layer protocol to by hardware filtering, earlier through these two devices.The virtual address manager is used to generate and delete the virtual mac address of each logic adapter card, detects address conflict, the virtual mac address information of generation and service logic adapter.Software filter is finished the filtering classification and the binding of the virtual mac address of each logic adapter card according to the mac address information of safeguarding in the virtual address manager, the alternative hardware filter is finished the address filtering of each logic adapter card simultaneously.
The virtual address manager provides the software function calling interface of group address management, and the funcall interface that mainly provides comprises:
1, generate virtual mac address, the corresponding relation of foundation and virtual adapter device number, and add in the address list of its maintenance.This function is called when system equipment is initialized.
2, from the address list deletion virtual mac address safeguarded and and the corresponding relation of virtual adapter device number.This function is called by the system equipment administration module when the virtual adapter of deletion.
3, search the device number of virtual adapter according to virtual mac address.This functional interface is called when handling the reception grouping by software filter.
4, search the corresponding virtual MAC Address according to the device number of virtual adapter.This functional interface is called when handling the transmission grouping by software filter.
The generation of address and deletion are driven by the device management module of system, in the time of the Ethernet adapter of a logic of user's additions and deletions, the device management module of system will the invocation facility initialization and the functional interface of deletion action, comprises to call increase that the virtual address manager provides and the functional interface of deletion address is done corresponding operation in this functional interface.
Consider the uniqueness of MAC Address, the virtual mac address that is each logic adapter card is unique, the way that present embodiment is taked is that high 24 of virtual mac address adopt international standards to organize still unappropriated sign, low 24 are adopted the MAC Address of IP address or physics Ethernet card itself to obtain by Hash operation, and add the address conflict testing mechanism to guarantee the uniqueness of calculated address.Collision detection is a virtual mac address that all logic adapter card in the system that adopts the same virtual address Managed Solution are generated, is used to guarantee the uniqueness of the virtual mac address that generates.Concrete implementation can be different.In the present embodiment, be to lean on the generating algorithm of virtual mac address to guarantee: high 24-bit adopts international standards to organize the still unappropriated OUI of IEEE (Organizationally Unique Identifier, organize unique identifying number), guarantee not conflict with the MAC Address of existing all hardware adapter.Low 24-bit can be divided into two parts, and the bit numerical value that two parts distribute can be by the largest logical adapter number decision that allows in the system, for example if allow 2 4=16 logic adapter card, a then preceding part can be 20-bit, a back part is 4-bit.Before a part obtain by a strong collisionless Hash (Hash) algorithm by the host IP address of system or the hardware mac address of physics Ethernet card, so-called strong collisionless, the probability that comes to the same thing that just is meant different data hash is minimum, for example the md5 algorithm.This partially the location value can guarantee that the virtual mac address between the different system can not repeat because the host IP address of different system or hardware mac address are can be not identical.A back part can be distributed according to the numerical order of logic adapter card, also can be the unduplicated numerical value that generates at random.This part is used for guaranteeing that the virtual mac address of same system can not repeat, with reference to shown in Figure 4.
The address of each logic adapter card of all generations constitutes an address table, and each list item comprises device identification sequence number and its corresponding virtual MAC Address of a logic adapter card at least.
With reference to figure 1 and Fig. 2, when receiving grouping, send into hardware filter through the ethernet frame that is treated as of Ethernet logic link layer from the data that bottom is uploaded, hardware filter is arranged to promiscuous mode makes all groupings continue upwards to pass through software filter.Software filter is at first judged the type (broadcast/group broadcast/clean culture) of the target MAC (Media Access Control) address of grouping, if clean culture, the functional interface that software filter then calls the virtual address manager is inquired about the device number of virtual adapter, if do not find and then abandon grouping, grouping is uploaded if find the interface of uploading that then calls this equipment correspondence; If broadcasting, then software filter duplicates this according to the logic card number and is grouped into all logic adapter card, and circulation is uploaded; If multicast, software filter copies to corresponding logic adapter card according to the multicast member situation, and circulation is uploaded.
With reference to figure 3, when sending grouping, its basic structure and figure one are similar, and just data flow is opposite, and the function that software filter is finished is different.The upper-layer protocol grouping is imported software filter into by logic adapter card, after software filter obtains grouping information, obtains the device number of virtual adapter from grouping information, if obtain failure, then returns the transmission failed message; If success is then called the functional interface of virtual address manager and is searched the corresponding virtual MAC Address, then do not return the transmission failed message if find, otherwise the source address field that sends grouping is inserted in this address, the transmission interface that calls lower floor sends this grouping.

Claims (7)

1, a kind of method of virtual ethernet adapter is characterized in that comprising step:
On Ethernet physics adapter, set up virtual address manager and software filter, and the filtered model of the hardware filter of this adapter is set to promiscuous mode;
Generate the virtual mac address of a plurality of logic adapter card by the virtual address manager, generate and these a plurality of virtual mac address information of maintenance;
Dock the contracture group, finish the filtering classification of the virtual mac address of each logic adapter card by software filter according to the virtual mac address information of safeguarding in the virtual address manager;
To sending grouping, finish and send the corresponding virtual mac address binding of logic adapter card of this grouping according to the virtual mac address information of safeguarding in the virtual address manager by software filter.
2, the method for claim 1 is characterized in that the high position of virtual mac address adopts international standards to organize still unappropriated sign, and low level adopts the hardware address of IP address or physics adapter itself to obtain by computing.
3, method as claimed in claim 2 is characterized in that described computing is a Hash operation.
4,, it is characterized in that the virtual address manager adopts the address conflict testing mechanism to guarantee the uniqueness of the virtual mac address of generation as claim 1,2 or 3 described methods.
5, the method for claim 1 is characterized in that described virtual mac address information comprises an address table, each list item comprise at least a logic adapter card the device identification sequence number and with its corresponding virtual MAC Address.
6,, further comprise step when it is characterized in that receiving grouping as claim 1 or 5 described methods:
A. the hardware filter of Ethernet physics adapter passes through software filter with all groupings;
B. software filter is judged the destination-mac address type of grouping:
If clean culture, software filter carries out matched and searched with the address table of safeguarding in this MAC Address and the virtual address manager, is grouped into this logic adapter card if find the logic adapter card of coupling then to duplicate this, otherwise abandons;
If broadcasting, software filter duplicates this and is grouped into all logic adapter card;
If multicast, software filter copies to corresponding logic adapter card according to the multicast member situation;
C. the interface of uploading of software filter calling logic adapter correspondence is uploaded grouping.
7,, further comprise the steps: when it is characterized in that sending grouping as claim 1 or 5 described methods
A. the upper-layer protocol grouping is imported software filter into by logic adapter card;
B. software filter obtains the device number of logic adapter card from grouping information, if obtain failure, then returns the transmission failed message; If the functional interface that the virtual address manager is then called in success is searched the corresponding virtual MAC Address, and with the source address field of the virtual mac address padding ethernet frames that finds, to finish address binding;
C. the software filter transmission interface that calls lower floor sends this grouping.
CN 02147263 2002-10-18 2002-10-18 Method for virtual Ethernet adapter card Expired - Fee Related CN1249956C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02147263 CN1249956C (en) 2002-10-18 2002-10-18 Method for virtual Ethernet adapter card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02147263 CN1249956C (en) 2002-10-18 2002-10-18 Method for virtual Ethernet adapter card

Publications (2)

Publication Number Publication Date
CN1490991A CN1490991A (en) 2004-04-21
CN1249956C true CN1249956C (en) 2006-04-05

Family

ID=34148692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02147263 Expired - Fee Related CN1249956C (en) 2002-10-18 2002-10-18 Method for virtual Ethernet adapter card

Country Status (1)

Country Link
CN (1) CN1249956C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100667783B1 (en) * 2004-09-14 2007-01-11 삼성전자주식회사 Communication adapter switching method and apparatus
CN100399273C (en) * 2005-08-19 2008-07-02 联想(北京)有限公司 System of virtual machine, and method for configuring hardware
CN101001263B (en) * 2006-01-09 2010-11-24 中兴通讯股份有限公司 Method for configuring MAC address at each node in inner exchange network
CN100391150C (en) * 2006-01-19 2008-05-28 华为技术有限公司 Data transfer device and data transfer method of virtual ether net device
WO2008031361A1 (en) * 2006-09-11 2008-03-20 3Dsp Corporation A multi-gateway system and methods for same
CN101610258B (en) * 2009-07-21 2012-03-28 北京九方中实电子科技有限责任公司 Method for filtering DOCSIS MAC address
CN101656648B (en) * 2009-09-11 2012-01-25 中兴通讯股份有限公司 Dynamic monitoring method and apparatus for local area network
CN102143067A (en) * 2011-02-26 2011-08-03 华为数字技术有限公司 Method and device for reducing scale of media access control (MAC) address table
EP2829024B1 (en) 2012-03-19 2020-07-08 Intel Corporation Techniques for packet management in an input/output virtualization system
WO2016187783A1 (en) * 2015-05-25 2016-12-01 华为技术有限公司 Data transmission method and device
CN111432044B (en) * 2020-03-17 2021-10-15 腾讯科技(深圳)有限公司 Multi-link equipment MAC address management method and device and multi-link equipment

Also Published As

Publication number Publication date
CN1490991A (en) 2004-04-21

Similar Documents

Publication Publication Date Title
CN1324843C (en) Method for distributing internet protocal address and detecting its replication in special network
CN1132347C (en) Method for maintaining routing between selected network station and mobile station
CN1310536C (en) Automatic channel selection in a radio access network
CN1716877A (en) Method and apparatus for self-configuring routing devices in a network
CN1154324C (en) Wireless coupling of standardized networks and non-standardized nodes
CN1249956C (en) Method for virtual Ethernet adapter card
CN1564989A (en) High speed MAC address search engine
CN1333617A (en) MAC address based telecommunication limiting method
CN1866910A (en) Data message transmission method and Ethernet bridge apparatus based on VLAN
CN1787489A (en) Method for average distributing interface flow at multi network processor engines
CN1848816A (en) Method and apparatus for transferring frames in extended wireless lan
CN1578252A (en) Architecture for bridged Ethernet residential access networks
CN1287576C (en) Method and device for reducing processing time of data in communication networks
CN1402480A (en) Method for managing address of medium access control bridge, and said bridge
CN1677982A (en) Individually programmable most significant bits of virtual LAN ID
CN1925452A (en) Data transferring system, method and network transferring apparatus
CN1859304A (en) Method for realizing neighbour discovery
CN101056246A (en) A method and device for realizing the load share
CN1291341C (en) Method and apparatus for realizing Ethernet passive optical network system dynamic filtration data base
CN1549503A (en) Method for transmitting user position information in network communication system
CN1859417A (en) Method for realizing multiple network device link aggregation
CN101043356A (en) Method for preventing MAC address cheat
CN1738258A (en) Subscriber unit redundant system and subscriber unit redundancy approach
CN1677950A (en) Data exchange method based on virtual local area network
CN1176540C (en) Method for realizing switch in with mixed multiple users'types in Ethernet network switch in devices

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060405

Termination date: 20111018