CN103634142A - Method for simultaneously managing user mode Internet interface and kernel virtual Internet interface - Google Patents
Method for simultaneously managing user mode Internet interface and kernel virtual Internet interface Download PDFInfo
- Publication number
- CN103634142A CN103634142A CN201310540708.1A CN201310540708A CN103634142A CN 103634142 A CN103634142 A CN 103634142A CN 201310540708 A CN201310540708 A CN 201310540708A CN 103634142 A CN103634142 A CN 103634142A
- Authority
- CN
- China
- Prior art keywords
- state
- user
- network interface
- interface
- kernel
- 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.)
- Pending
Links
Images
Abstract
The embodiment of the invention provides a method for simultaneously managing a user mode Internet interface and a kernel virtual Internet interface. The synchronous configuration and management of the user mode Internet interface and the kernel virtual Internet interface can be realized, and the sensing and operation requirements of certain business modules of a kernel mode operating system on the states of physical network card Internet interfaces are met. The method comprises the following steps: loading a physical network card driver and registering the user mode Internet interface by a user mode command line operating interface; receiving the attribute information of the user mode Internet interface, and establishing and registering the kernel virtual Internet interface through a newly increased Internet interface function by the kernel mode operating system; receiving the configuration and management information of the user mode Internet interface and carrying out corresponding configuration and management operation by the kernel virtual Internet interface.
Description
Technical field
The present invention relates to networking technology area, be specifically related to a kind of method of while leading subscriber state network interface and kernel virtual network port.
Technical background
The load mode that in prior art, physical network card drives mainly contains two kinds: kernel state operating system loads and user's state order line operation interface loads.But all there is certain defect in two kinds of modes, specific as follows in actual applications:
Kernel state operating system loads network interface card and drives and register network interface, and network interface management and network interface configuration have only been controlled by kernel state operating system.Now, the business that operates in user's state order line operation interface for some cannot meet it to the perception of physical internet ports state and operational requirements.
User's state order line operation interface loads network interface card and drives and register network interface, and network interface management and network interface configuration have only been controlled by user's state order line operation interface.Now, the business realizing based on kernel state operating system for some cannot meet it to the perception of physical internet ports state and operational requirements.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method of while leading subscriber state network interface and kernel virtual network port, wherein user's state network interface is all identical with number, type, title, index and the Hook Function of kernel virtual network port, guarantee that user issues configuration information to kernel virtual network port in configure user state network interface, make kernel virtual network port also identical with the configuration of user's state network interface, meet kernel state operating system and user's state order line operation interface to the configuration of network interface and regulatory requirement simultaneously.
One embodiment of the invention provides a kind of method of while leading subscriber state network interface and kernel virtual network port, be applicable to a kind of kernel state operating system of compiling certainly, in described kernel state operating system, moving at least one user's state order line operation interface, described method comprises:
Described user's state order line operation interface loads physical network card and drives and registered user's state network interface;
Described kernel state operating system receives the attribute information of user's state network interface, by newly-increased network interface function, sets up and register kernel virtual network port;
Described kernel virtual network port receives the configuration management information of user's state network interface, and carries out corresponding configuration bookkeeping.
Wherein, the attribute information of described user's state network interface comprises: the number of network interface, type, title, index and Hook Function.
Wherein, describedly by newly-increased network interface function, sets up and register kernel virtual network port and comprise: while there is not the Hook Function of user's state network interface in kernel state operating system, interpolation do-nothing function, wherein said do-nothing function only has respective hook subfunction name there is no practical operation.
Wherein, further comprise: when user's state network interface and kernel virtual network port all succeed in registration, described kernel state operating system is to described user's state order line operation interface feedback information that succeeds in registration; Otherwise judgement registration failure, re-registers user's state network interface and/or kernel virtual network port.
Wherein, the configuration management information that described kernel virtual network port receives user's state network interface comprises: when kernel virtual network port is managed for configuration while operating successfully, kernel state operating system feedback operation successful information is to user's state order line operation interface; Otherwise kernel virtual network port continues to receive configuration management information.
Wherein, described configuration management operation comprises: physical network card linking status and the lastest imformation of the perception of user's state network interface institute;
The order line configuration operation information of user's state network interface;
User's state network interface is to the establishment of virtual interface and bindings information;
The configuration operation information of user's state network interface to virtual interface.
Wherein, described order line configuration operation comprises: mac, ip, the route of configuration network interface.
Wherein, described virtual interface comprises: vlan sub-interface, bridge joint mouth, link aggregation mouth.
The method of while leading subscriber state network interface disclosed by the invention and kernel virtual network port, physical network card is at user's state order line operation interface registered user state network interface, simultaneously at a set of kernel virtual network port of kernel operations system creation, the number of this kernel virtual network port, type, title, index and Hook Function are all consistent with user's state network interface, and guarantee to issue configuration information to kernel virtual network port in configure user state network interface.Realize leading subscriber state network interface and kernel virtual network port simultaneously, meet perception and the operational requirements of some business modules of kernel state operating system to physical network card network interface state.
Accompanying drawing explanation
Figure 1 shows that the flow chart of the method for a kind of while leading subscriber state network interface that one embodiment of the invention provides and kernel virtual network port;
Figure 2 shows that the virtual network port that another embodiment of the present invention provides receives the configuration management information of user's state network interface, and carry out the flow chart of corresponding operating;
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of method of while leading subscriber state network interface and kernel virtual network port, is applicable to a kind of operating system of compiling certainly.Described can be from the operating system of compiling for modifying and generate the kernel operations system of new system image system file.Wherein, described primitive operation system is linux kernel operations system, and described user's state system image is user's state order line operation interface program.
The flow chart that Figure 1 shows that the method for a kind of while leading subscriber state network interface that one embodiment of the invention provides and kernel virtual network port, as shown in Figure 1, the method comprises:
Step 101: user's state order line operation interface loads physical network card and drives and registered user's state network interface.
Now, physical network card is deployed in user's state order line operation interface, and drive load and network interface registration all complete at user's state order line operation interface, user's state order line operation interface independent maintenance leading subscriber state network interface.
Step 102: kernel state operating system receives the attribute information of user's state network interface, sets up and registers kernel virtual network port by newly-increased network interface function.
The attribute information of described user's state network interface comprises: number, type, title, index and Hook Function.
Described Hook Function can capture operation system process or the event that causes of process, and by hook, returns to that one of operating system is processed or the call back function of filter event.
Here, title, index and number that the newly-increased needed attribute of network interface function is network interface, will together register the Hook Function of user's state network interface and other attributes during registration kernel virtual network port.
In an embodiment of the present invention, while there is not the Hook Function of user's state network interface in kernel state operating system, add do-nothing function, wherein said do-nothing function only has respective hook subfunction name there is no practical operation, the operation requirements to Hook Function when meeting user's state network interface configuration distributing.
In an embodiment of the present invention, when user's state network interface and kernel virtual network port all succeed in registration, described kernel state operating system is to described user's state order line operation interface feedback information that succeeds in registration; Otherwise judgement registration failure, re-registers user's state network interface and/or kernel virtual network port.
User's state network interface is consistent with the attribute information of kernel virtual network port like this, and guarantee kernel virtual network port receives the configuration management information from user's state network interface accurately, thereby realizes leading subscriber state network interface and kernel virtual network port simultaneously.
Step 103: kernel virtual network port receives the configuration management information of user's state network interface, and carries out corresponding configuration bookkeeping.
In an embodiment of the present invention, when kernel virtual network port is managed for configuration while operating successfully, kernel state operating system feedback operation successful information is to user's state order line operation interface; Otherwise kernel virtual network port continues to receive configuration management information.
Figure 2 shows that the virtual network port that another embodiment of the present invention provides receives the configuration management information of user's state network interface, and carry out the flow chart of corresponding operating.As shown in Figure 2, comprising:
Step 201: the linking status of user's state network interface perception physical network card, and the lastest imformation of linking status is issued to kernel virtual network port.
In an embodiment of the present invention, after kernel virtual network port state has upgraded, kernel state operating system will be updated successfully information and return to user's state order line operation interface; Otherwise user's state network interface continues to issue lastest imformation.
Step 202: user's state network interface is issued to kernel virtual network port by order line configuration operation information.
In an embodiment of the present invention, after kernel virtual network port has configured, kernel state operating system returns to user's state order line operation interface by configuration successful information; Otherwise user's state network interface continues to issue configuration operation information.
Wherein, described order line configuration operation comprises: mac, ip, the route of configuration network interface.
Order line issues the attribute informations such as title that configuration generally can issue network interface, index, because user's state network interface in technical scheme provided by the present invention is consistent with the attribute information of kernel virtual network port, configuration distributing process is accurately smooth, and this is also that step 102 will make user's state network interface reason consistent with title, the index of kernel virtual network port.
Step 203: user's state network interface is issued to kernel virtual network port by order line operation informations such as the establishment of vlan sub-interface, bridge joint mouth, link aggregation mouth and the binding of bridge joint mouth, the bindings of link aggregation mouth.
In an embodiment of the present invention, after kernel virtual network port has operated, kernel state operating system returns to user's state order line operation interface by operation successful information; Otherwise user's state network interface continues to issue operation information.
Step 204: user's state network interface will also be issued to vlan sub-interface, bridge joint mouth, the link aggregation mouth of the corresponding establishment of kernel virtual network port to the configuration operation information of vlan sub-interface, bridge joint mouth, link aggregation mouth.
In an embodiment of the present invention, after kernel virtual network port has configured, kernel state operating system returns to user's state order line operation interface by configuration operation successful information; Otherwise user's state network interface continues to issue configuration operation information.
Because number, type, title, index and the Hook Function of kernel virtual network port and user's state network interface are identical, the configuration-direct of user's state network interface and all can be issued to kernel virtual network port to the perception information of physical network card, thereby make kernel virtual network port also carry out corresponding operating, thereby realize leading subscriber state network interface and kernel virtual network port simultaneously.
It will be understood by those skilled in the art that configuration management operation for user's state network interface and kernel virtual network port can only comprise one or more in step 201~204; Meanwhile, for other configuration managements of user's state network interface and kernel virtual network port also in protection scope of the present invention.
It will be understood by those skilled in the art that above all steps all can realize by service routine code, do not represent actual implementation procedure.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement etc., within all should being included in protection scope of the present invention.
Claims (8)
1. the method for leading subscriber state network interface and kernel virtual network port simultaneously, it is characterized in that, be applicable to a kind of kernel state operating system of compiling certainly, moving at least one user's state order line operation interface in described kernel state operating system, described method comprises:
Described user's state order line operation interface loads physical network card and drives and registered user's state network interface;
Described kernel state operating system receives the attribute information of user's state network interface, by newly-increased network interface function, sets up and register kernel virtual network port;
Described kernel virtual network port receives the configuration management information of user's state network interface, and carries out corresponding configuration bookkeeping.
2. method according to claim 1, is characterized in that, the attribute information of described user's state network interface comprises: the number of network interface, type, title, index and Hook Function.
3. method according to claim 2, it is characterized in that, describedly by newly-increased network interface function, set up and register kernel virtual network port and comprise: while there is not the Hook Function of user's state network interface in kernel state operating system, add do-nothing function, wherein said do-nothing function only has respective hook subfunction name there is no practical operation.
4. method according to claim 3, is characterized in that, further comprises: when user's state network interface and kernel virtual network port all succeed in registration, described kernel state operating system is to described user's state order line operation interface feedback information that succeeds in registration; Otherwise judgement registration failure, re-registers user's state network interface and/or kernel virtual network port.
5. method according to claim 1, it is characterized in that, the configuration management information that described kernel virtual network port receives user's state network interface comprises: when kernel virtual network port is managed for configuration while operating successfully, kernel state operating system feedback operation successful information is to user's state order line operation interface; Otherwise kernel virtual network port continues to receive configuration management information.
6. method according to claim 1 or 5, is characterized in that, described configuration management information comprises:
Physical network card linking status and the lastest imformation of the perception of user's state network interface institute; And/or,
The order line configuration operation information of user's state network interface; And/or,
User's state network interface is to the establishment of virtual interface and bindings information; And/or,
The configuration operation information of user's state network interface to virtual interface.
7. method according to claim 6, is characterized in that, described order line configuration operation comprises: mac, ip, the route of configuration network interface.
8. method according to claim 6, is characterized in that, described virtual interface comprises: vlan sub-interface, bridge joint mouth, link aggregation mouth.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310540708.1A CN103634142A (en) | 2013-11-04 | 2013-11-04 | Method for simultaneously managing user mode Internet interface and kernel virtual Internet interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310540708.1A CN103634142A (en) | 2013-11-04 | 2013-11-04 | Method for simultaneously managing user mode Internet interface and kernel virtual Internet interface |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103634142A true CN103634142A (en) | 2014-03-12 |
Family
ID=50214795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310540708.1A Pending CN103634142A (en) | 2013-11-04 | 2013-11-04 | Method for simultaneously managing user mode Internet interface and kernel virtual Internet interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103634142A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103929418A (en) * | 2014-03-28 | 2014-07-16 | 汉柏科技有限公司 | Wireless Internet access method and system based on network safety equipment |
CN104123229A (en) * | 2014-07-21 | 2014-10-29 | 上海斐讯数据通信技术有限公司 | Method and system capable of making message efficiently submitted to user mode from kernel mode |
CN104899028A (en) * | 2015-05-27 | 2015-09-09 | 北京汉柏科技有限公司 | Method and system for operating 3G(3rd generation)-USB network card in user mode based on Linux kernel |
CN109587082A (en) * | 2019-01-10 | 2019-04-05 | 烽火通信科技股份有限公司 | A kind of asynchronous repeater system of message based on (SuSE) Linux OS and method |
CN110932890A (en) * | 2019-11-20 | 2020-03-27 | 厦门网宿有限公司 | Data transmission method, server and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216800A (en) * | 2008-01-02 | 2008-07-09 | 中兴通讯股份有限公司 | LINUX log controller and method |
CN102497434A (en) * | 2011-12-16 | 2012-06-13 | 中国科学院计算技术研究所 | Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof |
CN103312601A (en) * | 2013-05-31 | 2013-09-18 | 汉柏科技有限公司 | Data message processing method from user mode to kernel mode |
-
2013
- 2013-11-04 CN CN201310540708.1A patent/CN103634142A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216800A (en) * | 2008-01-02 | 2008-07-09 | 中兴通讯股份有限公司 | LINUX log controller and method |
CN102497434A (en) * | 2011-12-16 | 2012-06-13 | 中国科学院计算技术研究所 | Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof |
CN103312601A (en) * | 2013-05-31 | 2013-09-18 | 汉柏科技有限公司 | Data message processing method from user mode to kernel mode |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103929418A (en) * | 2014-03-28 | 2014-07-16 | 汉柏科技有限公司 | Wireless Internet access method and system based on network safety equipment |
CN104123229A (en) * | 2014-07-21 | 2014-10-29 | 上海斐讯数据通信技术有限公司 | Method and system capable of making message efficiently submitted to user mode from kernel mode |
CN104123229B (en) * | 2014-07-21 | 2017-10-24 | 上海斐讯数据通信技术有限公司 | Message can be made efficiently to be submitted to the method and system of User space from kernel state |
CN104899028A (en) * | 2015-05-27 | 2015-09-09 | 北京汉柏科技有限公司 | Method and system for operating 3G(3rd generation)-USB network card in user mode based on Linux kernel |
CN109587082A (en) * | 2019-01-10 | 2019-04-05 | 烽火通信科技股份有限公司 | A kind of asynchronous repeater system of message based on (SuSE) Linux OS and method |
CN109587082B (en) * | 2019-01-10 | 2020-12-29 | 烽火通信科技股份有限公司 | Message asynchronous forwarding system and method based on Linux operating system |
CN110932890A (en) * | 2019-11-20 | 2020-03-27 | 厦门网宿有限公司 | Data transmission method, server and computer readable storage medium |
CN110932890B (en) * | 2019-11-20 | 2022-09-09 | 厦门网宿有限公司 | Data transmission method, server and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106301829B (en) | A kind of method and apparatus of network service dilatation | |
CN103634142A (en) | Method for simultaneously managing user mode Internet interface and kernel virtual Internet interface | |
CN102255903B (en) | Safety isolation method for virtual network and physical network of cloud computing | |
CN105099789A (en) | Network element uploading method and equipment | |
CN104734931A (en) | Method and device for establishing link between virtual network functions | |
CN104350467A (en) | Elastic enforcement layer for cloud security using SDN | |
CN101739287A (en) | Device, system and method for managing virtual machines | |
CN103095574A (en) | Management method for network system, network system, and management server | |
CN111221619A (en) | Method, device and equipment for opening and arranging service | |
CN106685679A (en) | Network service deployment method and device | |
CN103441935B (en) | Automatically method and the device of the syntople of identified server and access switch | |
CN104407913A (en) | Method for implementing two-wire access through virtual machine with single network card | |
CN103207965A (en) | Method and device for License authentication in virtual environment | |
CN109474467A (en) | Network automatically management method, device, storage medium and electronic equipment | |
CN105335887A (en) | Self-service tax system and self-service tax method based on bus mode | |
CN104143066A (en) | Security information exchanging device | |
CN115348126A (en) | Network target range entity equipment access method, device and implementation system | |
CN107656796A (en) | A kind of virtual machine cold moving method, system and equipment | |
CN109343944A (en) | Data processing method, device, terminal and the storage medium of eSIM card | |
CN102789388B (en) | In MIPS IA frame serverPC, the method and system of network interface card function are increased based on BMC | |
CN106254419A (en) | System and method virtual machine operated by control station server | |
CN109684115A (en) | A kind of communication means and relevant device applied between plug-in unit | |
CN109819064A (en) | Method, operating system module and the meeting plate of intermodule communication | |
CN109343894A (en) | A kind of O&M method and apparatus of cloud platform | |
CN108512688A (en) | Network node configuration method and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140312 |
|
RJ01 | Rejection of invention patent application after publication |