Abstract:
Method for realizing the network topology discovery, which relates to the field of internet technique, includes: receiving the network topology inquiring command from the previous node, the network topology inquiring command includes the address information of the specified node; feeding back the network topology information of this node to the specified node, the network topology information of this node includes the connection information between this node and the previous node. The invention also discloses a node device. With the technique scheme provided by this invention, it can obtain the connection information between the nodes in the network topology information, namely the connection state of point-to-point.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is a continuation of International Patent Application No. PCT/CN2007/070500, filed Aug. 16, 2007, which claims priority to Chinese Patent Application No. 200610152388.2, filed Sep. 28, 2006, both of which are hereby incorporated by reference in their entirety. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention relates to the field of Internet technologies and in particular to a method and a node device for making a network topology discovery. 
       BACKGROUND OF THE INVENTION 
       [0003]    The Operation, Administration and Maintenance (OAM) protocol was initially developed by network operators for the purpose of improving reliability and maintainability of a network. A primary function of the OAM protocol is to detect a defect of the network. A correctable abnormality such as a bit error, a time deviation, and so on, shall be isolated within a certain range so as not to interfere with the operation of the network. Since data is transmitted at a constant rate over the network, any interruption will be recognized immediately as a fault of the loss of a signal. 
         [0004]    The Ethernet technology is easy to use, has low costs and offers constantly increasing bandwidths. It has been used on a large scale as both a service and a network infrastructure in the areas of intranets, metropolitan area networks and wide area networks. The OAM mechanism gains a great success in reducing the costs of network maintenance, and therefore the OAM naturally is extended into the Ethernet based on frames and data packets, which thus gives rise to Ethernet OAM. 
         [0005]    Functions of the Ethernet OAM can be divided into two general parts: fault management and performance management. The fault management is to probe connectivity of the network by transmitting as triggered periodically or manually a detection message capable of detecting a fault, and also provides functions of fault confirmation and fault isolation similar to those of a PING message in the Internet Protocol so as to locate an Ethernet fault as well as to provide functions of fault notification and alarm restrain. The performance management primarily refers to making measurement of parameters such as packet loss, latency, dithering during transmissions over the network and making statistics of various traffics in the network, such as the number of received and transmitted bytes, the number of packets in error, and so on. 
         [0006]    Besides detection of some faults of the network through the OAM, discovering a part of network topology information can also be made with the SNMP protocol, and only information on link status and device status of a certain node device itself can be derived from this discovery. The link status of the node device itself refers to the operation status of a port on the device (Up/Down), and the device status refers to information on whether the device is available, and so on. However, it is impossible to detect the status of an end-to-end connection for a user service using existing systems, and furthermore this method is inapplicable to the node device that is not SNMP-enabled. 
       SUMMARY OF THE INVENTION 
       [0007]    The invention provides a method and a node device for making a network topology discovery, which can acquire information on a connection between nodes among network topology information, that is, an end-to-end connection status. 
         [0008]    The invention provides a method for making a network topology discovery, which includes: receiving from a previous node a network topology query command including address information of a designated node; and feeding back, to the designated node, network topology information of the local node, including information on a connection between the local node and the previous node. 
         [0009]    The invention further provides a node device for making a network topology discovery, which includes: a reception unit adapted to receive from a previous node a network topology query command including address information of a designated node; and a topology information feedback unit adapted to feed back, to the designated node in the network topology query command, network topology information of the local node, including information on a connection between the local node and the previous node. 
         [0010]    The invention further provides a method for making a network topology discovery, which includes: transmitting, by an original node, a network topology query command including lifetime information; determining, by a node receiving the network topology query command, whether the lifetime upon arrival of the command at the local node is within a preset range, and if not, then discarding the command; otherwise, feeding back, to the original node, network topology information of the local node, including information on a connection between the local node and a previous node, and continuing transmission of the network topology query command including the lifetime information. 
         [0011]    The invention further provides a node device for making a network topology discovery, which includes: a reception unit adapted to receive a network topology query command including address information of an original node; a statistics-making unit adapted to make statistics of network topology information of the local node, including information on a connection between the local node and a previous node, after the reception unit receives the network topology query command; and a transmission unit adapted to transmit, to other nodes, information including at least the network topology information of the local node, of which the statistics-making unit makes statistics and which is fed back to the original node. 
         [0012]    As can be seen from the above, in the invention, upon reception of a network topology query command, including address information of a designated node, from a previous node, a certain node feeds back to the designated node, network topology information of the local node, including information on a connection between the local node and the previous node, so that the designated node can obtain the information on the connection between the nodes, thereby providing an implementation premise for detection of an end-to-end connection of a user service. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0013]      FIG. 1  is a schematic diagram of a maintenance domain in existing systems; 
           [0014]      FIG. 2  is a schematic diagram of a service instance based upon an MA in existing systems; 
           [0015]      FIG. 3  is a schematic diagram of a service instance throughout a network, which is applicable to an embodiment of the invention; 
           [0016]      FIG. 4  is a schematic diagram of a service instance based upon an MD, which is applicable to an embodiment of the invention; 
           [0017]      FIG. 5  is a flow chart of an embodiment of making a topology discovery throughout the network in the invention; 
           [0018]      FIG. 6  is a flow chart of an embodiment of making a network topology discovery within an MD in the invention; 
           [0019]      FIG. 7  is a flow chart of an embodiment of making a network topology discovery within an MA in the invention; and 
           [0020]      FIG. 8  is a schematic structural diagram of an embodiment of a node device for making a network topology discovery in the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0021]    Embodiments of the invention provide a method for making a network topology discovery, and a network topology including information on a connection between nodes can be discovered with this method. 
         [0022]    Several concepts related to the embodiments of the invention will firstly be introduced in brief before descriptions thereof. 
         [0023]    Reference is firstly made to  FIG. 1  which is a schematic diagram of a maintenance domain in existing systems. It shall be noted that technical solutions in the embodiments of the invention can be applicable in application contexts as illustrated in the maintenance service example. 
         [0024]    A Maintenance Domain (MD) refers to a network or a part thereof involved in the fault management functions, and different MDs are distinguished with MD names, for example, the maintenance domain in  FIG. 1  is named M. Boundaries of the maintenance domain is defined with a series of Domain Service Access Points (DSAP), which provide a connectivity service to the outside of the maintenance domain. An intermediate Service Access Point (ISAP) may also be present within the maintenance domain, and the ISAP is an intermediate point from the DSAP on a node device (e.g., a bridge device) to that on another node device (e.g., a bridge device). The DSAP or ISAP is a port on a node device. 
         [0025]    Five bridge devices (each can be regarded as a node in the network), B 1 , B 2 , B 3 , B 3  and B 5  respectively, are present in the maintenance domain named M in  FIG. 1 . Two DSAPs, A and B, and an ISAP, I 1 , are present on the B 1 ; two DSAPs, C and D, and two ISAPs, I 2  and I 3 , are present on the B 2 ; a DSAP, F, and two ISAPs, I 4  and I 5 , are present on the B 3 ; a DSAP, E, and an ISAP, I 6 , are present on the B 4 ; and four ISAPs, I 7 , I 8 , I 9  and I  10 , are present on the B 5 . 
         [0026]    A plurality of service instances can be configured in the maintenance domain as desired, for example, a plurality of DSAPs can be present on a bridge device, while one or more of the DSAPs available can be set for a service of a certain user, and the rest of the DSAPS on the bridge device will not operate for the service. Designation of a service instance actually means designation of a plurality of DSAPs to thereby establish a connectionless association relationship between these DSAPs, which is referred to as a Maintenance Association (MA), and therefore it can be said that a plurality of maintenance associations can be present in a maintenance domain. An end point of a maintenance association is referred to as a Maintenance Association End Point (MEP), and different MEPs are interconnected via a Maintenance Association Intermediate Point (MIP). An MEP in a maintenance association is physically located at a corresponding DSAP, and an MIP is physically located at a corresponding ISAP. The DSAP and ISAP and the MEP and MIP are distinguished in that they are defined based upon different concepts, that is, the DSAP and the ISAP are defined based upon an MD, and the MEP and the MIP are defined based upon an MA. Different MAs are distinguished with unique MA names throughout the maintenance domain, and an MA name and a maintenance domain name form together a unique identifier which shall be carried in a message of a service instance for distinguishing from other service instances. 
         [0027]    Reference is made to  FIG. 2  which is a service instance C 1  based upon an MA in the existing systems. As compared with  FIG. 1 , only A, C, E and F in the domain M are configured as DSAPs available to the C 1 , thereby establishing a service instance (that is, the MA) related to the C 1 , and the other two DSAPs (B and D) are not put into use and therefore do not belong to the service instance. 
         [0028]    Embodiments of the invention will be detailed after the concepts of maintenance domain, maintenance instance (that is, MA), DSAP, ISAP, MEP and MIP have become apparent. 
         [0029]    A method for making a topology discovery throughout a network will firstly described with reference to  FIG. 3  and  FIG. 5 .  FIG. 3  is a schematic diagram of a service instance throughout the network, which is applied in an embodiment of the invention, and  FIG. 5  is a flow chart of an embodiment of making a topology discovery throughout the network in the invention. 
         [0030]    Five bridge devices, B 1 , B 2 , B 3 , B 4  and B 5 , are present throughout the network illustrated in  FIG. 3 . Three ports, A, B and I 1 , are present on the B 1 ; three ports, C, D, I 2  and I 3 , are present on the B 2 ; three ports, F, I 4  and I 5 , are present on the B 3 ; two ports, E and I 6 , are present on the B 4 ; and four ports, I 7 , I 8 , I 9  and I 10 , are present on the B 5 , where the B and the D are unused ports. The bridge device B 1  where the port A is located is assumed to be an original node (those skilled in the art can appreciate that each bridge device in the network can be regarded as a node), and such a situation will not occur during forwarding a message that a command may be discarded due to an MD level. 
         [0031]    The step  11  to the step  163  illustrated in  FIG. 5  will be detailed below. 
         [0032]    Step  11 : The original node B 1  transmits (e.g., in a broadcast mode) via the I 1  a network Topology Discovery Message (TDM) to other nodes in a connection relationship with the I 1 . The message is for the purpose of querying about network topology information, and therefore the TDM can also be referred to a network topology query command. An illustrative format of the TDM message is as illustrated in  FIG. 1  below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 TDM message format 
               
             
          
           
               
                 Octets 
                 Fields 
                   
               
               
                   
               
             
          
           
               
                 1 
                 MD Level = 1 
                 Version = 1.0 
               
             
          
           
               
                 1 
                 OpCode = 0x10 
               
               
                 1 
                 Flags 
               
               
                 1 
                 First TLV Offset 
               
               
                 4 
                 Sequence Number = 123456 
               
               
                 1 
                 TDM TTL filed = 1 
               
               
                 6 
                 Original MAC Address = B1 
               
               
                 4 
                 Local Bridge MAC = B1 
               
               
                 4 
                 Local Port TLV = I1 
               
               
                   
               
             
          
         
       
     
         [0033]    Specific meanings of MD Level, Version, OpCode, Flags, First TLV Offset, Sequence Number, TDM TTL field and Original MAC Address in Table 1 will be detailed below. 
         [0034]    MD Level denotes the level of the MD domain, and no message lower than the configured MD level will be forwarded via an MIP. For example, the MD level of an MIP is defined as 4, and a TDM will be discarded if MD level=3 is carried in the message. 
         [0035]    Version denotes the version of the message. 
         [0036]    Op Code is a parameter value in the message. For example, OpCode=0x10 indicates that the message is used to execute an automatic discovery function. 
         [0037]    Flags is set to zero and reserved for future extension usage. This field will not be checked at other nodes receiving the TDM message. 
         [0038]    First TLV (Type Length Value) Offset denotes an offset of the first TLV. 
         [0039]    Sequence Number denotes a sequence number of the message, and whether the message has been retransmitted can be found with the sequence number. For example, it can be found whether the original node or a downstream node has retransmitted a network topology query command carrying the TDM, and if so, then the repeated query command will be discarded. 
         [0040]    TDM TTL (TDM Time to Live) field) defines a lifetime of the query command (that is, the TDM message) and represents the lifetime upon arrival of the query command at the local node (also referred to as the number of hops). The value is incremented by one each time the query command is issued to a node, and the command will be discarded when the value reaches 256 or another value which is set by the system. 
         [0041]    Original MAC (Media Access Control) Address records the address of the original node, e.g., the B 1  of the original node illustrated in Table 1. It is with this address that other nodes can respond to the original node with the queried information. 
         [0042]    Local Bridge MAC records information on the address where the local node is located. Since the original node B transmits the query command in this step, the Local Bridge MAC carried therein is the MAC address of the B 1 . 
         [0043]    Local Port TLV (Type Length Value) records port information of the local node, and in this step, the original node B 1  transmits via the port I 1  the query command in which the port information recorded in the Local Port TLV is the I 1 . 
         [0044]    Step  12 : The port I 7  on the bridge device B 5  receives the query command. The B 5  firstly detects whether the number of hops in the TDM TTL field reaches the system preset value (e.g., 256), and if so, then the flow goes to the step  13 ; otherwise, the flow goes to the step  14 . Those skilled in the art can appreciate from another point of view that if the lifetime upon arrival of the query command at the local node (B 5 ) is within the preset range (e.g., of 1 to 255), then the flow goes to the step  14 ; otherwise, the flow goes to the step  13 . 
         [0045]    Step  13 : The query command including the TDM message is discarded. 
         [0046]    Step  14 : The B 5  collects information on the ports (e.g., I 7 , I 8 , I 9  and I 10 ) on the local bridge and responds using the information of Original MAC address=B 1  in the TDM message to the original node B 1  with a network Topology Information Message (TIM) in which the network topology information of the local node is carried. 
         [0047]    After the information on the ports on the bridge B 5  is aggregated, the information is fed back in the TIM message to the B 1 , and the information on a bridge can be fed back only once. 
         [0048]    Specific contents of the TIM message are illustrated in Table 2 below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Topology information message format 
               
             
          
           
               
                 Octets 
                 Fields 
                   
               
               
                   
               
             
          
           
               
                 1 
                 MD Level = 1 
                 Version = 1.0 
               
             
          
           
               
                 1 
                 OpCode = 0x10 
               
               
                 1 
                 Flags 
               
               
                 1 
                 First TLV Offset 
               
               
                 4 
                 Sequence Number = 123456 
               
               
                 1 
                 TDM TTL filed = 1 
               
               
                 6 
                 Original MAC Address Field = B1 
               
               
                 6 
                 Local Bridge MAC = B5 
               
               
                 4 
                 Previous Port 1 TLV = I1 
               
               
                 4 
                 Local Port 1 TLV = I7 
               
               
                 4 
                 Local Port 2 TLV = I8 
               
               
                 4 
                 Local Port 3 TLV = I9 
               
               
                 4 
                 Local Port 4 TLV = I10 
               
               
                   
               
             
          
         
       
     
         [0049]    The previous Port TLV and the Local Port TLV in the TIM message denote information on a connection between network elements (also referred to as nodes), and each network element announces in the Local Port TLV a port on its own device and announces in the Previous Port TLV a previous port connected therewith (that is, a port of a previous node connected with the local port). As can be seen from this, the network topology information of the local node, which is fed back from the B 5  to the original node, includes the information on the connection between the local node and the previous node. It shall be noted that “previous” in the “previous node” as mentioned in various embodiments of the invention is only defined with respect to a network topology query command without any relationship with a practical location between nodes. For example, when the node A receives a network topology query command from the node B, then the node B can be regarded as a previous node of the A without defining practical locations of the node A and the node B in the network. 
         [0050]    The B 5  not only feeds back the network topology information of the local node to the B 1  but also continues the transmission of the query command including the TDM to the other nodes. Specifically: 
         [0051]    The B 5  transmits the query command to the I 6  of the B 4  via the port I 8  and changes in the TDM message of the query command the content of the Local Bridge MAC to the B 5  and the content of the Local Port TLV to the I 8 ; 
         [0052]    The B 5  transmits the query command to the I 5  of the B 3  via the port I 9  and changes in the TDM message of the query command the content of the Local Bridge MAC to the B 5  and the content of the Local Port to the I 9 ; 
         [0053]    The B 5  transmits the query command to the I 2  of the B 2  via the port I 10  and changes in the TDM message of the query command the content of the Local Bridge MAC to the B 5  and the content of the Local Port to the I 10 . 
         [0054]    Step  151 : The B 4  receives the query command from the I 8  via the port I 6  thereon, and the B 4  firstly determines whether the number of hops in the TDM TTL field reaches the preset value, and if so, then the flow goes to the step  13 ; otherwise, the flow goes to the step  161 . 
         [0055]    Step  152 : The B 3  receives the query command from the I 9  via the port I 5  thereon, and the B 3  firstly determines whether the number of hops in the TDM TTL field reaches the preset value, and if so, then the flow goes to the step  13 ; otherwise, the flow goes to the step  162 . 
         [0056]    Step  153 : The B 2  receives the query command from the I 10  via the port I 2  thereon, and the B 2  firstly determines whether the number of hops in the TDM TTL field reaches the preset value, and if so, then the flow goes to the step  13 ; otherwise, the flow goes to the step  163 . 
         [0057]    Step  161 : The B 4  collects information on the ports (e.g., I 6  and E) on the local bridge and feeds back to the original node B 1  a TIM message using the information of Original MAC Address Field=B 1  in the TDM message, wherein in the TIM message, Local Bridge MAC=B 4 , Previous Port  1  TLV=I 8 , Local Port  1  TLV=I 6  and Local Port  2  TLV=E. 
         [0058]    Furthermore, the I 6  forwards the received query command to the E. The B 4  determines whether the number of hops in the TDM TTL field upon arrival at the E reaches the preset value, and if so, then the flow goes to the step  13 ; otherwise, the flow continues forwarding the TDM message to the other nodes until the number of hops in the TDM TTL field at a node receiving the TDM message reaches the system preset value, where the message will not be forwarded. It shall be noted that the lifetime of the query command will not be changed while the query command is forwarded between ports within the same node; therefore, the B 4  determines whether the number of hops in the TDM TTL field upon arrival at the E reaches the preset value, that is, whether the number of hops in the TDM TTL field upon arrival at the local node reaches the preset value. 
         [0059]    Step  162 : The B 3  collects information on the ports (e.g., I 5  and F) on the local bridge and feeds back to the original node B 1  a TIM message using the information of Original MAC Address Field=B 1  in the TDM message, wherein in the TIM message, Local Bridge MAC=B 3 , Previous Port  1  TLV=I 9 , Local Port  1  TLV=I 5  and Local Port  2  TLV=F. 
         [0060]    Furthermore, the I 5  forwards the received query command to the F. The B 3  determines whether the number of hops in the TDM TTL field upon arrival at the F reaches the preset value, and if so, then the flow goes to the step  13 ; otherwise, the flow continues forwarding the TDM message to the other nodes via the port F until the number of hops in the TDM TTL field at a node receiving the TDM message reaches the system preset value, where the message will not be forwarded. 
         [0061]    Step  163 : The B 2  collects information on the ports (e.g., I 2  and C) on the local bridge and feeds back to the original node B 1  a TIM message using the information of Original MAC Address Field=B 1  in the TDM message, wherein Local Bridge MAC=B 2 , Previous Port  1  TLV=I 10 , Local Port  1  TLV=I 2  and Local Port  2  TLV=C. 
         [0062]    Furthermore, the I 2  forwards the received query command to the C. The B 2  determines whether the number of hops in the TDM TTL field upon arrival at the C reaches the preset value, and if so, then the flow goes to the step  13 ; otherwise, the flow continues forwarding the TDM message to the other nodes via the port C until the number of hops in the TDM TTL field at a node receiving the TDM message reaches the system preset value, where the message will not be forwarded. 
         [0063]    Those skilled in the art can appreciate that a downstream node in subsequent reception of the network topology query command including the address information of the original node B 1  still processes as in the forgoing solutions of the B 2 , B 3  and B 4 . Furthermore, a plurality of downstream nodes receiving the query command will feed back in the TDM messages their respective network topology information to the original node, and the network topology information fed back from each node to the original node will further include the information on the connection between the local node and the previous node, so that the original node can aggregate data of the received network topology information of the respective nodes to constitute a database, and form a network topology and, if desired, possibly a specific network topology graph by calculating the data information. 
         [0064]    The embodiments of the invention further provide a first embodiment of a node device for making a network topology discovery. The node device in the present embodiment includes a transmission unit, a reception unit and a statistics-making unit and optionally a determination unit, each of which will be detailed below. 
         [0065]    The transmission unit is adapted to transmit a network topology query command including an instruction lifetime parameter and to feed back network topology information of a bridge where a local node is located, of which the statistics-making unit makes statistics, to a bridge where an original node is located. Those skilled in the art can appreciate that the instruction lifetime parameter is a specific form of lifetime information. 
         [0066]    The reception unit is adapted to receive the network topology query command including the instruction lifetime parameter, and the query command contains address information of the original node. 
         [0067]    The statistics-making unit is adapted to make statistics of the network topology information of the bridge where the local node is located, including information on a connection between the local node and a previous node, after the reception unit receives the network topology query command, and to notify the transmission unit to feed back the information to the bridge where the original node is located after collecting the statistics. 
         [0068]    Optionally, in order to prevent the network topology query command from being forwarded unlimitedly within the network and to prevent respective nodes from feeding back repeatedly respective network topology information to the original node, the lifetime information can be set in the network topology query command, and correspondingly the determination unit can be set in the node device. The determination unit is adapted to determine whether the lifetime upon arrival of the network topology query command at the local node is within a preset range, and if so, then the determination unit is adapted to notify the statistics-making unit to make statistics of the network topology information of the bridge where the local node is located and to continue transmission of the network topology query command to other nodes through the transmission unit. 
         [0069]    It shall be noted that although the node device in the present embodiment is a bridge device, those skilled in the art shall appreciate that the node device can alternatively be a network device other than the bridge device, and the network topology information of the local node (the network topology information of the bridge where the local node is located in the present embodiment) fed back from each node device includes the information on the connection between the local node and the previous node. Furthermore, the original node can acquire a network topology from the received network topology information of the respective nodes. 
         [0070]    In the above method and node device embodiments, a query about the topology information is made each time throughout the network, which may result in a large number of multicast messages occurring over the network, and if no network topology information throughout the network is required, then a query about the network topology information of a plurality of nodes can be made within a smaller query range to thereby acquire a network topology structure within a certain range. 
         [0071]    For example, an item of MD (Maintenance Domain) Name TLV information is added in the TDM message to identify the network topology information of a designated MD to be probed. As can be appreciated, the maintenance domain name is a specific mode of identifying a maintenance domain, and other modes in addition to this are possible, for example, a maintenance domain can be identified uniquely with use of a maintenance domain code. With addition of this item, a downstream node of the original node will check the information and determine hereby whether the local port is a DSAP point, and if so, then a boundary of the MD has been reached and therefore a TDM message (that is, the network topology query command) will not be forwarded any longer; otherwise, forwarding of the TDM message will be continued. A method for making a network topology discovery within a local range will be detailed below with reference to  FIG. 4  and  FIG. 6 . 
         [0072]    Reference is made to  FIG. 4  which is a schematic diagram of a service instance based upon an MD, which is applicable to an embodiment of the invention. The MD in  FIG. 4  involves five bridge devices, B 1 , B 2 , B 3 , B 4  and B 5 , where two DSAPs, A and B, and an ISAP, I 1 , are present on the B 1 ; two DSAPs, C and D, and two ISAPs, I 2  and I 3 , are present on the B 2 ; a DSAP, F, and two ISAPs, I 4  and I 5 , are present on the B 3 ; a DSAP, E, and an ISAP, I 6 , are present on the B 4 ; and four ISAPs, I 7 , I 8 , I 9  and I 10 , are present on the B 5 . Among these ports, the B and the D are unused DSAPs. The bridge device B 1  where the DSAP A port is located is assumed to be an original node, and such a situation will not occur during forwarding a message that a query command may be discarded due to an MD level. 
         [0073]    Reference is made to  FIG. 6  which illustrates a flow chart of querying about network topology information within an MD in an embodiment of the invention. 
         [0074]    Step  211 : The B 1  collects information on the ports (e.g., A and I 1 ) on the local bridge and transmits (e.g., in a multicast mode) via the I 1  to other DSAP and ISAP connected with the I 1  a TDM message (that is, a network topology query command) with MD Name TLV=M as illustrated in Table 3 below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
             
           
               
                 TABLE 3 
               
             
             
               
                   
               
               
                 TDM message with MD Name TLV 
               
             
          
           
               
                 Octets 
                 Fields 
                   
               
               
                   
               
             
          
           
               
                 1 
                 MD Level = 1 
                 Version = 1.0 
               
             
          
           
               
                 1 
                 OpCode = 0x10 
               
               
                 1 
                 Flags 
               
               
                 1 
                 First TLV Offset 
               
               
                 4 
                 Sequence Number = 123456 
               
               
                 1 
                 TDM TTL filed = 1 
               
               
                 6 
                 Original MAC Address = B1 
               
               
                 4 
                 MD NAME TLV = M 
               
               
                 4 
                 Local Bridge MAC = B1 
               
               
                 4 
                 Local Port TLV = I1 
               
               
                   
               
             
          
         
       
     
         [0075]    Step  212 : The B 5  receives the query command via the port I 7  thereon, and determines whether the number of hops in the TDM TTL field upon arrival at I 7  reaches a system preset value, and if so, then the flow goes to the step  213 ; otherwise, the flow goes to the step  214 . 
         [0076]    Step  213 : The query command is discarded. 
         [0077]    Step  214 : The B 5  checks whether the MD Name TLV=M in the query command is consistent with an MD Name TLV which is preset at the port I 7 , and if not, then the flow executes  213 ; otherwise, the flow goes to the step  215 . 
         [0078]    Step  215 : The B 5  collects information on the ports (e.g., I 7 , I 8 , I 9  and I 10 ) on the local bridge and knows from the information of Original MAC Address=B 1  in the received query command that the query command designates a feedback destination address as the original node B 1 , and then the B 5  feeds back a TIM with contents illustrated in Table 4 to the original node B 1 . 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
             
           
               
                 TABLE 4 
               
             
             
               
                   
               
               
                 TIM message format including MD Name TLV information 
               
             
          
           
               
                 Octets 
                 Fields 
                   
               
               
                   
               
             
          
           
               
                 1 
                 MD Level = 1 
                 Version = 1.0 
               
             
          
           
               
                 1 
                 OpCode = 0x10 
               
               
                 1 
                 Flags 
               
               
                 1 
                 First TLV Offset 
               
               
                 4 
                 Sequence Number = 123456 
               
               
                 1 
                 TDM TTL filed = 256 
               
               
                 6 
                 Original MAC Address Field = B1 
               
               
                 6 
                 Local Bridge MAC = B5 
               
               
                 4 
                 MD NAME TLV = M 
               
               
                 4 
                 Previous DSAP1 TLV = I1 
               
               
                 4 
                 Local Port 1 TLV = I7 
               
               
                 4 
                 Local Port 2 TLV = I8 
               
               
                 4 
                 Local Port 3 TLV = I9 
               
               
                  4~ 
                 Local Port 4 TLV = I10 
               
               
                   
               
             
          
         
       
     
         [0079]    In addition to the contents in the above table, the TIM can further include other information as desired, e.g., information indicating the number of local ports, Port Number=4. This will also apply to a TIM message in other embodiments. 
         [0080]    Furthermore upon determining consistency of the MD Name TLVs, it is derived from the configuration information of the respective ports, which is preset on the local node, that all of the I 7 , I 8 , I 9  and I 10  are ISAPs of the MD, and then the flow goes to the step  216 . 
         [0081]    Step  216 : The B 5  transmits the query command via the port I 8  thereon to the port I 6  of the B 4  and changes in the message the Local Bridge MAC to the B 5  and the Local Port TLV to the I 8 ; transmits the query command via the port I 9  to the port I 5  of the B 3  and changes in the message the Local Bridge MAC to the B 5  and the Local Port TLV to the I 9 ; and transmits the query command via the port I 10  to the port I 3  of the B 2  and changes in the TDM message the Local Bridge MAC to the B 5  and the Local Port TLV to the I 10 . 
         [0082]    Step  217 : The B 4  receives via the I 6  thereon the query command from the I 8  and determines whether the number of hops in the TDM TTL field upon arrival at the I 6  (also at the B 4 ) reaches the system preset value, and if so, then the flow goes to the step  213 ; otherwise, the flow goes to the step  220 . 
         [0083]    Step  218 : The B 3  receives via the I 5  thereon the query command from the I 9  and determines whether the number of hops in the TDM TTL field upon arrival at the I 5  (also at the B 3 ) reaches the system preset value, and if so, then the flow goes to the step  213 ; otherwise, the flow goes to the step  221 . 
         [0084]    Step  219 : The B 2  receives via the I 2  thereon the query command from the I 10  and determines whether the number of hops in the TDM TTL field upon arrival at the I 2  reaches the system preset value, and if so, then the flow goes to the step  213 ; otherwise, the flow goes to the step  222 . 
         [0085]    Step  220 : The B 4  determines that the MD Name=M in the query command is consistent with the MD Name preset at the I 6 , which indicates that the I 6  belongs to the MD range, and then the B 4  collects information on the ports (e.g., I 6  and E) on the local bridge. The B 4  acquires the address of the original node B 1  from the information of Original MAC Address=B 1  in the received query command and further feeds back in an TIM to the B 1  the network topology information of the local node including at least information on a connection between the local node and a previous node. Specifically, there are Local Bridge MAC=B 4 , Previous Port  1  TLV=I 8 , Local Port  1  TLV=I 6  and Local Port  2  TLV=E in the TIM message fed back from the B 4  to the B 1 . Furthermore upon determining consistency of the MD Names, it can be derived from the configuration information of the respective ports, which is preset on the local node, that the I 6  is an ISAP of the MD and the E is a DSAP of the MD. The I 6  forwards the received query command to the E, and the E receives the query command but will not forward it to any other node. As can be appreciated, since the E is a DSAP of the MD (which indicates that the E is a boundary point of the MD), the I 6  may not forward the query command to the E. This will also apply to the other nodes. 
         [0086]    Step  221 : The B 3  determines that the MD Name=M in the query command is consistent with the MD Name preset at the I 5 , which indicates that the I 5  belongs to the MD range, and then the B 3  collects information on the ports (e.g., I 5  and F) on the local bridge. The B 3  acquires the address of the original node B 1  from the information of Original MAC Address=B 1  in the received query command and further feeds back in an TIM to the B 1  the network topology information of the local node including at least information on a connection between the local node and a previous node. Specifically, there are Local Bridge MAC=B 3 , Previous Port  1  TLV=I 9 , Local Port  1  TLV=I 5  and Local Port  2  TLV=F in the TIM message fed back from the B 3  to the B 1 . Furthermore upon determining consistency of the MD Names, it is derived from the configuration information of the respective ports, which is preset on the local node, that the I 5  is an ISAP of the MD and the F is a DSAP of the MD. The I 5  forwards the query command to the F, and the F receives the query command but will not forward it to any other node. 
         [0087]    Step  222 : The B 2  determines that the MD Name=M in the query command is consistent with the MD Name preset at the I 2 , which indicates that the I 2  belongs to the MD range, and then the B 2  collects information on the ports (e.g., I 2  and C) on the local bridge. The B 2  acquires the address of the original node B 1  from the information of Original MAC Address=B 1  in the received query command and further feeds back in an TIM to the B 1  the network topology information of the local node including at least information on a connection between the local node and a previous node. Specifically, there are Local Bridge MAC=B 2 , Previous Port  1  TLV=I 10 , Local Port  1  TLV=I 2  and Local Port  2  TLV=C in the TIM message fed back from the B 2  to the B 1 . Furthermore upon determining consistency of the MD Names, it is derived from the configuration information of the respective ports, which is preset on the local node, that the I 2  is an ISAP of the MD and the C is a DSAP of the MD. The I 2  forwards the query command to the C, and the C receives the query command but will not forward it to any other node. 
         [0088]    In correspondence with the method embodiment illustrated in  FIG. 6 , the invention further provides a second embodiment of a node device for making a network topology discovery. The node device in the present embodiment includes a transmission unit, a reception unit and a statistics-making unit and optionally a determination unit. The node device in the present embodiment will still be described taking a bridge device as an example, but those skilled in the art shall appreciate that the node device will not limit to the bridge device. 
         [0089]    The transmission unit is adapted to transmit a network topology query command including an instruction lifetime parameter and a maintenance domain identifier (e.g., a maintenance domain name) and to feed back network topology information of a bridge where a local node is located, of which the statistics-making unit makes statistics, to a bridge of an original node is located. 
         [0090]    The reception unit is adapted to receive the network topology query command including the instruction lifetime parameter and the maintenance domain identifier. 
         [0091]    The determination unit is adapted to determine whether the lifetime upon arrival of the network topology equerry command at the local node is within a preset range of values, and if so, then the determination unit is adapted to check whether a preset maintenance domain identifier is consistent with the received maintenance domain identifier and to discard the query command if they are inconsistent. 
         [0092]    If they are consistent, then the determination unit is adapted to instruct the statistics-making unit to make statistics of the network topology information of the local node and to determine from the received maintenance domain identifier whether a certain port on the local node is a domain service access point of the maintenance domain, and if not, then forwarding of the query command will be continued via the port; otherwise, forwarding of the query command via the port will be prohibited. 
         [0093]    The statistics-making unit is adapted to make statistics of the network topology information of the bridge where the local node is located, including information on a connection between the local node and a previous node, upon reception of the command from the determination unit, and to instruct the transmission unit to feed back the information to the bridge where the original node is located after collecting the statistics. 
         [0094]    As can be seen from the flow illustrated in  FIG. 6  and the above corresponding node device, the query range is defined within a local range (instead of a query throughout the network) because the identifier of the maintenance domain to be queried about is added in the TDM message (that is, the network topology query command). If a port receiving the query command does not belong to the MD range to be queried about, then the port will not feed back any network topology information of the local node to the original node; and the node receiving the TDM message will not continue transmitting via a DSAP port thereon, which belongs to the MD, the TDM message to other nodes, so that the TDM message will not be forwarded throughout the network. In order to further reduce the query range and thus satisfy diversified demands, MA (Maintenance Association) Name TLV information can be further added in the TDM and TIM messages to define a network topology information query at an MA level within the MD domain, thereby further reducing occupancy of network bandwidths. Of course, if a maintenance association name is unique throughout the network (it is unnecessary to identify a certain query range by both the maintenance domain name and the maintenance association name), then such a situation will not be excluded that only the maintenance association name is carried in the TDM message without any maintenance domain name. 
         [0095]    Descriptions will be given taking the service instance based upon the MA illustrated in  FIG. 2  as an application context. The MA involves five bridge devices, B 1 , B 2 , B 3 , B 4  and B 5 , where two MEPs, A and B, and an MIP, I 1 , are present on the B 1 ; two MEPs, C and D, and two MIPs, I 2  and I 3 , are present on the B 2 ; an MEP, F, and two MIPs, I 4  and I 5 , are present on the B 3 ; an MEP, E, and an MIP, I 6 , are present on the B 4 ; and four MIPs, I 7 , I 8 , I 9  and I 10 , are present on the B 5 . The B and the D are unused MEPs. The B 1  where the MEP A port is located is assumed to be an original node, and such a situation will not occur during forwarding a message that a query command may be discarded due to an MD level. 
         [0096]    Reference is made to  FIG. 7  which illustrates a flow chart of querying about network topology information within an MA in an embodiment of the invention. Step  310 : The B 1  collects information on the ports (e.g., A and I 1 ) on the local bridge and transmits (e.g., in a multicast mode) via the I 1  to other MEP and MIP connected with the I 1  a network topology discovery message TDM (also referred to as a network topology query command) as illustrated in Table 5 below: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
             
           
               
                 TABLE 5 
               
             
             
               
                   
               
               
                 TDM message with MA Name TLV 
               
             
          
           
               
                 Octets 
                 Fields 
                   
               
               
                   
               
             
          
           
               
                 1 
                 MD Level = 1 
                 Version = 1.0 
               
             
          
           
               
                 1 
                 OpCode = 0x10 
               
               
                 1 
                 Flags 
               
               
                 1 
                 First TLV Offset 
               
               
                 4 
                 Sequence Number = 123456 
               
               
                 1 
                 TDM TTL filed = 1 
               
               
                 6 
                 Original MAC Address = B1 
               
               
                 4 
                 MD NAME TLV = M 
               
               
                 4 
                 MA NAME TLV = A 
               
               
                 4 
                 Local Bridge MAC = B1 
               
               
                 4 
                 Local Port TLV = I1 
               
               
                   
               
             
          
         
       
     
         [0097]    Step  311 : The B 5  receives the query command via the port I 7 , and determines whether the number of hops in the TDM TTL field upon arrival at I 7  (that is, at the local node) reaches a system preset value, and if so, then the flow goes to the step  312 ; otherwise, the flow goes to the step  313 . 
         [0098]    Step  312 : The query command is discarded. 
         [0099]    Step  313 : The B 5  checks whether the MD Name=M in the message is consistent with an MD Name which is preset at the I 7 , that is, whether both of them are the M, and if so, which indicates that the I 7  belongs to the MD range, then the flow executes step  314 ; otherwise, the flow goes to the step  312 . 
         [0100]    Step  314 : The B 5  further checks whether the MA Name=A in the message is consistent with an MA Name which is preset at the I 7 , that is, whether both of them are the A, and if so, which indicates that the I 7  belongs to the MA range, then the flow executes step  315 ; otherwise, the flow goes to the step  312 . 
         [0101]    Step  315 : The B 5  collects information on the ports (e.g., I 7 , I 8 , I 9  and I 10 ) on the local bridge and feeds back an TIM illustrated in Table 6 to the bridge B 1  where the original node is located (where the address of the B 1  is acquired from information of the Original MAC Address=B 1  in the query command); and upon determining consistency of the MA Name TLVs, the B 5  knows from the configuration information of the respective ports, which is preset on the local node, that all of the I 7 , I 8 , I 9  and I 10  are MEP points, and then the flow goes to the step  316 . 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
             
           
               
                 TABLE 6 
               
             
             
               
                   
               
               
                 Topology information message format 
               
               
                 including MA Name TLV information 
               
             
          
           
               
                 Octets 
                 Fields 
                   
               
               
                   
               
             
          
           
               
                 1 
                 MD Level = 1 
                 Version = 1.0 
               
             
          
           
               
                 1 
                 OpCode = 0x10 
               
               
                 1 
                 Flags 
               
               
                 1 
                 First TLV Offset 
               
               
                 4 
                 Sequence Number = 123456 
               
               
                 1 
                 TDM TTL filed = 1 
               
               
                 6 
                 Original MAC Address Field = B1 
               
               
                 6 
                 Local Bridge MAC = B5 
               
               
                 4 
                 MD NAME TLV = M 
               
               
                 4 
                 MA NAME TLV = A 
               
               
                 4 
                 Previous DSAP1 TLV = I1 
               
               
                 4 
                 Local PORT 1 TLV = I7 
               
               
                 4 
                 Local PORT 2 TLV = I8 
               
               
                 4 
                 Local PORT 3 TLV = I9 
               
               
                 4 
                 Local PORT 4 TLV = I10 
               
               
                   
               
             
          
         
       
     
         [0102]    Step  316 : The B 5  transmits the query command to the port I 6  via the port I 8  and changes in the message the Local Bridge MAC to the B 5  and the Local Port TLV to the I 8 , and then the flow goes to the step  317 . 
         [0103]    The B 5  transmits the query command to the port I 5  via the port I 9  and changes in the message the Local Bridge MAC to the B 5  and the Local Port TLV to the I 9 , and then the flow goes to the step  318 . 
         [0104]    The B 5  transmits the query command to the port I 3  via the port I 10  and changes in the message the Local Bridge MAC to the B 5  and the Local Port TLV to the I 10  and then the flow goes to the step  319 . 
         [0105]    Step  317 : The B 4  receives the query command from the I 8  via the port I 6  and determines that the number of hops in the TDM TTL field upon arrival of the query command at the I 6  and the E (that is, at the local node) does not reach the system preset value and the received MD Name=M and MA Name=A are consistent with those preset on the local node. Furthermore, the B 4  collects information on the ports (e.g., I 6  and E) on the local bridge and feeds back the information to the B 1  (where the address of the B 1  is acquired from the information of Original MAC address=B 1  in the query command). The B 4  changes a TIM message fed back to the B 1  to Local Bridge MAC=B 4 , Previous Port  1  TLV=I 8 , Local Port  1  TLV=I 6  and Local Port 2  TLV=E. Upon determining consistency of the MA Names, the B 4  determines from the configuration information on the respective ports, which is preset on the local node, that the I 6  is an MIP of the MA and the E is an MEP of the MA. Furthermore, the I 6  forwards the query command to the E, and the E receives the query command but will not forward it to any other node. 
         [0106]    Step  318 : The B 3  receives the query command from the I 9  via the port I 5  and determines that the number of hops in the TDM TTL field upon arrival of the query command at the I 5  and the F (that is, at the local node) does not reach the system preset value and the received MD Name=M and MA Name=A are consistent with those preset on the local node. Thus, the B 3  collects information on the ports (e.g., I 5  and F) on the local bridge, acquires the address of the B 1  from the Original MAC address=B 1 , and further feeds back in a TIM message to the B 1  the network topology information of the local node, including information on a connection between the local node and a previous node. Specifically, there are Local Bridge MAC=B 3 , Previous Port  1  TLV=I 9 , Local Port  1  TLV=I 5  and Local Port  2  TLV=F in the TIM message fed back from the B 3  to the B 1 . Upon determining consistency of the MA Names, the B 3  determines from the configuration information on the respective ports, which is preset on the local node, that the I 5  is an MIP of the MA and the F is an MEP of the MA, and furthermore the I 5  forwards the query command to the F, and the F receives the query command but will not forward it to any other node. 
         [0107]    Step  319 : The B 2  receives the query command from the I 10  via the port I 2  and determines that the number of hops in the TDM TTL field upon arrival at the I 2  and the C (that is, at the local node) does not reach the system preset value and the received MD Name=M and MA Name=A are consistent with those preset on the local node. Thus, the B 2  collects information on the ports (e.g., I 2  and C) on the local bridge, acquires the address of the B 1  from the Original MAC address=B 1 , and further feeds back in a TIM message to the B 1  the network topology information of the local node, including information on a connection between the local node and a previous node. Specifically, there are Local Bridge MAC=B 2 , Previous Port  1  TLV=I 10 , Local Port  1  TLV=I 2  and Local Port  2  TLV=C in the TIM message fed back from the B 2  to the B 1 . Upon determining consistency of the MA Names, the B 2  determines from the configuration information on the respective ports, which is preset on the local node, that the I 2  is an MIP of the MA and the C is an MEP of the MA, and furthermore the I 2  forwards the query command to the C, and the E receives the query command but will not forward it to any other node. 
         [0108]    In correspondence with the method embodiment illustrated in  FIG. 7 , the invention further provides a third embodiment of a node device for making a network topology discovery. The node device in the present embodiment includes a transmission unit, a reception unit and a statistics-making unit and optionally a determination unit. The node device in the present embodiment will still be described taking a bridge device as an example, but those skilled in the art shall appreciate that the node device will not limit to the bridge device. 
         [0109]    The transmission unit is adapted to transmit a network topology query command including an instruction lifetime parameter, a maintenance domain identifier (e.g., a maintenance domain name) and a maintenance association identifier (e.g., a maintenance domain name) and to feed back network topology information of a bridge where a local node is located, of which the statistics-making unit makes statistics, to a bridge where an original node is located. 
         [0110]    The reception unit is adapted to receive the network topology query command including the instruction lifetime parameter, the maintenance domain identifier and the maintenance association identifier. 
         [0111]    The determination unit is adapted to determine whether the lifetime upon arrival of the network topology equerry command at the local node is within a preset range, and if not, then the command is discarded; otherwise, the determination unit is adapted to check whether a preset maintenance domain identifier is consistent with the received maintenance domain identifier. 
         [0112]    If the maintenance domain identifiers are inconsistent, then the query command is discarded; otherwise, the determination unit is adapted to continue determining whether the received maintenance association identifier is consistent with that preset. 
         [0113]    If the maintenance association identifiers are inconsistent, then the command is discarded; otherwise, the determination unit is adapted to instruct the statistics-making unit to make statistics of the network topology information of the bridge where the local node is located; and upon determining consistency of the maintenance association identifiers, the determination unit is adapted to further determine whether a certain port on the local node is a maintenance association end point of the maintenance association, and if not, then forwarding of the query command via the port to the other nodes will be continued; otherwise, forwarding of the query command via the port to the other nodes will be prohibited. 
         [0114]    The statistics-making unit is adapted to make statistics of the network topology information of the bridge where the local node is located upon reception of the command from the determination unit, and to instruct the transmission unit to feed back the information to the bridge where the original node is located after collecting the statistics. 
         [0115]    Several embodiments of the invention have been introduced above, and supplementary descriptions of several points of the above embodiments will be given below. 
         [0116]    Firstly, the network topology query command in the above embodiments includes the address information of the original node, which refers to a node initiating the network topology query command, and furthermore the other nodes receiving the network topology query command each will feed back the address information of the local node to the original node. Those skilled in the art shall appreciate hereby that each node will make a feedback to address information of a designated node indicated in the received network topology query command, and the address information of the designated node can either the address information of the original node initiating the network topology query command (as described in the above embodiments) or address information of any other node in need of acquisition of the network topology information. Generally, the respective nodes receiving the network topology query command will feed back the network topology information of the local node (including information on a connection between the local node and a previous node) to a designated node indicated in the network topology command, so that the designated node can obtain the network topology information of the respective nodes and also further aggregate the information to form a network topology. 
         [0117]    Secondly, a certain node (e.g., the original node) can transmit the network topology query command to the other nodes in different transmission modes. If a broadcast or multicast mode is adopted, then it is possible that a plurality of nodes each will receive the network topology query command from the same previous node (e.g., the original node) and further feed back the network topology information of the local node (including information on a connection between the local node and the previous node) to a designated node indicated in the network topology command, so that the designated node can receive the network topology information of the plurality of nodes and further form a network topology. 
         [0118]    Thirdly, as can be seen from the above embodiments, a topology information query can be made for a designated maintenance domain or maintenance association when the network topology query command includes a maintenance domain identifier and/or a maintenance association identifier to thereby avoid a topology discovery throughout the network for each time and hence a large number of multicast messages occurring over the network, thus improving a utilization ratio of bandwidths. Those skilled in the art shall appreciate hereby that the maintenance domain identifier and/or the maintenance association identifier can be understood as a query range identifier, and inclusion of the query range identifier in the network topology query command will be sufficient to attain the purpose of reducing the network topology information query range. Specifically, after a certain node receives via a port thereon the network topology query command including the query range identifier, if the port does not belong to the query range, then the node will not feed back any network topology information of the local node to a designated node. Furthermore after a node receives the network topology query command including the query range identifier, when the query command is required to be forwarded to other nodes, it will be forwarded to the other nodes via a port which is an intermediate point within the query range instead of a port which is a boundary point within the query range, because it will be unnecessary to continue forwarding the query command to the outside when the query command has arrived at a boundary of the query range. When the query range identifier is the maintenance domain identifier, the boundary point within the query range is particularly a DSAP within the maintenance domain, and the intermediate point is an ISAP; and when the query range identifier includes the maintenance association identifier, the boundary point within the query range is particularly an MEP of the maintenance association, and the intermediate point is an MIP. 
         [0119]    Finally, when the node receiving the network topology query command feeds back the network topology information of the local node to the designated node indicated in the query command, it is sufficient for the network topology information of the local node to include information on a connection between the local node and a previous node, and the connection information can be represented by identifiers of two ports interconnected on the two nodes or by respective node identifiers of the two nodes. In addition to this, the network topology information of the local node can include identifiers of part or all of ports on the local node or only those of ports within the query range in the query command, so that the designated node can obtain more port information. 
         [0120]    Additionally, it shall be noted that the automatic network topology information discovery mechanism according to the embodiments of the invention can guide a service flow onto another available path through an automatic network topology discovery mechanism upon occurrence of a network fault. This also can function to isolate the fault automatically and will be more efficient as compared with existing manual switching. Furthermore, relatively comprehensive network topology information (including information on a connection between nodes) can be acquired and can reflect from a comparison with the previously present network topology information whether the network logic topology has been changed, so that a network administrator can perform corresponding operations of fault location and isolation, the flow control, and so on, in a timely way, which will be of great value for maintenance of the network. 
         [0121]    The invention further discloses a fourth embodiment of a node device for making a network topology discovery, and reference is made to  FIG. 8  which illustrates a schematic structural diagram of the embodiment of the node device, which includes a reception unit  82  and a topology information feedback unit  81 , and optionally a query command transmission unit  83 , a first determination unit and a second determination unit. The internal structure and connection relationships of the node device will be further introduced below in connection with the operation principle thereof. 
         [0122]    The node device receives through the reception unit  82  from a previous node a network topology query command including address information of a designated node. As mentioned previously, the address information of the designated node may be the address of the original node initiating the network topology query command or the address of any other node desiring for the network topology information. 
         [0123]    Upon reception of the network topology query command, the reception unit  82  notifies the topology information feedback unit  81 , and if there is no other limiting condition, then the topology information feedback unit  81  will feed back to the designated node in the network topology query command the network topology information of the local node, including information on a connection between the local node and the previous node. Specifically, the information on the connection between the local node and the previous node can be identifiers of ports interconnected on the two nodes. Additionally, the network topology information of the local node can further include identifiers of other respective ports on the local node and the identifier of the local node. 
         [0124]    If another limiting condition is present, for example, lifetime information (e.g., an instruction lifetime parameter) is further included in the network topology query command, then the node device further correspondingly includes the first determination unit adapted to determine whether the lifetime upon arrival of the network topology query command at the local point is within a preset range after the reception unit  82  receives the network topology query command, and if so, then the first determination unit is adapted to notify the topology information feedback unit  81 . Furthermore, the topology information feedback unit  81  feeds back the network topology information of the local node to the designated node on the premise that the determination result of the first determination unit is that the lifetime is within the preset range. 
         [0125]    In an another example, a query range identifier is further included in the network topology query command, then the node device further correspondingly includes the second determination unit adapted to determine whether a port on the local node, via which the network topology query command is received, is within the query range, and if so, then the second determination unit is adapted to notify the topology information feedback unit  81 . Thus, the topology information feedback unit  81  feeds back the network topology information of the local node to the designated node on the premise that the determination result of the second determination unit is that the port is within the query range. The query range identifier may be a maintenance domain identifier or a maintenance association identifier or a combination thereof, which has been introduced in details above and therefore will not be described here again. 
         [0126]    Of course, if both the lifetime information and the query range identifier are included in the network topology query command, then the topology information feedback unit  81  feeds back the network topology information of the local node to the designated node on the premises that the determination result of the first determination unit is that the lifetime is within the preset range and that the determination result of the second determination unit is that the port is within the query range. 
         [0127]    Furthermore, the node device can further include the query command transmission unit  83  adapted to transmit to the other nodes the network topology query command including the address information of the designated node. If there is not any limiting condition, then the reception unit  82  of the node device will continue transmission of the network topology query command including the address information of the designated node to the other nodes through the query command transmission unit  83  upon reception of the network topology query command including the address information of the designated node, so that the other nodes each can subsequently continue a feedback of the network topology information of the local node to the designated node. If another limiting condition is present, for example, lifetime information is further included in the network topology query command, then when the determination result of the first determination unit is that the lifetime upon arrival of the network topology query command at the local node is not within the preset range, the topology information feedback unit  81  will not feed back any network topology information of the local node to the designated node, and the query command transmission unit  83  will not continue transmission of the network topology query command including the address information of the designated node to the other nodes. Therefore as for a certain node device, the node device will not continue transmission of the network topology query command including the address information of the designated node to the other nodes through the query command transmission unit  83  if the condition of forwarding the network topology query command is not satisfied. 
         [0128]    In another example, if the query range identifier is further included in the network topology query command, then the query command transmission unit  83  will forward the network topology query command including the address information of the designated node to the other nodes via a port on the local node, which is an intermediate point within the query range, thereby limiting the forwarding range of the network topology query command and thereby avoiding transmission of the network topology query command throughout the network, thus improving a utilization ratio of bandwidths. Relevant concepts of the query range, the intermediate point within the query range, and so on, have been detailed above, and repeated descriptions thereof will be omitted here. 
         [0129]    It shall be noted that the node device may be a bridge device or another network device. Since the node device can feed back the network topology information of the local node (including information on a connection between the local node and a previous node) to the designated node, the designated node can acquire the network topology information of other nodes, thereby realizing a network topology discovery. Furthermore, if the designated node acquires the network topology information of a plurality of nodes, then the network topology information can be synthesized to form a network topology structure. A query range identifier can be carried in the network topology query command, and the second determination unit in the node device can perform a corresponding process thereof, so that the network topology query range can be reduced to save bandwidth resources. 
         [0130]    The method and node device embodiments for making a network topology discovery according to the invention have been detailed above, and the principles and implementations of the embodiments of the invention have been set forth by way of specific examples. The above descriptions of the embodiments are merely intended to facilitate understanding of the invented method and essential idea thereof. Also those ordinarily skilled in the art will modify the embodiments and application scopes thereof in light of the invented idea. Accordingly, the disclosure in the specification shall not be taken for limiting the invention.