CN110808906A - Static routing test method and device - Google Patents

Static routing test method and device Download PDF

Info

Publication number
CN110808906A
CN110808906A CN201910984380.XA CN201910984380A CN110808906A CN 110808906 A CN110808906 A CN 110808906A CN 201910984380 A CN201910984380 A CN 201910984380A CN 110808906 A CN110808906 A CN 110808906A
Authority
CN
China
Prior art keywords
tested
routing
address
static route
equipment
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.)
Pending
Application number
CN201910984380.XA
Other languages
Chinese (zh)
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201910984380.XA priority Critical patent/CN110808906A/en
Publication of CN110808906A publication Critical patent/CN110808906A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects

Landscapes

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

Abstract

The application provides a testing method and a testing device for a static route, which are applied to testing equipment, wherein the method comprises the following steps: after determining the static route to be tested from the configured routing table, synchronizing the static route to be tested and the state thereof to the routing equipment; constructing a set number of messages based on a target IP address of the static route to be tested, a subnet mask and an MAC address of the routing equipment; sending the set number of messages to the routing equipment so that the routing equipment forwards the set number of messages; receiving a message forwarded by the routing equipment; determining whether the static route to be tested is effective or not according to whether the destination MAC address of each message forwarded by the received routing equipment is the MAC address of the testing equipment or not and whether the number of the messages forwarded by the received routing equipment is a set number or not; and determining whether the static route to be tested is abnormal according to the state of the static route to be tested and whether the static route to be tested is effective. By applying the embodiment of the application, the human resources can be greatly saved, and the testing efficiency is improved.

Description

Static routing test method and device
Technical Field
The application relates to the technical field of network communication, in particular to a method and a device for testing a static route.
Background
The main function of the route is to select a route, a static route is one of the routes, a destination Internet Protocol (IP) address, a subnet mask and a next hop IP address can be specified, a routing table can be formed by a plurality of static routes, and the routing device can forward a received message according to the routing table.
Static routing usually requires testing, and the current testing method needs the participation of technicians to complete: firstly, a technical person configures a static route, then the technical person constructs a message matched with the static route through a test tool, the message is sent to a routing device and forwarded by the routing device, the technical person captures a packet on an output interface of the routing device, and further whether the quantity of the message forwarded by the routing device is the same as that of the message constructed by the test tool is determined through a destination IP address and a destination Media Access Control (MAC) of the message, so that whether the static route is abnormal is determined.
At present, the subnet mask of the static route has 32 bits, and the destination IP address and the next hop IP address have many possibilities, that is, the number of the static routes is very large.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for testing a static route, so as to solve the problems of wasting a large amount of human resources and reducing the testing efficiency in the related art.
Specifically, the method is realized through the following technical scheme:
a testing method of static routing is applied to testing equipment, a sending port of the testing equipment is connected with a receiving port of routing equipment, and the receiving port of the testing equipment is connected with the sending port of the routing equipment, and the method comprises the following steps:
after determining a static route to be tested from a configured routing table, synchronizing the static route to be tested and the state thereof to the routing equipment so that the routing equipment updates the state of the static route to be tested;
constructing a set number of messages based on the destination IP address of the static route to be tested, the subnet mask and the MAC address of the routing equipment;
sending the set number of messages to the routing equipment so that the routing equipment forwards the set number of messages;
receiving the message forwarded by the routing equipment;
determining whether the static route to be tested is effective or not according to whether the received destination MAC address of each message forwarded by the routing equipment is the MAC address of the testing equipment or not and whether the number of the received messages forwarded by the routing equipment is the set number or not;
and determining whether the static route to be tested is abnormal or not according to the state of the static route to be tested and whether the static route to be tested is effective or not.
A testing device of static routing is applied to testing equipment, a sending port of the testing equipment is connected with a receiving port of routing equipment, and the receiving port of the testing equipment is connected with the sending port of the routing equipment, and the device comprises:
the synchronous module is used for determining the static route to be tested from the configured routing table, and then synchronizing the static route to be tested and the state thereof to the routing equipment so that the routing equipment updates the state of the static route to be tested;
the constructing module is used for constructing a set number of messages based on the destination IP address of the static route to be tested, the subnet mask and the MAC address of the routing equipment;
a sending module, configured to send the set number of packets to the routing device, so that the routing device forwards the set number of packets;
a receiving module, configured to receive a packet forwarded by the routing device;
a determining module, configured to determine whether the static route to be tested is valid according to whether a destination MAC address of each received message forwarded by the routing device is an MAC address of the testing device and whether the number of received messages forwarded by the routing device is the set number; and determining whether the static route to be tested is abnormal or not according to the state of the static route to be tested and whether the static route to be tested is effective or not.
It can be seen from the above technical solutions that, after determining a static route to be tested from a configured routing table, synchronizing the static route to be tested and its state to a routing device, then constructing a set number of messages based on a destination IP address, a subnet mask and an MAC address of the routing device and sending the messages to the routing device for forwarding, and finally determining whether the static route to be tested is valid according to whether a destination MAC address of each message forwarded by the routing device is an MAC address of the testing device and whether the number of the messages forwarded by the routing device is a set number, determining whether the static route to be tested is abnormal according to the state of the static route to be tested and whether the static route to be tested is valid, and the whole process does not need the participation of technical personnel any more, so as to realize automatic testing of the static route, and greatly save human resources compared with related technical solutions, and improve the testing efficiency.
Drawings
Fig. 1 is a flowchart illustrating a method for testing a static route according to the present application;
FIG. 2 is a schematic diagram illustrating connection between a test device and a routing device according to the present application;
FIG. 3 is a schematic diagram of a configuration process of a routing table shown in the present application;
fig. 4 is a schematic structural diagram of a static routing test apparatus shown in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to solve the above problem, embodiments of the present invention provide a method for testing a static route, so as to greatly save human resources and improve testing efficiency. Referring to fig. 1, fig. 1 is a flowchart of a testing method for a static route, which is applied to the testing device shown in fig. 2, and fig. 2 is a schematic connection diagram of the testing device and the routing device, where a sending port of the testing device is connected to a receiving port of the routing device, and a receiving port of the testing device is connected to a sending port of the routing device.
S11: after the static route to be tested is determined from the configured routing table, the static route to be tested and the state thereof are synchronized to the routing equipment, so that the routing equipment updates the state of the static route to be tested.
The configured routing table comprises a plurality of static routes, one static route can be determined as the static route to be tested, and the static route to be tested and the state thereof are synchronized to the routing equipment, so that the routing equipment can update the state of the static route to be tested.
In an alternative embodiment, please refer to fig. 3 for a configuration process of a routing table, where fig. 3 is a configuration process of a routing table, which specifically includes:
s31: and acquiring at least one preset destination IP address to obtain a preset destination IP address set.
The at least one predetermined destination IP address may be provided by a technician or may be determined by the testing device itself.
S32: and determining at least one IP address belonging to the same network segment with the IP address of the receiving port of the test equipment to obtain a next-hop IP address set.
And selecting at least one IP address from the network segment to which the IP address of the receiving port of the test equipment belongs to obtain a next-hop IP address set.
S33: and respectively adding subnet masks to all the combinations of all the IP addresses in the combination of all the IP addresses in the preset destination IP address set and all the IP addresses in the next hop IP address set to obtain all static routes to form a routing table.
S31-S33 recite a method for configuring a routing table, and there are certainly many other configurations, for example, a part of combinations may be selected from all combinations of each IP address in a preset destination IP address set and each IP address in a next-hop IP address combination, and all static routes obtained after adding a subnet mask to the part of combinations respectively form a routing table, and other configurations are not described in detail.
Correspondingly, the implementation process of S11 specifically includes:
updating the state of the static route in the routing table according to a set rule;
determining the static route in the updated state as a static route to be tested;
and synchronizing the static route to be tested and the state thereof to the routing equipment.
Because the static route is usually added and deleted in the routing table, the state of the static route in the routing table can be deleted and added, the static route with the changed state can be used as the static route to be tested, and the static route to be tested and the state thereof can be synchronized to the routing equipment, so that the routing equipment can update the state of the static route to be tested. The setting rule may be set according to actual needs, for example, the setting rule may be determined according to the size of a routing table supported by the routing device, the state of a static route whose state is deleted is first updated to addition, and the state of a static route whose state is added is next randomly updated to deletion according to a 30% probability; when the number of the static routes with the states of addition reaches 5% of the size of a routing table of the routing equipment, updating the states of the two static routes with the states of deletion as addition every time, and randomly updating the states of the two static routes with the states of addition as deletion next time according to the probability of 30%; … …, and so on, until the existing configuration reaches full specification.
S12: and constructing a set number of messages based on the destination IP address of the static route to be tested, the subnet mask and the MAC address of the routing equipment.
Because the packet needs to be sent to the routing device, when constructing the packet, it needs to construct a device based on the destination IP address of the static route to be tested, the subnet mask, and the MAC address of the routing device. The set number can be set according to actual needs, and for example, but not limited to, 100, 80, 96, and the like can be set.
S13: and sending the set number of messages to the routing equipment so that the routing equipment forwards the set number of messages.
S14: and receiving the message forwarded by the routing equipment.
S15: and determining whether the static route to be tested is effective or not according to whether the destination MAC address of each message forwarded by the received routing equipment is the MAC address of the testing equipment or not and whether the number of the messages forwarded by the received routing equipment is the set number or not.
S16: and determining whether the static route to be tested is abnormal according to the state of the static route to be tested and whether the static route to be tested is effective.
It can be known from S11 that the status of the static route to be tested may be deletion and addition, and assuming that the status of the static route to be tested is deletion, if the result obtained through S15 is valid, it indicates that the static route to be tested is abnormal, and if the result obtained through S15 is invalid, it indicates that the static route to be tested is normal; similarly, assuming that the state of the static route to be tested is addition, if the result obtained through S15 is valid, it indicates that the static route to be tested is normal, and if the result obtained through S15 is invalid, it indicates that the static route to be tested is abnormal.
It can be seen from the above technical solutions that, after determining a static route to be tested from a configured routing table, synchronizing the static route to be tested and its state to a routing device, then constructing a set number of messages based on a destination IP address, a subnet mask and an MAC address of the routing device and sending the messages to the routing device for forwarding, and finally determining whether the static route to be tested is valid according to whether a destination MAC address of each message forwarded by the routing device is an MAC address of the testing device and whether the number of the messages forwarded by the routing device is a set number, determining whether the static route to be tested is abnormal according to the state of the static route to be tested and whether the static route to be tested is valid, and the whole process does not need the participation of technical personnel any more, so as to realize automatic testing of the static route, and greatly save human resources compared with related technical solutions, and improve the testing efficiency.
Specifically, the constructing of the set number of messages based on the destination IP address of the static route to be tested, the subnet mask, and the MAC address of the routing device in S12 specifically includes:
selecting an IP address according to the target IP address and the subnet mask of the static route to be tested to obtain a selected IP address;
acquiring an MAC address of routing equipment;
and constructing a set number of messages respectively taking the selected IP address and the MAC address of the routing equipment as a destination IP address and a destination MAC address.
The destination IP address and the subnet mask of the static route to be tested can comprise a plurality of IP addresses, one IP address can be selected from the IP addresses as a selected IP address, and then messages respectively taking the selected IP address and the MAC address of the routing equipment as the destination IP address and the destination MAC address are constructed, so that the routing equipment can be ensured to receive the messages.
For example, assume that the static routes to be tested are: 5.1.1.1/30, 3.0.0.2 for the next hop IP address, and selecting 5.1.1.2 as the selected IP address, if the MAC address of the testing device is 00:24: ac:12:34:56, then a set number of messages can be constructed based on the selected IP address.
Specifically, in the above S15, determining whether the static route to be tested is valid according to whether the destination MAC address of each received message forwarded by the routing device is the MAC address of the testing device and whether the number of the received messages forwarded by the routing device is the set number, the implementation process specifically includes:
determining whether the destination MAC addresses of the received messages forwarded by the routing equipment are all the MAC addresses of the testing equipment;
if the received destination MAC addresses of all the messages forwarded by the routing equipment are determined to be the MAC addresses of the testing equipment, determining whether the number of the received messages forwarded by the routing equipment is a set number; if the number of the received messages forwarded by the routing equipment is determined to be the set number, determining that the static routing to be tested is effective; if the number of the received messages forwarded by the routing equipment is determined not to be the set number, determining that the static routing to be tested is invalid;
and if the destination MAC address of the received message forwarded by the routing equipment is determined not to be the MAC address of the testing equipment, determining that the static route to be tested is invalid.
Continuing to use the above example, capturing and analyzing the content of the message on the receiving port of the testing device, checking whether the destination MAC address and the number of each message are consistent with those in table 1 below, if it is determined that the destination MAC address of each message forwarded by the routing device is consistent with those in table 1, further determining whether the number of the received messages forwarded by the routing device is a set number, if it is determined that the number of the received messages forwarded by the routing device is the set number, it is determined that all the messages sent by the testing device are forwarded back, and it is determined that the static route to be tested is valid, and if it is determined that the number of the received messages forwarded by the routing device is not the set number, it is determined that all the messages sent by the testing device are not forwarded back, and it is determined that the static route to be tested is invalid; and if the destination MAC addresses of the messages forwarded by the routing equipment are determined not to be consistent with those in the table 1, determining that the static route to be tested is invalid.
Number of Destination IP address MAC address
100 5.1.1.2 00:24:ac:12:34:56
TABLE 1
Referring to fig. 4, fig. 4 is a schematic structural diagram of a static routing test apparatus shown in this application, which is applied in a test device, a sending port of the test device is connected to a receiving port of a routing device, and the receiving port of the test device is connected to the sending port of the routing device, and the apparatus includes:
a synchronizing module 41, configured to determine a static route to be tested from the configured routing table, and synchronize the static route to be tested and a state thereof to the routing device, so that the routing device updates a state of the static route to be tested;
a constructing module 42, configured to construct a set number of messages based on the destination IP address of the static route to be tested, the subnet mask, and the MAC address of the routing device;
a sending module 43, configured to send a set number of messages to the routing device, so that the routing device forwards the set number of messages;
a receiving module 44, configured to receive a packet forwarded by the routing device;
a determining module 45, configured to determine whether the static route to be tested is valid according to whether a destination MAC address of each received message forwarded by the routing device is an MAC address of the testing device and whether the number of received messages forwarded by the routing device is a set number; and determining whether the static route to be tested is abnormal according to the state of the static route to be tested and whether the static route to be tested is effective.
It can be seen from the above technical solutions that, after determining a static route to be tested from a configured routing table, synchronizing the static route to be tested and its state to a routing device, then constructing a set number of messages based on a destination IP address, a subnet mask and an MAC address of the routing device and sending the messages to the routing device for forwarding, and finally determining whether the static route to be tested is valid according to whether a destination MAC address of each message forwarded by the routing device is an MAC address of the testing device and whether the number of the messages forwarded by the routing device is a set number, determining whether the static route to be tested is abnormal according to the state of the static route to be tested and whether the static route to be tested is valid, and the whole process does not need the participation of technical personnel any more, so as to realize automatic testing of the static route, and greatly save human resources compared with related technical solutions, and improve the testing efficiency.
Optionally, the apparatus further includes an obtaining module, wherein:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring at least one preset destination IP address to obtain a preset destination IP address set;
the determining module 45 is further configured to determine at least one IP address that belongs to the same network segment as the IP address of the receiving port of the test device, so as to obtain a next-hop IP address set;
the constructing module 42 is further configured to add subnet masks to all combinations of all IP addresses in the combination of each IP address in the preset destination IP address set and the next hop IP address respectively to obtain all static routes, and form a routing table.
Specifically, the synchronizing module 41 is configured to determine the static route to be tested from the configured routing table, and then synchronize the static route to be tested and the state thereof to the routing device, and specifically configured to:
updating the state of the static route in the routing table according to a set rule;
determining the static route in the updated state as a static route to be tested;
and synchronizing the static route to be tested and the state thereof to the routing equipment.
Specifically, the constructing module 42 is configured to construct a set number of messages based on the destination IP address of the static route to be tested, the subnet mask, and the MAC address of the routing device, and specifically configured to:
selecting an IP address according to the target IP address and the subnet mask of the static route to be tested to obtain a selected IP address;
acquiring an MAC address of routing equipment;
and constructing a set number of messages respectively taking the selected IP address and the MAC address of the routing equipment as a destination IP address and a destination MAC address.
Specifically, the determining module 45 is configured to determine whether the static route to be tested is valid according to whether the destination MAC address of each received message forwarded by the routing device is the MAC address of the testing device and whether the number of the received messages forwarded by the routing device is a set number, and is specifically configured to:
determining whether the destination MAC addresses of the received messages forwarded by the routing equipment are all the MAC addresses of the testing equipment;
if the received destination MAC addresses of all the messages forwarded by the routing equipment are determined to be the MAC addresses of the testing equipment, determining whether the number of the received messages forwarded by the routing equipment is a set number; if the number of the received messages forwarded by the routing equipment is determined to be the set number, determining that the static routing to be tested is effective; if the number of the received messages forwarded by the routing equipment is determined not to be the set number, determining that the static routing to be tested is invalid;
and if the destination MAC address of the received message forwarded by the routing equipment is determined not to be the MAC address of the testing equipment, determining that the static route to be tested is invalid.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A testing method of static routing is applied to testing equipment, and is characterized in that a sending port of the testing equipment is connected with a receiving port of the routing equipment, and the receiving port of the testing equipment is connected with the sending port of the routing equipment, and the method comprises the following steps:
after determining a static route to be tested from a configured routing table, synchronizing the static route to be tested and the state thereof to the routing equipment so that the routing equipment updates the state of the static route to be tested;
constructing a set number of messages based on the target Internet Protocol (IP) address of the static route to be tested, the subnet mask and the Media Access Control (MAC) address of the routing equipment;
sending the set number of messages to the routing equipment so that the routing equipment forwards the set number of messages;
receiving the message forwarded by the routing equipment;
determining whether the static route to be tested is effective or not according to whether the received destination MAC address of each message forwarded by the routing equipment is the MAC address of the testing equipment or not and whether the number of the received messages forwarded by the routing equipment is the set number or not;
and determining whether the static route to be tested is abnormal or not according to the state of the static route to be tested and whether the static route to be tested is effective or not.
2. The method of claim 1, further comprising:
acquiring at least one preset destination IP address to obtain a preset destination IP address set;
determining at least one IP address belonging to the same network segment with the IP address of the receiving port of the test equipment to obtain a next-hop IP address set;
and respectively adding subnet masks to all the combinations of all the IP addresses in the preset destination IP address set and all the IP addresses in the next hop IP address combination to obtain all static routes to form a routing table.
3. The method of claim 2, wherein after determining the static route to be tested from the configured routing table, synchronizing the static route to be tested and the state thereof to the routing device, specifically comprising:
updating the state of the static route in the routing table according to a set rule;
determining the static route in the updated state as a static route to be tested;
and synchronizing the static route to be tested and the state thereof to the routing equipment.
4. The method according to claim 1, wherein constructing a set number of packets based on the destination IP address of the static route to be tested, the subnet mask, and the MAC address of the routing device specifically includes:
selecting an IP address according to the target IP address and the subnet mask of the static route to be tested to obtain a selected IP address;
acquiring the MAC address of the routing equipment;
and constructing a set number of messages respectively taking the selected IP address and the MAC address of the routing equipment as a destination IP address and a destination MAC address.
5. The method according to any one of claims 1 to 4, wherein determining whether the static route to be tested is valid according to whether a destination MAC address of each received packet forwarded by the routing device is a MAC address of the testing device and whether the number of received packets forwarded by the routing device is the set number includes:
determining whether the destination MAC addresses of the received messages forwarded by the routing equipment are all the MAC addresses of the testing equipment;
if the received destination MAC addresses of the messages forwarded by the routing equipment are determined to be the MAC addresses of the testing equipment, determining whether the number of the received messages forwarded by the routing equipment is the set number; if the number of the received messages forwarded by the routing equipment is determined to be the set number, determining that the static route to be tested is valid; if the number of the received messages forwarded by the routing equipment is determined not to be the set number, determining that the static route to be tested is invalid;
and if the destination MAC address of the received message forwarded by the routing equipment is determined not to be the MAC address of the testing equipment, determining that the static route to be tested is invalid.
6. A testing device of static routing, applied to testing equipment, is characterized in that a sending port of the testing equipment is connected with a receiving port of routing equipment, and the receiving port of the testing equipment is connected with the sending port of the routing equipment, the device comprises:
the synchronous module is used for determining the static route to be tested from the configured routing table, and then synchronizing the static route to be tested and the state thereof to the routing equipment so that the routing equipment updates the state of the static route to be tested;
the constructing module is used for constructing a set number of messages based on the destination IP address of the static route to be tested, the subnet mask and the MAC address of the routing equipment;
a sending module, configured to send the set number of packets to the routing device, so that the routing device forwards the set number of packets;
a receiving module, configured to receive a packet forwarded by the routing device;
a determining module, configured to determine whether the static route to be tested is valid according to whether a destination MAC address of each received message forwarded by the routing device is an MAC address of the testing device and whether the number of received messages forwarded by the routing device is the set number; and determining whether the static route to be tested is abnormal or not according to the state of the static route to be tested and whether the static route to be tested is effective or not.
7. The apparatus of claim 6, further comprising an acquisition module, wherein:
the acquisition module is used for acquiring at least one preset destination IP address to obtain a preset destination IP address set;
the determining module is further configured to determine at least one IP address that belongs to the same network segment as the IP address of the receiving port of the test device, and obtain a next-hop IP address set;
the constructing module is further configured to add subnet masks to all combinations of all IP addresses in the preset destination IP address set and all IP addresses in the next hop IP address combination, respectively, to obtain all static routes, and form a routing table.
8. The apparatus of claim 7, wherein the synchronization module is configured to synchronize the static route to be tested and the state thereof to the routing device after determining the static route to be tested from a configured routing table, and is specifically configured to:
updating the state of the static route in the routing table according to a set rule;
determining the static route in the updated state as a static route to be tested;
and synchronizing the static route to be tested and the state thereof to the routing equipment.
9. The apparatus according to claim 6, wherein the constructing module is configured to construct a set number of packets based on the destination IP address of the static route to be tested, the subnet mask, and the MAC address of the routing device, and is specifically configured to:
selecting an IP address according to the target IP address and the subnet mask of the static route to be tested to obtain a selected IP address;
acquiring the MAC address of the routing equipment;
and constructing a set number of messages respectively taking the selected IP address and the MAC address of the routing equipment as a destination IP address and a destination MAC address.
10. The apparatus according to any one of claims 6 to 9, wherein the determining module is configured to determine whether the static route to be tested is valid according to whether a destination MAC address of each received packet forwarded by the routing device is a MAC address of the testing device and whether the number of received packets forwarded by the routing device is the set number, and is specifically configured to:
determining whether the destination MAC addresses of the received messages forwarded by the routing equipment are all the MAC addresses of the testing equipment;
if the received destination MAC addresses of the messages forwarded by the routing equipment are determined to be the MAC addresses of the testing equipment, determining whether the number of the received messages forwarded by the routing equipment is the set number; if the number of the received messages forwarded by the routing equipment is determined to be the set number, determining that the static route to be tested is valid; if the number of the received messages forwarded by the routing equipment is determined not to be the set number, determining that the static route to be tested is invalid;
and if the destination MAC address of the received message forwarded by the routing equipment is determined not to be the MAC address of the testing equipment, determining that the static route to be tested is invalid.
CN201910984380.XA 2019-10-16 2019-10-16 Static routing test method and device Pending CN110808906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910984380.XA CN110808906A (en) 2019-10-16 2019-10-16 Static routing test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910984380.XA CN110808906A (en) 2019-10-16 2019-10-16 Static routing test method and device

Publications (1)

Publication Number Publication Date
CN110808906A true CN110808906A (en) 2020-02-18

Family

ID=69488726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910984380.XA Pending CN110808906A (en) 2019-10-16 2019-10-16 Static routing test method and device

Country Status (1)

Country Link
CN (1) CN110808906A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7349346B2 (en) * 2002-10-31 2008-03-25 Intel Corporation Method and apparatus to model routing performance
US8018854B1 (en) * 2005-05-03 2011-09-13 Eastern Research Inc. Facility and equipment testing for packet networks
CN102355377A (en) * 2011-06-30 2012-02-15 迈普通信技术股份有限公司 Entire test system and method for Ethernet switch
CN104301186A (en) * 2014-11-07 2015-01-21 迈普通信技术股份有限公司 Method and system for testing correctness of routing forwarding table
CN104410544A (en) * 2014-11-20 2015-03-11 中国联合网络通信集团有限公司 Ethernet network loop circuit testing method and device
CN106487605A (en) * 2015-08-26 2017-03-08 中兴通讯股份有限公司 packet loss detection method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7349346B2 (en) * 2002-10-31 2008-03-25 Intel Corporation Method and apparatus to model routing performance
US8018854B1 (en) * 2005-05-03 2011-09-13 Eastern Research Inc. Facility and equipment testing for packet networks
CN102355377A (en) * 2011-06-30 2012-02-15 迈普通信技术股份有限公司 Entire test system and method for Ethernet switch
CN104301186A (en) * 2014-11-07 2015-01-21 迈普通信技术股份有限公司 Method and system for testing correctness of routing forwarding table
CN104410544A (en) * 2014-11-20 2015-03-11 中国联合网络通信集团有限公司 Ethernet network loop circuit testing method and device
CN106487605A (en) * 2015-08-26 2017-03-08 中兴通讯股份有限公司 packet loss detection method and device

Similar Documents

Publication Publication Date Title
CN1937589B (en) Routing configuration validation apparatus and methods
US8081580B2 (en) Network verification system
CN105745883B (en) Forwarding table synchronous method, the network equipment and system
US9647928B2 (en) OSPF point-to-multipoint over broadcast or NBMA mode
JPWO2006095508A1 (en) Flooding suppression method
CN111294281B (en) Communication method and device based on Service Function Chain (SFC)
CN109561033B (en) Method and device for multicast replication in Overlay network
JP2004032725A (en) Test apparatus for network communication
CN101330466B (en) Method and device for forwarding multicast message
US10390290B1 (en) Flow processing migration
CN107888492A (en) A kind of method and apparatus of VRRP load balancing
US20030033430A1 (en) IP flow discovery for IP probe auto-configuration and SLA monitoring
CN108540386B (en) Method and device for preventing service flow interruption
CN105391612A (en) Virtual extensible local area network (VXLAN) tunnel end point (VTEP) adjacency learning method and VXLAN VTEP adjacency learning device
JP5267065B2 (en) Communication apparatus and network test method
CN107786386B (en) Selective transmission of Bidirectional Forwarding Detection (BFD) messages for authenticating multicast connections
CN102405629A (en) Method and apparatus for connecting subscriber devices to an ipv6-capable aggregation network
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
US20210320858A1 (en) Preventing traffic outages during address resolution protocol (arp) storms
EP2429137B1 (en) Method, system and network device for node configuration and path detection
CN109150711B (en) Protection switching method, device and storage medium for point-to-multipoint two-layer multicast service
US7688743B2 (en) Tracing routing differences
CN110808906A (en) Static routing test method and device
US8514876B2 (en) Method and apparatus for sequencing operations for an incoming interface check in data center ethernet
US10333830B2 (en) Passive routing in mesh network

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200218