[go: up one dir, main page]

CN110661664B - Flow simulation method and device - Google Patents

Flow simulation method and device Download PDF

Info

Publication number
CN110661664B
CN110661664B CN201910926786.2A CN201910926786A CN110661664B CN 110661664 B CN110661664 B CN 110661664B CN 201910926786 A CN201910926786 A CN 201910926786A CN 110661664 B CN110661664 B CN 110661664B
Authority
CN
China
Prior art keywords
routing device
core routing
route
core
traffic
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.)
Active
Application number
CN201910926786.2A
Other languages
Chinese (zh)
Other versions
CN110661664A (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201910926786.2A priority Critical patent/CN110661664B/en
Publication of CN110661664A publication Critical patent/CN110661664A/en
Application granted granted Critical
Publication of CN110661664B publication Critical patent/CN110661664B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • 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/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • 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/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation

Landscapes

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

Abstract

The embodiment of the application provides a flow simulation method and a device, comprising the following steps: the method comprises the steps of obtaining a networking topological structure comprising a plurality of routing devices, calculating a route from each non-core routing device to a core routing device aiming at each non-core routing device, obtaining flow transmitted from an outgoing interface of each non-core routing device in the route from the non-core routing device to the core routing device, calculating the flow sent to the core routing device by each non-core routing device as a source device based on the route from each non-core routing device to the core routing device and the outgoing interface flow of each non-core routing device, and calculating the flow of each link included in the route from each non-core routing device to the core routing device based on preset change conditions of a network environment and the access flow of each non-core routing device. By adopting the scheme, the traffic in the network is simulated aiming at the change of the network environment.

Description

Flow simulation method and device
Technical Field
The present application relates to the field of communications network technologies, and in particular, to a traffic simulation method and apparatus.
Background
With the rapid development of the communication network technology and the wide application of the communication network technology in practice, the complexity of the communication network is higher and higher, and the network environment of the communication network is often changed in the process of practical application, and it is important how to ensure the stability of the communication network and maintain the high-efficiency data transmission of the communication network for the changed network.
A plurality of routing devices may be included in a network of a communication network, and the routing devices are used for implementing transmission of data in the network. The routing equipment determines destination equipment of the received data to be transmitted, wherein the destination equipment is one of the plurality of routing equipment, and then sends the data to be transmitted to the destination equipment based on the calculated optimal route from the routing equipment to the destination equipment, namely sends the data to be transmitted to next-hop routing equipment in the optimal route so that the next-hop routing equipment continues to send the data to be transmitted to the destination equipment.
At present, when a routing device calculates an optimal route, it may use an Open Shortest Path First (OSPF) Protocol for calculation, where the OSPF Protocol is a router selection Protocol, and is a link state routing Protocol for an Internet Protocol (IP) network, and is an Interior Gateway Protocol (IGP) for deciding a route in a single AS (Autonomous System).
In practical application, when a network environment changes, traffic of links between some routing devices may change, and if the changed traffic is large and exceeds a range that the links can bear, a congestion problem may occur in data transmission of the links.
Disclosure of Invention
An object of the embodiments of the present application is to provide a traffic simulation method and apparatus, so as to simulate traffic in a network according to a change of a network environment. The specific technical scheme is as follows:
the embodiment of the application provides a flow simulation method, which comprises the following steps:
acquiring a networking topological structure comprising a plurality of routing devices, wherein the routing devices comprise a core routing device, and other routing devices are non-core routing devices;
for each of the non-core routing devices, calculating a route from the non-core routing device to the core routing device;
for each non-core routing device, acquiring traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device, as egress interface traffic of the non-core routing device;
calculating the flow sent to the core routing equipment by each non-core routing equipment as source equipment based on the route from each non-core routing equipment to the core routing equipment and the output interface flow of each non-core routing equipment, wherein the flow is used as the access flow of the non-core routing equipment;
and aiming at the preset change condition of the networking network environment, calculating the flow of each link contained in the route from each non-core routing device to the core routing device based on the preset change condition and the access flow of each non-core routing device, and taking the flow as the simulated link flow after the preset change condition occurs.
Further, the obtaining, for each non-core routing device, a traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device includes:
and for each non-core routing device, based on a Simple Network Management Protocol (SNMP), reading the traffic transmitted from an output interface of the non-core routing device in the route from the non-core routing device to the core routing device through information interaction between the non-core routing device and the non-core routing device.
Further, the calculating, based on the preset change condition of the networking network environment and the access traffic of each non-core routing device, traffic of each link included in a route from each non-core routing device to the core routing device includes:
calculating a route from a preset non-core routing device to the core routing device in the networking, which is removed from the networking of the preset non-core routing device, for each other non-core routing device when the preset non-core routing device in the networking fails;
and calculating the flow of each link contained in the route from each other non-core routing device to the core routing device based on the access flow of each other non-core routing device.
Further, the calculating, based on the preset change condition of the networking network environment and the access traffic of each non-core routing device, traffic of each link included in a route from each non-core routing device to the core routing device includes:
acquiring a change value of the access flow of a preset non-core routing device as an access change value aiming at the change of the access flow of the preset non-core routing device in the networking;
and calculating the flow of each link included in the route from the preset non-core routing equipment to the core routing equipment according to the access change value and the access flow of the non-core routing equipment included in the route from the preset non-core routing equipment to the core routing equipment.
Further, for the access flow of each non-core routing device, a ratio of service flows of different service types is set as a service flow ratio;
the calculating, based on a preset change condition of the networking network environment and the access traffic of each non-core routing device, traffic of each link included in a route from each non-core routing device to the core routing device includes:
aiming at the change of the service flow of a preset type service in the networking, calculating the changed access flow of each non-core routing device according to the change value of the service flow of the preset type service and based on the access flow of each non-core routing device and the service flow ratio of each non-core routing device;
and calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the changed access flow of each non-core routing device.
Further, the calculating, for each of the non-core routing devices, a route from the non-core routing device to the core routing device includes:
acquiring link information of links among the plurality of routing devices in the networking;
aiming at respectively taking each non-core routing device as a source device and the core routing device as a destination device, calculating an optimal route from the source device to the destination device as an initial optimal route based on link information of links between the routing devices contained in the area to which the source device belongs in the networking;
when routing equipment contained in the initial optimal route has united routing ABR equipment, calculating the optimal route from the ABR equipment to the destination equipment as an alternative route for replacement based on link information of links among the routing equipment contained in an area to which the ABR equipment belongs in the networking;
and when the alternative route is different from the path from the ABR equipment to the destination equipment in the initial optimal route, replacing the path from the ABR equipment to the destination equipment in the initial optimal route by using the alternative route to obtain the route from the non-core routing equipment to the core routing equipment.
Further, the obtaining link information of links between the plurality of routing devices in the network includes:
determining an ABR device from the plurality of routing devices based on the topology;
and reading link information of the links between the routing devices in the networking from the ABR devices through information interaction with the determined ABR devices based on the SNMP.
Further, the link information is an overhead value, and the overhead value represents an overhead for transmitting data.
The embodiment of the present application further provides a simulation apparatus for flow variation, including:
the system comprises a structure acquisition module, a topology acquisition module and a topology management module, wherein the structure acquisition module is used for acquiring a networking topology structure comprising a plurality of routing devices, the routing devices comprise a core routing device, and other routing devices are non-core routing devices;
a route calculation module, configured to calculate, for each of the non-core routing devices, a route from the non-core routing device to the core routing device;
a traffic obtaining module, configured to obtain, for each non-core routing device, traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device, as egress interface traffic of the non-core routing device;
an access flow calculation module, configured to calculate, based on a route from each non-core routing device to the core routing device and the egress interface flow of each non-core routing device, a flow sent by each non-core routing device to the core routing device as a source device, as an access flow of the non-core routing device;
and a link traffic calculation module, configured to calculate, based on a preset change condition of the networking network environment and the access traffic of each non-core routing device, traffic of each link included in a route from each non-core routing device to the core routing device, where the traffic is used as the simulated link traffic after the preset change condition occurs.
Further, the traffic obtaining module is specifically configured to, for each non-core routing device, based on a simple network management protocol SNMP, read, from the non-core routing device, traffic transmitted from an output interface of the non-core routing device in a route from the non-core routing device to the core routing device through information interaction with the non-core routing device.
Further, the link traffic calculation module is specifically configured to calculate, for each of the other non-core routing devices, a route from the non-core routing device to the core routing device in the network without the preset non-core routing device, when a preset non-core routing device in the network fails; and calculating the flow of each link included in the route from each other non-core routing device to the core routing device based on the access flow of each other non-core routing device.
Further, the link traffic calculation module is specifically configured to acquire, as an access change value, a change value of the access traffic of a preset non-core routing device in the network, for a change of the access traffic of the preset non-core routing device; and calculating the flow of each link included in the route from the preset non-core routing device to the core routing device according to the access change value and the access flow of the non-core routing device included in the route from the preset non-core routing device to the core routing device.
Further, for the access flow of each non-core routing device, a ratio of service flows of different service types is set as a service flow ratio;
the link flow calculation module is specifically configured to calculate, for a change in service flow of a preset type of service in the networking, a changed access flow of each non-core routing device based on the access flow of each non-core routing device and the ratio of the service flow of each non-core routing device according to a change value of the service flow of the preset type of service; and calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the changed access flow of each non-core routing device.
Further, the route calculation module includes:
an information obtaining submodule, configured to obtain link information of links between the plurality of routing devices in the network;
a first route calculation submodule, configured to calculate, for each of the non-core routing devices as a source device and the core routing device as a destination device, an optimal route from the source device to the destination device as an initial optimal route based on link information of a link between the routing devices included in an area to which the source device belongs in the network;
a second route calculation submodule, configured to, when there is a route ABR device based on a union among the route devices included in the initial optimal route, calculate an optimal route from the ABR device to the destination device as an alternative route for replacement based on link information of links between the route devices included in an area to which the ABR device belongs in the networking;
and the route replacement submodule is used for replacing the path from the ABR equipment to the destination equipment in the initial optimal route by using the replacement route when the replacement route is different from the path from the ABR equipment to the destination equipment in the initial optimal route, so as to obtain the route from the non-core routing equipment to the core routing equipment.
Further, the information obtaining sub-module is specifically configured to determine, based on the topology, an ABR device from the plurality of routing devices; and based on SNMP, reading link information of the links between the routing devices in the networking from the ABR devices through information interaction with the determined ABR devices.
Further, the link information is an overhead value, and the overhead value represents an overhead for transmitting data.
Embodiments of the present application further provide an electronic device, including a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing the steps of any of the above flow simulation methods.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above flow simulation methods are implemented.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform any of the above-described flow simulation methods.
The embodiment of the application has the following beneficial effects:
the embodiment of the application provides a flow simulation method, which comprises the following steps: the method comprises the steps of obtaining a networking topological structure comprising a plurality of routing devices, wherein the routing devices comprise a core routing device, other routing devices are non-core routing devices, calculating a route from the non-core routing device to the core routing device aiming at each non-core routing device, obtaining a flow transmitted from an outlet interface of the non-core routing device in the route from the non-core routing device to the core routing device aiming at each non-core routing device as an outlet interface flow of the non-core routing device, calculating a flow sent to the core routing device by each non-core routing device as a source device according to the route from the non-core routing device to the core routing device and the outlet interface flow of each non-core routing device on the basis of the outlet interface flow of each non-core routing device and the preset change condition of a networking environment of a networking according to the preset change condition, and calculating the flow of each link contained in the route from each non-core routing device to the core routing device as the simulated link flow after the preset change condition occurs.
In the traffic simulation method, a plurality of routing devices included in the network are divided into core routing devices and non-core routing devices, and for each non-core routing device, a route from the non-core routing device to the core routing device is calculated, and based on the calculated route, a traffic transmitted from an egress interface of the non-core routing device is acquired as an egress interface traffic, and then based on the calculated route and the acquired egress interface traffic, a traffic sent by each non-core routing device to the core routing device as a source device is calculated as an access traffic, which is equivalent to establishing a traffic model of the network, so that based on a traffic model of the network, for a preset change condition of a network switch, a traffic of each link included in a route from each non-core routing device to the core routing device after the preset change condition is assumed to occur can be calculated, namely, the link traffic after the preset change condition is simulated, so that the link traffic is simulated after the network environment of the assumed networking is changed.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a flow simulation method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a first network in the embodiment of the present application;
FIG. 3 is a flow chart of traffic modeling provided by an embodiment of the present application;
fig. 4 is a flowchart of a first method for calculating link traffic according to a preset change condition provided in an embodiment of the present application;
fig. 5 is a flowchart of a second method for calculating link traffic according to a preset change condition provided in the embodiment of the present application;
fig. 6 is a flowchart of a third method for calculating link traffic according to a preset change condition provided in the embodiment of the present application;
fig. 7 is a schematic structural diagram of a second network in the embodiment of the present application;
fig. 8 is a flowchart of an optimal route modification method according to an embodiment of the present application;
fig. 9 is a flowchart for acquiring a networking topology and link information according to the embodiment of the present application;
fig. 10 is a schematic structural view of a third network in the embodiment of the present application;
fig. 11 is a flowchart for calculating an initial optimal route according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a flow simulation apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a route calculation module in a traffic simulation apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, for a networking including multiple routing devices in actual operation, when a network environment changes, traffic of links between some routing devices may change, and if the changed traffic is large and exceeds a range that the links can bear, a congestion problem may occur in data transmission of the links. Simulating traffic changes of links in a network may also be understood as traffic deduction for a specific network.
An embodiment of the present application provides a flow simulation method, as shown in fig. 1, which may include the following steps:
step 11, obtaining a networking topology structure including a plurality of routing devices, where the plurality of routing devices include a core routing device and other routing devices are non-core routing devices.
Step 12, for each non-core routing device, calculating a route from the non-core routing device to the core routing device.
Step 13, for each non-core routing device, acquiring traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to a core routing device, as egress interface traffic of the non-core routing device.
And step 14, calculating the flow sent by each non-core routing device as the source device to the core routing device as the access flow of the non-core routing device based on the route from each non-core routing device to the core routing device and the output interface flow of each non-core routing device.
And step 15, aiming at the preset change condition of the networking network environment, calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the preset change condition and the access flow of each non-core routing device, and taking the flow as the simulated link flow after the preset change condition occurs.
In the traffic simulation method, a plurality of routing devices included in the network are divided into core routing devices and non-core routing devices, and for each non-core routing device, a route from the non-core routing device to the core routing device is calculated, and based on the calculated route, a traffic transmitted from an egress interface of the non-core routing device is acquired as an egress interface traffic, and then based on the calculated route and the acquired egress interface traffic, a traffic sent by each non-core routing device to the core routing device as a source device is calculated as an access traffic, which is equivalent to establishing a traffic model of the network, so that based on a traffic model of the network, for a preset change condition of a network switch, a traffic of each link included in a route from each non-core routing device to the core routing device after the preset change condition is assumed to occur can be calculated, namely, the link traffic after the preset change condition is simulated, so that the link traffic is simulated after the network environment of the assumed networking is changed.
In this embodiment of the application, in order to facilitate the simulation of traffic change, one routing device is selected from the multiple routing devices as a core routing device, and the other routing devices are used as non-core routing devices, and through the above steps 11 to 14, the access traffic of each non-core routing device is calculated, which may be understood as completing traffic modeling for the networking, and then, through step 15, the link traffic after the assumed networking has a preset change is simulated for the preset change.
In an embodiment of the application, for step 13, acquiring, for each non-core routing device, traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to a core routing device, specifically may be:
for each non-core routing device, based on SNMP (Simple Network Management Protocol), through information interaction with the non-core routing device, a flow transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to a core routing device is read from the non-core routing device as an egress interface flow of the non-core routing device, where the egress interface flow includes a flow of data sent to the core routing device by the non-core routing device itself as a source device, and a flow of data received by the non-core routing device from other non-core routing devices and forwarded to the core routing device.
In an embodiment of the present application, for step 14, based on the route from each non-core routing device to the core routing device and the egress interface traffic of each non-core routing device, the traffic sent by each non-core routing device as a source device to the core routing device is calculated, and as the access traffic of the non-core routing device and the access traffic of one non-core routing device, it may be understood as the remaining traffic after subtracting the received traffic of the data from other non-core routing devices from the egress interface traffic of the non-core routing device.
The process of traffic modeling is described in detail below with the networking architecture shown in fig. 2.
As shown in fig. 2, the networking includes a plurality of routing devices, which are routing devices 11 to routing devices 99, and the connection relationship between the routing devices is shown in detail in fig. 2, where the routing device 99 is set as a core routing device, the other routing devices 11 to routing devices 88 are set as non-core routing devices, and the traffic of the non-core routing devices all flows to the core routing device, and accordingly, the process of traffic modeling is shown in fig. 3, and includes the following steps:
step 31, for each non-core routing device, a route from the non-core routing device to the core routing device is calculated.
The process of calculating the route in this step is described in detail later.
Based on the networking shown in fig. 2, the calculated route from each non-core routing device to the core routing device may be as shown in table 1 below:
routing Number of links
11-33-66-88-99 4
22-44-77-99 3
33-66-88-99 3
55-66-88-99 3
44-77-99 2
66-88-99 2
77-99 1
88-99 1
Table 1: routing table from non-core routing device to core routing device
As can be seen from table 1 above, the number of links involved may be different for different routes, which have been sorted from high to low in table 1.
And 32, acquiring the output interface flow of each non-core routing device.
The output interface traffic of each non-core routing device includes the traffic of data sent to the core routing device by the non-core routing device itself as a source device, and the traffic of data received by the non-core routing device from other non-core routing devices and forwarded to the core routing device.
The step may specifically refer to the above manner of obtaining the egress interface traffic of the non-core routing device, and is not described in detail herein.
And step 33, sequentially using each route as a route to be calculated according to the sequence of the link quantity from high to low, and calculating the access flow of the source equipment of the route to be calculated.
In this step, if the source device of the route to be calculated does not belong to other routes, the access flow of the source device may be determined directly from the outgoing interface flow of the source device.
If the source device of the route to be calculated also belongs to other routes, calculating the outgoing interface flow of the source device, and subtracting the difference value of the flows received by the source device from other non-core routing devices to be used as the incoming flow of the source device.
For example, taking the routes in table 1 above as an example, the following is described in detail:
for the route "11-33-66-88-99", the routing device 11 only belongs to the one route, and the outgoing interface traffic of the routing device 11 is determined as the incoming traffic of the routing device 11.
For route "22-44-77-99", routing device 22 belongs to only this one route, and the outgoing interface traffic of routing device 22 is determined as the incoming traffic of routing device 22.
For the route "33-66-88-99", the routing device 33 also belongs to the route "11-33-66-88-99", and the outgoing interface traffic of the routing device 33 is calculated, and the difference value of the incoming traffic of the routing device 11 is subtracted as the incoming traffic of the routing device 33.
For route "55-66-88-99", the routing device 55 only belongs to this one route, and the outgoing interface traffic of the routing device 55 is determined as the incoming traffic of the routing device 55.
For route "44-77-99", routing device 44 also belongs to route "22-44-77-99", calculating the outgoing interface traffic of routing device 44, and subtracting the difference of the incoming traffic of routing device 22 as the incoming traffic of routing device 44.
For route "66-88-99", routing device 66 also belongs to routes "11-33-66-88-99", route "33-66-88-99" and route "55-66-88-99", calculates the outgoing interface traffic of routing device 66, and subtracts the difference of the incoming traffic of routing device 11, routing device 33 and routing device 55 as the incoming traffic of routing device 66.
For route "77-99", routing device 77 also belongs to routes "22-44-77-99" and "44-77-99", calculating the outgoing interface traffic of routing device 77, subtracting the difference of the incoming traffic of routing device 22 and routing device 44, as the incoming traffic of routing device 77.
For the routing device "88-99", the routing device 88 also belongs to the route "11-33-66-88-99", the route "55-66-88-99" and the route "66-88-99", the outgoing interface traffic of the routing device 88 is calculated, and the difference value of the incoming traffic of the routing device 11, the routing device 33, the routing device 55 and the routing device 66 is subtracted as the incoming traffic of the routing device 88.
Through the process of calculating the access traffic of the routing device shown in fig. 3, the access traffic of each non-core routing device is calculated for the networking shown in fig. 2, that is, traffic modeling is completed.
In the embodiment of the present application, the access traffic of each non-core routing device obtained after traffic modeling is as shown in table 2 below as an example:
Figure BDA0002219150110000121
Figure BDA0002219150110000131
table 2: statistical table for access flow and service flow
In table 2, in addition to counting the access traffic of each non-core routing device as the source device, the traffic type ratio of the traffic may be set, and as shown in table 2, the traffic ratio of the voice traffic to the video traffic is set to 1: 4.
In the traffic simulation method provided in this embodiment of the application, for the step 15, the preset change condition may be flexibly set according to actual needs, for example, the preset change condition may be that the preset non-core routing device fails, that the access traffic of the preset non-core routing device changes, or that the service traffic of the preset type of service changes.
Next, taking the networking shown in fig. 2 and the traffic counted in table 2 as an example, the simulation of the traffic change is described in detail for each preset change situation.
For the preset change condition that the preset non-core routing device fails, step 15, as shown in fig. 4, may include the following steps:
step 41, for each of the other non-core routing devices, calculating a route from the non-core routing device to the core routing device in the network without the preset non-core routing device.
Taking the failure of the routing device 88 as an example, in this step, in the networking for removing the routing device 88, the routes from other non-core routing devices to the core routing device are calculated, and the result is shown in table 3 below:
Figure BDA0002219150110000132
Figure BDA0002219150110000141
table 3: routing table from non-core routing device to core routing device
And 42, calculating the flow of each link included in the route from each other non-core routing device to the core routing device based on the access flow of each other non-core routing device.
Taking the failure of the routing device 88 as an example, in this step, based on the routes calculated in table 3 and the access flows of the non-core reason devices counted in table 2, the flow of each link in the group network can be calculated, and the calculation result is shown in table 4 below:
link circuit Flow rate
11-22 10kb
22-44 10+20=30kb
33-66 60kb
66-55 60+80=140kb
55-44 60+80+50=190kb
44-77 10+20+60+80+50=90=310kb
77-99 10+20+60+80+50=90+40=350kb
Table 4: flow statistical table for each link in network
As for the preset change condition that the access traffic of the preset non-core routing device changes, the step 15, as shown in fig. 5, may include the following steps:
and step 51, acquiring a change value of the access flow of the preset non-core routing equipment as an access change value.
Taking the access traffic of the routing device 11 as an example, the access traffic of the routing device 11 increases by 50%, and based on the access traffic of each non-core reason device counted in table 2, the access traffic of the routing device 11 increases from 10kb to 15kb, and increases by 5 kb.
And step 52, calculating the flow of each link included in the route from the preset non-core routing device to the core routing device according to the access change value and the access flow of the non-core routing device included in the route from the preset non-core routing device to the core routing device.
After the access traffic of the preset non-core routing device changes, the traffic of a link included in a path that needs to pass through the preset non-core routing device to reach the core routing device also changes.
Taking the access traffic of the routing device 11 increased by 50%, the traffic of each link with changed traffic can be calculated based on the access traffic of each route calculated in table 3 and the access traffic of each non-core reason device counted in table 2, and the calculation result is shown in table 5 below:
link circuit Flow rate
11-33 10+5=15kb
33-66 10+60+5=75kb
66-88 10+60+50+80+5=205kb
88-99 10+60+50+80+30+5=235kb
Table 5: flow statistical table for each link in network
Except for the above links, the access traffic of the routing device 11 does not exist in other links in the network, and therefore, the traffic of the links is not changed.
As shown in fig. 6, the step 15 may include the following steps, when the preset change condition is a change of the service traffic of the preset type service:
and 61, aiming at the change of the service flow of the preset type service in the networking, calculating the changed access flow of each non-core routing device according to the change value of the service flow of the preset type service and based on the access flow of each non-core routing device and the service flow ratio of each non-core routing device.
Taking the voice traffic of the voice service increased by 100% as an example, based on the access traffic of each non-core reason device counted in table 2, the voice traffic of each non-core routing device increases by 100%, and the statistics of the increased access traffic of each non-core routing device are shown in table 6 below:
source device Changed access flow Traffic flow
11 10+2=12kb Speech 2+2kb- -video 8kb
22 20+4=24kb Speech 4+4kb- -video 16kb
33 60+12=72kb Speech 12+12kb- -video 48kb
44 90+18=108kb Speech 18+18kb- -video 72kb
55 50+10=60kb Speech 10+10 kb-video 40kb
66 80+16=96kb Speech 16+16kb- -video 64kb
77 40+8=48kb Speech 8+8kb- -video 32kb
88 30+6=36kb Speech 6+6kb- -video 24kb
Table 6: statistical table for changed access flow
And 62, calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the changed access flow of each non-core routing device.
For each link included in the networking, the traffic of the link is the sum of the traffic transmitted to the core routing device through the link.
Based on table 6, the calculated traffic of each link included in the network is shown in table 7 below:
link circuit Flow rate
11-33 12kb
33-66 12+72=84kb
22-44 24kb
44-77 24+108=132kb
55-66 60kb
66-88 12+72+60+96=240kb
77-99 24+108+48=180kb
88-99 12+72+60+96+36=276kb
Table 7: flow statistical table for each link in network
Based on the flows shown in fig. 4, fig. 5, and fig. 6, the flow change of the link is calculated respectively for the preset change condition that the preset non-core routing device fails, the access flow of the preset non-core routing device changes, and the service flow of the preset type service changes, that is, the flow change of the link is simulated.
Through the simulation of the traffic change, the stability of the link can be pre-determined for the network environment change which may occur, for example, if the link traffic of one link is simulated to exceed the link threshold, it indicates that there may be a problem in the stability of the link after the network environment change actually occurs, such as a network congestion problem, and after the pre-determination, the networking can be maintained based on the pre-determination result, so as to improve the stability in the actual use process of the networking.
In an embodiment of the present application, for step 12, for each non-core routing device, a route from the non-core routing device to a core routing device is calculated, which may be calculated by using various currently known route calculation methods, and the calculation process may also be understood as performing route deduction for a specific networking, that is, for a plurality of routing devices included in the networking, calculating an optimal route between specific routing devices respectively serving as a source device and a destination device, as a basis for subsequent traffic simulation.
In addition, in the related art, for a networking device including multiple routing devices in actual operation, when a network environment changes, stability of the networking may be affected, for example, when a certain routing device in the networking device fails, data that is originally transmitted to a destination device through the routing device may not be transmitted to the destination device, in order to pre-determine stability of the networking device after the network environment changes, routing deduction may be performed for a specific networking device, and an optimal route calculated through the routing deduction may also be used as a basis for pre-determining stability of the networking device.
In the process of route deduction, the currently adopted method is to calculate the optimal route from the source device to the destination device based on the OSPF protocol.
In an actual networking, the networking may be divided into a plurality of areas (which may be called OSPF areas) including a backbone area and other non-backbone areas, and the plurality of Routing devices included in the networking are divided into two types, one type is a Routing device belonging to only one area, the other type is a Routing device belonging to a plurality of areas, and the Routing devices belonging to the plurality of areas are also called ABR (association-Based Routing) devices, and the ABR devices are located on the boundaries of the plurality of OSPF areas and are used for connecting the areas to the backbone network. ABR equipment may belong to more than two areas at the same time, but one of them is the backbone area (the area number of the backbone area is typically area 0).
Based on the OSPF protocol, when calculating the optimal route from the source device to the destination device, the routing device serving as the source device performs calculation based on the link information of the link between the routing devices included in the area to which the source device belongs, and the source device cannot acquire the topology structure of each routing device included in other areas and the link information of the link between the routing devices.
However, in practical networking applications, when a source device needs to transmit data to a destination device, a next hop routing device is determined based on a calculated optimal route from the source device to the destination device, and the data is transmitted to the next hop routing device, and the next hop routing device continues to send the data based on the calculated optimal route from the source device to the destination device until the data is transmitted to the destination device. In this process, if there is an ABR device in the routing devices included in the optimal route from the source device to the destination device, since the ABR device can know the link information of the links between the routing devices included in the plurality of areas to which the ABR device belongs, the optimal route from the ABR device to the destination device calculated by the ABR device may not be in accordance with the path from the ABR device to the destination device in the optimal route calculated by the source device, so that the optimal route calculated in the route deduction based on the link information of the links between the routing devices included in the area to which the source device belongs is not in accordance with the route actually used for transmitting data.
The following is described with the networking shown in fig. 7:
as shown in fig. 7, the networking includes 4 routing devices, a routing device a, a routing device B, a routing device C, and a routing device D, and the networking is divided into two areas, an area 0 and an area 1, where the area 0 includes the routing device C and the routing device D, the routing device C is connected to the routing device D, and the area 1 includes the routing device a, the routing device B, the routing device C, and the routing device D, where the routing device a is connected to the routing device C, the routing device C is connected to the routing device B, and the routing device B is connected to the routing device D.
For the networking shown in fig. 7, the routing device a is used as a source device, the routing device D is used as a destination device to perform routing deduction, and the calculated optimal route is "a-C-B-D", however, in the actual data transmission process, after the routing device a sends data to the routing device C according to the optimal route "a-C-B-D", the routing device C forwards the data according to its own calculated optimal route to the routing device D, since the routing device C is an ABR device, it can learn not only the path "C-B-D" in the area 1, but also the path "C-D" in the area 0, so when the calculated optimal route from itself to the routing device D is "C-D", the data will be sent directly to the routing device D according to this route, so that the route actually used for transmitting data from the routing device a to the routing device D is "a-C-D", which does not coincide with the optimal route "a-C-B-D" calculated by the route deduction.
In order to solve the technical problem, an embodiment of the present application provides an optimal route modification method, as shown in fig. 8, which may include the following steps:
step 81, acquiring a networking topological structure including a plurality of routing devices and link information of links between the routing devices in the networking.
Step 82, aiming at the source device and the destination device in the plurality of routing devices, calculating the optimal route from the source device to the destination device as the initial optimal route based on the link information of the link between the routing devices contained in the area to which the source device belongs in the networking.
And step 83, when the routing equipment contained in the initial optimal route has the ABR equipment, calculating the optimal route from the ABR equipment to the destination equipment as a replacement route for replacement based on the link information of the links between the routing equipment contained in the area to which the ABR equipment belongs in the networking.
And 84, when the path from the ABR equipment to the destination equipment in the initial optimal route is different from the path from the ABR equipment to the destination equipment in the initial optimal route, replacing the path from the ABR equipment to the destination equipment in the initial optimal route by using the alternative route to obtain the corrected optimal route.
By using the optimal route modification method shown in fig. 8, the optimal route from the ABR device to the destination device, which is calculated based on the link information of the links between the routing devices included in the area to which the ABR device in the initial optimal route belongs in the networking, will be the route actually used in data transmission, so the route from the ABR device to the destination device in the initial optimal route is replaced by the replacement route, and the obtained modified optimal route is the route actually used for data transmission from the source device to the destination device, that is, the calculated optimal route matches the route actually used for data transmission.
For the networking shown in fig. 7, the optimal route modification method shown in fig. 8 is adopted, after the initial optimal route "a-C-B-D" from the routing device a to the routing device D is calculated, whether an ABR device exists therein is determined, that is, the routing device C serving as the ABR device is determined, then the optimal route "C-D" from the routing device C to the routing device D is calculated and used as a replacement route to replace the "C-B-D" in the initial optimal route "a-C-B-D", so as to obtain the modified optimal route "a-C-D", and the modified optimal route "a-C-D" is a route actually used for data transmission.
In an embodiment of the present application, the above optimal route modification method may be applied to an electronic device in a network, where the electronic device may be a server, and is used for implementing route deduction.
For the step 81, the networking topology structure including the plurality of routing devices and the link information of the links between the routing devices in the networking are obtained, which may have a plurality of obtaining manners, for example, the networking topology structure and the link information manually input by the administrator may be obtained, or automatic obtaining may also be implemented.
In the embodiment of the present application, an automatic acquisition method is provided, and a flow of the method is shown in fig. 9, where the method includes:
step 91, acquiring a networking topology structure comprising a plurality of routing devices.
In this step, the electronic device for implementing route deduction is used as a member in the networking, and can discover each routing device included in the networking by information interaction with each routing device in the networking based on a currently known device discovery protocol, so as to obtain a topology structure of the networking.
In a possible implementation manner, in this step, the administrator may also manually input a networking topology into the electronic device where the user implements route deduction, so that the electronic device can obtain and use the networking topology.
And step 92, determining ABR equipment from a plurality of routing equipment contained in the networking based on the obtained topological structure.
The ABR equipment is routing equipment which belongs to at least two areas simultaneously, and link information of links between the routing equipment contained in each area to which the ABR equipment belongs is stored on the ABR equipment.
And step 93, reading link information of links between the routing devices in the networking from the ABR devices through information interaction with the determined ABR devices based on the SNMP.
In this embodiment of the present application, based on the requirement of calculating the route, the link information read in this step may be an overhead value of the link, where the overhead value represents an overhead of transmitting data.
Based on the OSPF protocol, in this step, a stored LSDB (Link State DataBase) may be read from the ABR device, where the LSDB is a set of LSAs (Link-State advertisements) of all routing devices in an area to which the ABR device belongs, and an LSA of a routing device includes information about neighbor devices and Link overheads, that is, includes an overhead value indicating overhead of transmitting data.
In the OSPF protocol, the overhead value of a link representing the overhead of transmitting data may be a cost value.
In the flow shown in fig. 9, since the ABR device belongs to at least two areas, it stores the link information of each routing device link included in each area, and thus, the ABR device reads the link information of the link between the routing devices in the networking, and can read the link information of the link between the routing devices in the networking in fewer times, and does not need to read from all the routing devices in the networking.
In this embodiment of the present application, for a source device and a destination device in a plurality of routing devices, an initial optimal route from the source device to the destination device is calculated based on link information of links between routing devices included in an area to which the source device belongs in networking, and various currently known calculation methods may be used.
For example, in the calculation, for all routes that can reach the destination device from the source device, a cost value of each route may be calculated, where the cost value is a sum of cost values of links included in the route, and in the OSPF protocol, the cost value may be referred to as a metric value.
The calculation scheme of the initial optimal route proposed in the embodiment of the present application is described in detail below.
Fig. 10 is a possible networking structure, which includes a routing device a, a routing device b, a routing device c, a routing device d, and a routing device e, the connection relationship among the routing devices is as shown in fig. 10, and the cost values of the links between the routing devices are shown in the following table 8:
Figure BDA0002219150110000201
Figure BDA0002219150110000211
table 8: overhead value of a link
Based on the topology structure of the networking shown in fig. 10 and the cost value of the link between the routing devices, taking the routing device a as the source device and other routing devices as the destination devices, as an example, a scheme for calculating an initial optimal route is proposed, as shown in fig. 11, including:
step 1101, determining candidate paths directly connected from the routing device a to other routing devices, and determining an optimal path from the candidate paths.
In this step, a routing device having a link relationship with the routing device a may be determined first, so as to obtain three routing devices, namely, a routing device b, a routing device c, and a routing device e;
correspondingly, three links, namely 'a-b', 'a-c' and 'a-e', can be determined, which are three candidate paths.
And determining an optimal path from the determined candidate paths.
In this step, the candidate path with the minimum metric value may be determined as the optimal path based on the metric values of the candidate paths, and the result is shown in the following table 9:
Figure BDA0002219150110000212
table 9: optimal path selection schematic table
The metric value of each candidate path in table 9 is calculated based on the cost value of each link in fig. 10, and based on the data in table 9, it can be known that the metric value of the path "a-b" is the smallest among the three candidate paths, so that the optimal path from the routing device a to the routing device b is determined to be "a-b", and accordingly, the optimal path with the routing device b as the destination device is calculated.
After determining the optimal path from the routing device a to the routing device b, the optimal path is removed from the candidate paths, i.e., the optimal path "a-b" is removed from the candidate paths, and the remaining candidate paths include "a-c" and "a-e".
Step 1102, based on the calculated destination device, determining a candidate path from the routing device a to another routing device through the calculated destination device b, and determining an optimal path therefrom.
In this step, the routing device b is used as a destination device for completing the calculation, and a routing device having a link relationship with the routing device b may be determined first to obtain three routing devices, which are respectively a routing device a, a routing device c, and a routing device d;
correspondingly, as the routing device a is a source device, excluding the source device, the candidate path taking the routing device b as a destination device is expanded to obtain two new paths "a-b-c" and "a-b-d", that is, two new paths "a-b-c" and "a-b-d" from the routing device a to the candidate path between other routing devices through the destination device b after calculation, and the two new paths "a-b-c" and "a-b-d" are added to the candidate path, so that the current candidate path includes "a-c", "a-e", "a-b-c" and "a-b-d".
And determining the optimal path from the current candidate paths.
In this step, the candidate path with the minimum metric value may be determined as the optimal path based on the metric values of the candidate paths, and the result is shown in the following table 10:
Figure BDA0002219150110000221
table 10: optimal path selection schematic table
The metric value of each candidate path in the table 10 is calculated based on the cost value of each link in fig. 10, and based on the data in the table 10, it can be known that the metric value of the path "a-b-c" is the smallest among the four candidate paths, so that the optimal path from the routing device a to the routing device c is determined to be "a-b-c", and accordingly, the routing device c is used as the optimal path of the destination device, and the calculation is completed.
After the optimal path from the routing device a to the routing device c is determined, the optimal path is removed from the candidate paths, and meanwhile, other candidate paths from the routing device a to the routing device c are also removed, wherein the remaining candidate paths comprise 'a-e' and 'a-b-d'.
Step 1103, based on the destination device having completed the calculation, determining candidate paths from the routing device a to other routing devices through the destination device c having completed the calculation, and determining an optimal path therefrom.
In this step, the routing device c is used as a destination device for completing the calculation, and a routing device having a link relationship with the routing device c may be determined first to obtain three routing devices, which are respectively a routing device a, a routing device b, and a routing device d;
correspondingly, as the routing device a is a source device, the routing device b is a destination device which is completed by calculation, the candidate path which takes the routing device c as the destination device is excluded, a new path "a-b-c-d" is obtained, namely the candidate path from the routing device a to other routing devices through the destination device c which is completed by calculation, and the new path "a-b-c-d" is added into the candidate path, so that the current candidate path comprises "a-e", "a-b-d" and "a-b-c-d".
And determining the optimal path from the current candidate paths.
In this step, the candidate path with the minimum metric value may be determined as the optimal path based on the metric values of the candidate paths, and the result is shown in the following table 11:
Figure BDA0002219150110000231
table 11: optimal path selection schematic table
The metric value of each candidate path in the table 11 is calculated based on the cost value of each link in fig. 10, and based on the data in the table 11, it can be known that the metric value of the path "a-b-d" is the smallest among the three candidate paths, so that the optimal path from the routing device a to the routing device d is determined to be "a-b-d", and accordingly, the routing device d is used as the optimal path of the destination device, and the calculation is completed.
After the optimal path from the routing device a to the routing device d is determined, the optimal path is removed from the candidate paths, meanwhile, other candidate paths from the routing device a to the routing device d are also removed, and the remaining candidate paths comprise 'a-e'.
And step 1104, based on the calculated destination device, determining candidate paths from the routing device a to other routing devices through the calculated destination device d, and determining an optimal path therefrom.
In this step, the routing device d is used as a destination device for completing the calculation, and a routing device having a link relationship with the routing device d may be determined first to obtain three routing devices, which are respectively a routing device b, a routing device c, and a routing device e;
correspondingly, the routing device b and the routing device c are destination devices which are calculated, except the routing device b and the routing device c, the candidate path which takes the routing device d as the destination device is expanded to obtain a new path "a-b-d-e", namely the candidate path from the routing device a to other routing devices through the destination device d which is calculated, and the new path "a-b-d-e" is added into the candidate path, so that the current candidate path comprises "a-e" and "a-b-d-e".
And determining the optimal path from the current candidate paths.
In this step, the candidate path with the minimum metric value may be determined as the optimal path based on the metric values of the candidate paths, and the result is shown in the following table 12:
Figure BDA0002219150110000241
table 12: optimal path selection schematic table
The metric value of each candidate path in the table 12 is calculated based on the cost value of each link in fig. 10, and based on the data in the table 12, it can be known that the metric value of the path "a-e" is the smallest in the two candidate paths, so that the optimal path from the routing device a to the routing device e is determined to be "a-e", and accordingly, the routing device e is used as the optimal path of the destination device, and the calculation is completed.
So far, in the networking shown in fig. 10, the routing device a is used as the source device, and the other routing devices are respectively used as the destination devices, so that the calculation of the optimal path is completed, and the result is shown in the above table 12.
In an embodiment of the present application, for step 12, a route from each non-core routing device to a core routing device is calculated for each non-core routing device, and the optimal route may be calculated by using the optimal route modification method provided in the embodiment of the present application, which specifically includes the following steps:
acquiring link information of links among a plurality of routing devices in networking;
aiming at respectively taking each non-core routing device as a source device and taking a core routing device as a destination device, calculating an optimal route from the source device to the destination device as an initial optimal route based on link information of links between the routing devices contained in an area to which the source device belongs in networking;
when the routing equipment contained in the initial optimal route has the ABR equipment, the optimal route from the ABR equipment to the destination equipment is calculated to be used as a replacement route for replacement on the basis of the link information of the links between the routing equipment contained in the area to which the ABR equipment belongs in the networking;
and when the path from the ABR equipment to the destination equipment in the initial optimal route is different from the path from the ABR equipment to the destination equipment in the initial optimal route, replacing the path from the ABR equipment to the destination equipment in the initial optimal route by using the alternative route to obtain the route from the non-core routing equipment to the core routing equipment.
Based on the above steps, the route from each non-core routing device to the core device can be calculated, and the detailed calculation process may refer to any of the above optimal route correction methods provided in the embodiments of the present application, and will not be described in detail herein.
Based on the same inventive concept, according to the flow simulation method provided in the above embodiment of the present invention, correspondingly, another embodiment of the present invention further provides a simulation apparatus for flow variation, a schematic structural diagram of which is shown in fig. 12, and the method specifically includes:
a structure obtaining module 1201, configured to obtain a networking topology structure including a plurality of routing devices, where the plurality of routing devices include a core routing device, and other routing devices are non-core routing devices;
a route calculation module 1202, configured to calculate, for each non-core routing device, a route from the non-core routing device to the core routing device;
a traffic obtaining module 1203, configured to obtain, for each non-core routing device, traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device, as egress interface traffic of the non-core routing device;
an access traffic calculation module 1204, configured to calculate, based on a route from each non-core routing device to the core routing device and the egress interface traffic of each non-core routing device, traffic sent by each non-core routing device to the core routing device as a source device, as access traffic of the non-core routing device;
a link traffic calculation module 1205, configured to calculate, for a preset change condition of the network environment of the networking, traffic of each link included in a route from each non-core routing device to the core routing device based on the preset change condition and the access traffic of each non-core routing device, as simulated link traffic after the preset change condition occurs.
Further, the traffic obtaining module 1203 is specifically configured to, for each non-core routing device, based on a simple network management protocol SNMP, read, from the non-core routing device, traffic transmitted from an output interface of the non-core routing device in a route from the non-core routing device to the core routing device through information interaction with the non-core routing device.
Further, the link traffic calculation module 1205 is specifically configured to calculate, for each of the other non-core routing devices, a route from the non-core routing device to the core routing device in the network without the preset non-core routing device, when the preset non-core routing device in the network fails; and calculating the flow of each link contained in the route from each other non-core routing device to the core routing device based on the access flow of each other non-core routing device.
Further, the link traffic calculation module 1205 is specifically configured to obtain, as an access change value, a change value of the access traffic of a preset non-core routing device in the network, for the change of the access traffic of the preset non-core routing device; and calculating the flow of each link included in the route from the preset non-core routing device to the core routing device according to the access change value and the access flow of the non-core routing device included in the route from the preset non-core routing device to the core routing device.
Further, for the access flow of each non-core routing device, a ratio of service flows of different service types is set as a service flow ratio;
a link traffic calculation module 1205, specifically configured to calculate, for a change in service traffic of a preset type of service in the networking, a changed access traffic of each non-core routing device based on the access traffic of each non-core routing device and the ratio of the service traffic of each non-core routing device according to a change value of the service traffic of the preset type of service; and calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the changed access flow of each non-core routing device.
Further, the route calculation module 1202, as shown in fig. 13, includes:
an information obtaining sub-module 1301, configured to obtain link information of links between the multiple routing devices in the networking;
a first route calculation sub-module 1302, configured to calculate, for each non-core routing device serving as a source device and each core routing device serving as a destination device, an optimal route from the source device to the destination device based on link information of links between routing devices included in an area to which the source device belongs in the networking, and use the optimal route as an initial optimal route;
a second route calculation sub-module 1303, configured to, when there is a route ABR device based on a union among the route devices included in the initial optimal route, calculate an optimal route from the ABR device to the destination device as an alternative route for replacement based on link information of links between the route devices included in an area to which the ABR device belongs in the networking;
a route replacing submodule 1304, configured to, when the replacement route is different from the path from the ABR device to the destination device in the initial optimal route, replace, by using the replacement route, the path from the ABR device to the destination device in the initial optimal route, and obtain a route from the non-core routing device to the core routing device.
Further, the information obtaining sub-module 1301 is specifically configured to determine, based on the topology, an ABR device from the multiple routing devices; and based on SNMP, reading link information of the links between the routing devices in the networking from the ABR devices through information interaction with the determined ABR devices.
Further, the link information is an overhead value, and the overhead value represents an overhead for transmitting data.
The embodiment of the present application further provides an electronic device, as shown in fig. 14, including a processor 1401 and a machine-readable storage medium 1402, where the machine-readable storage medium 1402 stores machine-executable instructions capable of being executed by the processor 1401, and the processor 1401 is caused by the machine-executable instructions to: implementing the steps of any of the above flow simulation methods.
The machine-readable storage medium may include a Random Access Memory (RAM) and a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above flow simulation methods.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when executed on a computer, cause the computer to perform any of the flow simulation methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the relevant embodiments of the apparatus, the electronic device, the computer-readable storage medium and the computer program product, which are substantially similar to the method embodiments, the description is relatively simple, and relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (18)

1. A method of flow simulation, comprising:
acquiring a networking topological structure comprising a plurality of routing devices, wherein the routing devices comprise a core routing device, and other routing devices are non-core routing devices;
for each of the non-core routing devices, calculating a route from the non-core routing device to the core routing device;
for each non-core routing device, acquiring traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device, as egress interface traffic of the non-core routing device;
calculating the flow sent to the core routing equipment by each non-core routing equipment as source equipment based on the route from each non-core routing equipment to the core routing equipment and the output interface flow of each non-core routing equipment, wherein the flow is used as the access flow of the non-core routing equipment;
calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the preset change condition and the access flow of each non-core routing device aiming at the preset change condition of the networking network environment, wherein the flow is used as the simulated link flow after the preset change condition occurs;
wherein, the access flow of each non-core routing device is: and subtracting the residual traffic of the received data traffic from other non-core routing equipment from the outgoing interface traffic of the non-core routing equipment.
2. The method according to claim 1, wherein the obtaining, for each of the non-core routing devices, traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device includes:
and for each non-core routing device, based on a Simple Network Management Protocol (SNMP), reading the traffic transmitted from the output interface of the non-core routing device in the route from the non-core routing device to the core routing device through information interaction between the non-core routing device and the non-core routing device.
3. The method according to claim 1 or 2, wherein the calculating traffic of each link included in the route from each non-core routing device to the core routing device based on the preset change condition of the network environment for the networking and the access traffic of each non-core routing device comprises:
aiming at the fault of a preset non-core routing device in the networking, aiming at each other non-core routing device in the networking without the preset non-core routing device, calculating the route from the non-core routing device to the core routing device;
and calculating the flow of each link contained in the route from each other non-core routing device to the core routing device based on the access flow of each other non-core routing device.
4. The method according to claim 1 or 2, wherein the calculating, for the preset change condition of the networking environment, traffic of each link included in the route from each non-core routing device to the core routing device based on the preset change condition and the access traffic of each non-core routing device comprises:
acquiring a change value of the access flow of a preset non-core routing device as an access change value aiming at the change of the access flow of the preset non-core routing device in the networking;
and calculating the flow of each link included in the route from the preset non-core routing equipment to the core routing equipment according to the access change value and the access flow of the non-core routing equipment included in the route from the preset non-core routing equipment to the core routing equipment.
5. The method according to claim 1 or 2, characterized in that for the access traffic of each non-core routing device, a proportion of traffic flows of different traffic types is set as a traffic flow proportion;
the calculating, based on a preset change condition of the networking network environment and the access traffic of each non-core routing device, traffic of each link included in a route from each non-core routing device to the core routing device includes:
aiming at the change of the service flow of a preset type service in the networking, calculating the changed access flow of each non-core routing device according to the change value of the service flow of the preset type service and based on the access flow of each non-core routing device and the service flow ratio of each non-core routing device;
and calculating the flow of each link included in the route from each non-core routing device to the core routing device based on the changed access flow of each non-core routing device.
6. The method of claim 1, wherein the calculating, for each of the non-core routing devices, a route from the non-core routing device to the core routing device comprises:
acquiring link information of links among the plurality of routing devices in the networking;
aiming at respectively taking each non-core routing device as a source device and the core routing device as a destination device, calculating an optimal route from the source device to the destination device as an initial optimal route based on link information of links between the routing devices contained in the area to which the source device belongs in the networking;
when routing equipment contained in the initial optimal route has united routing ABR equipment, calculating the optimal route from the ABR equipment to the destination equipment as an alternative route for replacement based on link information of links among the routing equipment contained in an area to which the ABR equipment belongs in the networking;
and when the alternative route is different from the path from the ABR equipment to the destination equipment in the initial optimal route, replacing the path from the ABR equipment to the destination equipment in the initial optimal route by using the alternative route to obtain the route from the non-core routing equipment to the core routing equipment.
7. The method of claim 6, wherein the obtaining link information of links between the plurality of routing devices in the network comprises:
determining an ABR device from the plurality of routing devices based on the topology;
and based on the SNMP, reading link information of the link between the routing devices in the networking from the ABR equipment through information interaction with the determined ABR equipment.
8. The method of claim 7, wherein the link information is an overhead value indicating an overhead for transmitting data.
9. A flow simulator, comprising:
the system comprises a structure acquisition module, a topology acquisition module and a topology management module, wherein the structure acquisition module is used for acquiring a networking topology structure comprising a plurality of routing devices, the routing devices comprise a core routing device, and other routing devices are non-core routing devices;
a route calculation module, configured to calculate, for each of the non-core routing devices, a route from the non-core routing device to the core routing device;
a traffic obtaining module, configured to obtain, for each non-core routing device, traffic transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device, as egress interface traffic of the non-core routing device;
an access flow calculation module, configured to calculate, based on a route from each non-core routing device to the core routing device and the egress interface flow of each non-core routing device, a flow sent by each non-core routing device to the core routing device as a source device, as an access flow of the non-core routing device;
a link traffic calculation module, configured to calculate, for a preset change condition of a network environment of the networking, traffic of each link included in a route from each non-core routing device to the core routing device based on the preset change condition and the access traffic of each non-core routing device, where the traffic is used as a link traffic after the preset change condition is simulated;
wherein, the access flow of each non-core routing device is: and subtracting the residual traffic of the received data traffic from other non-core routing equipment from the output interface traffic of the non-core routing equipment.
10. The apparatus according to claim 9, wherein the traffic obtaining module is specifically configured to, for each non-core routing device, based on a simple network management protocol SNMP, read, from the non-core routing device through information interaction with the non-core routing device, a traffic that is transmitted from an egress interface of the non-core routing device in a route from the non-core routing device to the core routing device.
11. The apparatus according to claim 9 or 10, wherein the link traffic calculation module is specifically configured to, for a failure of a preset non-core routing device in the networking, calculate, for each other non-core routing device in the networking that removes the preset non-core routing device, a route from the non-core routing device to the core routing device; and calculating the flow of each link included in the route from each other non-core routing device to the core routing device based on the access flow of each other non-core routing device.
12. The apparatus according to claim 9 or 10, wherein the link traffic calculation module is specifically configured to, for the access traffic of a preset non-core routing device in the networking changes, obtain a change value of the access traffic of the preset non-core routing device, as an access change value; and calculating the flow of each link included in the route from the preset non-core routing device to the core routing device according to the access change value and the access flow of the non-core routing device included in the route from the preset non-core routing device to the core routing device.
13. The apparatus according to claim 9 or 10, wherein, for the access traffic of each non-core routing device, a proportion of service traffic of different service types is set as a service traffic proportion;
the link flow calculation module is specifically configured to calculate, for a change in service flow of a preset type of service in the networking, a changed access flow of each non-core routing device based on the access flow of each non-core routing device and the ratio of the service flow of each non-core routing device according to a change value of the service flow of the preset type of service; and calculating the flow of each link contained in the route from each non-core routing device to the core routing device based on the changed access flow of each non-core routing device.
14. The apparatus of claim 9, wherein the route calculation module comprises:
an information obtaining submodule, configured to obtain link information of links between the plurality of routing devices in the network;
a first route calculation submodule, configured to calculate, for each of the non-core routing devices as a source device and the core routing device as a destination device, an optimal route from the source device to the destination device as an initial optimal route based on link information of a link between the routing devices included in an area to which the source device belongs in the network;
a second route calculation submodule, configured to, when there is a route ABR device based on a union among the route devices included in the initial optimal route, calculate an optimal route from the ABR device to the destination device as an alternative route for replacement based on link information of links between the route devices included in an area to which the ABR device belongs in the networking;
and the route replacement submodule is used for replacing the path from the ABR equipment to the destination equipment in the initial optimal route by using the replacement route when the replacement route is different from the path from the ABR equipment to the destination equipment in the initial optimal route, so as to obtain the route from the non-core routing equipment to the core routing equipment.
15. The apparatus according to claim 14, wherein the information obtaining sub-module is specifically configured to determine, based on the topology, an ABR device from the plurality of routing devices; and based on SNMP, reading link information of the links between the routing devices in the networking from the ABR devices through information interaction with the determined ABR devices.
16. The apparatus of claim 15, wherein the link information is an overhead value indicating an overhead for transmitting data.
17. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-8.
CN201910926786.2A 2019-09-27 2019-09-27 Flow simulation method and device Active CN110661664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910926786.2A CN110661664B (en) 2019-09-27 2019-09-27 Flow simulation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910926786.2A CN110661664B (en) 2019-09-27 2019-09-27 Flow simulation method and device

Publications (2)

Publication Number Publication Date
CN110661664A CN110661664A (en) 2020-01-07
CN110661664B true CN110661664B (en) 2022-06-21

Family

ID=69039566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910926786.2A Active CN110661664B (en) 2019-09-27 2019-09-27 Flow simulation method and device

Country Status (1)

Country Link
CN (1) CN110661664B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7908130B2 (en) * 2002-12-12 2011-03-15 Ixia Modelling aggregate transport layer network traffic behaviour with feedback containing packet loss information
US7606165B2 (en) * 2004-01-30 2009-10-20 Microsoft Corporation What-if analysis for network diagnostics
CN104518899B (en) * 2013-09-30 2018-06-26 中国电信股份有限公司 Network routing traffic emulation mode and device
CN108964958A (en) * 2017-05-27 2018-12-07 中兴通讯股份有限公司 path evaluation method and device
CN108566305B (en) * 2018-04-28 2021-04-06 中国人民大学 A computer network intelligent networking and optimization system and method

Also Published As

Publication number Publication date
CN110661664A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
US9647959B2 (en) Method, device, and system for creating bidirectional multicast distribution tree based on interior gateway protocol
US7990877B2 (en) Method and apparatus for dynamically runtime adjustable path computation
CN109639575B (en) Routing planning method based on link congestion coefficient
CN102577280B (en) Method, device and system for sending messages
CN108965141B (en) Method and device for calculating multipath routing tree
US9608900B2 (en) Techniques for flooding optimization for link state protocols in a network topology
US10567272B2 (en) Bit error information transfer method, network device, and communications system
CN106470168A (en) A kind of data transmission method, the switch using the method and network control system
CN112615780B (en) Method and device for determining alternative path of data flow in SDN network
US10831630B2 (en) Fault analysis method and apparatus based on data center
WO2021088801A9 (en) Routing method, network controller, system, and storage medium
CN103843360B (en) Service deployment method, device and the network equipment
CN111083050B (en) A method and device for data stream transmission based on software-defined network
US20170207993A1 (en) Bidirectional constrained path search
Böttger et al. Shaping the Internet: 10 years of IXP growth
WO2025050814A1 (en) Traffic determination method and apparatus, electronic device, and storage medium
CN110661664B (en) Flow simulation method and device
US9154403B2 (en) Identifying the best service provider link for performance routing
CN112995036A (en) Network traffic scheduling method and device
CN108737264B (en) Data transmission method and device
JP6407092B2 (en) Load distribution apparatus, load distribution method and program
CN112637053B (en) Method and device for determining backup forwarding path of route
CN114363191A (en) A method and device for routing diffusion simulation based on nodes and IP addresses
CN105306294B (en) A kind of Test cases technology system and method for interchanger
CN109921989B (en) BGP logical topology generation method and equipment

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