CN114124782A - Method for determining IP service path of terminal - Google Patents

Method for determining IP service path of terminal Download PDF

Info

Publication number
CN114124782A
CN114124782A CN202111407433.5A CN202111407433A CN114124782A CN 114124782 A CN114124782 A CN 114124782A CN 202111407433 A CN202111407433 A CN 202111407433A CN 114124782 A CN114124782 A CN 114124782A
Authority
CN
China
Prior art keywords
initiating
port
dynamic group
service
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111407433.5A
Other languages
Chinese (zh)
Other versions
CN114124782B (en
Inventor
董光新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dingxingda Information Technology Co ltd
Original Assignee
Beijing Dingxingda Information Technology Co ltd
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 Beijing Dingxingda Information Technology Co ltd filed Critical Beijing Dingxingda Information Technology Co ltd
Priority to CN202111407433.5A priority Critical patent/CN114124782B/en
Publication of CN114124782A publication Critical patent/CN114124782A/en
Application granted granted Critical
Publication of CN114124782B publication Critical patent/CN114124782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

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

The embodiment of the disclosure provides a method, a device, equipment and a computer readable storage medium for determining a terminal ip service path. The method comprises the steps of obtaining initiating data, and determining routing initial point equipment according to the initiating data and the interconnection type of each network element port; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port; grouping the initiating data based on the initiating MAC property to obtain a dynamic group of the dynamic MAC property and a static group of the static MAC property; traversing the dynamic group to obtain the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group. In this way, the traffic path of the terminal ip can be calculated quickly.

Description

Method for determining IP service path of terminal
Technical Field
Embodiments of the present disclosure relate generally to the field of communications, and more particularly, to a method, an apparatus, a device and a computer-readable storage medium for determining an ip traffic path of a terminal.
Background
With the rapid development of networks, more and more devices are provided in the networks, and a transmitting end transmits a message to a receiving end only through a plurality of devices. If one device cannot work normally in the transmission process, the message cannot be transmitted successfully, and the problem of which device needs to be quickly and accurately positioned occurs. Clearly, if each device is manually checked, a great deal of manpower and material resources are needed. As shown in fig. 1, it is computationally inefficient to complete hundreds of thousands to millions of IP paths in a short time (one trace command is executed for 15 seconds and is not yet completed) by the conventional Tracert method.
Therefore, how to quickly calculate the specific path of each user is a problem which needs to be solved urgently at present.
Disclosure of Invention
According to the embodiment of the disclosure, a scheme for determining an ip service path of a terminal is provided.
In a first aspect of the present disclosure, a method for determining an ip traffic path of a terminal is provided. The method comprises the following steps:
acquiring initiating data, and determining routing initial point equipment according to the initiating data and the interconnection type of each network element port; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port;
grouping the initiating data based on the initiating MAC property to obtain a dynamic group of the dynamic MAC property and a static group of the static MAC property;
traversing the dynamic group to obtain the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group.
Further, the interconnection type is determined by:
acquiring the port information of the whole network element and the port information of the neighbor network element, and determining the interconnection type of each network element port.
Further, the obtaining the initiating data, and determining the routing start point device according to the initiating data and the interconnection type of each network element port includes:
if the equipment sending the initiating data is the router, determining routing initial point equipment according to an ARP table of the router;
and if the equipment for sending the initiating data is the switch, determining routing initial point equipment according to the MAC address of the switch, vlan data and the interconnection type of each network element port.
Further, the determining ring devices based on the device IP in the dynamic group, the interconnection type of each network element port, and the static group includes:
constructing a data set secondList corresponding to the device IP from the static group based on the device IP in the dynamic group; the second List set comprises an IP for initiating service, a VPN for initiating VPN, a property for initiating MAC and an initiating port;
judging whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same subnet;
if yes, and the dynamic group is the same as the initiating VPN in the secondList set and the initiating port is the same, the port interconnection type in the dynamic group is an interconnection port, and the corresponding port type in the secondList set is a system port, the device is an out-loop device currently initiating the service IP.
Further, the determining a ring endpoint and/or an endpoint device based on the device IP in the dynamic group, the interconnection type of each network element port, and the static group includes:
constructing a data set secondList corresponding to the device IP from the static group based on the device IP in the dynamic group; the second List set comprises an IP for initiating service, a VPN for initiating VPN, a property for initiating MAC and an initiating port;
judging whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same subnet;
if the dynamic group is the same as the initiating VPN and the initiating port in the secondList set, determining a ring endpoint and/or endpoint equipment according to the port types of the dynamic group and the secondList set.
Further, the determining a ring endpoint and/or an endpoint device according to the dynamic group and the port type of the secondList set includes:
if the port in the dynamic group is a vlan interface and the device in the dynamic group is a ring network switch, the device is an egress end point device currently initiating a service IP;
if the port interconnection type in the dynamic group is a service port and the port type in the secondList set is a system port, the device is an out-loop terminal device currently initiating a service IP;
if the port in the dynamic group is a vlan if port and the device in the dynamic group is a non-ring network switch, the device is a terminal device currently initiating a service IP;
if the port interconnection type in the dynamic group is a service port and the port type in the secondList set is an interconnection port, the device is a terminal device currently initiating a service IP.
Further, still include:
determining a pass device and a broadcasting device according to the dynamic group and the port type of the secondList set; wherein,
if the port interconnection type in the dynamic group is the same as the port interconnection type of the secondList set, the device is a passing device which currently initiates a service IP;
if the port interconnection type in the dynamic group is the same as the port interconnection type of the secondList set, and the port name in the dynamic group is the same as the port name of the secondList set, the device is a broadcasting device currently initiating a service IP.
In a second aspect of the present disclosure, a device for determining an ip traffic path of a terminal is provided. The device includes:
an obtaining module, configured to obtain initiation data, and determine a routing start point device according to the initiation data and an interconnection type of each network element port; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port;
a grouping module, configured to group the initiation data based on the initiation MAC property to obtain a dynamic group of a dynamic MAC property and a static group of a static MAC property;
the determining module is used for traversing the dynamic group to obtain the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group.
In a third aspect of the disclosure, an electronic device is provided. The electronic device includes: a memory having a computer program stored thereon and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present disclosure, a computer readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, implements a method as in accordance with the first aspect of the present disclosure.
According to the method for determining the ip service path of the terminal, provided by the embodiment of the application, the routing initial point equipment is determined according to the initiating data and the interconnection type of each network element port by acquiring the initiating data; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port; grouping the initiating data based on the initiating MAC property to obtain a dynamic group of the dynamic MAC property and a static group of the static MAC property; traversing the dynamic group to obtain the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group, thereby realizing the quick and accurate identification of the service path.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
FIG. 1 shows a schematic diagram of computing an IP path in a Tracert manner;
fig. 2 shows a flow chart of a method for determining an ip traffic path of a terminal according to an embodiment of the present disclosure;
FIG. 3 shows a network topology schematic according to an embodiment of the present disclosure;
figure 4 shows a schematic diagram of network element data collected according to an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of data in a router ARP table according to an embodiment of the disclosure;
fig. 6 shows a complete traffic path diagram for terminal IP traffic according to an embodiment of the present disclosure;
fig. 7 shows a block diagram of a device for determining an ip traffic path of a terminal according to an embodiment of the present disclosure;
FIG. 8 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 2 shows a flowchart of a method 200 for determining an ip traffic path of a terminal according to an embodiment of the present disclosure, including:
s210, acquiring initiating data, and determining routing initial point equipment according to the initiating data and the interconnection type of each network element port; the initiating data includes initiating service IP, initiating device IP, initiating VPN, initiating MAC property and initiating port.
The network elements are elements in a network, and the classification of the network elements comprises a router, a switch, an OLT and/or an ONU and the like; the device classification may be equivalent to the network element classification in this disclosure.
In some embodiments, the forwarding procedure of the IP packet is:
1) after the IP data packet reaches a network layer, firstly obtaining a destination network number according to a destination IP address, and then determining whether to directly deliver or forward the data packet; if the network numbers are not matched, the data packet needs to be forwarded, and the step 3) is executed;
2) forwarding the data packet to the destination host; if the corresponding matching item can not be found in the ARP cache table of the current router, an ARP request packet needs to be broadcasted to the current local area network to obtain the MAC address of the corresponding host;
3) searching a next-hop IP address in a routing table (forwarding table) according to the destination IP address;
4) searching the MAC address corresponding to the next hop IP address in an ARP cache table of the router, and if the MAC address of the next hop router is found, filling the searched MAC address into the 6 bytes at the head of the data frame (namely updating the data frame of the link layer); if the IP address does not exist in the ARP cache table, an ARP packet is broadcasted to the current local area network to request the MAC address of the next hop router;
it should be noted that after the ARP request packet is broadcasted, only the next-hop router will respond to the ARP request packet, and all other hosts and routers will ignore the ARP broadcast packet.
5) Updating a data frame of a data link layer, namely a target MAC address field of a frame header, according to the obtained MAC address of the next hop router;
6) and forwarding the data packet.
In some embodiments, the interconnection type (physical connection between two network elements by a network cable) includes:
1) W-W interconnection port
Device class (switch) and neighbor device class (switch) is port type (W-W interconnect);
2) R-W interconnection port
Device class (switch), and neighbor device class (router) port type (R-W interconnect);
3) R-R interconnection port
Device class (router) and neighbor device class (router) port type (R-R interconnect);
4) others being service ports
A service port (the other end of the port is directly connected with the terminal);
wherein, the R represents a router;
the W represents a switch;
further, the port interconnection type can be upgraded when specific conditions are met:
if the port interconnection type is R-W interconnection neighbor is a ring switch, the port interconnection type (system port) cannot be modified;
if the port interconnection type is R-W interconnection neighbor is a non-ring switch, the port interconnection type (interconnection port) cannot be modified;
if the port interconnection type is R-R interconnection, the port interconnection type (interconnection port) cannot be modified.
In some embodiments, the interconnect type may be determined by:
acquiring port information of a full-path network element and port information of a neighbor network element, calculating network element neighbors (neighbor ports) through an automatic discovery algorithm and/or an LLDP protocol, and determining the interconnection type of each network element port.
In some embodiments, the classification of the path devices disclosed in the present disclosure, that is, the classification of the path devices refers to classifying and classifying roles that are assumed by a network element in a whole IP packet forwarding process of an IP terminal path:
an end point device: the network element directly connects the terminal; for example, a certain port of a switch is directly connected with a certain computer by a network cable;
route start point device: a router where a gateway of a terminal IP is located is called routing initial point equipment;
passing through equipment: network elements passed by in the IP data packet forwarding process are uniformly called passing equipment;
and (3) ring discharging equipment: as shown in fig. 3, the switch 2 is a device that jumps out of the ring to connect to other non-ring switches, i.e. ring-out devices; in fig. 3, the switches in the two gray areas are ring network switches;
ring-out terminal point: is both a ring-out device and a terminal device.
In some embodiments, data of all network elements as shown in fig. 4 is acquired, including router, switch, OLT and ONU data, i.e. basic data required for post operations is acquired.
In some embodiments, the initiation data is obtained for determining a gateway of the terminal IP, i.e. determining a route origin device; the initiating data comprises initiating service IP, initiating equipment IP, initiating VPN, initiating MAC property, initiating port and the like.
If the gateways are all configured on the router, the data collected from the ARP table of the router is shown in FIG. 5;
further, if the device sending the initiation data is the switch, the MAC address and vlan data on the switch are grouped into a group to form a unique key named key1, similarly, the MAC and vlan data in the ARP table on the router are also grouped into a unique key named key2, the key2 is traversed, and if the key1 can be found, the initiation data of the data on the switch (the corresponding initiation data is the initiation data on the router) is obtained;
through the calculation, the initiating data of the IP of the whole network terminal and the corresponding switch set can be obtained, namely, all connection ways can be listed;
wherein, the uniqueness can be ensured by adopting a mode of MAC + vlan data combination. The uniqueness of the MAC data cannot be guaranteed; vlan data is used on the switch to partition different local area networks, and in the present disclosure, vlans may be partitioned by traffic classification.
In summary, the route starting point device is determined according to the processed initiation data and the interconnection type of each network element port.
S220, grouping the initiating data based on the initiating MAC property to obtain a dynamic group with a dynamic MAC property and a static group with a static MAC property.
In some embodiments, the initiating data is grouped based on the initiating MAC property to obtain a dynamic group of dynamic MAC properties and a static group of static MAC properties;
wherein, the dynamic group comprises all data of which the MAC property in the initiating data is dynamic MAC; the static group comprises all data of which the MAC property is static MAC in the initiating data
MAC property: can be divided into dynamic MAC addresses and static MAC addresses;
the dynamic MAC address has aging time;
the static MAC address has no aging time.
S230, traversing the dynamic group to acquire the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group.
In some embodiments, the ring device is determined by:
and acquiring the service initiating IP, the initiating equipment IP, the initiating port, the equipment classification and the MAC initiating property from the dynamic group, and taking the equipment IP as a distinguishing condition among different equipment, namely determining uniqueness.
Constructing a data set secondList corresponding to the device IP from the static group based on the device IP in the dynamic group; the second List set comprises an IP for initiating service, a VPN for initiating VPN, a property for initiating MAC and an initiating port; each piece of data in the dynamic group corresponds to a secndlist set, i.e., one-to-many.
Judging whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same subnet, namely whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same C-type network;
if yes, and the dynamic group is the same as the initiating VPN in the secondList set and the initiating port is the same, the port interconnection type in the dynamic group is an interconnection port, and the corresponding port type in the secondList set is a system port, the device is an out-loop device currently initiating the service IP.
In some embodiments, the ring end point, end point device, is determined by:
and acquiring the service initiating IP, the initiating equipment IP, the initiating port, the equipment classification and the MAC initiating property from the dynamic group, and taking the equipment IP as a distinguishing condition among different equipment, namely determining uniqueness.
Constructing a data set secondList corresponding to the device IP from the static group based on the device IP in the dynamic group; the second List set comprises an IP for initiating service, a VPN for initiating VPN, a property for initiating MAC and an initiating port; each piece of data in the dynamic group corresponds to a secndlist set, i.e., one-to-many.
Judging whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same subnet, namely whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same C-type network;
if the dynamic group is the same as the initiating VPN and the initiating port in the secondList set, determining a ring end point and/or end point equipment according to the port types of the dynamic group and the secondList set;
in particular, the amount of the solvent to be used,
if the port in the dynamic group is a vlan interface and the device in the dynamic group is a ring network switch, the device is an egress end point device currently initiating a service IP;
if the port interconnection type in the dynamic group is a service port and the port type in the secondList set is a system port, the device is an out-loop terminal device currently initiating a service IP;
if the port in the dynamic group is a vlan if port and the device in the dynamic group is a non-ring network switch, the device is a terminal device currently initiating a service IP;
if the port interconnection type in the dynamic group is a service port and the port type in the secondList set is an interconnection port, the device is a terminal device currently initiating a service IP.
Further, still include:
determining a pass device and a broadcasting device according to the dynamic group and the port type of the secondList set; wherein,
if the port interconnection type in the dynamic group is the same as the port interconnection type of the secondList set, the device is a passing device which currently initiates a service IP;
if the port interconnection type in the dynamic group is the same as the port interconnection type of the secondList set, and the port name in the dynamic group is the same as the port name of the secondList set, the device is a broadcasting device currently initiating a service IP.
In conclusion, a complete service path of one terminal IP service is obtained as shown in fig. 6.
According to the embodiment of the disclosure, the following technical effects are achieved:
by the algorithm, the specific path of each user can be rapidly calculated, and when a network fault occurs, the fault reason can be rapidly checked.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that acts and modules referred to are not necessarily required by the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
Fig. 7 shows a block diagram of a device 700 for determining ip traffic paths of a terminal according to an embodiment of the present disclosure. As shown in fig. 7, the apparatus 700 includes:
an obtaining module 710, configured to obtain initiating data, and determine a routing start point device according to the initiating data and an interconnection type of each network element port; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port;
a grouping module 720, configured to group the initiating data based on the initiating MAC property to obtain a dynamic group with a dynamic MAC property and a static group with a static MAC property;
a determining module 730, configured to traverse the dynamic group and obtain an IP of the device in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 8 shows a schematic block diagram of an electronic device 700 that may be used to implement embodiments of the present disclosure. As shown, device 800 includes a Central Processing Unit (CPU)801 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)802 or loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The CPU801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processing unit 801 performs the various methods and processes described above, such as the method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When loaded into RAM 803 and executed by CPU801, a computer program may perform one or more of the steps of method 200 described above. Alternatively, in other embodiments, the CPU 701 may be configured to perform the method 200 in any other suitable manner (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System On Chip (SOCs), load programmable logic devices (CPLDs), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for determining a terminal ip service path is characterized by comprising the following steps:
acquiring initiating data, and determining routing initial point equipment according to the initiating data and the interconnection type of each network element port; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port;
grouping the initiating data based on the initiating MAC property to obtain a dynamic group of the dynamic MAC property and a static group of the static MAC property;
traversing the dynamic group to obtain the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group.
2. The method of claim 1, wherein the interconnect type is determined by:
acquiring the port information of the whole network element and the port information of the neighbor network element, and determining the interconnection type of each network element port.
3. The method of claim 2, wherein the obtaining the initiation data and determining the routing start point device according to the initiation data and the interconnection type of each network element port comprises:
if the equipment sending the initiating data is the router, determining routing initial point equipment according to an ARP table of the router;
and if the equipment for sending the initiating data is the switch, determining routing initial point equipment according to the MAC address of the switch, vlan data and the interconnection type of each network element port.
4. The method of claim 3, wherein the determining a ring device based on the device IP in the dynamic group, the interconnect type of each network element port, and the static group comprises:
constructing a data set secondList corresponding to the device IP from the static group based on the device IP in the dynamic group; the second List set comprises an IP for initiating service, a VPN for initiating VPN, a property for initiating MAC and an initiating port;
judging whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same subnet;
if yes, and the dynamic group is the same as the initiating VPN in the secondList set and the initiating port is the same, the port interconnection type in the dynamic group is an interconnection port, and the corresponding port type in the secondList set is a system port, the device is an out-loop device currently initiating the service IP.
5. The method of claim 4, wherein determining a ring endpoint and/or an endpoint device based on the device IPs in the dynamic group, the interconnect type of each network element port, and the static group comprises:
constructing a data set secondList corresponding to the device IP from the static group based on the device IP in the dynamic group; the second List set comprises an IP for initiating service, a VPN for initiating VPN, a property for initiating MAC and an initiating port;
judging whether the IP of the initiating service in the dynamic group and the IP of the initiating service in the secondList set belong to the same subnet;
if the dynamic group is the same as the initiating VPN and the initiating port in the secondList set, determining a ring endpoint and/or endpoint equipment according to the port types of the dynamic group and the secondList set.
6. The method according to claim 5, wherein said determining a ring endpoint and/or an endpoint device according to the dynamic group and the port type of the secondList set comprises:
if the port in the dynamic group is a vlan interface and the device in the dynamic group is a ring network switch, the device is an egress end point device currently initiating a service IP;
if the port interconnection type in the dynamic group is a service port and the port type in the secondList set is a system port, the device is an out-loop terminal device currently initiating a service IP;
if the port in the dynamic group is a vlan if port and the device in the dynamic group is a non-ring network switch, the device is a terminal device currently initiating a service IP;
if the port interconnection type in the dynamic group is a service port and the port type in the secondList set is an interconnection port, the device is a terminal device currently initiating a service IP.
7. The method of claim 6, further comprising:
determining a pass device and a broadcasting device according to the dynamic group and the port type of the secondList set; wherein,
if the port interconnection type in the dynamic group is the same as the port interconnection type of the secondList set, the device is a passing device which currently initiates a service IP;
if the port interconnection type in the dynamic group is the same as the port interconnection type of the secondList set, and the port name in the dynamic group is the same as the port name of the secondList set, the device is a broadcasting device currently initiating a service IP.
8. An apparatus for determining an ip traffic path of a terminal, comprising:
an obtaining module, configured to obtain initiation data, and determine a routing start point device according to the initiation data and an interconnection type of each network element port; the initiating data comprises an initiating service IP, an initiating device IP, an initiating VPN, an initiating MAC property and an initiating port;
a grouping module, configured to group the initiation data based on the initiation MAC property to obtain a dynamic group of a dynamic MAC property and a static group of a static MAC property;
the determining module is used for traversing the dynamic group to obtain the equipment IP in the dynamic group; and determining ring equipment, a ring-out terminal and/or terminal equipment based on the equipment IP in the dynamic group, the interconnection type of each network element port and the static group.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202111407433.5A 2021-11-24 2021-11-24 Method for determining IP service path of terminal Active CN114124782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111407433.5A CN114124782B (en) 2021-11-24 2021-11-24 Method for determining IP service path of terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111407433.5A CN114124782B (en) 2021-11-24 2021-11-24 Method for determining IP service path of terminal

Publications (2)

Publication Number Publication Date
CN114124782A true CN114124782A (en) 2022-03-01
CN114124782B CN114124782B (en) 2023-02-28

Family

ID=80372314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111407433.5A Active CN114124782B (en) 2021-11-24 2021-11-24 Method for determining IP service path of terminal

Country Status (1)

Country Link
CN (1) CN114124782B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010048687A1 (en) * 1997-08-21 2001-12-06 Adc Telecommunications, Inc. Telecommunication network with variable address learning, switching and routing
CN1756222A (en) * 2004-09-27 2006-04-05 华为技术有限公司 Looped network and its service realizing method
US20090019536A1 (en) * 2006-01-27 2009-01-15 Camrivox Ltd. Automatic ip network determination and configuration for edge devices
CN102137019A (en) * 2011-03-29 2011-07-27 华为技术有限公司 Method for registering and ageing VLAN (Virtual Local Domain Network) and device thereof
CN105847023A (en) * 2015-01-14 2016-08-10 北京神州泰岳信息安全技术有限公司 Service system network topology relationship obtaining method and device
CN107888563A (en) * 2017-10-17 2018-04-06 北京北信源软件股份有限公司 A kind of determination method and apparatus of terminal access position
US20190288871A1 (en) * 2016-12-06 2019-09-19 Huawei Technologies Co., Ltd. Loop Failure Handling Method and Switch
CN111600762A (en) * 2020-06-02 2020-08-28 山东中创软件商用中间件股份有限公司 Network topology structure generation method, device, equipment and medium
CN111934921A (en) * 2020-07-29 2020-11-13 深信服科技股份有限公司 Network topology discovery method and device, equipment and storage medium
US20210328874A1 (en) * 2020-04-16 2021-10-21 Hewlett Packard Enterprise Development Lp Compute node discovery mechanism

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010048687A1 (en) * 1997-08-21 2001-12-06 Adc Telecommunications, Inc. Telecommunication network with variable address learning, switching and routing
CN1756222A (en) * 2004-09-27 2006-04-05 华为技术有限公司 Looped network and its service realizing method
US20090019536A1 (en) * 2006-01-27 2009-01-15 Camrivox Ltd. Automatic ip network determination and configuration for edge devices
CN102137019A (en) * 2011-03-29 2011-07-27 华为技术有限公司 Method for registering and ageing VLAN (Virtual Local Domain Network) and device thereof
CN105847023A (en) * 2015-01-14 2016-08-10 北京神州泰岳信息安全技术有限公司 Service system network topology relationship obtaining method and device
US20190288871A1 (en) * 2016-12-06 2019-09-19 Huawei Technologies Co., Ltd. Loop Failure Handling Method and Switch
CN107888563A (en) * 2017-10-17 2018-04-06 北京北信源软件股份有限公司 A kind of determination method and apparatus of terminal access position
US20210328874A1 (en) * 2020-04-16 2021-10-21 Hewlett Packard Enterprise Development Lp Compute node discovery mechanism
CN111600762A (en) * 2020-06-02 2020-08-28 山东中创软件商用中间件股份有限公司 Network topology structure generation method, device, equipment and medium
CN111934921A (en) * 2020-07-29 2020-11-13 深信服科技股份有限公司 Network topology discovery method and device, equipment and storage medium

Also Published As

Publication number Publication date
CN114124782B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN107078963B (en) Route tracing in virtual extensible local area networks
WO2016082588A1 (en) Link connectivity checking method and apparatus
CN113098770B (en) Message sending method, route table item generating method, device and storage medium
CN112751733B (en) Link detection method, device, equipment, system and switch
CN105429841B (en) NNI PING implementation method and device
CN112491701B (en) Message forwarding method and device
CN111614505B (en) Message processing method and gateway equipment
US12063155B2 (en) Packet sending method and apparatus, and storage medium
US20130042020A1 (en) Quick Network Path Discovery
EP3767900B1 (en) Method for discovering forwarding path, and related device thereof
EP3292660B1 (en) Packet forwarding in a vxlan switch
US9473384B2 (en) Validating reachability of nodes of a network of an industrial automation and control system
CN103457794B (en) Method and system for confirming faults of IP bearer network
CN110391984B (en) Message forwarding method and device
CN114124782B (en) Method for determining IP service path of terminal
US20160344591A1 (en) Determining Connections of Non-External Network Facing Ports
CN107241236B (en) Forwarding information base table item detection method, detection equipment and network equipment
WO2018127024A1 (en) Error correction method, device based on network port transmission and network port transmission equipment
CN112737957B (en) Flow table aging method and device
CN116260726A (en) Topology discovery method, device, terminal and storage medium
CN116132555A (en) Message processing method and system
CN114765589A (en) Network testing method, device and storage medium
US11902087B2 (en) Forwarding fault location determining method and device
CN114257473B (en) Method, device, equipment and medium for realizing multiple transparent bridges in resource pool
CN114430393B (en) Message processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant