Summary of the invention
The problem to be solved in the present invention is that the static configuration sponsor party name causes in the prior art setting, maintenance are loaded down with trivial details, is difficult to guarantee the uniqueness of title.
The method of configuring sponsor party name of the present invention may further comprise the steps:
Receive initiator's title request, comprise initiator's sign in the title request;
Return the title corresponding to the initiator with its sign.
Alternatively, described method also comprises: generate well-determined title according to initiator's sign according to generating algorithm.
Preferably, comprise in the described title that the initiator identifies.
Alternatively, described method also comprises: preserve the title of returning the initiator and reach and its corresponding identification;
Describedly return title to the initiator and be specially: when the sign of the initiator in the title request that is received has been preserved, return the corresponding title of having preserved to the initiator; Otherwise return the title different with preserving title to the initiator.
Preferably, the sign type that also comprises the initiator in the described title request;
Described method also comprises: when the initiator in the title request identifies type not in the sign type of being supported the time, with the sign type notification initiator who is supported;
Describedly return title to the initiator and be specially:, return title corresponding to initiator's sign when the initiator in the title request identifies type in the sign type of being supported the time.
The invention provides the method for another kind of configuring sponsor party name, may further comprise the steps:
Send initiator's title request, comprising initiator's sign;
Reception is to the title request responding, and the title that has a corresponding relation with sign in the response is set to sponsor party name.
Preferably, described transmission initiator's title request is specially: send its title request when each initiator starts.
Preferably, the current sign type that also comprises the initiator in the described title request;
Described method also comprises: when supporting the notice of sign type when receiving, current sign type is revised as the sign type of support, and resends initiator's title request, comprising the sign of the current sign type of initiator.
The present invention also provides a kind of network node that is used for configuring sponsor party name, comprise transmitting element and receiving element and title unit, be used for identifying the title of determining corresponding to this sign, and return this title by transmitting element according to the initiator in the sponsor party name request of receiving element reception.
Alternatively, the definite title corresponding to initiator's sign in described title unit is specially: the title unit adopts generating algorithm to identify according to the initiator and generates well-determined title.
Alternatively, described title unit comprises memory module and request processing module, wherein:
Memory module is used for preserving the title returned by transmitting element and corresponding initiator's sign;
Request processing module is used for searching memory module and whether preserves initiator's sign in the title request, returns corresponding title by transmitting element when searching successfully; Search failure and the time return the title different, and this title identified with corresponding initiator be kept in the memory module with the title of preserving.
Preferably, described network node also comprises the sign type units, being used for initiator in the title request that receives identifies type and does not return the sign type that this network node is supported by transmitting element when not belonging to the sign type of this network node support, exports the title request to the title unit when belonging to the sign type of this network node support.
Another kind provided by the invention comprises that as initiator's network node transmitting element and receiving element and title request unit and title are provided with the unit, wherein:
The title request unit is used and is generated the title request that comprises that the initiator identifies, and sends by transmitting element;
Title is provided with the unit and is used for parsing and identify the title with corresponding relation in the title request response that receiving element receives, and it is set to the sponsor party name of present networks node.
Preferably, comprise that also the initiator identifies type in the described title request;
Described title request unit generates the title request and is specially: the title request unit is according to current sign type, and the sign that identifies with the type on the present networks node identifies the title request that generates as the initiator.
Preferably, described network node also comprises sign type response unit, be used for receiving when supporting the sign type notification sign type that current sign type is revised as in the notice at receiving element, and instruction title request unit generates the title request.
Identify generation and the corresponding sponsor party name of sign according to the initiator in the sponsor party name request among the present invention, and title is back to the initiator is provided with, the automatic configuration and the centralized management of sponsor party name have been realized, reduced setting, safeguarded the workload of sponsor party name, can also prevent that malice from falsely using the data security problem that sponsor party name causes; Simultaneously, the present invention has guaranteed the uniqueness and the consistency of sponsor party name by the corresponding relation of title and sign;
In addition, the present invention identifies as the initiator by the sign that adopts initiator type, and the support to the initiator of multiple hardwares structure can be provided.
Embodiment
The configuration effort of title is dispersed in each initiator and manually carries out in the prior art, lacks the centralized management to title, causes being easy to occur the repetition of title and falsely using problem.When on the management of title and configuration concentrate on a node in the network, carrying out, can carry out the automatic setting of title, and the uniqueness of title can obtain better guarantees.Simultaneously,, also need to guarantee the relatively stable of sponsor party name configuration, make the initiator can realize normal visit according to the title of automatic configuration to target side because the target side in the storage networking is discerned the initiator according to title uniquely.Among the present invention, set up corresponding relation between initiator's title and initiator's sign, the certainty of utilizing the initiator to identify realizes the consistency of title.
Any one can all can be used as the node that carries out the title centralized configuration and management with initiator's nodes in communication in the network, is referred to as the title management server in the present invention.The structure of a kind of typical application network of the present invention can be visited by IP network between initiator, target side and the title management server as shown in Figure 2 mutually.The title management server may be main frame or server physically, also may be the network equipment or memory device; On function, may also may be to have had the name service function after in other system, moving the process of carrying out title configuration and management only as sponsor party name configuration and management.
Sponsor party name collocation method of the present invention at step S310, receives initiator's title request in the flow process of title management server one side as shown in Figure 3.Initiator's title request can be a unicast message, also can be multicast message.
The initiator carries the sign of local terminal in the title request, discern this initiator for the title management server.Any name server that can make can identify the characteristic value that each initiator is different from other initiators in the same application network as the initiator, for example, initiator's sign can be initiator's IP address, MAC (Media Access Control, medium access control system) network characterization value such as address, can be initiator's CPU (Central Process Unit, central processing unit) hardware characteristics value such as sequence number, can be user's other characteristic values in initiator's setting, can also be the combination of above-mentioned characteristic value.
The title management server can provide the support to multiple sign, no matter for example the initiator all can be its distribution title as sign or with the host name that the user is provided with as sign with MAC Address.When the application network at initiator and title management server place is supported multiple sign, can come the kind of sign is distinguished by the sign type, comprise that not only the initiator identifies this moment in initiator's title request, can also comprise the sign type, discern each initiator in conjunction with the two for the title management server.
The sign type can adopt the coding of initiator and title management server agreement to represent, takies a field in the title request message.Following table is depicted as a kind of possible sign type coding mode:
| The sign type | Coding |
| The port mac address | 0 |
| The CPU sequence number | 1 |
| | |
| User Defined | 100~255 |
When the application network support at title management server place surpasses one type sign, can execution in step S320, judge whether the sign type in the title request belongs to the sign type of this title management server support, if, execution in step S340; If not, execution in step S330.
In step 330, the sign type notification initiator with the title management server is supported changes step S310.Sign type in the title request be can not get the initiator that book server is supported, the title management server returns all sign types that book server is supported to this initiator, and the initiator can choose one wantonly asks title to be distributed again.
Owing to often do not have relevance between initiator's all kinds sign, thereby when the initiator changed the sign type, in most of the cases difficulty was embodied as the dissimilar identical title of sign distribution of same initiator.In order to keep the consistency of sponsor party name as far as possible, the sign type that the present invention's suggestion is supported the title management server is expanded, and avoids deleting the sign type of original support as far as possible.Like this, use the title management server to support the initiator who identifies type in the title request, all to keep identical sign type and the sign of the type at every turn, be convenient to the title management server with it corresponding to the title of fixing.
At step S340, identify the title of determining correspondence according to the initiator in the title request.Identify the concrete grammar of determining title according to the initiator and can realize that the present invention provides two types implementation as exemplary illustration according to applied environment by the user.
First kind mode draws title for to be designated input with the initiator by generating algorithm.The condition that generating algorithm should satisfy is that the title of generation is identical when the sign of importing is identical; And the sign of input is not simultaneously, the title difference of generation.In other words, generating algorithm should be able to identify according to the initiator and generate well-determined title.The simplest a kind of the realization is to comprise that the initiator identifies in the title that generates, with the iSCSI initiator is example, when adopting MAC Address as the sign type, to MAC Address is the initiator A of 0X000AE55B8C6E and the initiator B that MAC Address is 0X000AE55B8C6F, can generate following title according to the iSCSI Naming conventions of RFC 3721 regulations:
Initiator A:iqn.2001-04.com.example.storage:MAC:000AE55B8C6E;
Initiator B:iqn.2001-04.com.example.storage:MAC:000AE55B8C6F.
The second class mode is for preserving the sign distributed and the mapping table of title on the title management server, whether the sign when receiving the title request in this title request of retrieval earlier has been kept in the mapping table, distributed title if mean for this initiator, then return the corresponding title of this sign, to keep the consistency of sponsor party name; If otherwise this initiator is new requestor, is the new title of its distribution, and new title and this initiator sign are kept in the mapping table.In this mode, the producing method of title for example can generate new title with the mode of serial number as long as guarantee that new title is different from the title of having preserved.When the title management server is supported a plurality of sign type, can also increase sign type item in the mapping table, to distinguish each initiator better.
At step S350, return among the step S340 title of determining to the initiator, as to the sponsor party name request responding.
When the application network at title management server place was only supported a kind of sign type, step S320, S330 can omit.
Title collocation method of the present invention in the flow process of initiator's one side as shown in Figure 4, at step S410, the initiator sends the title request that comprises its sign.To supporting the application network of multiple sign type, can also in the title request, comprise this initiator's current sign type.The initiator writes the sign of the type in the title request according to current sign type.
Can when each initiator's node starts, send the title request, make the title management server can more intactly realize centralized management, to strengthen whole security of network system sponsor party name.
Initiator's title request can be a unicast message, also can be multicast message.If the employing unicast message, the initiator need know the IP address of title management server in advance.
At step S420, receive answer to the title request.
At step S430, judge whether the answer that receives is the notice that opposite end title management server supports to identify type, if, execution in step S440; If not, change step S450.
When the application network support at initiator place surpasses a kind of sign type, if the sign type in the sponsor party name request is not the sign type that the title management server is supported, then the title management server returns the notice of the sign type of supporting, informs which sign type the initiator should use; If the sign type in the title request belongs to the sign type that the title management server is supported, then return the title request responding.
At step S440, the type in is revised initiator's current sign type as per advice, changes step S410, generates new title request by new current sign type and resends to the title management server.When comprising in the notice that when surpassing a kind of sign type, the initiator can choose any one kind of them as current sign type.
At step S450, the title that the title management server returns in to the title request responding is set to the invention party name.
When the application network at initiator place was only supported a kind of sign type, step S430, S440 can omit.
Figure 5 shows that the signal flow example between the initiator and title management server among the present invention.Initiator's node starts, and generates the title request message and to the transmission of title management server, has wherein carried the sign of current sign type and the type according to current sign type.The title request message that the inspection of title management server receives finds that sign type wherein is not the sign type that book server is supported, generates to support sign type notification message to send, and the sign type of being supported is informed this initiator.The initiator is according to supporting the sign type in the sign type notification message to upgrade current sign type, regenerate to comprise that the title request message that upgrades back sign type and the type sign is sent to the title management server.Behind the sign type checking, the title management server identifies according to the initiator determines corresponding title, in the title request response title is replied the initiator.After the initiator is provided with title, promptly can this title and application network in target side connect, carry out storage operation.
After initiator's node restarts, generate the title request message according to the current sign type of having upgraded, be sent to the title management server.After the title management server identifies type checking,, will in the title request response, return the identical title of determining with last time of title according to the corresponding relation of initiator's sign with title.Like this, the consistency of sponsor party name is guaranteed.
The network node that has the title configuration feature among the present invention, promptly the title management server can have structure shown in Figure 6.Sign type units 630 is connected with transmitting element 610, receiving element 620 and title unit 640 respectively, and title unit 640 is connected with transmitting element 610.
Other nodes that transmitting element 610 is used in application network send messages, and receiving element 620 is used for receiving the message that other nodes in the application network send to this node.
When receiving element 620 receives the title request, export it to sign type units 630.The sign type units judges whether sign type in the title request belongs to the name type of this node support, if belong to then export this title request to title unit 640; If the sign type package that does not belong to then this node is supported in supporting the sign type notification, and will be supported to identify type notification and export transmitting element 610 to, send to the initiator of this title request by transmitting element 610.Sign type units 630 is a selectable unit, can omit when application network is supported single sign type.
Title unit 640 identifies definite title according to the initiator in the title request of input, title is encapsulated in the title request response exports transmitting element 610 to.Transmitting element 610 is sent to title request response the initiator of this title request.
According to the mode difference of being determined title in the title unit 640 by sign, the title management server can have different embodiment.In embodiment one, title unit 640 adopt generating algorithms by the initiator identify calculate title, the required satisfied condition of generating algorithm is as previously mentioned.
Title management server embodiment two can have structure shown in Figure 7, and title unit 640 comprises interconnective request processing module 641 and memory module 642, and wherein request processing module is connected with transmitting element 610 with sign type units 630 respectively.
In storely in the memory module 642 be sent to initiator's title and corresponding initiator's sign thereof by transmitting element 610.Request processing module 641 when receiving the title request, parses initiator's sign wherein from receiving element 620 or sign type units 630, searches this sign in memory module 642.If found this sign in memory module 642, request processing module 641 is encapsulated in the corresponding title of this sign in the memory module 642 in the title request response and exports transmitting element 610 to; If in memory module 642, do not find this sign, request processing module 641 generate with memory module 641 in the different newname of title of preservation, newname is encapsulated in the title request response exports transmitting element 610 to, and newname and corresponding initiator's sign thereof are deposited in the memory module 642.
Figure 8 shows that among the present invention the structural representation as initiator's network node, title request unit 830 connects transmitting element 810 and sign type response unit 840 respectively; Receiving element 820 is connected to sign type response unit 840 respectively and title is provided with unit 850.
Other nodes that transmitting element 810 is used in application network send messages, and receiving element 820 is used for receiving the message that other nodes in the application network send to this node.
The title request unit 830 of initiator's node is encapsulated in initiator's sign in the title request, exports the title request to transmitting element 810, is sent to the title management server by transmitting element 810.Receiving element 820 exports the title request response that receives to title unit 850 is set, and title is provided with unit 850 and parses title from title request response, and it is set to the sponsor party name of this node.
When the application network at initiator place is supported multiple sign type, can increase sign type response unit 840.Preserve current sign type in title request unit 830 or sign type response unit 840, title request unit 830 encapsulates the sign of current sign type and the type simultaneously when generating the title request.Receiving element 820 receives when supporting the sign type notification and it to be exported to sign type response unit 840, sign type response unit 840 therefrom parses the sign type that the title management server is supported, this initiator's current sign type is revised as wherein a kind of, and instruction title request unit 830 regenerates the title request according to amended current sign type.
Need to prove, mutual various messages can adopt both sides to arrange between initiator and the title management server among the present invention any message name and form are as long as can be carried on initiator's sign, sign type and/or the sponsor party name that needs to notify the opposite end in this message.
To sum up, the present invention has realized the dynamic assignment of sponsor party name, guaranteed the uniqueness of sponsor party name in the application network system, has reduced the workload that the keeper plans configuring sponsor party name; Simultaneously, all initiators' centralized management distributes in the application network, can prevent effectively that malice from falsely using sponsor party name, has avoided potential data security problem.
Above-described embodiment of the present invention does not constitute the qualification to protection range of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection range of the present invention.