WO2012155430A1 - Method and network management for calculating network element interfaces - Google Patents

Method and network management for calculating network element interfaces Download PDF

Info

Publication number
WO2012155430A1
WO2012155430A1 PCT/CN2011/080054 CN2011080054W WO2012155430A1 WO 2012155430 A1 WO2012155430 A1 WO 2012155430A1 CN 2011080054 W CN2011080054 W CN 2011080054W WO 2012155430 A1 WO2012155430 A1 WO 2012155430A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
vlan
network element
matching
interface set
Prior art date
Application number
PCT/CN2011/080054
Other languages
French (fr)
Chinese (zh)
Inventor
孙凯意
张伟
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012155430A1 publication Critical patent/WO2012155430A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • H04L41/0809Plug-and-play configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/467Arrangements for supporting untagged frames, e.g. port-based VLANs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4675Dynamic sharing of VLAN information amongst network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • H04L41/122Discovery or management of network topologies of virtualised topologies, e.g. software-defined networks [SDN] or network function virtualisation [NFV]

Definitions

  • the present invention relates to the field of network technologies for supporting Layer 3 switching, and in particular, to the automatic calculation of the Layer 2 and Layer 3 interfaces of the network element by the network management, and is specifically a method and network management method for computing the network element interface.
  • a virtual local area network is a technology that divides a physical network into multiple logical (virtual) local area networks (LANs).
  • LANs logical (virtual) local area networks
  • network administrators can divide user logic in the same physical LAN into different broadcast domains (each broadcast domain is a VLAN) according to actual application requirements.
  • Each VLAN is logically a separate LAN with the same attributes as a physically formed LAN. All broadcast and unicast traffic in the same VLAN is restricted to this VLAN and not forwarded to other VLANs.
  • NEs of different VLANs want to communicate, they must pass through Layer 3 routing.
  • each port of the network element can be assigned to a different VLAN, which involves a Layer 2 interface and a Layer 3 interface.
  • the Layer 2 interface refers to the VLAN interface.
  • the Layer 3 interface refers to the Internet interconnection protocol. (IP, Internet Protocol) interface.
  • Layer 3 interfaces are created based on VLANs.
  • network element A is connected to network element B.
  • Port 1 is the UNI port of network element A
  • port 4 is the UNI port of network element B
  • port 2 is the NNI side port of network element A.
  • Port 3 serves as the NNI side port of network element B, and port 2 and port 3 are physically connected by a fiber link.
  • Port 1 is the UNI port of network element A
  • Port 3 serves as the NNI side port of network element B
  • port 2 and port 3 are physically connected by a fiber link.
  • the IP address of the port is on the same network segment.
  • the existing NE interface configuration mode requires the operator to manually configure the VLAN interface and IP interface for the NEs on the network.
  • the network is large, it is easy to configure errors, causing IP conflicts or VLANs and IPs that do not match, resulting in poor communication, which reduces configuration efficiency.
  • the main purpose of the present invention is to provide a method and network management method for computing a network element interface, which aims to improve configuration accuracy and configuration efficiency.
  • the present invention provides a method for computing a network element interface, where the method includes:
  • the matching VLAN interface and the matching IP interface of the local network element and the opposite network element are calculated based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set.
  • the calculating, by the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set, the matching VLAN interface and the matching IP interface of the local network element and the peer network element Includes:
  • the matching IP interface between the local network element and the remote network element is calculated based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
  • the calculating, by the first VLAN interface set and the second VLAN interface set, the matching VLAN interface between the local network element and the remote network element including: Querying the first VLAN interface set and the second VLAN interface set respectively; if one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as the local end A matching VLAN interface between the NE and the peer NE;
  • the VLAN interface intersection is used as a matching VLAN interface between the local network element and the remote network element;
  • a new VLAN interface is assigned as the matching VLAN interface between the local NE and the peer NE.
  • the principle of determining the intersection of the VLAN interfaces is as follows:
  • the VLAN IDs of the VLAN interfaces are the same; the VLAN interface is allocated as follows:
  • the VLAN IDs are unique and equal within the network element.
  • the matching IP interface between the local network element and the remote network element is calculated based on the matching VLAN interface, the first IP interface set, and the second IP interface set, and includes:
  • the network corresponding to the empty set is An IP interface that is in the same network segment as the IP interface address of the IP interface set that is not an empty set and that is unique to the entire network, and the IP interface set that is not an empty set and the assigned IP interface are used as the local network element. a matching IP interface corresponding to the peer network element;
  • the at least one pair of IP interfaces is used as the local network element and The matching IP interface corresponding to the peer network element;
  • an IP interface that is unique to the entire network and whose IP address is on the same network segment is assigned as the matching IP interface corresponding to the local NE and the peer NE.
  • the method further includes:
  • the local network element is used as the query condition, and the topology connection is obtained by querying the database. If the topology connection is empty, the user is prompted to establish a physical connection between the local network element and the remote network element.
  • the invention also provides a network management system for calculating a network element interface, where the network management system includes:
  • An obtaining module configured to obtain, by using a topology connection, a peer network element that has a physical connection with the local network element;
  • Establishing a module configured to respectively establish a first VLAN interface set of the local network element, a first IP interface set, and a second VLAN interface set and a second IP interface set of the peer network element;
  • a calculation module configured to calculate, according to the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set, the matching VLAN interface and the matching IP address of the local network element and the peer network element interface.
  • the calculation module comprises:
  • VLAN interface calculation unit configured to calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set;
  • the IP interface calculation unit is configured to calculate a matching IP interface between the local network element and the remote network element based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
  • the VLAN interface calculation unit includes:
  • a first query subunit configured to respectively query the first VLAN interface set and the second
  • VLAN interface set
  • a first computing subunit configured to: when the one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as the local network element and the peer network element. Matching the VLAN interface; when the first VLAN interface set and the second VLAN interface set are both empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as the local The matching VLAN interface between the end network element and the peer network element; otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local network element and the remote network element.
  • the IP interface calculation unit includes:
  • a second query subunit configured to query, in the first IP interface set and the second IP interface set, an IP interface that is the same as the ID of the matching VLAN interface
  • a second calculating subunit configured to: when one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element Assigning, to the network element corresponding to the empty set, an IP interface that is in the same network segment as the IP interface address in the IP interface set that is not an empty set and is unique to the entire network, and is not an empty set IP interface set and allocated.
  • the IP interface is the matching IP interface corresponding to the local network element and the peer network element; when the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have the same IP address.
  • the at least one IP interface is used as the matching IP interface between the local network element and the ⁇ end network element; otherwise, an IP interface with a unique network and the IP address in the same network segment is allocated as the local end.
  • the matching IP interface corresponding to the NE and the peer NE.
  • the network management further includes:
  • the query obtaining module is configured to obtain the topology connection by querying the database by using the local network element as a query condition.
  • the prompting module is configured to prompt the user to establish a physical connection between the local network element and the remote network element when the topology connection is empty.
  • the method for calculating a network element interface and the network management provided by the present invention automatically establish a VLAN interface set and an IP interface set of the local network element and the opposite network element respectively, and then automatically calculate according to the established VLAN interface set and the IP interface set.
  • the matching VLAN interface and the IP interface required for the local NE and the peer NE to transmit data.
  • the manual configuration is highly error-prone, IP conflicts, or services such as VLANs and IPs do not match.
  • the accuracy of the configuration improves the efficiency of the configuration.
  • 1 is a schematic diagram of a conventional network element connection
  • FIG. 2 is a schematic flow chart of a method for computing a network element interface according to an embodiment of the present invention
  • the local network element and the peer network element are calculated based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set. Schematic diagram of matching the VLAN interface and the matching IP interface;
  • FIG. 4 is a schematic flowchart of calculating a matching VLAN interface between a local network element and a remote network element based on a first VLAN interface set and a second VLAN interface set in the method for calculating a network element interface according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of calculating a matching IP interface between a local network element and a remote network element based on a matched VLAN interface, a first IP interface set, and a second IP interface set in the method for calculating a network element interface according to an embodiment of the present invention
  • FIG. 6 is a schematic flowchart of another embodiment of a method for computing a network element interface according to the present invention
  • FIG. 7 is a schematic diagram of a connection between network elements in a three-layer switching network in another embodiment of a method for computing a network element interface according to the present invention
  • FIG. 8 is a schematic structural diagram of an embodiment of a network management system for computing a network element interface according to the present invention.
  • FIG. 9 is a schematic structural diagram of a computing module in an embodiment of a network management system for computing a network element interface according to the present invention
  • FIG. 10 is a schematic structural diagram of a VLAN interface computing unit in an embodiment of a network management system for computing a network element interface according to the present invention
  • FIG. 11 is a schematic structural diagram of an IP interface calculation unit in an embodiment of a network management system for computing a network element interface according to the present invention
  • FIG. 12 is a schematic structural diagram of another embodiment of a network management system for computing a network element interface according to the present invention.
  • the solution of the embodiment of the present invention is mainly: establishing the local network element and the peer network element respectively
  • the VLAN interface set and the IP interface set automatically calculate the matching VLAN interface and IP interface required for the local NE and the peer NE to transmit data according to the established VLAN interface set and the IP interface set, so as to improve the accuracy and efficiency of the configuration.
  • an embodiment of the present invention provides a method for computing a network element interface, including: Step S101: Obtain a peer network element that has a physical connection with a local network element by using a topology connection; The NMS needs to synchronize the NE data to determine whether there is a physical connection between the local NE and the peer NE. If there is no physical connection, the user is prompted to establish a physical connection or LLDP (Link Layer Discovery Protocol) link auto discovery.
  • LLDP Link Layer Discovery Protocol
  • the local network element and the peer network element have established corresponding physical connections.
  • all the peer NEs that establish physical connections with the local NE are obtained through the topology connection.
  • Step S102 Establish a first VLAN interface set, a first IP interface set, and a second VLAN interface set and a second IP interface set of the peer network element, respectively.
  • the network management query aggregates all VLAN interfaces and all IP interfaces of the physical port of the interface that need to be configured with the local NE.
  • the VLAN set 1 and IP set 1 are formed, that is, the first VLAN interface set and the first IP interface set of the local NE are established.
  • Interface collection Therefore, the matching VLAN interface and the matching IP interface between the local network element and the opposite network element are calculated according to the foregoing sets.
  • Step S103 Calculate a matching VLAN interface and a matching IP interface between the local network element and the opposite network element based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set.
  • the matching VLAN interface between the local network element and the remote network element is calculated according to the first VLAN interface set and the second VLAN interface set, and then the first IP interface set is calculated and combined according to the calculated matching VLAN interface.
  • the second IP interface set calculates a matching IP interface between the local network element and the peer network element.
  • VLAN set 1 If the element in the VLAN set 1 is empty, and the element in the VLAN set 2 is not empty, the VLAN of the VLAN set 2 is used as the standard, and the same VLAN interface is assigned to the local network element as the VLAN interface of the local network element. The result of the calculation is 1, and the newly added VLAN interface is identified in the VLAN interface calculation result 1. VLAN set 2 is used as the VLAN interface calculation result of the peer NE. Otherwise the same treatment;
  • VLAN Set 1 If there is an intersection between VLAN Set 1 and VLAN Set 2, calculate the intersection of the two. The principle of the intersection is that the VLAN IDs of the VLAN interfaces are the same. Record the intersection of VLAN interfaces as the match between the local NE and the peer NE. The calculation result of the VLAN interface;
  • VLAN set 1 If there is no intersection between VLAN set 1 and VLAN set 2, a new VLAN interface is assigned to the two NEs as the matching result of the matching VLAN interface between the local NE and the peer NE, and in the calculation result.
  • the VLAN interface is added.
  • the above-mentioned allocation principle is that the VLAN ID is unique within the NE and is equal.
  • IP set 1 look up the IP interface corresponding to the calculation result 1 of the local network element VLAN interface.
  • the search principle is that the ID of the IP interface is equal to the VLAN ID in the calculation result 1 of the local network element VLAN interface. If it exists, record it. Correspondence between the VLAN ID and the IP interface. If it does not exist, the mapping between the VLAN ID and the null value is recorded. 2.
  • the IP set 2 and the VLAN interface are calculated in the same step D1 to generate a corresponding relationship 2;
  • the VLAN interface is used as the calculation result of the matching VLAN interface between the local NE and the peer NE. The VLAN interface is added to the calculation result.
  • the IP address needs to be calculated based on the IP address that is not empty. If the IP address of the network segment where the IP address is located is not configured on the peer network, the IP address of the network segment where the IP address is located is the same as the IP address of the network segment where the IP address is located. If the configuration has been configured, the two IP addresses of the same network segment are assigned to the entire network segment, and the network segment is not used on the NEs at both ends. According to the above steps, one of the two corresponding relationships is identified as a new one, and one identifier is ⁇ ⁇ tampering.
  • step S103 includes:
  • Step S1031 Calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set.
  • Step S1032 Calculate a matching IP interface between the local network element and the remote network element based on the matching VLAN interface, the first IP interface set, and the second IP interface set.
  • step S1031 includes: Step S10311: query the first VLAN interface set and the second VLAN interface set respectively; Step S10312: If one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set is not an empty set. As the matching VLAN interface between the local network element and the peer network element; if the first VLAN interface set and the second VLAN interface set are not empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as the local network element and the pair. The matching VLAN interface of the end network element; otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local NE and the peer NE.
  • the principle of determining the intersection of the VLAN interfaces is as follows: The VLAN IDs of the VLAN interfaces are the same.
  • the VLAN interface assignment principle is as follows: The VLAN IDs are unique and equal in the NEs.
  • step S1032 includes:
  • Step S10321 Query an IP interface with the same ID as the matching VLAN interface in the first IP interface set and the second IP interface set respectively.
  • Step S10322 If one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element, the corresponding is an empty set.
  • the network element allocates an IP interface that is in the same network segment as the IP interface address of the IP interface set that is not an empty set and is unique to the entire network.
  • the IP interface set that is not an empty set and the assigned IP interface are used as the local network element.
  • a matching IP interface corresponding to the peer network element if the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have IP addresses in the same network segment, the at least one The IP interface is used as the matching IP interface corresponding to the local NE and the peer NE. Otherwise, an IP interface with the same network and the IP address on the same network segment is assigned as the matching IP address of the local NE and the peer NE. interface.
  • the VLAN interface set and the IP interface set of the local network element and the peer network element are separately established, and the data of the local network element and the peer network element are automatically calculated according to the established VLAN interface set and the IP interface set.
  • Matching VLAN interfaces and IP interfaces When the network is large, manual configuration is highly error-prone, IP conflicts, or VLANs and IPs do not match. Such problems ensure the accuracy of the configuration and improve the configuration efficiency.
  • another embodiment of the present invention provides a method for calculating a network element interface.
  • the method further includes:
  • Step S90 The local network element is used as a query condition, and the topology connection is obtained by querying the database.
  • the network management system needs to synchronize the network element data to determine whether there is a physical connection between the local network element and the peer network element. If there is no physical connection, the user is prompted to establish a physical connection or perform automatic LLDP link discovery.
  • the network management system queries the database, and obtains the topology connection by using the local network element as a query condition, and stores it in the TopoLinkList_T linked list structure. If the obtained link is empty or the length of the linked list structure is 0, the user is prompted to establish a fiber connection between the network elements.
  • FIG. 7 it is a schematic diagram of connections between network elements in a Layer 3 switching network.
  • the intermediate node NE is named NE1
  • the neighboring NEs are named NE2, NE3, and NE4.
  • NE1 and NE2 are connected to each other through Gei_l/9 and Gei_l/9.
  • GEi_l/9 of NE1 is divided into Vlan2 and Vlan3, Vlan2 corresponds to Layer 3 interface ip2, IP address is 10.1.1.5/24, and Vlan3 corresponds to Layer 3 interface ip3.
  • the IP address is 10.1.2.5/24;
  • the Gei_l/9 of NE2 is divided into Vlan2 and Vlan3, the Layer 3 interface ip2 corresponding to Vlan2, the IP address is 10.1.1.6/24, and the Layer 3 interface ip3 corresponding to Vlan3, the IP address is 10.1.2.6/24.
  • NE1 and NE3 are connected by Gei_l/10 and Gei_l/10.
  • the Gei_l/10 of NE1 is divided into Vlan4, Vlan4 corresponds to the Layer 3 interface ip4, and the IP address is 10.1.3.5/24.
  • the Gd_l/10 of NE3 is divided into Vlan5.
  • Vlan5 corresponds to the Layer 3 interface ip5, and the IP address is 10.1.4.6/24.
  • NE1 and NE4 are connected by Gei_l/8 and Gei_l/8, where Gei_l/8 of NE1 It is divided into Vlan5 and Vlan6, Vlan5 corresponds to Layer 3 interface ip5, IP address is 10.1.4.5/24, Vlan6 does not correspond to Layer 3 interface; NE4's Gei_l/8 is divided into Vlan5 and Vlan6, and Vlan5 corresponds to Layer 3 interface ip5, IP The address is 10.1.8.6/24, Vlan6 corresponds to the Layer 3 interface ip6, and the IP address is 10.1.6.6/24.
  • the NE is the local NE and the NEs NE2, NE3, and NE4 are the peer NEs.
  • the procedure for automatically calculating the NE interface in the network is as follows:
  • the peer network element that has a physical connection with the local network element is obtained through the topology connection.
  • all the physical connections of the local network element are obtained, and the TopoLinkList_T linked list structure is stored, and the TopoLinkList_T linked list structure is traversed.
  • One of the elements TopoLink_T is taken as an example, and the following processing is performed: From the TopoLink_T structure, the local physical port (named ortl) is parsed The physical port of the peer (named port2) is used as the query condition to query the VLAN interface containing the physical port of the local end and the physical port of the remote end.
  • the VLAN interface of the local VLAN interface is stored in the vlanList1 linked list structure and the peer VLAN interface vlanList2 linked list structure. in.
  • the local network element and the peer network element are also parsed from the TopoLink_T structure, and the IP interface of the local network element and the IP interface of the remote network element are respectively queried.
  • Traverse vlanListl and vlanList2 take the intersection of the two sets, and judge the intersection principle as the element with the same VLAN ID. If there is no intersection, assign a new VLAN ID, and generate a new VLAN interface, as an intersection, intersection storage.
  • the data structure is: a mapl HashMap structure created by the local network element, a map2 HashMap structure created by the peer network element, and the element belonging to the vlanListl in the intersection is stored as a key into the ma l , and the element belonging to the vlanList2 in the intersection is used as the element The key is stored in map2.
  • mapl Traverse the key in mapl, and query the ipListl for the same element with the same VLAN ID and IP ID. If it exists, it is stored as the value of mapl. If it does not exist, the value is empty. Map2 is treated with ma l.
  • map1 and map2 if map1 and map2 have the same key, the value is not empty, and the IP address is in the same network segment, then the next key value is compared; if the value is empty, then the allocation The IP addresses in the network segments that are not used in the two network elements of the same network segment and the only two network elements are used to complete the value. If the value in mapl is empty, the vlaue in map2 is not empty.
  • the IP addresses in the collection do not need to be completed and updated;
  • traffic can be transmitted between the local NE and the UNI port of the peer NE.
  • the input data required for the calculation in this embodiment is simple.
  • the network management system Before the network element interface is automatically calculated, the network management system only needs to synchronize the correct interface data on the network element to establish a correct optical fiber connection.
  • the function automatically calculated by the network element interface in this embodiment can avoid manual configuration errors, ensure the accuracy of configuration, and improve configuration efficiency.
  • an embodiment of the present invention provides a network management system for computing a network element interface, including: an obtaining module 801, an establishing module 802, and a computing module 803, where:
  • the obtaining module 801 is configured to obtain, by using a topology connection, a peer that has a physical connection with the local network element.
  • Network element
  • the establishing module 802 is configured to respectively establish a first VLAN interface set of the local network element, a first IP interface set, and a second VLAN interface set of the peer network element, and a second IP interface set; A VLAN interface set, a first IP interface set, a second VLAN interface set, and a second IP interface set are used to calculate a matching VLAN interface and a matching IP interface between the local network element and the peer network element.
  • the NMS Before calculating the NE interface, the NMS needs to synchronize the NE data to determine whether there is a physical connection between the local NE and the peer NE. If there is no physical connection, the user is prompted to establish a physical connection or automatically discover the LLDP link.
  • the local network element and the peer network element have established corresponding physical connections.
  • all the peer NEs that establish physical connections with the local NE are obtained through the topology connection.
  • the network management query aggregates all VLAN interfaces and all IP interfaces of the physical port of the interface that need to be configured with the local NE.
  • the VLAN set 1 and IP set 1 are formed, that is, the first VLAN interface set and the first IP interface set of the local NE are established.
  • the matching VLAN interface between the local network element and the remote network element is calculated according to the first VLAN interface set and the second VLAN interface set, and then the first IP interface set and the second IP interface are calculated and combined according to the calculated matching VLAN interface.
  • the set calculates the matching IP interface between the local NE and the peer NE.
  • VLAN Set 1 If the element in VLAN Set 1 is empty, the element in VLAN Set 2 is not empty, then The VLAN ID of VLAN 2 is used as the standard. The same VLAN interface is assigned to the local NE. The VLAN interface calculation result of the local NE is 1 and the newly added VLAN interface is identified in the VLAN interface calculation result 1. VLAN set 2 is used as the VLAN interface calculation result of the peer NE. Otherwise the same treatment;
  • VLAN Set 1 If there is an intersection between VLAN Set 1 and VLAN Set 2, calculate the intersection of the two. The principle of the intersection is that the VLAN IDs of the VLAN interfaces are the same. Record the intersection of VLAN interfaces as the match between the local NE and the peer NE. The calculation result of the VLAN interface;
  • VLAN set 1 If there is no intersection between VLAN set 1 and VLAN set 2, a new VLAN interface is assigned to the two NEs as the matching result of the matching VLAN interface between the local NE and the peer NE, and in the calculation result.
  • the VLAN interface is added.
  • the above-mentioned allocation principle is that the VLAN ID is unique within the NE and is equal.
  • IP set 1 look up the IP interface corresponding to the calculation result 1 of the local network element VLAN interface.
  • the search principle is that the ID of the IP interface is equal to the VLAN ID in the calculation result 1 of the local network element VLAN interface. If it exists, record it. Correspondence between the VLAN ID and the IP interface. If it does not exist, the mapping between the VLAN ID and the null value is recorded.
  • the IP set 2 and the VLAN interface are calculated in the same step D1 to generate a correspondence 2;
  • the VLAN interface is used as the calculation result of the matching VLAN interface between the local NE and the peer NE. The VLAN interface is added to the calculation result.
  • the IP address needs to be calculated based on the IP address that is not empty. If the IP address of the network segment where the IP address is located is not configured on the peer network, the IP address of the network segment where the IP address is located is the same as the IP address of the network segment where the IP address is located. If the configuration has been configured, the two IP addresses of the same network segment are assigned to the entire network segment, and the network segment is not used on the NEs at both ends. According to the above steps, one of the two corresponding relationships is identified as a new one, and one identifier is ⁇ ⁇ tampering.
  • the calculation module 803 includes: a VLAN interface calculation unit 8031 and an IP interface calculation unit 8032, where:
  • the VLAN interface calculation unit 8031 is configured to calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set.
  • the IP interface calculation unit 8032 is configured to calculate a matching IP interface between the local network element and the remote network element based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
  • the VLAN interface calculation unit 8031 includes: a first query subunit 80311 and a first calculation subunit 80312, where:
  • the first query subunit 80311 is configured to separately query the first VLAN interface set and the second VLAN interface set;
  • the first calculating sub-unit 80312 is configured to: when the one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as a match between the local network element and the remote network element.
  • VLAN interface When the first VLAN interface set and the second VLAN interface set are both empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as the matching VLAN interface between the local NE and the peer NE; otherwise, a new interface is assigned. VLAN interface as the local network The matching VLAN interface between the meta and the peer NE.
  • the IP interface computing unit 8032 includes: a second query subunit 80321 and a second computing subunit 80322, where:
  • the second query sub-unit 80321 is configured to query, in the first IP interface set and the second IP interface set, an IP interface that is the same as the ID of the matching VLAN interface, respectively.
  • a second calculating sub-unit 80322 configured to: when one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element, Assigning an IP interface corresponding to the IP interface address of the IP interface set that is not an empty set to the IP address of the IP interface set that is not an empty set and unique to the entire network, the IP interface set and the assigned IP address that are not empty sets
  • the interface is a matching IP interface corresponding to the local network element and the peer network element; when the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have IP addresses in the same network.
  • the at least one IP interface is used as the matching IP interface between the local network element and the ⁇ end network element; otherwise, an IP interface with the entire network and the IP address in the same network segment is allocated as the local network element.
  • another embodiment of the present invention provides a network management system for calculating a network element interface. Based on the foregoing embodiments, the method further includes:
  • the query obtaining module 790 is configured to obtain a topology connection by querying the database by using the local network element as a query condition.
  • the prompting module 800 is configured to prompt the user to establish a physical connection between the local network element and the peer network element when the topology connection is empty.
  • the network management system needs to synchronize the network element data to determine whether there is a physical connection between the local network element and the peer network element. If there is no physical connection, the user is prompted to establish a physical connection or perform automatic LLDP link discovery.
  • the network management system queries the database, and obtains the topology connection by using the local network element as a query condition, and stores it in the TopoLinkList_T linked list structure. If the obtained link is empty or chain If the length of the table structure is 0, the user is prompted to establish a fiber connection between the network elements.
  • the method for calculating a network element interface and the network management system in the embodiment of the present invention respectively, respectively, respectively, establishing a VLAN interface set and an IP interface set of the local network element and the peer network element, and automatically calculating the local network element according to the established VLAN interface set and the IP interface set.
  • the matching VLAN interface and the IP interface required to transmit data with the peer network element.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in the present invention are a method and network management for calculating network element interfaces, wherein the method comprises obtaining an opposite network element physically connected to a local network element via a topological link; respectively establishing a first Virtual Local Area Network (VLAN) interface set and a first Internet Protocol (IP) interface set of the local network element, a second VLAN interface set and a second IP interface set of the opposite network element; based on the first VLAN interface set, the first IP interface set, the second VLAN interface set and the second IP interface set, calculating the matched VLAN interfaces and matched IP interfaces between the local network element and the opposite network element. The present invention avoids the problems that manual configuration is extremely error prone and disconnected services caused by IP collision or mismatched VLAN and IP, thus ensuring the configuration accuracy and improving the configuration efficiency.

Description

计算网元接口的方法及网管 技术领域  Method and network management method for computing network element interface
本发明涉及支持三层交换的网络技术领域, 尤其涉及网管对于网元二 层和三层接口的自动计算, 具体为一种计算网元接口的方法及网管。 背景技术  The present invention relates to the field of network technologies for supporting Layer 3 switching, and in particular, to the automatic calculation of the Layer 2 and Layer 3 interfaces of the network element by the network management, and is specifically a method and network management method for computing the network element interface. Background technique
虚拟局域网 ( VLAN , Vitual Local Area Network )是一种将物理网络划 分成多个逻辑(虚拟)局域网 (LAN )的技术。 利用 VLAN技术, 网络管 理者可以根据实际应用需要, 把同一物理局域网中的用户逻辑划分成不同 的广播域(每个广播域即一个 VLAN )。 每个 VLAN在逻辑上似一个独立 的局域网, 与物理上形成的 LAN具有相同的属性。 同一个 VLAN 中的所 有广播和单播流量都被限制在该 VLAN 中, 而不会转发到其它 VLAN 中。 当不同 VLAN 的网元要进行通信时, 必须经过三层的路由转发。 基于网元 的端口对 VLAN进行划分时,可以将网元的各个端口分配给不同的 VLAN, 其中涉及二层接口及三层接口, 二层接口是指 VLAN接口, 三层接口是指 因特网互联协议 ( IP, Internet Protocol )接口。  A virtual local area network (VLAN) is a technology that divides a physical network into multiple logical (virtual) local area networks (LANs). With VLAN technology, network administrators can divide user logic in the same physical LAN into different broadcast domains (each broadcast domain is a VLAN) according to actual application requirements. Each VLAN is logically a separate LAN with the same attributes as a physically formed LAN. All broadcast and unicast traffic in the same VLAN is restricted to this VLAN and not forwarded to other VLANs. When NEs of different VLANs want to communicate, they must pass through Layer 3 routing. When a port is assigned to a VLAN based on a network element, each port of the network element can be assigned to a different VLAN, which involves a Layer 2 interface and a Layer 3 interface. The Layer 2 interface refers to the VLAN interface. The Layer 3 interface refers to the Internet interconnection protocol. (IP, Internet Protocol) interface.
三层接口是基于 VLAN创建的。在三层交换网络中,为了保证网元 NNI 侧业务畅通, 必须保证物理上连接的两个网元的两个物理端口, 需要处于 同一个 VLAN中, 并且此 VLAN所在的三层接口的 IP地址必须在同一网 段内。 如图 1所示, 网元 A与网元 B组网, 其中端口 1作为网元 A的 UNI 侧端口, 端口 4作为网元 B的 UNI侧端口, 端口 2作为网元 A的 NNI侧 端口, 端口 3作为网元 B的 NNI侧端口, 端口 2和端口 3之间通过纤缆链 接即物理连接。 为保证业务在端口 1和端口 4之间进行传送, 则需要将端 口 2和端口 3划分到相同的 VLAN接口中, 并且 VLAN接口所属的三层接 口的 IP地址在同一网段。 Layer 3 interfaces are created based on VLANs. On a Layer 3 switching network, you need to ensure that the two physical interfaces of the two NEs that are physically connected must be in the same VLAN and the IP address of the Layer 3 interface where the VLAN resides. Must be in the same network segment. As shown in Figure 1, network element A is connected to network element B. Port 1 is the UNI port of network element A, port 4 is the UNI port of network element B, and port 2 is the NNI side port of network element A. Port 3 serves as the NNI side port of network element B, and port 2 and port 3 are physically connected by a fiber link. To ensure that services are transmitted between port 1 and port 4, you need to divide port 2 and port 3 into the same VLAN interface, and the Layer 3 interface to which the VLAN interface belongs. The IP address of the port is on the same network segment.
现有的网元接口配置方式, 通常需要操作人员手工在网管上给网路中 的网元配置 VLAN接口和 IP接口。 但是, 当网路庞大时, 极易配置出错, 造成 IP沖突或者因为 VLAN和 IP不匹配造成业务不通, 从而降低了配置 效率。 发明内容  The existing NE interface configuration mode requires the operator to manually configure the VLAN interface and IP interface for the NEs on the network. However, when the network is large, it is easy to configure errors, causing IP conflicts or VLANs and IPs that do not match, resulting in poor communication, which reduces configuration efficiency. Summary of the invention
本发明的主要目的在于提供一种计算网元接口的方法及网管, 旨在提 高配置的准确性和配置效率。  The main purpose of the present invention is to provide a method and network management method for computing a network element interface, which aims to improve configuration accuracy and configuration efficiency.
为了达到上述目的, 本发明提出一种计算网元接口的方法, 所述方法 包括:  In order to achieve the above object, the present invention provides a method for computing a network element interface, where the method includes:
通过拓 卜连接获取与本端网元具有物理连接的对端网元;  Obtaining a peer network element that has a physical connection with the local network element by using the topology connection;
分别建立本端网元的第一 VLAN接口集合、第一 IP接口集合以及对端 网元的第二 VLAN接口集合、 第二 IP接口集合;  Establishing a first VLAN interface set, a first IP interface set, and a second VLAN interface set and a second IP interface set of the peer network element respectively.
基于所述第一 VLAN接口集合、 第一 IP接口集合、 第二 VLAN接口 集合以及第二 IP接口集合计算所述本端网元与对端网元的匹配 VLAN接口 及匹配 IP接口。  The matching VLAN interface and the matching IP interface of the local network element and the opposite network element are calculated based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set.
优选地,所述基于第一 VLAN接口集合、第一 IP接口集合、第二 VLAN 接口集合以及第二 IP接口集合计算所述本端网元与对端网元的匹配 VLAN 接口及匹配 IP接口, 包括:  Preferably, the calculating, by the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set, the matching VLAN interface and the matching IP interface of the local network element and the peer network element, Includes:
基于第一 VLAN接口集合以及第二 VLAN接口集合计算所述本端网元 与对端网元的匹配 VLAN接口;  Calculating a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set;
基于所述匹配 VLAN接口、 第一 IP接口集合及第二 IP接口集合计算 所述本端网元与对端网元的匹配 IP接口。  The matching IP interface between the local network element and the remote network element is calculated based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
优选地, 所述基于第一 VLAN接口集合以及第二 VLAN接口集合计算 所述本端网元与对端网元的匹配 VLAN接口, 包括: 分别查询所述第一 VLAN接口集合以及第二 VLAN接口集合; 若所述第一 VLAN接口集合与第二 VLAN接口集合其中之一为空集, 则以不为空集的 VLAN接口集合作为本端网元与对端网元的匹配 VLAN接 口; Preferably, the calculating, by the first VLAN interface set and the second VLAN interface set, the matching VLAN interface between the local network element and the remote network element, including: Querying the first VLAN interface set and the second VLAN interface set respectively; if one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as the local end A matching VLAN interface between the NE and the peer NE;
若所述第一 VLAN接口集合与第二 VLAN接口集合均不为空集且存在 VLAN接口交集 , 则以所述 VLAN接口交集作为本端网元与对端网元的匹 配 VLAN接口;  If the first VLAN interface set and the second VLAN interface set are both empty and have a VLAN interface intersection, the VLAN interface intersection is used as a matching VLAN interface between the local network element and the remote network element;
否则, 分配一个新的 VLAN接口作为本端网元与对端网元的匹配 VLAN接口。  Otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local NE and the peer NE.
优选地 ,判断所述 VLAN接口交集的原则为: VLAN接口对应的 VLAN ID相同; 所述 VLAN接口的分配原则为: VLAN ID在网元内唯一且相等。  Preferably, the principle of determining the intersection of the VLAN interfaces is as follows: The VLAN IDs of the VLAN interfaces are the same; the VLAN interface is allocated as follows: The VLAN IDs are unique and equal within the network element.
优选地, 所述基于匹配 VLAN接口、 第一 IP接口集合及第二 IP接口 集合计算所述本端网元与对端网元的匹配 IP接口, 包括:  Preferably, the matching IP interface between the local network element and the remote network element is calculated based on the matching VLAN interface, the first IP interface set, and the second IP interface set, and includes:
分别在第一 IP接口集合及第二 IP接口集合中查询与所述匹配 VLAN 接口的 ID相同的 IP接口;  Querying, in the first IP interface set and the second IP interface set, the same IP interface as the matching VLAN interface ID;
若所述第一 IP接口集合及第二 IP接口集合其中之一为空集,且不为空 集的 IP接口集合中的 IP接口在相应网元上没有使用过,则为空集对应的网 元分配一个与所述不为空集的 IP接口集合中的 IP接口地址处于相同网段且 全网唯一的 IP接口, 将不为空集的 IP接口集合及分配的 IP接口作为本端 网元与对端网元对应的匹配 IP接口;  If the first IP interface set and the second IP interface set are empty sets, and the IP interfaces in the IP interface set that are not empty sets are not used on the corresponding network element, the network corresponding to the empty set is An IP interface that is in the same network segment as the IP interface address of the IP interface set that is not an empty set and that is unique to the entire network, and the IP interface set that is not an empty set and the assigned IP interface are used as the local network element. a matching IP interface corresponding to the peer network element;
若所述第一 IP接口集合及第二 IP接口集合均不为空集,且至少存在一 对 IP接口的 IP地址在同一网段内, 则以该至少一对 IP接口作为本端网元 与对端网元对应的匹配 IP接口;  If the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have IP addresses in the same network segment, the at least one pair of IP interfaces is used as the local network element and The matching IP interface corresponding to the peer network element;
否则,分配一对全网唯一且 IP地址处于同一网段的 IP接口作为本端网 元与对端网元对应的匹配 IP接口。 优选地, 所述通过拓朴连接获取与本端网元具有物理连接的对端网元 之前, 所述方法还包括: Otherwise, an IP interface that is unique to the entire network and whose IP address is on the same network segment is assigned as the matching IP interface corresponding to the local NE and the peer NE. Preferably, before the obtaining, by the topology connection, the peer network element that has a physical connection with the local network element, the method further includes:
以本端网元为查询条件, 通过查询数据库获取所述拓朴连接; 若所述拓朴连接为空, 则提示用户建立本端网元与对端网元之间的物 理连接。  The local network element is used as the query condition, and the topology connection is obtained by querying the database. If the topology connection is empty, the user is prompted to establish a physical connection between the local network element and the remote network element.
本发明还提出一种计算网元接口的网管, 所述网管包括:  The invention also provides a network management system for calculating a network element interface, where the network management system includes:
获取模块, 用于通过拓朴连接获取与本端网元具有物理连接的对端网 元;  An obtaining module, configured to obtain, by using a topology connection, a peer network element that has a physical connection with the local network element;
建立模块, 用于分别建立本端网元的第一 VLAN接口集合、 第一 IP接 口集合以及对端网元的第二 VLAN接口集合、 第二 IP接口集合;  Establishing a module, configured to respectively establish a first VLAN interface set of the local network element, a first IP interface set, and a second VLAN interface set and a second IP interface set of the peer network element;
计算模块, 用于基于所述第一 VLAN接口集合、 第一 IP接口集合、 第 二 VLAN接口集合以及第二 IP接口集合计算所述本端网元与对端网元的匹 配 VLAN接口及匹配 IP接口。  a calculation module, configured to calculate, according to the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set, the matching VLAN interface and the matching IP address of the local network element and the peer network element interface.
优选地, 所述计算模块包括:  Preferably, the calculation module comprises:
VLAN接口计算单元, 用于基于第一 VLAN接口集合以及第二 VLAN 接口集合计算所述本端网元与对端网元的匹配 VLAN接口;  a VLAN interface calculation unit, configured to calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set;
IP接口计算单元, 用于基于所述匹配 VLAN接口、第一 IP接口集合及 第二 IP接口集合计算所述本端网元与对端网元的匹配 IP接口。  The IP interface calculation unit is configured to calculate a matching IP interface between the local network element and the remote network element based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
优选地 , 所述 VLAN接口计算单元包括:  Preferably, the VLAN interface calculation unit includes:
第一查询子单元, 用于分别查询所述第一 VLAN接口集合以及第二 a first query subunit, configured to respectively query the first VLAN interface set and the second
VLAN接口集合; VLAN interface set;
第一计算子单元, 用于当所述第一 VLAN接口集合与第二 VLAN接口 集合其中之一为空集时, 以不为空集的 VLAN接口集合作为本端网元与对 端网元的匹配 VLAN接口;当所述第一 VLAN接口集合与第二 VLAN接口 集合均不为空集且存在 VLAN接口交集时, 以所述 VLAN接口交集作为本 端网元与对端网元的匹配 VLAN接口; 否则, 分配一个新的 VLAN接口作 为本端网元与对端网元的匹配 VLAN接口。 a first computing subunit, configured to: when the one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as the local network element and the peer network element. Matching the VLAN interface; when the first VLAN interface set and the second VLAN interface set are both empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as the local The matching VLAN interface between the end network element and the peer network element; otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local network element and the remote network element.
优选地 , 所述 IP接口计算单元包括:  Preferably, the IP interface calculation unit includes:
第二查询子单元,用于分别在第一 IP接口集合及第二 IP接口集合中查 询与所述匹配 VLAN接口的 ID相同的 IP接口;  a second query subunit, configured to query, in the first IP interface set and the second IP interface set, an IP interface that is the same as the ID of the matching VLAN interface;
第二计算子单元,用于当所述第一 IP接口集合及第二 IP接口集合其中 之一为空集,且不为空集的 IP接口集合中的 IP接口在相应网元上没有使用 过时,为空集对应的网元分配一个与所述不为空集的 IP接口集合中的 IP接 口地址处于相同网段且全网唯一的 IP接口,将不为空集的 IP接口集合及分 配的 IP接口作为本端网元与对端网元对应的匹配 IP接口; 当所述第一 IP 接口集合及第二 IP接口集合均不为空集, 且至少存在一对 IP接口的 IP地 址在同一网段内时, 以该至少一^ IP接口作为本端网元与^端网元^应的 匹配 IP接口; 否则 , 分配一对全网唯一且 IP地址处于同一网段的 IP接口 作为本端网元与对端网元对应的匹配 IP接口。  a second calculating subunit, configured to: when one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element Assigning, to the network element corresponding to the empty set, an IP interface that is in the same network segment as the IP interface address in the IP interface set that is not an empty set and is unique to the entire network, and is not an empty set IP interface set and allocated. The IP interface is the matching IP interface corresponding to the local network element and the peer network element; when the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have the same IP address. In the network segment, the at least one IP interface is used as the matching IP interface between the local network element and the ^ end network element; otherwise, an IP interface with a unique network and the IP address in the same network segment is allocated as the local end. The matching IP interface corresponding to the NE and the peer NE.
优选地, 所述网管还包括:  Preferably, the network management further includes:
查询获取模块, 用于以本端网元为查询条件, 通过查询数据库获取所 述拓朴连接。  The query obtaining module is configured to obtain the topology connection by querying the database by using the local network element as a query condition.
提示模块, 用于当所述拓朴连接为空时, 提示用户建立本端网元与对 端网元之间的物理连接。  The prompting module is configured to prompt the user to establish a physical connection between the local network element and the remote network element when the topology connection is empty.
本发明提出的一种计算网元接口的方法及网管, 通过分别建立本端网 元与对端网元的 VLAN接口集合以及 IP接口集合, 再根据建立的 VLAN 接口集合以及 IP接口集合, 自动计算本端网元与对端网元传输数据所需的 匹配 VLAN接口以及 IP接口, 网路庞大时, 避免了手工配置极易出错、 IP 沖突或者因为 VLAN和 IP不匹配造成业务不通等问题,保证了配置的准确 性, 提高了配置效率。 附图说明 The method for calculating a network element interface and the network management provided by the present invention automatically establish a VLAN interface set and an IP interface set of the local network element and the opposite network element respectively, and then automatically calculate according to the established VLAN interface set and the IP interface set. The matching VLAN interface and the IP interface required for the local NE and the peer NE to transmit data. When the network is large, the manual configuration is highly error-prone, IP conflicts, or services such as VLANs and IPs do not match. The accuracy of the configuration improves the efficiency of the configuration. DRAWINGS
图 1是现有的网元连接示意图;  1 is a schematic diagram of a conventional network element connection;
图 2是本发明计算网元接口的方法一实施例流程示意图;  2 is a schematic flow chart of a method for computing a network element interface according to an embodiment of the present invention;
图 3是本发明计算网元接口的方法一实施例中基于第一 VLAN接口集 合、 第一 IP接口集合、 第二 VLAN接口集合以及第二 IP接口集合计算本 端网元与对端网元的匹配 VLAN接口及匹配 IP接口的流程示意图;  3 is a method for computing a network element interface according to an embodiment of the present invention. The local network element and the peer network element are calculated based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set. Schematic diagram of matching the VLAN interface and the matching IP interface;
图 4是本发明计算网元接口的方法一实施例中基于第一 VLAN接口集 合以及第二 VLAN接口集合计算本端网元与对端网元的匹配 VLAN接口的 流程示意图;  4 is a schematic flowchart of calculating a matching VLAN interface between a local network element and a remote network element based on a first VLAN interface set and a second VLAN interface set in the method for calculating a network element interface according to an embodiment of the present invention;
图 5是本发明计算网元接口的方法一实施例中基于匹配 VLAN接口、 第一 IP接口集合及第二 IP接口集合计算本端网元与对端网元的匹配 IP接 口的流程示意图;  5 is a schematic flowchart of calculating a matching IP interface between a local network element and a remote network element based on a matched VLAN interface, a first IP interface set, and a second IP interface set in the method for calculating a network element interface according to an embodiment of the present invention;
图 6是本发明计算网元接口的方法另一实施例的流程示意图; 图 7是本发明计算网元接口的方法另一实施例中三层交换网络中网元 之间的连接示意图;  6 is a schematic flowchart of another embodiment of a method for computing a network element interface according to the present invention; FIG. 7 is a schematic diagram of a connection between network elements in a three-layer switching network in another embodiment of a method for computing a network element interface according to the present invention;
图 8是本发明计算网元接口的网管一实施例结构示意图;  8 is a schematic structural diagram of an embodiment of a network management system for computing a network element interface according to the present invention;
图 9是本发明计算网元接口的网管一实施例中计算模块的结构示意图; 图 10是本发明计算网元接口的网管一实施例中 VLAN接口计算单元的 结构示意图;  9 is a schematic structural diagram of a computing module in an embodiment of a network management system for computing a network element interface according to the present invention; FIG. 10 is a schematic structural diagram of a VLAN interface computing unit in an embodiment of a network management system for computing a network element interface according to the present invention;
图 11是本发明计算网元接口的网管一实施例中 IP接口计算单元的结构 示意图;  11 is a schematic structural diagram of an IP interface calculation unit in an embodiment of a network management system for computing a network element interface according to the present invention;
图 12是本发明计算网元接口的网管另一实施例的结构示意图。  FIG. 12 is a schematic structural diagram of another embodiment of a network management system for computing a network element interface according to the present invention.
为了使本发明的技术方案更加清楚、 明了, 下面将结合附图作进一步 评述。 具体实施方式 In order to make the technical solutions of the present invention clearer and clearer, the following will be further reviewed in conjunction with the accompanying drawings. detailed description
本发明实施例解决方案主要是: 分别建立本端网元与对端网元的 The solution of the embodiment of the present invention is mainly: establishing the local network element and the peer network element respectively
VLAN接口集合以及 IP接口集合, 根据建立的 VLAN接口集合以及 IP接 口集合自动计算本端网元与对端网元传输数据所需的匹配 VLAN接口以及 IP接口, 以提高配置的准确性和效率。 The VLAN interface set and the IP interface set automatically calculate the matching VLAN interface and IP interface required for the local NE and the peer NE to transmit data according to the established VLAN interface set and the IP interface set, so as to improve the accuracy and efficiency of the configuration.
如图 2所示, 本发明一实施例提出一种计算网元接口的方法, 包括: 步驟 S101 , 通过拓朴连接获取与本端网元具有物理连接的对端网元; 在计算网元接口之前, 网管需要同步网元数据, 确定本端网元与对端 网元间是否存在物理连接。 如果没有任何物理连接, 则提示用户需要首先 建立物理连接, 或者进行链路层发现协议( LLDP, Link Layer Discovery Protocol )链路自动发现。  As shown in FIG. 2, an embodiment of the present invention provides a method for computing a network element interface, including: Step S101: Obtain a peer network element that has a physical connection with a local network element by using a topology connection; The NMS needs to synchronize the NE data to determine whether there is a physical connection between the local NE and the peer NE. If there is no physical connection, the user is prompted to establish a physical connection or LLDP (Link Layer Discovery Protocol) link auto discovery.
在本实施例中, 本端网元与对端网元已经建立了相应的物理连接。 同 时通过拓朴连接, 获取与本端网元建立物理连接的所有对端网元。  In this embodiment, the local network element and the peer network element have established corresponding physical connections. At the same time, all the peer NEs that establish physical connections with the local NE are obtained through the topology connection.
步驟 S102, 分别建立本端网元的第一 VLAN接口集合、 第一 IP接口 集合以及对端网元的第二 VLAN接口集合、 第二 IP接口集合;  Step S102: Establish a first VLAN interface set, a first IP interface set, and a second VLAN interface set and a second IP interface set of the peer network element, respectively.
网管查询聚合有本端网元需要配置接口的物理端口的所有 VLAN接口 及所有 IP接口, 形成 VLAN集合 1 及 IP集合 1 , 即建立本端网元的第一 VLAN接口集合和第一 IP接口集合; 同时查询聚合有对端网元需要配置接 口的物理端口的所有 VLAN接口及所有 IP接口, 形成 VLAN集合 2及形 成 IP集合 2 , 即建立对端网元的第二 VLAN接口集合和第二 IP接口集合。 以便后续根据上述各集合计算本端网元与对端网元的匹配 VLAN接口及匹 配 IP接口。  The network management query aggregates all VLAN interfaces and all IP interfaces of the physical port of the interface that need to be configured with the local NE. The VLAN set 1 and IP set 1 are formed, that is, the first VLAN interface set and the first IP interface set of the local NE are established. At the same time, query all the VLAN interfaces and all IP interfaces of the physical port that need to be configured with the peer NE to form the VLAN set 2 and form the IP set 2, that is, establish the second VLAN interface set and the second IP of the peer network element. Interface collection. Therefore, the matching VLAN interface and the matching IP interface between the local network element and the opposite network element are calculated according to the foregoing sets.
步驟 S103,基于第一 VLAN接口集合、第一 IP接口集合、第二 VLAN 接口集合以及第二 IP接口集合计算本端网元与对端网元的匹配 VLAN接口 及匹配 IP接口。 在本步驟, 首先根据第一 VLAN接口集合及第二 VLAN接口集合计算 本端网元与对端网元的匹配 VLAN接口 , 然后 , 根据计算出的匹配 VLAN 接口计算并结合第一 IP接口集合及第二 IP接口集合计算本端网元与对端网 元的匹配 IP接口。 Step S103: Calculate a matching VLAN interface and a matching IP interface between the local network element and the opposite network element based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set. In this step, the matching VLAN interface between the local network element and the remote network element is calculated according to the first VLAN interface set and the second VLAN interface set, and then the first IP interface set is calculated and combined according to the calculated matching VLAN interface. The second IP interface set calculates a matching IP interface between the local network element and the peer network element.
具体包括以下过程:  Specifically includes the following process:
一、 计算 VLAN接口, 确定本端网元 VLAN接口计算结果 1 (即本端 网元的匹配 VLAN接口 )和对端网元的 VLAN接口计算结果 2 (即对端网 元的匹配 VLAN接口)。  1. Calculate the VLAN interface and determine the calculation result of the VLAN interface of the local NE (that is, the matching VLAN interface of the local NE) and the VLAN interface calculation result of the peer NE (that is, the matching VLAN interface of the peer NE).
1、 如果 VLAN集合 1中的元素为空, VLAN集合 2中元素不为空, 则 以 VLAN集合 2中 VLAN为标准, 为本端网元分配相同的 VLAN接口,作 为本端网元的 VLAN接口计算结果 1 , 并将新增的 VLAN接口在 VLAN接 口计算结果 1中标识出。 VLAN集合 2作为对端网元的 VLAN接口计算结 果 2。 反之处理相同;  If the element in the VLAN set 1 is empty, and the element in the VLAN set 2 is not empty, the VLAN of the VLAN set 2 is used as the standard, and the same VLAN interface is assigned to the local network element as the VLAN interface of the local network element. The result of the calculation is 1, and the newly added VLAN interface is identified in the VLAN interface calculation result 1. VLAN set 2 is used as the VLAN interface calculation result of the peer NE. Otherwise the same treatment;
2、 如果 VLAN集合 1、 VLAN集合 2存在交集, 则计算两者的交集, 判断交集的原则为 VLAN接口对应的 VLAN ID相同, 记录下 VLAN接口 交集作为本端网元与对端网元的匹配 VLAN接口的计算结果;  2. If there is an intersection between VLAN Set 1 and VLAN Set 2, calculate the intersection of the two. The principle of the intersection is that the VLAN IDs of the VLAN interfaces are the same. Record the intersection of VLAN interfaces as the match between the local NE and the peer NE. The calculation result of the VLAN interface;
3、 如果 VLAN集合 1、 VLAN集合 2不存在交集, 则为两端网元分配 一个新的 VLAN接口, 作为本端网元与对端网元的匹配 VLAN接口的计算 结果,并且在计算结果中标识出 VLAN接口为新增,上述分配原则为 VLAN ID在网元内唯一, 并且相等。  3. If there is no intersection between VLAN set 1 and VLAN set 2, a new VLAN interface is assigned to the two NEs as the matching result of the matching VLAN interface between the local NE and the peer NE, and in the calculation result. The VLAN interface is added. The above-mentioned allocation principle is that the VLAN ID is unique within the NE and is equal.
二、 计算 IP接口, 确定本端网元与对端网元的匹配 IP接口。  2. Calculate the IP interface and determine the matching IP interface between the local NE and the peer NE.
1、在 IP集合 1中查找本端网元 VLAN接口计算结果 1对应的 IP接口, 查找原则为 IP接口的 ID与本端网元 VLAN接口计算结果 1中的 VLAN ID 相等; 如果存在, 则记录该 VLAN ID与 IP接口的对应, 如果不存在, 则 记录 VLAN ID与空值的对应关系, 此处称为对应关系 1; 2、 IP集合 2与 VLAN接口计算同步驟 D1 , 生成对应关系 2; 1. In IP set 1, look up the IP interface corresponding to the calculation result 1 of the local network element VLAN interface. The search principle is that the ID of the IP interface is equal to the VLAN ID in the calculation result 1 of the local network element VLAN interface. If it exists, record it. Correspondence between the VLAN ID and the IP interface. If it does not exist, the mapping between the VLAN ID and the null value is recorded. 2. The IP set 2 and the VLAN interface are calculated in the same step D1 to generate a corresponding relationship 2;
3、 遍历对应关系 1与对应关系 2 , 对相同的 VLAN ID对应的 IP接口 进行比较, 如果所有 VLAN ID对应的两个 IP接口都存在, 并且至少一对 IP接口的 IP地址在同一网段内,则不需要生成新的 IP接口;如果所有 VLAN ID对应的两个 IP接口都存在, 但是没有一对 IP接口的 IP地址在同一网段 内, 则需要重新为两端网元分配一个新的 VLAN接口, 作为本端网元与对 端网元的匹配 VLAN接口的计算结果, 并且在计算结果中标识出 VLAN接 口为新增;  3. Traverse the corresponding relationship 1 and the corresponding relationship 2, and compare the IP interfaces corresponding to the same VLAN ID. If all the IP interfaces corresponding to the VLAN IDs exist, and the IP addresses of at least one pair of IP interfaces are in the same network segment. You do not need to generate a new IP interface. If the IP addresses of all the VLAN IDs exist, but the IP addresses of the two IP interfaces are in the same network segment, you need to re-assign a new network to the NEs. The VLAN interface is used as the calculation result of the matching VLAN interface between the local NE and the peer NE. The VLAN interface is added to the calculation result.
4、 遍历对应关系 1与对应关系 2, 如果两个对应关系中的 IP接口都为 空, 则分配两个全网唯一、 同一网段的 IP地址, 并且此网段在这两端网元 上没有使用过;  4. Traverse the corresponding relationship 1 and the corresponding relationship 2. If the IP interfaces in the two corresponding relationships are all empty, allocate two IP addresses that are unique to the entire network and on the same network segment, and the network segment is on the NEs at both ends. Not used;
5、 遍历对应关系 1与对应关系 2, 如果存在相同 VLAN ID对应的 IP 接口中有一个为空值的情况, 则需要分配一个新的 IP接口, 并且标识为新 增, 对于新增 IP接口的 IP地址需要根据不为空的 IP地址计算。 如果此 IP 地址所在网段的 IP在对端网元没有进行过配置, 则分配一个全网唯一、 与 此 IP地址在同一网段 IP地址; 如果此 IP地址所在网段的 IP在对端网元已 经进行过配置, 则分配两个全网唯一、 同一网段的 IP地址, 并且此网段在 这两端网元上没有使用过。 根据上述步驟, 两个对应关系中一个 IP接口表 识为新增, 一个标识为^ ίι爹改。  5, traversing the corresponding relationship 1 and the corresponding relationship 2, if there is a null value in the IP interface corresponding to the same VLAN ID, then a new IP interface needs to be assigned, and the identifier is added, for the new IP interface The IP address needs to be calculated based on the IP address that is not empty. If the IP address of the network segment where the IP address is located is not configured on the peer network, the IP address of the network segment where the IP address is located is the same as the IP address of the network segment where the IP address is located. If the configuration has been configured, the two IP addresses of the same network segment are assigned to the entire network segment, and the network segment is not used on the NEs at both ends. According to the above steps, one of the two corresponding relationships is identified as a new one, and one identifier is ^ ίι tampering.
如图 3所示, 步驟 S103包括:  As shown in FIG. 3, step S103 includes:
步驟 S1031 , 基于第一 VLAN接口集合以及第二 VLAN接口集合计算 本端网元与对端网元的匹配 VLAN接口;  Step S1031: Calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set.
步驟 S1032,基于匹配 VLAN接口、第一 IP接口集合及第二 IP接口集 合计算本端网元与对端网元的匹配 IP接口。  Step S1032: Calculate a matching IP interface between the local network element and the remote network element based on the matching VLAN interface, the first IP interface set, and the second IP interface set.
如图 4所示, 步驟 S1031包括: 步驟 S 10311 ,分别查询第一 VLAN接口集合以及第二 VLAN接口集合; 步驟 S10312,若第一 VLAN接口集合与第二 VLAN接口集合其中之一 为空集, 则以不为空集的 VLAN接口集合作为本端网元与对端网元的匹配 VLAN接口; 若第一 VLAN接口集合与第二 VLAN接口集合均不为空集且 存在 VLAN接口交集, 则以 VLAN接口交集作为本端网元与对端网元的匹 配 VLAN接口; 否则分配一个新的 VLAN接口作为本端网元与对端网元的 匹配 VLAN接口。 As shown in FIG. 4, step S1031 includes: Step S10311: query the first VLAN interface set and the second VLAN interface set respectively; Step S10312: If one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set is not an empty set. As the matching VLAN interface between the local network element and the peer network element; if the first VLAN interface set and the second VLAN interface set are not empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as the local network element and the pair. The matching VLAN interface of the end network element; otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local NE and the peer NE.
其中 , 判断 VLAN接口交集的原则为: VLAN接口对应的 VLAN ID 相同; VLAN接口的分配原则为: VLAN ID在网元内唯一且相等。  The principle of determining the intersection of the VLAN interfaces is as follows: The VLAN IDs of the VLAN interfaces are the same. The VLAN interface assignment principle is as follows: The VLAN IDs are unique and equal in the NEs.
如图 5所示, 步驟 S1032包括:  As shown in FIG. 5, step S1032 includes:
步驟 S10321 , 分别在第一 IP接口集合及第二 IP接口集合中查询与匹 配 VLAN接口的 ID相同的 IP接口;  Step S10321: Query an IP interface with the same ID as the matching VLAN interface in the first IP interface set and the second IP interface set respectively.
步驟 S 10322 , 若第一 IP接口集合及第二 IP接口集合其中之一为空集, 且不为空集的 IP接口集合中的 IP接口在相应网元上没有使用过,则为空集 对应的网元分配一个与不为空集的 IP接口集合中的 IP接口地址处于相同网 段且全网唯一的 IP接口, 将不为空集的 IP接口集合及分配的 IP接口作为 本端网元与对端网元对应的匹配 IP接口; 若第一 IP接口集合及第二 IP接 口集合均不为空集, 且至少存在一对 IP接口的 IP地址在同一网段内, 则以 该至少一对 IP接口作为本端网元与对端网元对应的匹配 IP接口;否则分配 一对全网唯一且 IP地址处于同一网段的 IP接口作为本端网元与对端网元对 应的匹配 IP接口。  Step S10322: If one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element, the corresponding is an empty set. The network element allocates an IP interface that is in the same network segment as the IP interface address of the IP interface set that is not an empty set and is unique to the entire network. The IP interface set that is not an empty set and the assigned IP interface are used as the local network element. a matching IP interface corresponding to the peer network element; if the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have IP addresses in the same network segment, the at least one The IP interface is used as the matching IP interface corresponding to the local NE and the peer NE. Otherwise, an IP interface with the same network and the IP address on the same network segment is assigned as the matching IP address of the local NE and the peer NE. interface.
本实施例通过分别建立本端网元与对端网元的 VLAN接口集合以及 IP 接口集合,根据建立的 VLAN接口集合以及 IP接口集合自动计算本端网元 与对端网元传输数据所需的匹配 VLAN接口以及 IP接口, 网路庞大时, 避 免了手工配置极易出错、 IP沖突或者因为 VLAN和 IP不匹配造成业务不通 等问题, 保证了配置的准确性, 提高了配置效率。 In this embodiment, the VLAN interface set and the IP interface set of the local network element and the peer network element are separately established, and the data of the local network element and the peer network element are automatically calculated according to the established VLAN interface set and the IP interface set. Matching VLAN interfaces and IP interfaces. When the network is large, manual configuration is highly error-prone, IP conflicts, or VLANs and IPs do not match. Such problems ensure the accuracy of the configuration and improve the configuration efficiency.
如图 6所示, 本发明另一实施例提出一种计算网元接口的方法, 在上 述实施例的基础上, 在步驟 S101之前还包括:  As shown in FIG. 6, another embodiment of the present invention provides a method for calculating a network element interface. On the basis of the foregoing embodiment, before step S101, the method further includes:
步驟 S90, 以本端网元为查询条件, 通过查询数据库获取拓朴连接。 步驟 S100, 若拓朴连接为空, 则提示用户建立本端网元与对端网元之 间的物理连接。  Step S90: The local network element is used as a query condition, and the topology connection is obtained by querying the database. Step S100: If the topology connection is empty, the user is prompted to establish a physical connection between the local network element and the peer network element.
如上所述, 在计算网元接口之前, 网管需要同步网元数据, 确定本端 网元与对端网元间是否存在物理连接。 如果没有任何物理连接, 则提示用 户需要首先建立物理连接, 或者进行 LLDP链路自动发现。  As described above, before the network element interface is calculated, the network management system needs to synchronize the network element data to determine whether there is a physical connection between the local network element and the peer network element. If there is no physical connection, the user is prompted to establish a physical connection or perform automatic LLDP link discovery.
在本实施例中, 网管查询数据库, 以本端网元为查询条件, 获取拓朴 连接, 将其存入 TopoLinkList_T链表结构中。 如果获取的链接为空或者链 表结构长度为 0, 则提示用户需要建立网元间的光纤连接。  In this embodiment, the network management system queries the database, and obtains the topology connection by using the local network element as a query condition, and stores it in the TopoLinkList_T linked list structure. If the obtained link is empty or the length of the linked list structure is 0, the user is prompted to establish a fiber connection between the network elements.
下面以具体实例对本实施例的技术方案进行详细阐述:  The technical solution of this embodiment is described in detail below by using specific examples:
如图 7所示, 是三层交换网络中网元之间的连接示意图。 中间节点网 元取名为 NE1 , 与其相邻的三个网元即对端网元分别取名为 NE2、 NE3和 NE4。  As shown in Figure 7, it is a schematic diagram of connections between network elements in a Layer 3 switching network. The intermediate node NE is named NE1, and the neighboring NEs are named NE2, NE3, and NE4.
NE1与 NE2之间通过 Gei_l/9和 Gei_l/9相连, 其中 NE1的 Gei_l/9 划分在 Vlan2、 Vlan3中, Vlan2对应三层接口 ip2, IP地址为 10.1.1.5/24, Vlan3对应三层接口 ip3, IP地址为 10.1.2.5/24; NE2的 Gei_l/9划分在 Vlan2、 Vlan3中, Vlan2对应的三层接口 ip2, IP地址为 10.1.1.6/24, Vlan3对应的 三层接口 ip3, IP地址为 10.1.2.6/24。  NE1 and NE2 are connected to each other through Gei_l/9 and Gei_l/9. GEi_l/9 of NE1 is divided into Vlan2 and Vlan3, Vlan2 corresponds to Layer 3 interface ip2, IP address is 10.1.1.5/24, and Vlan3 corresponds to Layer 3 interface ip3. The IP address is 10.1.2.5/24; the Gei_l/9 of NE2 is divided into Vlan2 and Vlan3, the Layer 3 interface ip2 corresponding to Vlan2, the IP address is 10.1.1.6/24, and the Layer 3 interface ip3 corresponding to Vlan3, the IP address is 10.1.2.6/24.
NE1与 NE3之间通过 Gei_l/10和 Gei_l/10相连,其中 NE1的 Gei_l/10 划分在 Vlan4中, Vlan4对应三层接口 ip4, IP地址为 10.1.3.5/24; NE3的 Gd_l/10划分在 Vlan5中, Vlan5对应三层接口 ip5, IP地址为 10.1.4.6/24。  NE1 and NE3 are connected by Gei_l/10 and Gei_l/10. The Gei_l/10 of NE1 is divided into Vlan4, Vlan4 corresponds to the Layer 3 interface ip4, and the IP address is 10.1.3.5/24. The Gd_l/10 of NE3 is divided into Vlan5. Vlan5 corresponds to the Layer 3 interface ip5, and the IP address is 10.1.4.6/24.
NE1与 NE4之间通过 Gei_l/8和 Gei_l/8相连, 其中 NE1的 Gei_l/8 划分在 Vlan5、 Vlan6中, Vlan5对应三层接口 ip5 , IP地址为 10.1.4.5/24, Vlan6没有对应三层接口; NE4的 Gei_l/8划分在 Vlan5、 Vlan6中, Vlan5 对应三层接口 ip5 , IP地址为 10.1.8.6/24, Vlan6对应三层接口 ip6, IP地址 为 10.1.6.6/24。 NE1 and NE4 are connected by Gei_l/8 and Gei_l/8, where Gei_l/8 of NE1 It is divided into Vlan5 and Vlan6, Vlan5 corresponds to Layer 3 interface ip5, IP address is 10.1.4.5/24, Vlan6 does not correspond to Layer 3 interface; NE4's Gei_l/8 is divided into Vlan5 and Vlan6, and Vlan5 corresponds to Layer 3 interface ip5, IP The address is 10.1.8.6/24, Vlan6 corresponds to the Layer 3 interface ip6, and the IP address is 10.1.6.6/24.
以网元 NE1为本端网元, 网元 NE2、 NE3和 NE4为对端网元为例描述 网管自动计算网络中网元接口的步驟如下:  The NE is the local NE and the NEs NE2, NE3, and NE4 are the peer NEs. The procedure for automatically calculating the NE interface in the network is as follows:
一、 通过拓朴连接, 获取与本端网元具有物理连接的对端网元。 同时 获取本端网元的所有物理连接, 存入 TopoLinkList_T 链表结构, 遍历 TopoLinkList_T链表结构, 以其中一个元素 TopoLink_T为例, 进行如下处 理: 从 TopoLink_T结构中, 解析出本端物理端口 (命名 ortl ) 与对端的 物理端口(命名 port2 ), 将此作为查询条件, 查询出包含有本端物理端口和 对端物理端口的 VLAN接口 ,分别存入本端 VLAN接口 vlanListl链表结构 和对端 VLAN接口 vlanList2链表结构中。 另夕卜, 还需要从 TopoLink_T结 构中, 解析出本端网元和对端网元, 将此作为查询条件, 查询出本端网元 的 IP接口和对端网元的 IP接口, 分别存入本端 IP接口的 ipListl链表结构 和对端 IP接口的 ipList2链表结构中。  The peer network element that has a physical connection with the local network element is obtained through the topology connection. At the same time, all the physical connections of the local network element are obtained, and the TopoLinkList_T linked list structure is stored, and the TopoLinkList_T linked list structure is traversed. One of the elements TopoLink_T is taken as an example, and the following processing is performed: From the TopoLink_T structure, the local physical port (named ortl) is parsed The physical port of the peer (named port2) is used as the query condition to query the VLAN interface containing the physical port of the local end and the physical port of the remote end. The VLAN interface of the local VLAN interface is stored in the vlanList1 linked list structure and the peer VLAN interface vlanList2 linked list structure. in. In addition, the local network element and the peer network element are also parsed from the TopoLink_T structure, and the IP interface of the local network element and the IP interface of the remote network element are respectively queried. The ipListl linked list structure of the local IP interface and the ipList2 linked list structure of the peer IP interface.
二、 遍历 vlanListl和 vlanList2, 取两个集合的交集, 判断交集原则为 VLAN ID相同的元素, 如果不存在交集, 则分配一个新的 VLAN ID, 生成 一个新的 VLAN接口, 作为交集, 交集存放的数据结构为: 本端网元创建 的一个 mapl的 HashMap结构, 对端网元创建的一个 map2的 HashMap结 构, 将交集中属于 vlanListl 的元素作为 key存入 ma l , 将交集中属于 vlanList2的元素作为 key存入 map2。  2. Traverse vlanListl and vlanList2, take the intersection of the two sets, and judge the intersection principle as the element with the same VLAN ID. If there is no intersection, assign a new VLAN ID, and generate a new VLAN interface, as an intersection, intersection storage. The data structure is: a mapl HashMap structure created by the local network element, a map2 HashMap structure created by the peer network element, and the element belonging to the vlanListl in the intersection is stored as a key into the ma l , and the element belonging to the vlanList2 in the intersection is used as the element The key is stored in map2.
以图 7为例 , 通过 NE1与 NE2计算的物理连接, 计算出:  Taking Figure 7 as an example, through the physical connection between NE1 and NE2, calculate:
mapl中包含两个元素, keyl=nel/Vlan2, key2=ne lan3;  Mapl contains two elements, keyl=nel/Vlan2, key2=ne lan3;
map2中包含两个元素, keyl=ne2/Vlan2, key2=ne2/Vlan3; 通过 NE1与 NE3计算的物理连接, 计算出: Map2 contains two elements, keyl=ne2/Vlan2, key2=ne2/Vlan3; Through the physical connection between NE1 and NE3, calculate:
mapl中包含一个元素, keyl=nel/vlan7;  Mapl contains an element, keyl=nel/vlan7;
map2中包含一个元素, keyl=ne2/vlan7;  Map2 contains an element, keyl=ne2/vlan7;
通过 NE1与 NE4计算的物理连接, 计算出:  Through the physical connection calculated by NE1 and NE4, it is calculated:
mapl中包含两个元素, keyl=nel/Vlan5 , key2=ne lan6;  Mapl contains two elements, keyl=nel/Vlan5, key2=ne lan6;
map2中包含两个元素, keyl=ne2/Vlan5 , key2=ne2/Vlan6。  Map2 contains two elements, keyl=ne2/Vlan5 and key2=ne2/Vlan6.
三、 遍历 mapl中的 key, 在 ipListl中查询 VLAN ID与 IP ID相同的 元素, 如果存在, 作为 mapl的 value存储; 如果不存在, 则 value为空。 map2同 ma l的处理。  3. Traverse the key in mapl, and query the ipListl for the same element with the same VLAN ID and IP ID. If it exists, it is stored as the value of mapl. If it does not exist, the value is empty. Map2 is treated with ma l.
以图 7 为例, 经遍历后, 记录 NE1 与 NE2 的 mapl 包含元素为 keyl=nel/Vlan2, value l=nel/ip2 , key2=nel/Vlan3 , value2=nel/ip3 ; map2 包含元素 为 keyl=ne2/Vlan2 , value I=ne2/ip2 , key2=ne2/Vlan3 , value2=ne2/ip3;  Taking Figure 7 as an example, after traversing, the mapl containing elements of NE1 and NE2 are recorded as keyl=nel/Vlan2, value l=nel/ip2, key2=nel/Vlan3, value2=nel/ip3 ; map2 contains elements as keyl= Ne2/Vlan2 , value I=ne2/ip2 , key2=ne2/Vlan3 , value2=ne2/ip3;
记录 NE1与 NE3的 mapl包含元素为 keyl=nel/vlan7, valuel=空, map2 包含元素为 keyl=ne2/vlan7, vlauel=空;  Record map1 contains NE1 and NE3 elements are keyl=nel/vlan7, valuel=empty, map2 contains elements as keyl=ne2/vlan7, vlauel=empty;
记录 NE1与 NE4的 mapl包含元素为 key 1 =nel/Vlan5 , value l=nel/ip5 , key2=nel/Vlan6 , value2=空 , map2 包含元素为 keyl=ne2/Vlan5 , vlauel=ne2/ip5 , key2=ne2/Vlan6 , value=ne2/ip6。  Record the mapl containing elements of NE1 and NE4 as key 1 = nel / Vlan5 , value l = nel / ip5 , key2 = nel / Vlan6 , value2 = empty , map2 contains elements as keyl = ne2 / Vlan5 , vlauel = ne2 / ip5 , key2 =ne2/Vlan6 , value=ne2/ip6.
四、遍历 mapl与 map2,如果 mapl与 map2中 key相同的情况下, value 都不为空,并且 IP地址在同一网段内,则进行下个 key值的比较;如果 value 都为空, 则分配两个同一网段的且唯一的两个网元内都未使用过的网段内 的 IP地址,补全 value;相同 key情况下,如果 mapl中的 value为空, map2 中的 vlaue不为空, 则校验 mapl的 value的 ip在 ne2中是否已经有相同网 段 ip的使用,如果没有使用则为 map2的 value分配一个与 mapl中的 value 相同网段的且全网唯一的 IP地址; 相同 key情况下, 如果 mapl中的 vlaue 与 map2中的 value都不为空,但是 IP地址不在同一网段内, 则需要分配两 个同一网段的且唯一的两个网元内都未使用过的网段内的 IP地址, 替换 ma l中 value和 map2中 value的 IP地址。 Fourth, traversing mapl and map2, if map1 and map2 have the same key, the value is not empty, and the IP address is in the same network segment, then the next key value is compared; if the value is empty, then the allocation The IP addresses in the network segments that are not used in the two network elements of the same network segment and the only two network elements are used to complete the value. If the value in mapl is empty, the vlaue in map2 is not empty. Then, verify that the value ip of mapl has the same network segment ip in ne2, if not used, assign a value of map2 to the same network segment as the value in mapl and the unique IP address of the whole network; Key case, if vlaue in mapl If the value in the map2 is not empty, but the IP address is not in the same network segment, you need to allocate two IP addresses in the network segment that are not used in the two network elements of the same network segment. l The value and the IP address of the value in map2.
以图 7为例, NE1与 NE2: ma l中的 mapl包含元素为, keyl=nel/Vlan2, valuel=nel/ip2:10.1.1.5/24 , key2=nel/Vlan3 , value2=nel/ip3 :10.1.2.5/24; map2 包 含元 素 为 keyl=ne2/Vlan2 , value 1 =ne2/ip2: 10.1.1.6/24 , key2=ne2/Vlan3, value2=ne2/i 3: 10.1.2.6/24 , 其中两个集合中的 IP地址都 不需要补全和更新;  Taking Figure 7 as an example, the mapl elements in NE1 and NE2: ma l contain elements: keyl=nel/Vlan2, valuel=nel/ip2:10.1.1.5/24, key2=nel/Vlan3, value2=nel/ip3 :10.1 .2.5/24; map2 contains elements for keyl=ne2/Vlan2, value 1 =ne2/ip2: 10.1.1.6/24 , key2=ne2/Vlan3, value2=ne2/i 3: 10.1.2.6/24 , two of them The IP addresses in the collection do not need to be completed and updated;
NE1与 NE3: ma l包含元素为 keyl=nel/vlan7, valuel=空, map2包 含元素为 key 1 =ne2/vlan7 , vlaue 1 =空, map 1中元素更新为 key 1 =ne 1 /vlan7 , valuel=nel/ip2:10.1.7.5/24, map2 中元素更新为 keyl=ne2/vlan7 , value 1= ne2/ip2: 10.1.7.6/24;  NE1 and NE3: ma l contains elements key1=nel/vlan7, valuel=empty, map2 contains elements as key 1 =ne2/vlan7, vlaue 1 = empty, elements in map 1 are updated to key 1 =ne 1 /vlan7 , valuel =nel/ip2:10.1.7.5/24, the elements in map2 are updated to keyl=ne2/vlan7, value 1= ne2/ip2: 10.1.7.6/24;
NE1 与 NE4 : ma l 包 含 元 素 为 keyl=nel/Vlan5 , valuel=nel/ip5:10.1.5.5/24, key2=nel/Vlan6 , value2= nel/ip6:10.1.6.5/24, map2 包 含元 素 为 keyl=ne2/Vlan5 , vlaue 1 =ne2/ip5 :10.1.5.6/24 , key2=ne2/Vlan6,value=ne2/ip6: 10.1.6.6/24。  NE1 and NE4: ma l include elements as keyl=nel/Vlan5, valuel=nel/ip5:10.1.5.5/24, key2=nel/Vlan6, value2= nel/ip6:10.1.6.5/24, map2 contains elements as keyl =ne2/Vlan5 , vlaue 1 =ne2/ip5 :10.1.5.6/24 , key2=ne2/Vlan6, value=ne2/ip6: 10.1.6.6/24.
到此, 所有计算步驟结束。 根据上述的计算结果, 在本端网元与对端 网元的 UNI侧端口之间可以进行业务传送。  At this point, all calculation steps are completed. According to the calculation result, traffic can be transmitted between the local NE and the UNI port of the peer NE.
从上述计算过程可以看出, 本实施例计算所需的输入数据简单, 自动 计算网元接口前, 只需网管从网元上同步正确的接口数据, 建立正确的光 纤连接即可。 使用本实施例中网元接口自动计算的功能可以避免人工配置 出错, 保证配置的准确性, 同时提高了配置效率。  It can be seen from the above calculation process that the input data required for the calculation in this embodiment is simple. Before the network element interface is automatically calculated, the network management system only needs to synchronize the correct interface data on the network element to establish a correct optical fiber connection. The function automatically calculated by the network element interface in this embodiment can avoid manual configuration errors, ensure the accuracy of configuration, and improve configuration efficiency.
如图 8所示, 本发明一实施例提出一种计算网元接口的网管, 包括: 获取模块 801、 建立模块 802以及计算模块 803 , 其中:  As shown in FIG. 8, an embodiment of the present invention provides a network management system for computing a network element interface, including: an obtaining module 801, an establishing module 802, and a computing module 803, where:
获取模块 801 ,用于通过拓朴连接获取与本端网元具有物理连接的对端 网元; The obtaining module 801 is configured to obtain, by using a topology connection, a peer that has a physical connection with the local network element. Network element
建立模块 802, 用于分别建立本端网元的第一 VLAN接口集合、 第一 IP接口集合以及对端网元的第二 VLAN接口集合、 第二 IP接口集合; 计算模块 803, 用于基于第一 VLAN接口集合、 第一 IP接口集合、 第 二 VLAN接口集合以及第二 IP接口集合计算本端网元与对端网元的匹配 VLAN接口及匹配 IP接口。  The establishing module 802 is configured to respectively establish a first VLAN interface set of the local network element, a first IP interface set, and a second VLAN interface set of the peer network element, and a second IP interface set; A VLAN interface set, a first IP interface set, a second VLAN interface set, and a second IP interface set are used to calculate a matching VLAN interface and a matching IP interface between the local network element and the peer network element.
在计算网元接口之前, 网管需要同步网元数据, 确定本端网元与对端 网元间是否存在物理连接。 如果没有任何物理连接, 则提示用户需要首先 建立物理连接, 或者进行 LLDP链路自动发现。  Before calculating the NE interface, the NMS needs to synchronize the NE data to determine whether there is a physical connection between the local NE and the peer NE. If there is no physical connection, the user is prompted to establish a physical connection or automatically discover the LLDP link.
在本实施例中, 本端网元与对端网元已经建立了相应的物理连接。 同 时通过拓朴连接, 获取与本端网元建立物理连接的所有对端网元。  In this embodiment, the local network element and the peer network element have established corresponding physical connections. At the same time, all the peer NEs that establish physical connections with the local NE are obtained through the topology connection.
网管查询聚合有本端网元需要配置接口的物理端口的所有 VLAN接口 及所有 IP接口, 形成 VLAN集合 1 及 IP集合 1 , 即建立本端网元的第一 VLAN接口集合和第一 IP接口集合; 同时查询聚合有对端网元需要配置接 口的物理端口的所有 VLAN接口及所有 IP接口, 形成 VLAN集合 2及形 成 IP集合 2 , 即建立对端网元的第二 VLAN接口集合和第二 IP接口集合。  The network management query aggregates all VLAN interfaces and all IP interfaces of the physical port of the interface that need to be configured with the local NE. The VLAN set 1 and IP set 1 are formed, that is, the first VLAN interface set and the first IP interface set of the local NE are established. At the same time, query all the VLAN interfaces and all IP interfaces of the physical port that need to be configured with the peer NE to form the VLAN set 2 and form the IP set 2, that is, establish the second VLAN interface set and the second IP of the peer network element. Interface collection.
首先根据第一 VLAN接口集合及第二 VLAN接口集合计算本端网元与 对端网元的匹配 VLAN接口, 然后, 根据计算出的匹配 VLAN接口计算并 结合第一 IP接口集合及第二 IP接口集合计算本端网元与对端网元的匹配 IP 接口。  First, the matching VLAN interface between the local network element and the remote network element is calculated according to the first VLAN interface set and the second VLAN interface set, and then the first IP interface set and the second IP interface are calculated and combined according to the calculated matching VLAN interface. The set calculates the matching IP interface between the local NE and the peer NE.
具体包括以下过程:  Specifically includes the following process:
一、 计算 VLAN接口, 确定本端网元 VLAN接口计算结果 1 (即本端 网元的匹配 VLAN接口 )和对端网元的 VLAN接口计算结果 2 (即对端网 元的匹配 VLAN接口)。  1. Calculate the VLAN interface and determine the calculation result of the VLAN interface of the local NE (that is, the matching VLAN interface of the local NE) and the VLAN interface calculation result of the peer NE (that is, the matching VLAN interface of the peer NE).
1、 如果 VLAN集合 1中的元素为空, VLAN集合 2中元素不为空, 则 以 VLAN集合 2中 VLAN为标准, 为本端网元分配相同的 VLAN接口,作 为本端网元的 VLAN接口计算结果 1 , 并将新增的 VLAN接口在 VLAN接 口计算结果 1中标识出。 VLAN集合 2作为对端网元的 VLAN接口计算结 果 2。 反之处理相同; 1. If the element in VLAN Set 1 is empty, the element in VLAN Set 2 is not empty, then The VLAN ID of VLAN 2 is used as the standard. The same VLAN interface is assigned to the local NE. The VLAN interface calculation result of the local NE is 1 and the newly added VLAN interface is identified in the VLAN interface calculation result 1. VLAN set 2 is used as the VLAN interface calculation result of the peer NE. Otherwise the same treatment;
2、 如果 VLAN集合 1、 VLAN集合 2存在交集, 则计算两者的交集, 判断交集的原则为 VLAN接口对应的 VLAN ID相同, 记录下 VLAN接口 交集作为本端网元与对端网元的匹配 VLAN接口的计算结果;  2. If there is an intersection between VLAN Set 1 and VLAN Set 2, calculate the intersection of the two. The principle of the intersection is that the VLAN IDs of the VLAN interfaces are the same. Record the intersection of VLAN interfaces as the match between the local NE and the peer NE. The calculation result of the VLAN interface;
3、 如果 VLAN集合 1、 VLAN集合 2不存在交集, 则为两端网元分配 一个新的 VLAN接口, 作为本端网元与对端网元的匹配 VLAN接口的计算 结果,并且在计算结果中标识出 VLAN接口为新增,上述分配原则为 VLAN ID在网元内唯一, 并且相等。  3. If there is no intersection between VLAN set 1 and VLAN set 2, a new VLAN interface is assigned to the two NEs as the matching result of the matching VLAN interface between the local NE and the peer NE, and in the calculation result. The VLAN interface is added. The above-mentioned allocation principle is that the VLAN ID is unique within the NE and is equal.
二、 计算 IP接口, 确定本端网元与对端网元的匹配 IP接口。  2. Calculate the IP interface and determine the matching IP interface between the local NE and the peer NE.
1、在 IP集合 1中查找本端网元 VLAN接口计算结果 1对应的 IP接口, 查找原则为 IP接口的 ID与本端网元 VLAN接口计算结果 1中的 VLAN ID 相等; 如果存在, 则记录该 VLAN ID与 IP接口的对应, 如果不存在, 则 记录 VLAN ID与空值的对应关系, 此处称为对应关系 1;  1. In IP set 1, look up the IP interface corresponding to the calculation result 1 of the local network element VLAN interface. The search principle is that the ID of the IP interface is equal to the VLAN ID in the calculation result 1 of the local network element VLAN interface. If it exists, record it. Correspondence between the VLAN ID and the IP interface. If it does not exist, the mapping between the VLAN ID and the null value is recorded.
2、 IP集合 2与 VLAN接口计算同步驟 D1 , 生成对应关系 2;  2. The IP set 2 and the VLAN interface are calculated in the same step D1 to generate a correspondence 2;
3、 遍历对应关系 1与对应关系 2 , 对相同的 VLAN ID对应的 IP接口 进行比较, 如果所有 VLAN ID对应的两个 IP接口都存在, 并且至少一对 IP接口的 IP地址在同一网段内,则不需要生成新的 IP接口;如果所有 VLAN ID对应的两个 IP接口都存在, 但是没有一对 IP接口的 IP地址在同一网段 内, 则需要重新为两端网元分配一个新的 VLAN接口, 作为本端网元与对 端网元的匹配 VLAN接口的计算结果, 并且在计算结果中标识出 VLAN接 口为新增;  3. Traverse the corresponding relationship 1 and the corresponding relationship 2, and compare the IP interfaces corresponding to the same VLAN ID. If all the IP interfaces corresponding to the VLAN IDs exist, and the IP addresses of at least one pair of IP interfaces are in the same network segment. You do not need to generate a new IP interface. If the IP addresses of all the VLAN IDs exist, but the IP addresses of the two IP interfaces are in the same network segment, you need to re-assign a new network to the NEs. The VLAN interface is used as the calculation result of the matching VLAN interface between the local NE and the peer NE. The VLAN interface is added to the calculation result.
4、 遍历对应关系 1与对应关系 2, 如果两个对应关系中的 IP接口都为 空, 则分配两个全网唯一、 同一网段的 IP地址, 并且此网段在这两端网元 上没有使用过; 4. Traverse the correspondence 1 and the correspondence 2, if the IP interfaces in the two correspondences are If it is empty, it allocates two IP addresses unique to the entire network and the same network segment, and this network segment has not been used on the NEs at both ends;
5、 遍历对应关系 1与对应关系 2, 如果存在相同 VLAN ID对应的 IP 接口中有一个为空值的情况, 则需要分配一个新的 IP接口, 并且标识为新 增, 对于新增 IP接口的 IP地址需要根据不为空的 IP地址计算。 如果此 IP 地址所在网段的 IP在对端网元没有进行过配置, 则分配一个全网唯一、 与 此 IP地址在同一网段 IP地址; 如果此 IP地址所在网段的 IP在对端网元已 经进行过配置, 则分配两个全网唯一、 同一网段的 IP地址, 并且此网段在 这两端网元上没有使用过。 根据上述步驟, 两个对应关系中一个 IP接口表 识为新增, 一个标识为^ ίι爹改。  5, traversing the corresponding relationship 1 and the corresponding relationship 2, if there is a null value in the IP interface corresponding to the same VLAN ID, then a new IP interface needs to be assigned, and the identifier is added, for the new IP interface The IP address needs to be calculated based on the IP address that is not empty. If the IP address of the network segment where the IP address is located is not configured on the peer network, the IP address of the network segment where the IP address is located is the same as the IP address of the network segment where the IP address is located. If the configuration has been configured, the two IP addresses of the same network segment are assigned to the entire network segment, and the network segment is not used on the NEs at both ends. According to the above steps, one of the two corresponding relationships is identified as a new one, and one identifier is ^ ίι tampering.
如图 9所示, 计算模块 803包括: VLAN接口计算单元 8031 及 IP接 口计算单元 8032, 其中:  As shown in FIG. 9, the calculation module 803 includes: a VLAN interface calculation unit 8031 and an IP interface calculation unit 8032, where:
VLAN接口计算单元 8031 , 用于基于第一 VLAN接口集合以及第二 VLAN接口集合计算所述本端网元与对端网元的匹配 VLAN接口;  The VLAN interface calculation unit 8031 is configured to calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set.
IP接口计算单元 8032, 用于基于所述匹配 VLAN接口、 第一 IP接口 集合及第二 IP接口集合计算所述本端网元与对端网元的匹配 IP接口。  The IP interface calculation unit 8032 is configured to calculate a matching IP interface between the local network element and the remote network element based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
如图 10所示, VLAN接口计算单元 8031包括: 第一查询子单元 80311 以及第一计算子单元 80312, 其中:  As shown in FIG. 10, the VLAN interface calculation unit 8031 includes: a first query subunit 80311 and a first calculation subunit 80312, where:
第一查询子单元 80311 , 用于分别查询第一 VLAN接口集合以及第二 VLAN接口集合;  The first query subunit 80311 is configured to separately query the first VLAN interface set and the second VLAN interface set;
第一计算子单元 80312, 用于当第一 VLAN接口集合与第二 VLAN接 口集合其中之一为空集时, 以不为空集的 VLAN接口集合作为本端网元与 对端网元的匹配 VLAN接口;当第一 VLAN接口集合与第二 VLAN接口集 合均不为空集且存在 VLAN接口交集时, 以 VLAN接口交集作为本端网元 与对端网元的匹配 VLAN接口; 否则分配一个新的 VLAN接口作为本端网 元与对端网元的匹配 VLAN接口。 The first calculating sub-unit 80312 is configured to: when the one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as a match between the local network element and the remote network element. VLAN interface. When the first VLAN interface set and the second VLAN interface set are both empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as the matching VLAN interface between the local NE and the peer NE; otherwise, a new interface is assigned. VLAN interface as the local network The matching VLAN interface between the meta and the peer NE.
如图 11所示, IP接口计算单元 8032包括: 第二查询子单元 80321以 及第二计算子单元 80322, 其中:  As shown in FIG. 11, the IP interface computing unit 8032 includes: a second query subunit 80321 and a second computing subunit 80322, where:
第二查询子单元 80321 , 用于分别在第一 IP接口集合及第二 IP接口集 合中查询与所述匹配 VLAN接口的 ID相同的 IP接口;  The second query sub-unit 80321 is configured to query, in the first IP interface set and the second IP interface set, an IP interface that is the same as the ID of the matching VLAN interface, respectively.
第二计算子单元 80322, 用于当第一 IP接口集合及第二 IP接口集合其 中之一为空集,且不为空集的 IP接口集合中的 IP接口在相应网元上没有使 用过时, 为空集对应的网元分配一个与所述不为空集的 IP接口集合中的 IP 接口地址处于相同网段且全网唯一的 IP接口,将不为空集的 IP接口集合及 分配的 IP接口作为本端网元与对端网元对应的匹配 IP接口;当所述第一 IP 接口集合及第二 IP接口集合均不为空集, 且至少存在一对 IP接口的 IP地 址在同一网段内时, 以该至少一^ IP接口作为本端网元与^端网元^应的 匹配 IP接口; 否则分配一对全网唯一且 IP地址处于同一网段的 IP接口作 为本端网元与对端网元对应的匹配 IP接口。  a second calculating sub-unit 80322, configured to: when one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element, Assigning an IP interface corresponding to the IP interface address of the IP interface set that is not an empty set to the IP address of the IP interface set that is not an empty set and unique to the entire network, the IP interface set and the assigned IP address that are not empty sets The interface is a matching IP interface corresponding to the local network element and the peer network element; when the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have IP addresses in the same network. In the segment, the at least one IP interface is used as the matching IP interface between the local network element and the ^ end network element; otherwise, an IP interface with the entire network and the IP address in the same network segment is allocated as the local network element. A matching IP interface corresponding to the peer network element.
如图 12所示, 本发明另一实施例提出一种计算网元接口的网管, 在上 述实施例的基础上, 还包括:  As shown in FIG. 12, another embodiment of the present invention provides a network management system for calculating a network element interface. Based on the foregoing embodiments, the method further includes:
查询获取模块 790, 用于以本端网元为查询条件,通过查询数据库获取 拓朴连接。  The query obtaining module 790 is configured to obtain a topology connection by querying the database by using the local network element as a query condition.
提示模块 800, 用于当拓朴连接为空时,提示用户建立本端网元与对端 网元之间的物理连接。  The prompting module 800 is configured to prompt the user to establish a physical connection between the local network element and the peer network element when the topology connection is empty.
如上所述, 在计算网元接口之前, 网管需要同步网元数据, 确定本端 网元与对端网元间是否存在物理连接。 如果没有任何物理连接, 则提示用 户需要首先建立物理连接, 或者进行 LLDP链路自动发现。  As described above, before the network element interface is calculated, the network management system needs to synchronize the network element data to determine whether there is a physical connection between the local network element and the peer network element. If there is no physical connection, the user is prompted to establish a physical connection or perform automatic LLDP link discovery.
在本实施例中, 网管查询数据库, 以本端网元为查询条件, 获取拓朴 连接, 将其存入 TopoLinkList_T链表结构中。 如果获取的链接为空或者链 表结构长度为 0, 则提示用户需要建立网元间的光纤连接。 In this embodiment, the network management system queries the database, and obtains the topology connection by using the local network element as a query condition, and stores it in the TopoLinkList_T linked list structure. If the obtained link is empty or chain If the length of the table structure is 0, the user is prompted to establish a fiber connection between the network elements.
本发明实施例计算网元接口的方法及网管, 通过分别建立本端网元与 对端网元的 VLAN接口集合以及 IP接口集合 , 根据建立的 VLAN接口集 合以及 IP接口集合自动计算本端网元与对端网元传输数据所需的匹配 VLAN接口以及 IP接口, 网路庞大时, 避免了手工配置极易出错、 IP沖突 或者因为 VLAN和 IP不匹配造成业务不通等问题, 保证了配置的准确性, 提高了配置效率。  The method for calculating a network element interface and the network management system in the embodiment of the present invention, respectively, respectively, establishing a VLAN interface set and an IP interface set of the local network element and the peer network element, and automatically calculating the local network element according to the established VLAN interface set and the IP interface set. The matching VLAN interface and the IP interface required to transmit data with the peer network element. When the network is large, the manual configuration is highly error-prone, IP conflicts, or services such as VLANs and IP mismatches are not available, ensuring accurate configuration. Sexuality improves configuration efficiency.
以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围 , 凡是利用本发明说明书及附图内容所作的等效结构或流程变换, 或直接或 间接运用在其它相关的技术领域, 均同理包括在本发明的专利保护范围内。  The above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and equivalent structural or process changes made by the present specification and drawings may be directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims

权利要求书 Claim
1、 一种计算网元接口的方法, 其特征在于, 所述方法包括: 通过拓朴连接获取与本端网元具有物理连接的对端网元;  A method for computing a network element interface, the method comprising: obtaining, by using a topology connection, a peer network element having a physical connection with a local network element;
分别建立本端网元的第一虚拟局域网 VLAN接口集合、 第一因特网互 联协议 IP接口集合以及对端网元的第二 VLAN接口集合、 第二 IP接口集 合;  Establishing a first virtual local area network VLAN interface set of the local network element, a first Internet interconnection protocol IP interface set, and a second VLAN interface set and a second IP interface set of the opposite end network element respectively;
基于所述第一 VLAN接口集合、 第一 IP接口集合、 第二 VLAN接口 集合以及第二 IP接口集合计算所述本端网元与对端网元的匹配 VLAN接口 及匹配 IP接口。  The matching VLAN interface and the matching IP interface of the local network element and the opposite network element are calculated based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set.
2、 根据权利要求 1所述的方法, 其特征在于, 所述基于第一 VLAN接 口集合、 第一 IP接口集合、 第二 VLAN接口集合以及第二 IP接口集合计 算所述本端网元与对端网元的匹配 VLAN接口及匹配 IP接口, 包括: 基于第一 VLAN接口集合以及第二 VLAN接口集合计算所述本端网元 与对端网元的匹配 VLAN接口;  The method according to claim 1, wherein the calculating the local network element and the pair based on the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set The matching VLAN interface of the end network element and the matching IP interface include: calculating a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set;
基于所述匹配 VLAN接口、 第一 IP接口集合及第二 IP接口集合计算 所述本端网元与对端网元的匹配 IP接口。  The matching IP interface between the local network element and the remote network element is calculated based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
3、 根据权利要求 2所述的方法, 其特征在于, 所述基于第一 VLAN接 口集合以及第二 VLAN 接口集合计算所述本端网元与对端网元的匹配 VLAN接口, 包括:  The method according to claim 2, wherein the calculating the matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set includes:
分别查询所述第一 VLAN接口集合以及第二 VLAN接口集合; 若所述第一 VLAN接口集合与第二 VLAN接口集合其中之一为空集, 则以不为空集的 VLAN接口集合作为本端网元与对端网元的匹配 VLAN接 口;  Querying the first VLAN interface set and the second VLAN interface set respectively; if one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as the local end A matching VLAN interface between the NE and the peer NE;
若所述第一 VLAN接口集合与第二 VLAN接口集合均不为空集且存在 VLAN接口交集, 则以所述 VLAN接口交集作为本端网元与对端网元的匹 配 VLAN接口; If the first VLAN interface set and the second VLAN interface set are not empty sets and the VLAN interface intersection exists, the intersection of the VLAN interface is used as the match between the local network element and the remote network element. With a VLAN interface;
否则, 分配一个新的 VLAN接口作为本端网元与对端网元的匹配 VLAN接口。  Otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local NE and the peer NE.
4、 根据权利要求 3所述的方法, 其特征在于, 判断所述 VLAN接口交 集的原则为: VLAN接口对应的 VLAN ID相同; 所述 VLAN接口的分配原 则为: VLAN ID在网元内唯一且相等。  The method according to claim 3, wherein the principle of determining the intersection of the VLAN interfaces is as follows: the VLAN IDs of the VLAN interfaces are the same; the VLAN interface is allocated according to the principle that: the VLAN ID is unique within the network element. equal.
5、 根据权利要求 3所述的方法, 其特征在于, 所述基于匹配 VLAN接 口、第一 IP接口集合及第二 IP接口集合计算所述本端网元与对端网元的匹 配 IP接口, 包括:  The method according to claim 3, wherein the matching IP interface between the local network element and the remote network element is calculated based on the matching VLAN interface, the first IP interface set, and the second IP interface set, Includes:
分别在第一 IP接口集合及第二 IP接口集合中查询与所述匹配 VLAN 接口的 ID相同的 IP接口;  Querying, in the first IP interface set and the second IP interface set, the same IP interface as the matching VLAN interface ID;
若所述第一 IP接口集合及第二 IP接口集合其中之一为空集,且不为空 集的 IP接口集合中的 IP接口在相应网元上没有使用过,则为空集对应的网 元分配一个与所述不为空集的 IP接口集合中的 IP接口地址处于相同网段且 全网唯一的 IP接口, 将不为空集的 IP接口集合及分配的 IP接口作为本端 网元与对端网元对应的匹配 IP接口;  If the first IP interface set and the second IP interface set are empty sets, and the IP interfaces in the IP interface set that are not empty sets are not used on the corresponding network element, the network corresponding to the empty set is An IP interface that is in the same network segment as the IP interface address of the IP interface set that is not an empty set and that is unique to the entire network, and the IP interface set that is not an empty set and the assigned IP interface are used as the local network element. a matching IP interface corresponding to the peer network element;
若所述第一 IP接口集合及第二 IP接口集合均不为空集,且至少存在一 对 IP接口的 IP地址在同一网段内, 则以该至少一对 IP接口作为本端网元 与对端网元对应的匹配 IP接口;  If the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have IP addresses in the same network segment, the at least one pair of IP interfaces is used as the local network element and The matching IP interface corresponding to the peer network element;
否则,分配一对全网唯一且 IP地址处于同一网段的 IP接口作为本端网 元与对端网元对应的匹配 IP接口。  Otherwise, an IP interface that is unique to the entire network and whose IP address is on the same network segment is assigned as the matching IP interface corresponding to the local NE and the peer NE.
6、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述通过拓 朴连接获取与本端网元具有物理连接的对端网元之前, 所述方法还包括: 以本端网元为查询条件, 通过查询数据库获取所述拓朴连接; 若所述拓朴连接为空, 则提示用户建立本端网元与对端网元之间的物 理连接。 The method according to any one of claims 1 to 5, wherein before the obtaining a peer network element having a physical connection with the local network element by using the topology connection, the method further includes: The end network element is a query condition, and the topology connection is obtained by querying the database. If the topology connection is empty, the user is prompted to establish a relationship between the local network element and the peer network element. Connected.
7、 一种计算网元接口的网管, 其特征在于, 所述网管包括: 获取模块, 用于通过拓朴连接获取与本端网元具有物理连接的对端网 元;  A network management system for computing a network element interface, wherein the network management system includes: an obtaining module, configured to acquire, by using a topology connection, a peer network element that has a physical connection with the local network element;
建立模块, 用于分别建立本端网元的第一 VLAN接口集合、 第一 IP接 口集合以及对端网元的第二 VLAN接口集合、 第二 IP接口集合;  Establishing a module, configured to respectively establish a first VLAN interface set of the local network element, a first IP interface set, and a second VLAN interface set and a second IP interface set of the peer network element;
计算模块, 用于基于所述第一 VLAN接口集合、 第一 IP接口集合、 第 二 VLAN接口集合以及第二 IP接口集合计算所述本端网元与对端网元的匹 配 VLAN接口及匹配 IP接口。  a calculation module, configured to calculate, according to the first VLAN interface set, the first IP interface set, the second VLAN interface set, and the second IP interface set, the matching VLAN interface and the matching IP address of the local network element and the peer network element interface.
8、 根据权利要求 7所述的网管, 其特征在于, 所述计算模块包括: The network management system according to claim 7, wherein the calculation module comprises:
VLAN接口计算单元, 用于基于第一 VLAN接口集合以及第二 VLAN 接口集合计算所述本端网元与对端网元的匹配 VLAN接口; a VLAN interface calculation unit, configured to calculate a matching VLAN interface between the local network element and the remote network element based on the first VLAN interface set and the second VLAN interface set;
IP接口计算单元, 用于基于所述匹配 VLAN接口、第一 IP接口集合及 第二 IP接口集合计算所述本端网元与对端网元的匹配 IP接口。  The IP interface calculation unit is configured to calculate a matching IP interface between the local network element and the remote network element based on the matched VLAN interface, the first IP interface set, and the second IP interface set.
9、 根据权利要求 8所述的网管, 其特征在于, 所述 VLAN接口计算单 元包括:  The network management system according to claim 8, wherein the VLAN interface calculation unit comprises:
第一查询子单元, 用于分别查询所述第一 VLAN接口集合以及第二 VLAN接口集合;  a first query subunit, configured to separately query the first VLAN interface set and the second VLAN interface set;
第一计算子单元, 用于当所述第一 VLAN接口集合与第二 VLAN接口 集合其中之一为空集时, 以不为空集的 VLAN接口集合作为本端网元与对 端网元的匹配 VLAN接口;当所述第一 VLAN接口集合与第二 VLAN接口 集合均不为空集且存在 VLAN接口交集时, 以所述 VLAN接口交集作为本 端网元与对端网元的匹配 VLAN接口; 否则, 分配一个新的 VLAN接口作 为本端网元与对端网元的匹配 VLAN接口。  a first computing subunit, configured to: when the one of the first VLAN interface set and the second VLAN interface set is an empty set, the VLAN interface set that is not an empty set is used as the local network element and the peer network element. Matching the VLAN interface; when the first VLAN interface set and the second VLAN interface set are not empty sets and there is a VLAN interface intersection, the VLAN interface intersection is used as a matching VLAN interface between the local network element and the remote network element. Otherwise, a new VLAN interface is assigned as the matching VLAN interface between the local NE and the peer NE.
10、 根据权利要求 8所述的网管, 其特征在于, 所述 IP接口计算单元 包括: 10. The network management system according to claim 8, wherein the IP interface computing unit Includes:
第二查询子单元,用于分别在第一 IP接口集合及第二 IP接口集合中查 询与所述匹配 VLAN接口的 ID相同的 IP接口;  a second query subunit, configured to query, in the first IP interface set and the second IP interface set, an IP interface that is the same as the ID of the matching VLAN interface;
第二计算子单元,用于当所述第一 IP接口集合及第二 IP接口集合其中 之一为空集,且不为空集的 IP接口集合中的 IP接口在相应网元上没有使用 过时,为空集对应的网元分配一个与所述不为空集的 IP接口集合中的 IP接 口地址处于相同网段且全网唯一的 IP接口,将不为空集的 IP接口集合及分 配的 IP接口作为本端网元与对端网元对应的匹配 IP接口; 当所述第一 IP 接口集合及第二 IP接口集合均不为空集, 且至少存在一对 IP接口的 IP地 址在同一网段内时, 以该至少一^ IP接口作为本端网元与^端网元^应的 匹配 IP接口; 否则 , 分配一对全网唯一且 IP地址处于同一网段的 IP接口 作为本端网元与对端网元对应的匹配 IP接口。  a second calculating subunit, configured to: when one of the first IP interface set and the second IP interface set is an empty set, and the IP interface in the IP interface set that is not an empty set is not used on the corresponding network element Assigning, to the network element corresponding to the empty set, an IP interface that is in the same network segment as the IP interface address in the IP interface set that is not an empty set and is unique to the entire network, and is not an empty set IP interface set and allocated. The IP interface is the matching IP interface corresponding to the local network element and the peer network element; when the first IP interface set and the second IP interface set are not empty sets, and at least one pair of IP interfaces have the same IP address. In the network segment, the at least one IP interface is used as the matching IP interface between the local network element and the ^ end network element; otherwise, an IP interface with a unique network and the IP address in the same network segment is allocated as the local end. The matching IP interface corresponding to the NE and the peer NE.
11、 根据权利要求 7至 10任一项所述的网管, 其特征在于, 所述网管 还包括:  The network management system according to any one of claims 7 to 10, wherein the network management system further comprises:
查询获取模块, 用于以本端网元为查询条件, 通过查询数据库获取所 述拓朴连接;  The query obtaining module is configured to obtain the topology connection by querying the database by using the local network element as a query condition;
提示模块, 用于当所述拓朴连接为空时, 提示用户建立本端网元与对 端网元之间的物理连接。  The prompting module is configured to prompt the user to establish a physical connection between the local network element and the remote network element when the topology connection is empty.
PCT/CN2011/080054 2011-05-19 2011-09-22 Method and network management for calculating network element interfaces WO2012155430A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110130729.7 2011-05-19
CN201110130729.7A CN102790692B (en) 2011-05-19 2011-05-19 Method for calculating network element interface and web master

Publications (1)

Publication Number Publication Date
WO2012155430A1 true WO2012155430A1 (en) 2012-11-22

Family

ID=47155999

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/080054 WO2012155430A1 (en) 2011-05-19 2011-09-22 Method and network management for calculating network element interfaces

Country Status (2)

Country Link
CN (1) CN102790692B (en)
WO (1) WO2012155430A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414646B (en) * 2013-08-14 2016-07-06 北京华为数字技术有限公司 A kind of multicast service negotiation method and device
CN104618209A (en) * 2013-11-05 2015-05-13 华为技术有限公司 Virtual local area network interface processing method and network device
CN107517150B (en) * 2016-06-17 2020-08-04 深圳市信锐网科技术有限公司 Intranet resource access method and device based on virtual private network VPN
CN108206758B (en) * 2016-12-20 2021-11-23 中兴通讯股份有限公司 Ethernet two-layer virtual private network service positioning method and device
CN108011755B (en) * 2017-11-29 2021-02-26 瑞斯康达科技发展股份有限公司 Network element management method and device
CN114039859B (en) * 2021-11-03 2023-05-30 中盈优创资讯科技有限公司 STN network equipment chain ring changing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996925A (en) * 2006-12-25 2007-07-11 华为技术有限公司 Sending and receiving method and system for link aggregation method, device and MAC frame
CN101945110A (en) * 2010-09-20 2011-01-12 中兴通讯股份有限公司 Configuration method and device of address resolution protocol entry

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1315296C (en) * 2003-07-11 2007-05-09 华为技术有限公司 Method of multicast data forwarding in multi-port virtual local area network system
CN1801711B (en) * 2006-01-18 2011-03-23 杭州华三通信技术有限公司 Multicast group member identification method and apparatus
US8064458B2 (en) * 2009-06-23 2011-11-22 Nortel Networks Limited Method and apparatus for simulating IP multinetting

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996925A (en) * 2006-12-25 2007-07-11 华为技术有限公司 Sending and receiving method and system for link aggregation method, device and MAC frame
CN101945110A (en) * 2010-09-20 2011-01-12 中兴通讯股份有限公司 Configuration method and device of address resolution protocol entry

Also Published As

Publication number Publication date
CN102790692B (en) 2015-05-06
CN102790692A (en) 2012-11-21

Similar Documents

Publication Publication Date Title
WO2012155430A1 (en) Method and network management for calculating network element interfaces
US8274967B2 (en) Method, system and gateway for remotely accessing MPLS VPN
US7986649B2 (en) Method, apparatus and system for virtual network configuration and partition handover
JP5710928B2 (en) Network system, virtual network management method, and router
CN111953507B (en) Network topology discovery method and device and computer storage medium
WO2018157299A1 (en) Virtualization method for optical line terminal (olt) device, and related device
JP2004328732A (en) Method and apparatus for determining shared broadcast domain of network switch, port and interface
CN108650177B (en) Method and system for performing cross-domain service configuration on SPTN (shortest Path bridging) equipment
US20050050225A1 (en) System and method for discovery of BGP router topology
WO2014194749A1 (en) Vpn implementation processing method and apparatus for edge device
US20070081535A1 (en) Method and system for implementing virtual router redundacy protocol on a resilient packet ring
WO2006005260A1 (en) A virtual private network and the method for the control and transmit of the route
WO2012088982A1 (en) Method, apparatus and virtual private network system for issuing routing information
WO2012094898A1 (en) Virtual machine migration method, switch, virtual machine system
WO2006002598A1 (en) A vpn system of a hybrid-site hybrid backbone network and an implementing method thereof
WO2009082905A1 (en) Method, system and switch device for dynamically establishing multicast virtual local area network
CN110932906A (en) Data center network topology structure discovery method based on SNMP technology and topology structure discovery system thereof
WO2012037762A1 (en) Method and apparatus for configuring address resolution protocol entry
WO2015027736A1 (en) Method and device for implementing hierarchical virtual private lan service
WO2004071009A1 (en) A method for determining relation between client edge router and virtual private network
CN107995015B (en) Method and device for acquiring TWAMP end-to-end detection path
US7369513B1 (en) Method and apparatus for determining a network topology based on Spanning-tree-Algorithm-designated ports
JP2020508600A (en) Traffic engineering service mapping
WO2014094224A1 (en) Method, network device, and virtual cluster for determining administrative domain
WO2011057570A1 (en) Data transmission method, device and system for virtual local area networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11865839

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11865839

Country of ref document: EP

Kind code of ref document: A1