Network communication method
Technical field
The present invention relates to a kind of network communication method, relate in particular to a kind of by need not network interface card drive can resident internal storage the network communication program carry out the network communication method of real pattern lower network transfer of data.
Background technology
At present, be the operating system of hardware structure with x86, as Windows, linux system etc., it still adopts the working method of real pattern to the protected mode transition when starting.And certain application is also arranged as the disc operating system (DOS) that under real pattern, moves, and as some 16 dedicated system, perhaps some hardware detection systems etc.The visit of computer hardware normally by driver, need be selected different dedicated programs for use at different chip models and different system.But some hardware vendors no longer provide system driver under the real pattern now, perhaps are not loaded as yet in the primary stage of os starting network device driver, all can't carry out the transmission of network data under above-mentioned two kinds of situations.Simultaneously, (BasicInput Output System does not provide the interface of universal network equipment I/O (I/O) control in BIOS) to basic input output system yet.
At the above situation that can't carry out Network Transmission, (Preboot Execution Environment, PXE) agreement is finished network data transmission by pre-loaded execution environment usually at present.Pre-loaded execution environment agreement is the netboot agreement that Intel Company releases, at first, the network interface card of supporting pre-loaded execution environment agreement will be housed in the system, need to configure DynamicHost configuration agreement (Dynamic Host Configuration Protocol in the network environment simultaneously, DHCP) and simple and easy file transfer protocol (FTP) (TrivialFile Transfer Protocol TFTP) waits relevant service.After the system power-up self check, configure network environment, then pre-start-up procedure (NBP) is loaded into this locality and finishes the guiding work of system start-up by a series of automation mechanized operation.
Pre-loaded execution environment agreement groundwork step is as follows:
After the client self check was finished, the PXE network interface card was taken over CPU control;
DynamicHost configuration protocol server (DHCP Server) communication in the PXE network interface card of client and the network, so that obtain the information of Internet Protocol (IP) address and pre-start-up procedure (NBP);
Download pre-start-up procedure (NBP) by simple and easy file transfer protocol (FTP) server (TFTPServer) in simple and easy file transfer protocol (FTP) (TFTP) automatic network;
The guiding of the complete client of pre-start-up procedure (NBP) beginning.
Can finish certain network data transmission by pre-loaded execution environment agreement, but pre-loaded execution environment protocol specification only provides simple and easy file transfer protocol (FTP), agreement (the UserDatagram Protocol of user data unit, UDP), start (Pre-Boot) application interface in advance, and do not provide the common transmission control protocol of Network Transmission (Transmission Control Protocol, TCP).Adopt user data unit agreement/Internet Protocol carry out communication then reliability of data transmission can not get guaranteeing that this is undoubtedly fatal defective for those data to be relied on very strong application.Though, can introduce like this that extra agreement is disposed and work such as maintenance upgrade by can guarantee the correctness and the reliability of transfer of data in the form of taking to add again on the user data unit agreement basis proprietary protocol.
Summary of the invention
In order to solve above-mentioned the problems of the prior art and defective, the object of the present invention is to provide a kind of network communication method, by need not network interface card drive can resident internal storage the network communication program carry out the transmission of real pattern lower network data.
A kind of network communication method provided by the present invention, comprise following steps: the standard network communication program is simplified, connect so that the standard network communication program under the prerequisite that can satisfy the actual data transfer needs, has effective reliability, and take less internal memory space; Work out a pre-start-up procedure and pre-start-up procedure is stored in the webserver, the standard network communication program after simplifying is worked out among pre-start-up procedure, and pre-start-up procedure is set to real pattern network communication environment; On the FTP client FTP of supporting pre-loaded execution environment agreement, be set at the network interface card start-up mode, and dispose pre-loaded execution environment relevant DynamicHost configuration protocol service and simple and easy file transfer protocol (FTP) service; Start FTP client FTP, pre-loaded execution environment network adapter obtains the information of Internet protocol addresses and pre-start-up procedure by DynamicHost configuration protocol service, and downloads pre-start-up procedure by simple and easy file transfer protocol (FTP) automatic network server; Carry out pre-start-up procedure, to judge current soft, demand that whether hardware environment meets network communication; In the basic internal storage of client, choose suitable space, so that the standard network communication program after the simplifying in the pre-start-up procedure is assigned in internal memory space; In interrupt vector table, add configuration item, with thinking that the standard network communication program after simplifying disposes soft interruption so that call the standard network communication program; And the data field of revising basic input output system, so that being assigned in the basic input output system space, the position at standard network communication program place protects.
Wherein, the mode that the standard network communication program is simplified the protocol suite by simplifying transmission control protocol/Internet Protocol is finished.The structure that protocol suite kept of the transmission control protocol/Internet Protocol after simplifying includes: transmission control protocol (TCP) layer, in order to guarantee reliability of data transmission; Internet Protocol (IP) layer is in order to be responsible for the transmitting-receiving of data; And universal network UDI (UNDI), in order to carry out the control of the network equipment.
In sum, compared with prior art, the invention has the advantages that:
1, network communication method of the present invention need not real pattern under the proprietary driver support of different chips;
2, network communication method of the present invention is easy to use, and adopts general hardware access mode, i.e. interrupt mode under the real pattern;
3, network communication method of the present invention connects by effective continuation, has guaranteed reliability of data transmission;
4, adopted in the network communication method of the present invention simplify after the standard network communication program saved basic internal memory space valuable under the real pattern, and other program implementation in the not influence system is (for example: the startup of Windows NT kernel operations system);
5, in the network communication method of the present invention, the standard network communication program after simplifying is hidden in the data of input/output system district of internal storage, takes suitable protection mechanism can avoid the network communication program to be destroyed by other executive program;
6, network communication method of the present invention adopts the standard network communications protocol program of simplifying, and by the deployment of special-purpose proprietary protocol, can obtain the interoperability of network data transmission to greatest extent.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is the method flow diagram of a kind of network communication method of the present invention; And
Fig. 2 is the system block diagrams of the applied embodiment of a kind of network communication method of the present invention.
Wherein, Reference numeral
10 FTP client FTPs
20 DynamicHost configuration protocol servers
30 simple and easy file transfer protocol (FTP) servers
40 storage servers
Step 100 pair standard network communication program is simplified
Standard network communication program after step 110 will be simplified is worked out in pre-start-up procedure
Step 120 is stored in pre-start-up procedure in the webserver
Be set at the network interface card start-up mode on step 130 FTP client FTP, and dispose the relevant service of pre-loaded execution environment
Step 140 is obtained the information of Internet protocol addresses and pre-start-up procedure by DynamicHost configuration protocol service
Step 150 is downloaded pre-start-up procedure by simple and easy file transfer protocol (FTP) server
Step 160 is carried out pre-start-up procedure to judge current soft, demand that whether hardware environment meets network communication
Step 170 is assigned the network communication program in the client internal memory space
Step 180 is provided with an interrupt vector table
Step 190 is revised the data field of basic input output system
Embodiment
Below, will elaborate to better embodiment of the present invention in conjunction with graphic part.
In order to overcome the defective that proprietary driver is installed in the prior art, adopt the mode of pre-loaded execution environment (PXE) protocol specification to realize network communication now usually.Pre-loaded execution environment agreement has obtained the support of most network interface card manufacturer at present, the bottom of pre-loaded execution environment agreement has complete network interface card I/O call method, it is network driver interface, but, pre-loaded execution environment agreement only provides the non-standing of user data unit agreement to connect in the transport layer of the protocol suite of transmission control protocol/Internet Protocol, and it can not satisfy the needs of reliability of data transmission under the applied environment of data sensitive.Method of the present invention utilizes pre-loaded execution environment agreement to realize the visit to network just, has overcome the drawback that pre-loaded execution environment agreement transport layer only provides the unreliable connection of user data unit agreement simultaneously.
See also Fig. 1, this figure is the method flow diagram of a kind of network communication method of the present invention, and as shown in the figure, a kind of network communication method of the present invention includes following steps:
At first, the standard network communication program is simplified (step 100), because internal memory space available under the real pattern of no operating system is very little, usually the real pattern stage has only a part of space of preceding 640KB to use before the os starting, and all the other are then taken by basic input output system program, display routine etc.; And the transmission of real data still needs extra program support, server end should be avoided the deployment-specific agreement as far as possible and must meet the demand of existing route mode, so the standard network communication program after requiring in the method for the present invention to simplify only takies less internal memory space, and make the standard network communication program under the prerequisite that can satisfy the actual data transfer needs, having effective reliability connects, wherein, the mode of tool use value is for to simplify the protocol suite of transmission control protocol/Internet Protocol, make it be simplified the back and only keep following structure function: a transmission control protocol layer, in order to guarantee reliability of data transmission, an Internet Protocol layer, in order to be responsible for the transmitting-receiving of data, and a universal network UDI, in order to carry out the control of the network equipment;
Then, work out a pre-start-up procedure by the developer, and the standard network communication program after will simplifying is worked out among pre-start-up procedure (step 110), its concrete function and realization details can be formulated according to demand, can also finish other function except the network communication environment that is set at real pattern;
Next, pre-start-up procedure is stored in (step 120) in the webserver;
Then, on the FTP client FTP of supporting pre-loaded execution environment agreement, be set at the network interface card start-up mode, and dispose pre-loaded execution environment relevant DynamicHost configuration protocol service and simple and easy file transfer protocol (FTP) service (step 130);
Then, start FTP client FTP, pre-loaded execution environment network adapter is obtained the information (step 140) of Internet protocol addresses and pre-start-up procedure by DynamicHost configuration protocol service; And by simple and easy file transfer protocol (FTP) automatic network server download pre-start-up procedure (step 150);
Then, carry out pre-start-up procedure, for example judge whether the version of pre-loaded execution environment agreement is suitable to judge current soft, demand (step 160) that whether hardware environment meets network communication, if meet then continue to carry out subsequent step, otherwise end;
In the basic internal storage of client, choose suitable space, so that the standard network communication program after the simplifying in the pre-start-up procedure is assigned in internal memory space (step 170), after wherein pre-start-up procedure is taken over CPU, the standard network communication program that is stored in after the simplifying in self program space is assigned in the top of the remaining basic internal storage of client;
An interrupt vector list item (step 180) is set, with thinking that the standard network communication program after simplifying disposes soft interruption so that call the standard network communication program; And
Revise the data field (step 190) of basic input output system; the 40:13h position in data of input/output system district records the apical position of residue internal storage; have no progeny in soft configuring the network communication program and configure, revise this data field content and can protect this section network communication program.All can think that by the program of the basic internal storage remaining space of 40:13h position enquiring this space is taken by data of input/output system; thereby avoid this position; and then realization is to the protection of network communication program; wherein before pre-start-up procedure withdraws from; can also carry out display reminding information, automatic network reading of data and the feature operation of calling other program execution.
See also Fig. 2 now, Figure 2 shows that the system block diagrams of the applied embodiment of a kind of network communication method of the present invention, this embodiment is a no disk operating system, for example, this no disk operating system can be applied to knife edge type server (Blade Sever) and high-performance calculation (High PerformanceComputing; HPC) etc. in the system, suppose that no disc system supports pre-loaded execution environment (PXE) to start, at first, DynamicHost configuration protocol server 20 communications in the PXE network interface card of FTP client FTP 10 and the network, so that obtain the information of Internet Protocol (IP) address and pre-start-up procedure, then, start the execution phase at pre-loaded execution environment, FTP client FTP 10 is downloaded pre-start-up procedure earlier in simple and easy file transfer protocol (FTP) server 30, wherein network communication program composition is in pre-start-up procedure, then in the pre-start-up procedure execution phase, the top that control FTP client FTP 10 is assigned the network communication program the basic internal storage remaining area in its basic input output system space, revise the interruption of local hard drive simultaneously in interrupt vector table, the position of the interrupt handling routine of its sensing is exactly the entrance of network communication program.When os starting, all operations to local hard drive all are automatically transferred on the system image that stores in the storage server 40 of network, because the reliability that adopt to continue connects, therefore avoided causing starting owing to loss of data in the network communication process catastrophic effect of failure.In the space of internal storage 640KB; os starting and basic input output system handling procedure all will take internal memory space; therefore the space that stays is very limited; because the network communication program after simplifying is very short and small; therefore can be stored in fully in the internal memory space; revise the data field of basic input output system simultaneously; the handling procedure of basic input output system self is can be regarded as in the shared space of network communication program after simplifying, so just can be avoided extraneous interference by the protecting network communication program.
For other application, can in interrupt vector table, add new soft interruption with reference to above-mentioned no disc system, when the network communication program under the real pattern needs accesses network equipment, only need call corresponding interruption and get final product.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.