CN100423497C - Address determination method and its nodes in the network - Google Patents
Address determination method and its nodes in the network Download PDFInfo
- Publication number
- CN100423497C CN100423497C CNB031088619A CN03108861A CN100423497C CN 100423497 C CN100423497 C CN 100423497C CN B031088619 A CNB031088619 A CN B031088619A CN 03108861 A CN03108861 A CN 03108861A CN 100423497 C CN100423497 C CN 100423497C
- Authority
- CN
- China
- Prior art keywords
- address
- node
- packet
- initialization
- lower layer
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
一种网络中的地址决定方法及其节点,新节点通过由预先设定的网络应用模式,将全节点应答要求或只有服务器应答要求的任一方的初始化信息包组播在子网络内,所述新节点作为初始化应答信息包,若具有来自服务器的应答信息包,则以包含其中的赋予下位层地址作为固有节点的下位层地址,若无来自服务器的应答,则按照网络应用模式进行出错停止、或者根据从1个或多个已起动的节点返回来的各自初始化应答信息包中包含的现有的下位层地址,选择未使用的1个数值作为固有节点的下位层地址。由此,在按照网络的规模和传输的容许量决定网络初期设定所必需的地址时,有无服务器均不会使处理方法出现大的差异,可用简单的方式来决定地址。
A method for determining an address in a network and a node thereof, wherein a new node multicasts an initialization information packet of either a full node response request or only a server response request in a subnet through a preset network application mode, said The new node is an initialization response packet. If there is a response packet from the server, the lower layer address included therein is used as the lower layer address of the inherent node. If there is no response from the server, an error stop is performed according to the network application mode. Alternatively, one unused numerical value is selected as the lower layer address of the specific node based on the existing lower layer address included in each initialization response packet returned from one or more activated nodes. Therefore, when determining addresses necessary for network initial setting according to the scale of the network and the allowable amount of transmission, there is no significant difference in the processing method whether there is a server or not, and the addresses can be determined in a simple manner.
Description
技术领域 technical field
本发明涉及网络中的地址决定方法及其节点。The invention relates to an address determination method and its nodes in the network.
背景技术 Background technique
传统的IP网络是按照网络的规模和传输的容许量来决定网络初期设定所必需的地址,但在由RFC(request for comments:请求注解)形式记述的DHCP服务器(dynamic host configuration protocol server:动态主机配置协议服务器)和AutoIP(Auto internet protocol:Auto网际协议)等中,因服务器的有无会使地址决定方法大不相同,故存在着组装复杂的问题。又,子网络内存在服务器时,该服务器本身有时会发生异常、或者造成与服务器的通信暂时性中断,在以分散方式动作时,出现忽略服务器的存在而分配地址的问题。In the traditional IP network, the address necessary for the initial setting of the network is determined according to the scale of the network and the allowable amount of transmission, but in the DHCP server (dynamic host configuration protocol server: dynamic Host Configuration Protocol server) and AutoIP (Auto internet protocol: Auto Internet Protocol), etc., depending on the presence or absence of a server, the address determination method is greatly different, so there is a problem of complicated assembly. Also, when there is a server in the subnet, the server itself may malfunction, or communication with the server may be temporarily interrupted. When operating in a distributed manner, there is a problem of assigning addresses regardless of the existence of the server.
并且,在传统的IP网络中存在为决定地址而需要大量时间的问题。Also, there is a problem that a lot of time is required to determine an address in a conventional IP network.
本发明目的在于,提供一种在按照网络的规模和传输的容许量决定网络初期设定所必需的地址时,有无服务器均不会使处理方法出现大的差异,可用简单的方式来决定地址的网络中的地址决定方法及其节点。The object of the present invention is to provide a method for determining the address necessary for the initial setting of the network in accordance with the scale of the network and the allowable amount of transmission, regardless of whether there is a server or not, so that there is no large difference in the processing method, and the address can be determined in a simple manner. The address determination method and its nodes in the network.
本发明又一目的在于,提供一种可解决传统技术中当存在于子网络内的服务器本身发生异常或者造成与服务器的通信暂时性中断时出现的忽略该服务器的存在而分配地址的问题,可缩短地址决定所需的时间的网络中的地址决定方法及其节点。Another object of the present invention is to provide a method that can solve the problem of ignoring the existence of the server and assigning addresses in the traditional technology when the server in the subnet itself is abnormal or the communication with the server is temporarily interrupted. An address determination method in a network and a node thereof for shortening the time required for address determination.
发明内容 Contents of the invention
本发明第1技术方案的网络中的地址决定方法,其特征在于,新节点新加入网络时,将全节点应答要求的初始化信息包组播在各子网络内,所述新节点若接收到来自服务器的初始化应答信息包作为对初始化信息包的应答,则将包含在所述初始化应答信息包中的赋予下位层地址决定作为自己节点的下位层地址,若无来自服务器的应答作为对初始化信息包的应答,而接收到分别从1个或多个已启动的节点返回来的初始化应答信息包,则根据分别从已启动的节点返回来的初始化应答信息包中包含的现有的下位层地址信息,选择未使用的1个数值作为自己节点的下位层地址。The address determination method in the network of the first technical solution of the present invention is characterized in that when a new node newly joins the network, the initialization information packet of the full node response request is multicast in each sub-network, and if the new node receives a message from The initialization response packet of the server is used as a response to the initialization packet, and the assigned lower layer address included in the initialization response packet is determined as the lower layer address of the own node, and if there is no response from the server, the response to the initialization packet , and receive the initialization response packets returned from one or more activated nodes respectively, according to the existing lower layer address information contained in the initialization response packets returned from the activated nodes respectively , select one unused value as the lower layer address of its own node.
本发明的第2技术方案是在上述第1技术方案的网络的地址决定方法中,其特征在于,所述初始化信息包至少包括收信地址、固有地址、信息包型、固有硬件地址和临时下位层地址,在所述收信地址中,对子网络内组播收信地址作出指定,由信息包型或附加位来识别所述网络应用模式。The second technical solution of the present invention is in the network address determination method of the above-mentioned first technical solution, wherein the initialization information packet includes at least a receiving address, a unique address, a packet type, a unique hardware address, and a temporary subordinate The layer address, in the receiving address, specifies the multicast receiving address in the subnet, and identifies the network application mode by information packet type or additional bits.
本发明的第3技术方案是在上述第1或第2技术方案的网络的地址决定方法中,其特征在于,所述初始化应答信息包包括收信地址、固有地址、信息包型、固有硬件地址、赋予下位层地址或固有下位层地址、以及服务器是否应答的代码,在所述收信地址中对所述初始化信息包的送信源地址作出指定。The third technical solution of the present invention is in the address determination method of the network of the above-mentioned first or second technical solution, wherein the initialization response information packet includes a receiving address, a unique address, a packet type, and a unique hardware address , a lower layer address or a unique lower layer address, and a code indicating whether or not the server responds, and the address of the transmission source of the initialization packet is specified in the destination address.
本发明的第4技术方案是在上述第1至第2技术方案的网络的地址决定方法中,其特征在于,所述网络是一个主机依次访问多个从机并和特定的从机之间进行信息包交换的主/从方式的网络,由应成为子网络内的服务器的从属节点决定下位层地址的预约值,所述主节点在地址取得动作之前生成包含有管理的从属节点各自的硬件地址、下位层地址、从属管理号的数据库,从新的从属节点接受所述初始化信息包时,将与设定作为预约值的下位层地址对应的从属管理号传送至从属节点地址,将来自该从属节点的初始化应答信息包返回至初始化信息包的送信源的从属节点。The 4th technical solution of the present invention is in the address determination method of the network of the above-mentioned 1st to the 2nd technical solution, it is characterized in that, described network is that one master sequentially visits a plurality of slaves and conducts a process with a specific slave. In the network of the master/slave system of packet exchange, the reserved value of the lower layer address is determined by the slave node that should be the server in the subnet, and the master node generates and includes the hardware address of each slave node before the address acquisition operation. , the lower layer address, and the database of the slave management number. When receiving the initialization packet from a new slave node, the slave management number corresponding to the lower layer address set as the reservation value is transmitted to the slave node address, and the The initialization response packet is returned to the slave node of the transmission source of the initialization packet.
本发明的第5技术方案是在上述第1至第2技术方案的网络的地址决定方法中,其特征在于,所述网络是CSMA/CD方式(carrier sense multiple accesswith collision detection:载波侦听多路访问/冲突检测)的网络,在所述服务器节点的下位层地址值中,将地址值的可设定范围的最小值设定为预约地址,接受到来自所述新节点的初始化信息包的已启动的节点在接受到该初始化信息包之后,经过与保持该节点的下位层地址值成正比的所定时间,送出与该初始化信息包相对应的初始化应答信息包。The 5th technical solution of the present invention is in the address determination method of the network of the above-mentioned 1st to 2nd technical solution, it is characterized in that, described network is CSMA/CD mode (carrier sense multiple access with collision detection: carrier sense multiple access access/conflict detection) network, in the lower layer address value of the server node, set the minimum value of the settable range of the address value as the reserved address, and receive the existing address of the initialization packet from the new node After receiving the initialization packet, the activated node transmits an initialization response packet corresponding to the initialization packet after a predetermined time proportional to the lower layer address value of the node is held.
本发明的第6技术方案是在上述第5技术方案的网络的地址决定方法中,其特征在于,各节点由从接受到的信息包的内容中得到的其他的节点各自的活动位与硬件地址的组合要素构成,保持在固有节点再启动的同时将值清除后再作成的管理表,将所述活动位附加于所述初始化应答信息包,作为已使用的下位层地址向所述新节点地址送信。The 6th technical solution of the present invention is in the address determination method of the network of the above-mentioned 5th technical solution, it is characterized in that, each node obtains each activity bit and hardware address of other nodes from the content of the received information packet Composition of combination elements, hold the management table created after clearing the value when the original node is restarted, add the activity bit to the initialization response packet, and send it to the new node address as the lower layer address already used send a letter.
本发明第1技术方案的网络中的地址决定方法,其特征在于,新节点新加入网络时,通过由预先设定的模式,将全节点应答要求或仅服务器应答要求的初始化信息包组播在各子网络内,在进行仅服务器应答要求作为初始化信息包时,作为对该初始化信息包的应答,所述新节点若接收到来自服务器的初始化应答信息包作为初始化应答信息包,则将包含在所述初始化应答信息包中的赋予下位层地址决定作为自己节点的下位层地址,若没有从服务器接收到初始化应答信息包,就故障停止,在进行全节点应答要求作为初始化信息包时,所述新节点若接收到来自服务器的初始化应答信息包作为对所述初始化信息包的应答,则将包含在所述初始化应答信息包中的赋予下位层地址决定作为自己节点的下位层地址,若无来自服务器的应答作为对初始化信息包的应答,而接收到分别从1个或多个已启动的节点返回来的初始化应答信息包,则根据分别从已启动的节点返回来的初始化应答信息包中包含的现有的下位层地址信息,选择未使用的1个数值作为自己节点的下位层地址。The address determination method in the network of the first technical solution of the present invention is characterized in that, when a new node newly joins the network, the initialization information packet of the full node response request or only the server response request is multicast in the preset mode. In each subnetwork, when only the server response request is made as an initialization packet, as a response to the initialization packet, if the new node receives an initialization response packet from the server as an initialization response packet, it will include in The assigned lower layer address in the initialization response packet is determined as the lower layer address of the own node, and if the initialization response packet is not received from the server, the failure stops, and when a full node response request is made as the initialization packet, the If the new node receives an initialization response packet from the server as a response to the initialization packet, it determines the assigned lower layer address included in the initialization response packet as the lower layer address of its own node. The response of the server is the response to the initialization information packet, and when receiving the initialization response information packet returned from one or more started nodes respectively, according to the initialization response information package returned from the started node respectively contains The existing lower layer address information, and select one unused value as the lower layer address of its own node.
这样,当新进入具有本发明的节点的子网络时,若是子网络内存在服务器的网络,则从其服务器中得到下位层地址,若是子网络内不存在服务器的网络,则可以不与从其他节点返回来的下位层地址冲突的地址作为固有的下位层地址自律决定。Like this, when newly entering the sub-network with the node of the present invention, if there is a server network in the sub-network, then obtain the lower layer address from its server, if there is no server network in the sub-network, then you can not communicate with other users. The lower-layer address conflicting address returned by the node is determined autonomously as an inherent lower-layer address.
综上所述,采用本发明,使网络初期设定所需的下位层地址的决定方式按照网络的规模,仅通过变更初始化信息包的部分代码号设定网络应用模式,即可与服务器方式、分散方式中任一种简单地对应,并可缩短地址决定所需的时间。In summary, with the present invention, the method of determining the lower layer address required for network initial setting is based on the scale of the network, and only by changing the partial code number of the initialization packet to set the network application mode, it can be compared with the server method, Any of the distributed methods can easily correspond, and the time required for address determination can be shortened.
附图的简单说明A brief description of the drawings
图1为主/从方式的网络的布局。Figure 1 shows the layout of the master/slave network.
图2为CSMA/CD方式的网络的布局。Fig. 2 is the layout of the network of CSMA/CD way.
图3为本发明一实施例的节点的协议栈图。Fig. 3 is a protocol stack diagram of a node according to an embodiment of the present invention.
图4为表示本发明一实施例的节点构成的方框图。Fig. 4 is a block diagram showing the configuration of a node according to an embodiment of the present invention.
图5为上述实施例的信息包A的构成图。Fig. 5 is a structural diagram of the packet A of the above-mentioned embodiment.
图6为上述实施例的信息包B的构成图。Fig. 6 is a structural diagram of the packet B of the above-mentioned embodiment.
图7为上述实施例的信息包C的构成图。FIG. 7 is a structural diagram of the packet C of the above-mentioned embodiment.
图8为上述实施例的信息包D的构成图。FIG. 8 is a structural diagram of the packet D of the above-mentioned embodiment.
图9为上述实施例的信息包E的构成图。FIG. 9 is a structural diagram of the packet E of the above-mentioned embodiment.
图10为上述实施例的信息包F的构成图。FIG. 10 is a diagram showing the structure of the packet F of the above-mentioned embodiment.
图11为上述实施例的服务器方式(SR模式)中的下位层地址决定的程序图。FIG. 11 is a flowchart of the determination of the lower layer address in the server mode (SR mode) of the above-mentioned embodiment.
图12为上述实施例的分散方式(A模式)中的下位层地址决定的程序图。Fig. 12 is a flowchart of the determination of the lower layer address in the distributed method (A mode) of the above-mentioned embodiment.
图13为主/从方式的信息包收发信的时间图。Fig. 13 is a timing chart of packet transmission and reception in the master/slave mode.
图14为CSMA/CD方式的信息包收发信的时间图。FIG. 14 is a timing chart of packet transmission and reception in the CSMA/CD method.
图15为保持主节点的从属管理表的说明图。FIG. 15 is an explanatory diagram of a slave management table holding a master node.
图16为本发明第3实施例中使用的保持各节点的其他节点活动位管理表的说明图。Fig. 16 is an explanatory diagram of a management table holding other node activity bits of each node used in the third embodiment of the present invention.
图17为本发明第3实施例中使用的信息包B的构成图。Fig. 17 is a diagram showing the structure of a packet B used in the third embodiment of the present invention.
具体实施方式 Detailed ways
下面参照附图详细说明本发明一实施例。An embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
在网络系统中,唯一存在于子网络内的服务器有两种方式:对子网络内的全节点的地址进行分配管理的方式(服务器方式)和无服务器的、由各节点自律决定固有地址的方式(分散方式)。In the network system, there are two ways for the only server that exists in the subnetwork: the way of allocating and managing the addresses of all nodes in the subnetwork (server way) and the way of serverless, where each node independently determines the inherent address (distributed way).
本实施例的网络中的地址决定方法的特征在于,在这些服务器方式和分散方式中分别包括新节点决定固有下位层地址的方法和尽可能缩短决定下位层地址所需时间的方法。另外,所谓下位层地址是指图3所示的协议栈的应保持在下位层L3的地址,它是分配到子网络内的所有已启动的节点中的、在子网络内属于世界唯一的一种地址。又,上位地址由下位层地址唯一地决定,在这里不作详细说明。在下位层地址取得动作之前,子网络内唯一的IP地址的取得结束,将该取得结束作为触发点,移至下位层地址的取得动作。又,硬件地址在制造时预先将各个传送媒体设定为唯一值。The address determination method in the network of this embodiment is characterized in that the server method and the distributed method include a method of determining a lower layer address unique to a new node and a method of shortening the time required to determine a lower layer address as much as possible. In addition, the so-called lower layer address refers to the address that should be kept in the lower layer L3 of the protocol stack shown in FIG. kind of address. Also, the upper address is uniquely determined by the lower layer address, and will not be described in detail here. Before the lower layer address acquisition operation, the acquisition of the unique IP address in the subnet is completed, and the completion of the acquisition is used as a trigger to move to the lower layer address acquisition operation. In addition, the hardware address is previously set to a unique value for each transmission medium at the time of manufacture.
如图4所示,包含服务器的各节点100是由数字信号传送用的传送媒体、调制调解回路1、由程序执行地址分配、管理及其他所定的运算控制的微电脑2、作为非挥发性存储器的EPROM(可擦只读存储器)3、ROM(只读存储器)4、RAM(随机存取存储器)5各要素所构成。并由软件程序执行地址决定。As shown in FIG. 4, each node 100 including the server is composed of a transmission medium for digital signal transmission, a modulation and
图5~图10表示网络内的节点间传递数据的信息包。其中,图中的「固有」一词的含义是将该信息包送信的节点(也包含服务器的节点),各信息包的要素以1字节单位的位来表现。5 to 10 show packets for transferring data between nodes in the network. Here, the term "proprietary" in the figure means a node (including a server node) that transmits the packet, and elements of each packet are represented by bits in 1-byte units.
出现新节点时,从图3所示的下位层L3输出初始化信息包。如图5所示,初始化信息包A由收信地址A1、固有地址A2、信息包型A3、应答型A4、固有硬件地址A5、临时下位层地址A6各要素所构成。其中,作为收信地址A1,子网络内写入IP组播收信地址;作为固有地址A2,写入固有IP地址。并且,根据以下两种场合即有信息包型A3的写入但无应答型A4的写入场合、或者信息包型A3和应答型A4都有写入场合,来识别是全节点应答要求还是仅服务器应答要求。又,通过硬件开关和软件的设定工具等预先在新节点中对新节点是进行全节点应答要求还是仅服务器的应答要求作出设定。即,在各节点进入网络时,可由使用者或设置者选择是进行全节点应答要求还是只有服务器的应答要求。When a new node appears, an initialization packet is output from the lower layer L3 shown in FIG. 3 . As shown in FIG. 5, the initializing packet A is composed of elements of a destination address A1, a unique address A2, a packet type A3, a response type A4, a unique hardware address A5, and a temporary lower layer address A6. Wherein, as the receiving address A1, an IP multicast receiving address is written in the subnet; as the specific address A2, a specific IP address is written. And, according to the following two occasions, that is, there is a writing of packet type A3 but no writing of response type A4, or there are writing occasions of both packet type A3 and response type A4, to identify whether the full node responds to the request or only The server answers the request. In addition, whether the new node performs an all-node response request or only a server response request is set in advance in the new node by using a hardware switch, a software setting tool, and the like. That is, when each node enters the network, the user or installer can choose whether to make a response request from all nodes or a response request from only the server.
接受到初始化信息包A的节点根据有无该初始化信息包A的应答型的写入对仅服务器的应答还是全节点进行识别。若应答型即为仅服务器的应答,则将图7所示的初始化应答信息包返回。若已收到的初始化信息包A无应答型的写入即属于全节点应答,则服务器以外的节点将图6所示的初始化应答信息包B返回,服务器将图7所示的初始化应答信息包C返回。The node that has received the initialization packet A recognizes whether only the server's response or the full node is based on whether or not the initialization packet A is written in response. If the response type is the response from the server only, the initialization response packet shown in FIG. 7 is returned. If the non-response writing of the received initialization information packet A belongs to the full node response, the node other than the server will return the initialization response information packet B shown in Figure 6, and the server will return the initialization response information packet B shown in Figure 7 C returns.
图6所示的初始化应答信息包B由收信地址B1、固有地址B2、信息包型B3、应答型B4、固有硬件地址B5、临时下位层地址B6的各要素所构成。图7所示的初始化应答信息包C由收信地址C1、固有地址C2、信息包型C3、应答型C4、固有硬件地址C5、固有下位层地址C6、赋予下位层地址C7的各要素所构成。The initialization response packet B shown in FIG. 6 is composed of each element of a destination address B1, a unique address B2, a packet type B3, a response type B4, a unique hardware address B5, and a temporary lower layer address B6. The initialization response packet C shown in FIG. 7 is composed of each element of the receiving address C1, the unique address C2, the packet type C3, the response type C4, the unique hardware address C5, the unique lower layer address C6, and the assigned lower layer address C7. .
在这些初始化应答信息包B、C中,收信地址B1、C1表示初始化信息包A的送信源节点的IP地址,固有地址B2、C2表示固有IP地址,信息包型B3、C3或应答型B4和应答型C4表示对由已写入其中的代码收信的信息包是从服务器返回的信息包还是从一般节点返回的信息包进行识别,并且是一种初始化信息包A的应答。这些初始化信息包B、C包含固有硬件地址B5、C5和固有的下位层地址B6、C6。又,初始化应答信息包若是来自服务器,则该初始化信息包C包含赋予新节点的下位层地址C7。In these initialization response packets B and C, the receiving address B1 and C1 represent the IP address of the node sending the initialization packet A, the unique address B2 and C2 represent the unique IP address, and the packet type B3 and C3 or the response type B4 The sum-response type C4 indicates identification of whether the packet received by the code written therein is a packet returned from a server or a packet returned from a general node, and is a reply to the initialization packet A. These initialization packets B and C include specific hardware addresses B5 and C5 and specific lower layer addresses B6 and C6. Also, if the initialization response packet is from the server, the initialization packet C includes the lower layer address C7 assigned to the new node.
图8所示的信息包D是该节点相对于来自服务器的下位层地址返回的受理应答,由收信地址D1、固有地址D2、信息包型D3、应答型D4、固有硬件地址D5、固有下位层地址D6的各要素所构成。该信息包D的收信地址D1即是服务器的IP地址。Packet D shown in FIG. 8 is an acceptance response returned by the node to the lower layer address from the server. Each element of layer address D6 is constituted. The receiving address D1 of the information packet D is the IP address of the server.
图9所示的信息包E是一种决定临时下位层地址后组播在子网络内的信息包,它包含组播的收信地址E1、表示送信源的固有地址E2、信息包型E3、固有硬件地址E5和临时下位层地址E5。通过该信息包E接受临时下位层地址E5的节点若与固有的下位层地址相同,则将送信源的IP地址作为收信地址F1对图10所示的重复通知用的信息包F送信。该信息包F由收信地址F1、固有地址F2、信息包型F3、固有硬件地址F4、固有下位层地址F5的各要素所构成。The information packet E shown in FIG. 9 is an information packet multicast in the subnet after a temporary lower layer address is determined, and it includes a multicast receiving address E1, an inherent address E2 indicating a sending source, an information packet type E3, The intrinsic hardware address E5 and the temporary lower layer address E5. If the node receiving the temporary lower layer address E5 through this packet E is the same as the inherent lower layer address, it transmits the packet F for duplicate notification shown in FIG. This packet F is constituted by each element of a destination address F1, a unique address F2, a packet type F3, a unique hardware address F4, and a unique lower layer address F5.
下面对本发明的无服务器的某一个下位层地址的决定方法(A模式)和由服务器可靠地决定下位层地址的方法(SR模式)的各具体动作进行说明。另外,A模式和SR模式可由硬件开关或软件设定工具等切换,最好是按照网络应用程序来决定。即,根据决定网络应用的网络规模、传输占有率容许度及有无管理者来决定。一般来讲,在规模大、无传输占有率容许度但有管理者时推荐选择SR模式,除此之外的条件则推荐使用A模式。Next, specific operations of the serverless method for determining a lower layer address (A mode) and the method for reliably determining a lower layer address by a server (SR mode) according to the present invention will be described. In addition, the A mode and the SR mode can be switched by a hardware switch or a software setting tool, and it is preferable to determine according to a network application. That is, it is determined based on the network scale, transmission occupancy allowance, and presence or absence of a manager to determine the network application. Generally speaking, the SR mode is recommended when the scale is large, there is no transmission occupancy allowance but there is a manager, and the A mode is recommended for other conditions.
图11是执行各节点的SR模式时的下位层地址决定顺序的程序图。在SR模式中,必须由已启动的服务器分配下位层地址。已启动的节点与新节点间的通信中断或一旦服务器停止时,服务器无应答,在该模式中,作为出错而结束。在此场合,为了使服务器复位,需要管理者介入。FIG. 11 is a sequence diagram of the lower layer address determination procedure when executing the SR mode of each node. In SR mode, the lower layer addresses must be assigned by the started server. If the communication between the already started node and the new node is interrupted or the server does not respond once the server is stopped, in this mode, it ends as an error. In this case, the intervention of the administrator is required to reset the server.
新节点对图5所示的初始化信息包A进行组播(S1)。对其作出应答,仅从已启动的服务器将图7所示的初始化应答信息包C返回(S2)。接受到该初始化应答信息包C的新节点由图8所示的信息包D作出应答,确定下位层地址。The new node multicasts the initialization packet A shown in FIG. 5 (S1). In response to this, the initialization response packet C shown in FIG. 7 is returned only from the activated server (S2). The new node that has received the initialization response packet C responds with the packet D shown in FIG. 8, and specifies the address of the lower layer.
图12是执行各节点的A模式时的下位层地址的决定顺序的程序图。在A模式中,新节点若组播初始化信息包A(S11),则从子网络内的已启动的所有的节点(也包含服务器节点)返回初始化应答信息包B或C(服务器场合)(S12)。FIG. 12 is a sequence diagram of a procedure for determining a lower layer address when the A mode of each node is executed. In the A mode, if the new node multicasts the initialization information packet A (S11), then from all the nodes (also including the server node) started in the subnet, return the initialization response information packet B or C (server occasion) (S12 ).
在此,即使无来自服务器的应答(此时无初始化应答信息包C),新节点也可从除了在从已收到的各节点的初始化应答信息包B中包含的固有下位层地址B6以外的下位层地址中决定临时下位层地址以用于新节点,对分别包含该值的初始化应答信息包B返回的已启动的节点作为收信地址的信息包E进行组播(S13)。Here, even if there is no response from the server (at this time, there is no initialization response packet C), the new node can send a new node from a location other than the inherent lower layer address B6 contained in the initialization response packet B received from each node. A temporary lower layer address is determined for the new node in the lower layer address, and a packet E with the activated node as the destination is returned by the initialization response packet B each including the value (S13).
对于该组播的信息包E,若判断为某一已启动的节点与固有下位层地址重复,则由信息包F执行地址重复通知(S14)。新节点一旦接受到该地址重复通知,则除了与所述返信地址群重复的地址之外,重新设定临时下位层地址,执行S13的组播,等待重复通知的返回。For the multicast packet E, if it is judged that a certain activated node has the same lower layer address, the packet F performs address duplication notification (S14). Once the new node receives the address repetition notification, it resets the temporary lower-layer address except for the addresses that overlap with the return address group, executes the multicast in S13, and waits for the return of the repetition notification.
若经过了所定时间仍未从S13的组播返回重复通知,则以预先设定的临时下位层地址作为本地址进行决定(S16)。If the multicast in S13 does not return a repeat notification after a predetermined time has elapsed, a determination is made using a preset temporary lower layer address as the own address (S16).
另一方面,S11中,在通过组播从新节点将初始化信息包A送信时,若从子网络内的已启动的节点的服务器有通过初始化初始化信息包C执行的应答(S12’),则新节点以该初始化应答信息包C中包含的赋予下位层地址C7作为固有下位层地址(S17)。在此场合,可在不进行信息包B、E、F收发信的情况下立即作出下位层地址的确定。这样,即使是A模式,也可快速进行下位层地址分配。On the other hand, in S11, when the initialization packet A is sent from the new node by multicast, if there is a response from the server of the activated node in the subnet to execute the initialization packet C (S12'), the new The node uses the given lower layer address C7 included in the initialization response packet C as its own lower layer address (S17). In this case, the address of the lower layer can be determined immediately without transmitting and receiving packets B, E, and F. FIG. In this way, even in the A mode, lower layer address allocation can be quickly performed.
在本实施例的网络的地址决定方法中,无论什么场合,均可通过预先准备好新节点在子网络内组播的两种不同的信息包(变更初始化信息包A的部分代码号)区别使用决定任一下位层地址的方法(A模式)和由服务器可靠地决定下位层地址的方法(SR模式)。并且,只要已启动的节点按照来自该新节点的初始化信息包进行应答,新节点就可通过预先选择的SR模式或A模式对下位层地址进行决定。In the address determination method of the network of the present embodiment, no matter what the occasion, it is possible to distinguish and use by preparing in advance two different information packets (partial code number of the initialization information packet A) that the new node multicasts in the subnetwork A method of determining an arbitrary lower layer address (A mode) and a method of reliably determining a lower layer address by a server (SR mode). And, as long as the activated node responds in accordance with the initialization packet from the new node, the new node can determine the address of the lower layer in the preselected SR mode or A mode.
在此,SR模式的地址决定方法因只需要对每1个新节点与服务器之间作出处理即可,故是一种传输少而稳定的方法,即使是由许多节点组成的网络也无破绽。另一方面,A模式的地址决定方法因是每1个新节点均需从全节点返回应答,故传输占有率高,与由许多节点组成的网络不对应。但在本实施例中,由于只是按照网络的规模部分地变更初始化信息包A的代码号,因此,可有选择且简单地变更对应地址决定方法。Here, the address determination method in the SR mode only needs to process between each new node and the server, so it is a method with less transmission and is stable, even in a network composed of many nodes. On the other hand, the address determination method of the A mode requires a response from all nodes for each new node, so the transmission occupancy rate is high, and it does not correspond to a network composed of many nodes. However, in this embodiment, since the code number of the initialization packet A is only partially changed according to the scale of the network, the corresponding address determination method can be selectively and easily changed.
又,存在服务器时,当然希望新节点尽快接受下位层地址分配。为了解决这一问题,下面说明以图1、图13所示的主/从方式的通信和以图2、图14所示的CSMA/CD方式的通信。Also, when there is a server, it is of course desirable that the new node accepts the lower layer address assignment as soon as possible. In order to solve this problem, the communication of the master/slave method shown in Fig. 1 and Fig. 13 and the communication of the CSMA/CD method shown in Fig. 2 and Fig. 14 will be described below.
在图1、图13所示的主/从方式中,以定时时间段进行多个从属节点和1个主节点的通信,主节点按顺序号存放在各从属节点中,并在与特定从属节点之间进行信息包交换。然而,从从属节点接受信息包的主节点若预先知道将其信息包传送到哪1个从属节点,则可以最短时间将该信息包送至目的从属节点。In the master/slave mode shown in Figure 1 and Figure 13, the communication between multiple slave nodes and one master node is carried out in a fixed time period, and the master node is stored in each slave node according to the sequence number, and communicates with a specific slave node Packets are exchanged between them. However, if the master node receiving a packet from a slave node knows in advance which slave node to transfer its packet to, it can send the packet to the destination slave node in the shortest time.
由于应成为服务器的节点在子网络内是唯一的,故作为该服务器节点用的下位层地址决定了1个预约值。并且,当新节点是从属节点时,接受到其送信的信息包A的主节点立即传送至具有下位层地址预约值的从属节点(或在主节点本身具有预约值时不需要传送),作为对其的应答,可立即从具有下位层地址预约值的服务器节点将初始化应答信息包C返回至送信源的新节点。Since the node to be the server is unique within the subnet, the lower layer address used as the server node determines one reserved value. And, when the new node is a slave node, the master node that receives the information packet A sent by it immediately transmits to the slave node with the reserved value of the lower layer address (or does not need to transmit when the master node itself has a reserved value), as a response In response to this, an initialization response packet C may be immediately returned from the server node having the reserved value of the lower layer address to the new node of the transmission source.
如图15所示,主节点在取得下位层代码之前完成管理下的从属节点的至少包含IP地址、硬件地址、下位层地址、从属管理号的管理表10A、10B,保持在ROM5或EPROM3上,可分配在与下位层地址预约值相当的从属节点地址中。在此,将预约值预先写入服务器节点中,作为下位层地址值,主节点将其与IP地址和硬件地址一起读入,并反映在图15的管理表10B上。在图15的管理表10B中,将下位层地址作为0x00写入,其结果是即使主切点本身是从属节点,也可立即将初始化应答信息包C返回至送信源。As shown in FIG. 15 , the master node completes the management tables 10A and 10B of the slave nodes under management including at least IP addresses, hardware addresses, lower layer addresses, and slave management numbers before obtaining the lower layer codes, and keeps them in ROM5 or EPROM3. It can be allocated to the slave node address equivalent to the lower layer address reservation value. Here, the reservation value is written in advance in the server node, and the master node reads it as the lower layer address value together with the IP address and the hardware address, and reflects it on the management table 10B of FIG. 15 . In the management table 10B of FIG. 15, the lower layer address is written as 0x00. As a result, even if the master itself is a slave node, the initialization response packet C can be immediately returned to the transmission source.
下面对图2、图14所示的CSMA/CD方式节点的通信进行说明。在该方式中,无特别的主/从的概念,想要送信的节点在即将送信时进行载波检测,若在传送媒体上无载波,则向任意的节点送信。在这种网络中,通过将从接受到初始化信息包A起至将初始化应答信息包B或C送信为止的期间作为由“下位层地址值×固定时间”赋于的时间,可避免多个节点同时送出信息包时发生的信息包冲突。与其同时,通过将服务器节点的下位层地址值作为预约值决定为小于其他的通常节点的最小值,服务器节点即可将最早初始化应答信息包C送出。即,新节点可在短时间内得到下位层地址。Next, the communication of the CSMA/CD scheme nodes shown in Fig. 2 and Fig. 14 will be described. In this method, there is no special master/slave concept, and the node that wants to send a signal performs carrier sense just before sending a signal, and if there is no carrier on the transmission medium, it sends a signal to an arbitrary node. In such a network, multiple nodes can be avoided by setting the period from receiving the initialization packet A to transmitting the initialization response packet B or C as the time given by "lower layer address value x fixed time". Packet collisions that occur when packets are sent out at the same time. At the same time, the server node can send the earliest initialization response packet C by determining the lower layer address value of the server node as the predetermined value to be smaller than the minimum value of other normal nodes. That is, the new node can obtain the lower layer address in a short time.
这样,服务器将作为下位层地址值的预约值决定为下位层地址可设定范围的最小值,并且,特别是在主/从方式中,主节点立即存放在下位层地址值的预约值中并进行初始化信息包A的送信和初始化应答信息包C的收信;在CSMA/CD方式中,由于各节点在下位层地址值与固定时间之积赋于的时间中作为信息包应答的通信规则,新节点在存在服务器时可在短时间内接受下位层地址的分配。In this way, the server determines the reserved value as the lower layer address value as the minimum value of the lower layer address settable range, and especially in the master/slave method, the master node immediately stores the reserved value of the lower layer address value and The transmission of the initialization packet A and the reception of the initialization response packet C are carried out; in the CSMA/CD method, since each node responds to the packet within the time given by the product of the lower layer address value and the fixed time, The new node can receive the allocation of the lower layer address in a short time when there is a server.
又,图6所示的初始化应答信息包B通过附加以下的信息可通知更为适合的已使用的节点地址。图16所示的其他节点活动位管理表11就是保持各节点的数据表。该数据表由活动位、各节点硬件地址和定时器的要素所组成。活动位以下位层地址号按从小至大的顺序被存放在RAM5上,例如,最初的存储地址号表示下位层地址=0,第2个地址号表示下位层地址=1,若存在对应地址,则例如对应地址号的活动位=1,若不存在,则定义是活动位=0等。又,与各下位层地址对应的节点的硬件地址也保持一致。又,各节点最后接受到的信息包的送信源硬件地址的对应活动位分别具有递减计数定时器,递减计数定时器在每次接受送信源硬件地址相当信息包时复位至初始值。并且,该定时器计数从该初始值开始减小,成为所定值以下时,活动位=0。Furthermore, the initialization response packet B shown in FIG. 6 can notify a more suitable used node address by adding the following information. The other node activity bit management table 11 shown in FIG. 16 is a data table for keeping each node. The data table consists of elements of activity bits, hardware addresses of each node, and timers. The bit layer address numbers below the active bit are stored on the RAM5 in ascending order, for example, the initial storage address number represents the lower layer address=0, the second address number represents the lower layer address=1, if there is a corresponding address, Then, for example, the active bit corresponding to the address number=1, if it does not exist, it is defined as active bit=0 and so on. In addition, the hardware addresses of the nodes corresponding to the respective lower layer addresses are also consistent. Also, each node has a countdown timer corresponding to the active bit of the transmission source hardware address of the packet received last, and the countdown timer is reset to an initial value every time a packet corresponding to the transmission source hardware address is received. Then, the timer counts down from the initial value, and when it becomes equal to or less than a predetermined value, the active bit=0.
如图17所示,将这样管理的数据表11的活动位附加于初始化应答信息包B,通过将已使用的下位层地址值通知给新节点,就可提供更确切的已使用的下位层地址。另外,这些数据表11的数据在节点重新启动的同时加以清除而再作成。As shown in FIG. 17, by adding the active bit of the data table 11 managed in this way to the initialization response packet B, by notifying the new node of the used lower layer address value, it is possible to provide a more accurate used lower layer address. . In addition, the data of these data tables 11 are cleared and recreated at the same time as the node restarts.
Claims (7)
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002-092072 | 2002-03-28 | ||
| JP2002092072 | 2002-03-28 | ||
| JP2002092072A JP3808793B2 (en) | 2002-03-28 | 2002-03-28 | Address determination method and node in network |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1449164A CN1449164A (en) | 2003-10-15 |
| CN100423497C true CN100423497C (en) | 2008-10-01 |
Family
ID=28786157
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB031088619A Expired - Fee Related CN100423497C (en) | 2002-03-28 | 2003-03-27 | Address determination method and its nodes in the network |
Country Status (3)
| Country | Link |
|---|---|
| JP (1) | JP3808793B2 (en) |
| CN (1) | CN100423497C (en) |
| TW (1) | TWI254541B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI417737B (en) * | 2006-10-25 | 2013-12-01 | Hewlett Packard Development Co | Real-time identification of an asset model and categorization of an asset to assist in computer network security |
| CN111200513B (en) * | 2018-11-20 | 2022-03-04 | 杭州海康威视数字技术股份有限公司 | Server startup method, server and cluster server system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5408618A (en) * | 1992-07-31 | 1995-04-18 | International Business Machines Corporation | Automatic configuration mechanism |
| US5920267A (en) * | 1994-05-09 | 1999-07-06 | Europlex Research Limited | Ring network system |
| CN1228228A (en) * | 1996-06-14 | 1999-09-08 | 艾利森电话股份有限公司 | Method and apparatus for addressing wireless communication stations using dynamically assigned addresses |
| EP1120946A1 (en) * | 2000-01-26 | 2001-08-01 | Telecom Italia Mobile S.P.A. | A method for the conditional routing of a request for access to an internet page |
-
2002
- 2002-03-28 JP JP2002092072A patent/JP3808793B2/en not_active Expired - Fee Related
-
2003
- 2003-03-27 CN CNB031088619A patent/CN100423497C/en not_active Expired - Fee Related
- 2003-03-28 TW TW92107148A patent/TWI254541B/en not_active IP Right Cessation
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5408618A (en) * | 1992-07-31 | 1995-04-18 | International Business Machines Corporation | Automatic configuration mechanism |
| US5920267A (en) * | 1994-05-09 | 1999-07-06 | Europlex Research Limited | Ring network system |
| CN1228228A (en) * | 1996-06-14 | 1999-09-08 | 艾利森电话股份有限公司 | Method and apparatus for addressing wireless communication stations using dynamically assigned addresses |
| EP1120946A1 (en) * | 2000-01-26 | 2001-08-01 | Telecom Italia Mobile S.P.A. | A method for the conditional routing of a request for access to an internet page |
Also Published As
| Publication number | Publication date |
|---|---|
| TW200306726A (en) | 2003-11-16 |
| CN1449164A (en) | 2003-10-15 |
| JP2003289320A (en) | 2003-10-10 |
| TWI254541B (en) | 2006-05-01 |
| JP3808793B2 (en) | 2006-08-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103119916B (en) | To the method for similar bus user automatic distributing address | |
| US6965929B2 (en) | Configuring a network device | |
| CN110505319A (en) | A method and system for automatically assigning RS485 slave device addresses | |
| JP5047785B2 (en) | Method for assigning addresses to nodes in a wireless network | |
| CN106506717B (en) | A kind of automatic discovering method and equipment | |
| CN102307249B (en) | IP address automatic configuration method based on link layer topology | |
| JP4948839B2 (en) | Method and apparatus for allocating network subscriber device addresses in a ProfitetIO network | |
| CN110495157B (en) | Communication system for serial communication between communication devices | |
| CN102025797A (en) | Address prefix processing method, device, system and network equipment | |
| CN100423497C (en) | Address determination method and its nodes in the network | |
| CN116016445A (en) | Address allocation method for master-slave bus communication system | |
| CN115733820B (en) | Address prefix allocation methods and devices, storage media and electronic devices | |
| US7583690B2 (en) | Allocation of station addresses to communication users in a bus system | |
| CN113395366B (en) | A network address allocation method and device | |
| Taghiloo et al. | New approach for address auto-configuration in manet based on virtual address space mapping (vasm) | |
| CN114866111A (en) | Address binding method, system, master control node and equipment node | |
| RU2765121C1 (en) | Method for organizing streaming, method for providing information about the streaming identifier, use of a dns server, device, computer program and machine-readable medium | |
| CN115118662A (en) | A method, system, device and medium for hash collision processing based on ARP table | |
| CN120238521B (en) | Methods, devices, systems, equipment, and media for assigning bus numbers to switching chips | |
| CN113098702A (en) | Method for allocating and determining network element IP address, network element and management domain network | |
| KR100928024B1 (en) | A computer-readable recording medium recording a method of automatically configuring a network address and a program for realizing the method. | |
| CN112383594B (en) | Cross-host communication method and device based on hyper-directory Fabric network | |
| JP2004064379A (en) | Router and program | |
| CN117793057A (en) | A dynamic IP address allocation method and device | |
| CN108574743A (en) | A kind of distribution method, equipment and the system of local media accessing to control address |
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: 20081001 Termination date: 20120327 |
