CN112436983B - Analog wide area network data transmission method and device, electronic equipment and storage medium - Google Patents

Analog wide area network data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112436983B
CN112436983B CN202011320220.4A CN202011320220A CN112436983B CN 112436983 B CN112436983 B CN 112436983B CN 202011320220 A CN202011320220 A CN 202011320220A CN 112436983 B CN112436983 B CN 112436983B
Authority
CN
China
Prior art keywords
port
vlan
message
pair
sending
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
CN202011320220.4A
Other languages
Chinese (zh)
Other versions
CN112436983A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202011320220.4A priority Critical patent/CN112436983B/en
Publication of CN112436983A publication Critical patent/CN112436983A/en
Application granted granted Critical
Publication of CN112436983B publication Critical patent/CN112436983B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Landscapes

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

Abstract

Compared with a test scheme for simulating a data transmission process in a wide area network environment in the related art, the method has the defects of difficulty and complexity in realization, and is simple and convenient to realize. The method is applied to a switch which is provided with a Virtual Local Area Network (VLAN) set, a receiving port, a sending port and a selected port set, wherein the receiving port and the sending port are ports which are connected with the outside, the VLAN set comprises at least three VLANs, the selected port set comprises at least one selected port, each VLAN in the VLAN set corresponds to a port pair, and the method comprises the following steps: receiving a first message which does not carry a VLAN identification through the receiving port; forwarding the first message in a set forwarding path corresponding to each port pair; and sending the first message through the sending port.

Description

Analog wide area network data transmission method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer communications technologies, and in particular, to a method and an apparatus for simulating data transmission in a wide area network, an electronic device, and a storage medium.
Background
Forwarding delays in wide area networks can have a significant impact on the operational performance of internet-based applications or devices, resulting in a significant degradation of the user experience. In order to prevent the problem of abnormal message transmission caused by the characteristics of the internet-based application or device, such as forwarding delay and bandwidth limitation, of the wide area network, before the internet-based application or device is applied online, a message transmission test needs to be performed on the internet-based application or device simulation wide area network in a test environment.
In the related art, if the delay characteristic in the message transmission process needs to be increased, the delay characteristic can be realized only by using an ultra-long cable; or, adding exceptions such as packet loss, repetition, disorder, bandwidth limitation, delay jitter and the like according to test requirements through a network damage simulation device based on an FPGA (Field Programmable Gate Array) to simulate a message transmission process in a wide area network environment. But the related art has the defects of difficult and complicated test implementation.
Disclosure of Invention
The application provides a method and a device for simulating data transmission of a wide area network, which at least solve the problem that the related technology has the defects of difficult and complex test realization. The technical scheme of the application is as follows:
according to a first aspect of the embodiments of the present application, there is provided a method for transmitting data in an analog wide area network, which is applied to a switch that sets a VLAN set of a virtual local area network, a receiving port, a transmitting port, and a selected port set, where the receiving port and the transmitting port are ports connected to the outside, the VLAN set includes at least three VLANs, the selected port set includes at least one selected port, and each VLAN in the VLAN set corresponds to a port pair, the method includes:
receiving a first message which does not carry a VLAN identification through the receiving port;
forwarding the first message in a set forwarding path corresponding to each port pair;
and sending the first message through the sending port.
The method has the beneficial effects that: the method provided by the embodiment of the application realizes not only one-time two-layer forwarding of the first message but also multiple-time forwarding by setting the VLAN and the port of the traditional switch, thereby realizing the simulation of the data transmission process under the wide area network environment. By applying the method for simulating the data transmission of the wide area network to the switch, the data transmission is realized by simulating the characteristics of low bandwidth and high delay of the wide area network, so that the data transmission test can be carried out under the environment of the wide area network under the condition that special network damage equipment based on an FPGA (field programmable gate array) is not available, and the test requirement on the environment transmission of the wide area network is met.
In a possible implementation manner, the forwarding the first packet in the set forwarding path corresponding to each port pair includes:
sending the first message through the other port of the port pair where the receiving port is located;
for any other port pair that does not include the receiving port and does not include the transmitting port in the set forwarding path, executing: receiving the first message through one port in a current port pair, and sending the first message to a next adjacent port pair behind the current port pair in the set forwarding path after the other port in the current port pair performs self-loop operation;
and aiming at the port pair comprising the sending port in the set forwarding path, executing: and receiving the first message through the other port of the port pair comprising the sending port.
The beneficial effects of the embodiment are as follows: the specific implementation mode of forwarding in a plurality of port pairs is limited, and how to forward the first message in the set forwarding path corresponding to each port pair can be determined more clearly.
In a possible implementation manner, sending the first packet through the other port of the port pair where the receiving port is located specifically includes:
acquiring a first VLAN identifier corresponding to a port where the receiving port is located, and sending the first message added with the first VLAN identifier through the other port in the port pair where the receiving port is located;
after the other port in the current port pair performs the self-loop operation, sending the first packet to a next adjacent port pair located behind the current port pair in the set forwarding path, which specifically includes:
determining a target VLAN identification mapped by the first VLAN identification according to the set forwarding path;
and changing the first VLAN identification added by the first message into the target VLAN identification.
The beneficial effects of the embodiment are as follows: the method is characterized in that each port pair corresponds to one VLAN, and VLAN identifications are added to a first message through mapping between different VLANs, so that forwarding among the port pairs can be realized according to the VLAN identifications and VLAN mapping rules.
In one possible embodiment, the method further comprises:
in response to a configuration instruction for row values and column values of a target matrix, determining the number of VLANs included in a VLAN set based on the row values and the column values, and determining the number of selected ports included in a selected port set based on the column values;
setting the VLAN belonging to the VLAN set according to the VLAN number, and setting the selected port belonging to the selected port set according to the selected port number; wherein, the VLAN set comprises a first VLAN, a second VLAN and other VLANs;
configuring the receiving port and any selected port to belong to the first VLAN, configuring the receiving port and the sending port to belong to the second VLAN, and filling a plurality of other VLANs into the target matrix; each VLAN in the VLAN set has different numbers, and any two VLANs with adjacent numbers are filled in different columns in the target matrix;
configuring each port pair corresponding to the VLANs filled into the same column of the target matrix to comprise the same selected port, and configuring that the number threshold value of the VLANs allowed to pass through each selected port is the same to obtain the target matrix.
The beneficial effects of the embodiment are as follows: by configuring the matrix, the implementation mode can realize free setting of low bandwidth and high delay for simulating wide area transmission, if the lower bandwidth is simulated, the simulation mode is realized by configuring a larger row number value for the target matrix, and similarly, if the simulation mode is higher delay, the simulation mode is realized by configuring a larger number value for the product of the row number value and the column number value of the target matrix, so that more accurate simulation is realized.
In a possible implementation manner, the determining, according to the set forwarding path, a target VLAN id to which the first VLAN id is mapped includes:
acquiring a first position of the first VLAN identifier in the target matrix;
determining whether the first location is the last location in any row of the target matrix;
if yes, the VLAN identification filled in the initial position of the adjacent next line of any line is taken as the target VLAN identification; and if not, taking the VLAN identifier filled in the right side of the first position and the adjacent second position as the target VLAN identifier.
The beneficial effects of the embodiment are as follows: the embodiment provides an embodiment for setting the forwarding path, and the sizes of the VLAN set and the selected port set can be set according to the set forwarding path by setting the forwarding path, so that the maximum utilization rate of the set VLAN set and the selected port set is ensured.
In one possible embodiment, the method further comprises:
and if a second message which does not carry the VLAN identification is received through the sending port, the second message is directly forwarded through the receiving port.
The beneficial effects of the embodiment are as follows: according to the method provided by the application, the data transmission of the analog wide area network is realized through the configuration in one direction, and the two-layer forwarding function of the traditional switch can be still realized in the other transmission direction, so that the reusability of the switch is improved.
According to a second aspect of the embodiments of the present application, there is provided a device for simulating data transmission in a wide area network, which is applied to a switch that sets a VLAN set of a virtual local area network, a receiving port, a sending port, and a selected port set, where the receiving port and the sending port are ports connected to the outside, the VLAN set includes at least three VLANs, the selected port set includes at least one selected port, and each VLAN in the VLAN set corresponds to a port pair, the device includes:
the receiving and sending unit is used for receiving a first message which does not carry the VLAN identification through the receiving port;
the processing unit is used for forwarding the first message in the set forwarding path corresponding to each port pair;
the transceiver unit is further configured to send the first packet through the sending port.
In a possible implementation manner, the processing unit is configured to, when forwarding the first packet in a set forwarding path corresponding to each port pair, specifically:
sending the first message through the other port of the port pair where the receiving port is located;
for any other port pair that does not include the receiving port and does not include the transmitting port in the set forwarding path, executing: receiving the first message through one port in a current port pair, and sending the first message to a next adjacent port pair behind the current port pair in the set forwarding path after the other port in the current port pair performs self-loop operation;
and aiming at the port pair comprising the sending port in the set forwarding path, executing the following steps: and receiving the first message through the other port of the port pair containing the sending port.
In a possible implementation manner, the transceiver unit, when sending the first packet through the other port of the port pair where the receiving port is located, is specifically configured to:
acquiring a first VLAN identifier corresponding to a port where the receiving port is located, and sending the first message added with the first VLAN identifier through the other port in the port pair where the receiving port is located;
after the self-loop operation is performed on the other port in the current port pair, the first packet is sent to the next port pair located behind and adjacent to the current port pair in the set forwarding path, which specifically includes:
determining a target VLAN identification mapped by the first VLAN identification according to the set forwarding path;
and changing the first VLAN identification added by the first message into the target VLAN identification.
In a possible implementation, the processing unit is further configured to:
in response to a configuration instruction for row values and column values of a target matrix, determining the number of VLANs included in a VLAN set based on the row values and the column values, and determining the number of selected ports included in a selected port set based on the column values;
setting the VLAN belonging to the VLAN set according to the VLAN number, and setting the selected port belonging to the selected port set according to the selected port number; wherein, the VLAN set comprises a first VLAN, a second VLAN and other VLANs;
configuring the receiving port and any selected port to belong to the first VLAN, configuring the receiving port and the sending port to belong to the second VLAN, and filling a plurality of other VLANs into the target matrix; each VLAN in the VLAN set has different numbers, and any two VLANs with adjacent numbers are filled in different columns in the target matrix;
configuring each port pair corresponding to the VLANs filled into the same column of the target matrix to comprise the same selected port, and configuring that the number threshold value of the VLANs allowed to pass through each selected port is the same to obtain the target matrix.
In a possible implementation manner, the transceiver unit, when determining, according to the set forwarding path, a target VLAN id to which the first VLAN id is mapped, is specifically configured to:
acquiring a first position of the first VLAN identifier in the target matrix;
determining whether the first location is the last location in any row of the target matrix;
if yes, taking the VLAN identification filled in the initial position of the adjacent next line of any line as the target VLAN identification; and if not, taking the VLAN identification filled in the right side of the first position and the adjacent second position as the target VLAN identification.
In a possible implementation manner, the transceiver unit is further configured to:
and if a second message which does not carry the VLAN identification is received through the sending port, the second message is directly forwarded through the receiving port.
According to a third aspect of embodiments herein, there is provided an electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods provided by the first aspect.
According to a fourth aspect of embodiments herein, there is provided a storage medium having stored thereon computer-executable instructions for causing a computer to perform any of the methods provided by the first aspect.
According to a fifth aspect of embodiments herein, there is provided a program product comprising program code for causing a computer device to perform any of the methods as provided by the first aspect when the program product is run on the computer device.
For the beneficial effects of the second aspect to the fifth aspect, please specifically refer to the beneficial effects of each possible implementation manner in the first aspect, which is not described herein again.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application and are not to be construed as limiting the application.
Fig. 1 is a schematic view of a scenario for simulating data transmission in a wide area network according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of determining a port pair corresponding to a VLAN through a matrix according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for simulating data transmission in a wide area network according to an embodiment of the present disclosure;
fig. 4 is a schematic view of a scenario of a method for simulating data transmission in a wide area network according to an embodiment of the present application;
fig. 5 is a schematic flowchart of an apparatus for simulating a data transmission method of a wide area network according to an exemplary embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the descriptions so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein.
Terms of terminology that may be referred to in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art, and include:
(1) Self-loop operation: i.e. the port is self-looping. Optionally, the bottom layer register is set to connect the sending and receiving signals of the designated port in the switch together, so that the port becomes a connection state, and at this time, the service logic on the designated port still takes effect normally; and the data sent out by the port is received by the port again, and the received data is the same as the data sent out. It can be understood that, by setting the port self-loop, the port without connecting the user equipment can also implement forwarding of layer two traffic in the switch.
(2) VLAN (Virtual Local Area Network) mapping: the principle of the VLAN mapping technology is that when a user message enters an ISP network, a VLAN identification (Tag) of the user is replaced with a VLAN Tag of a public network according to a certain rule, so that the message only carries one layer of VLAN Tag to traverse the ISP network, and when the user message leaves the ISP network, the VLAN Tag of the user is replaced with the original VLAN Tag of the user according to a certain rule.
Applied to a switch, each port of the switch may be configured with one or more VLAN mapping rules, each of which may implement, for example, mapping one VID1 (VLAN ID, VLAN number) to another VID2. For example, if a message carrying VLAN Tag 1 is received, the VLAN Tag of the message is replaced with an identifier of VLAN2 according to the configured VLAN mapping rule, and then forwarding is continued according to the forwarding rule of VLAN 2.
At present, in the process of data transmission through the internet, forwarding delay in the network may greatly affect the performance of internet-based applications or device operations, which may cause a serious decrease in throughput and further seriously affect user experience. In the process of research and development, the applications or the devices are usually debugged and tested in a local area network with high bandwidth and low delay, so that some problems which occur in the environment with low bandwidth and high delay of the wide area network cannot be found before online, and thus poor user experience or even online failure is caused after the applications or the devices are online. Therefore, a tool or a technique is needed before the ethernet network is connected to the network, which is used to introduce the characteristics of the wan transmission, such as low bandwidth, high delay, and delay jitter, in the testing environment of the ethernet network, so as to try to avoid the problems of packet loss, forwarding error, etc. caused in the wan environment after the ethernet network is connected to the network.
In the related art, the adopted test mode is a scene of simulating the wide area network to transmit data through special hardware equipment, such as network damage simulation equipment. By the aid of the network damage simulation equipment formed based on the FPGA, exceptions such as packet loss, repetition, disorder, delay jitter and the like can be added according to needs, and accordingly data transmission conditions in a wide area network environment in a transmission process are simulated. Alternatively, in the related art, if a scene with high delay needs to be simulated, the simulation is realized through an ultra-long cable, which, however, causes a problem of extremely high cost. Therefore, the implementation process of data transmission in the wan environment is complicated and difficult, and the cost is high.
In view of this, the present application provides a method for simulating data transmission in a wide area network, which can simulate a wide area network environment with low bandwidth and high delay to perform a data transmission process through an existing common switch, so as to realize a simple and convenient simulated wide area network data transmission request with low cost. Referring to fig. 1, a scene schematic diagram of a simulated wide area network data transmission provided in an embodiment of the present application is shown in fig. 1, where in the related art, data transmission in a simulated wide area network environment is implemented by connecting a network impairment simulation device dedicated for simulation in a communication link, but in the present application, the data transmission is implemented only by using an existing switch, and a specific implementation manner is as described below.
In order to realize the simulation of wide area network data transmission only through the functions supported by the conventional ethernet switch, multiple VLANs need to be configured on the existing switch, multiple ports need to be selected, and the functions of VLAN mapping, port self-looping and the like are combined to realize the simulated wide area network transmission of messages. Based on the design concept of the present application, the following introduces, by a first aspect, a configuration of a switch in order to implement the analog wide area network data transmission method provided by the present application; a second aspect introduces an implementation procedure of the method for simulating data transmission in a wide area network based on configuration of a switch.
In a first aspect: configuration process
In consideration of the characteristics of low bandwidth, high delay, delay jitter and the like in data transmission in a wide area network environment, the main design concept of the application is as follows:
according to the method, the switch is provided with the different VLANs, the message is forwarded for multiple times among the different VLANs by combining the VLAN mapping technology, and each data forwarding has certain delay, so that the message output by the switch is simulated data transmitted in a high-delay environment after being forwarded for multiple times.
In the application, by setting the self-loop operation of the port and setting one port to allow a plurality of VLANs to pass through, the message can loop on one port for a plurality of times, and because the message has the characteristic of continuity, the bandwidth which can be actually distributed to each port of the message is only a small part of the bandwidth of the port.
And thirdly, as the message passes through the same port for multiple times, the size of the message has unstable characteristics, so that the problem of delay jitter can be caused.
Based on the design concept, when the switch is configured, the VLAN set, the receiving port, the sending port and the selected port set are preset. The receiving port and the transmitting port are interfaces connected to other devices on the switch, for example, ports connected to the access switch 1 and the access switch 2 in the switch in fig. 1. And in order to satisfy the requirement of simulating wide area network data transmission, the VLAN set comprises at least three VLANs, the selected port set comprises at least one selected port, each VLAN in the VLAN set corresponds to a port pair, and each port pair at least comprises a port for receiving a message and a port for sending a message. For example, for ease of understanding and description, in the following embodiments, it is assumed that the receiving port is port a, the transmitting port is port B, and the selected port set is (T) 1 …T n ) Where n represents the number of selected ports.
In order to ensure the full utilization and regularity between the ports and the VLANs, the corresponding relation between each VLAN and each port is realized based on a certain rule, so that the setting of one port pair corresponding to each VLAN is met. In a possible implementation manner, a port pair corresponding to each VLAN is determined through a preset target matrix, and a mapping rule between the VLANs is determined.
In practice, the target matrix is generated by:
step A1: in response to a configuration instruction for row values and column values of the target matrix, determining the number of VLANs included in the VLAN set based on the row values and the column values, and determining the number of selected ports included in the selected port set based on the column values.
Assuming that a target matrix with the size of m × n is constructed, wherein m is more than or equal to 1 and n is more than or equal to 2, constructing the target matrix shown in the following formula 1:
Figure BDA0002792659910000111
wherein v is m,n For representing the position in the matrix, after receiving the configuration command for m and n values, the object matrix with corresponding size is constructed according to the example of the object matrix which is not filled with values as shown in formula 1. And determining the number of VLANs in the VLAN set to be (m x n + 2) based on the values of m and n, and determining the number of selected ports included in the selected port set to be n based on the value of n.
Step A2: setting the VLAN belonging to the VLAN set according to the VLAN number, and setting the selected port belonging to the selected port set according to the selected port number; wherein, the VLAN set comprises a first VLAN, a second VLAN and other VLANs.
Illustratively, the m × n +2 VLANs included in the configured VLAN set have different numbers, denoted as (V) 0 ,V 1 ,…,V mn+1 ) It should be noted that the sequence numbers of different VLANs are only used for distinguishing different VLANs, and are not used for identifying other relationships or differences, such as order and priority. Suppose that V will be 0 As a first VLAN, V mn+1 As a second VLAN, a division V in the VLAN set 0 ,V mn+1 The outer VLANs are other VLANs.
Step A3: configuring the receiving port and any selected port to belong to the first VLAN, configuring the receiving port and the sending port to belong to the second VLAN, and filling a plurality of other VLANs into the target matrix.
Illustratively, port A, port B, selected port set (T) are configured 1 …T n ) The following relationships are established with the VLANs:
(1) Is port AAny selected port T i Configuration allowance V 0 Through, i.e. V 0 The corresponding port pair includes port A and selected port T i
(2) Configuring permission V for port A and port B mn+1 Through, i.e. V mn+1 The corresponding port pair includes port a and selected port B.
(3) To be configured of 0 ,V 1 ,…,V mn-1 ) Fills in the empty matrix established as in equation 1 and any two numbered adjacent VLANs fill in different columns in the target matrix.
In one possible embodiment, the matrix after VLAN filling is shown in the following equation 2:
Figure BDA0002792659910000121
step A4: and configuring that each port pair corresponding to the VLAN filled into the same column of the target matrix comprises the same selected port, and configuring that the VLAN quantity threshold value allowed to pass through by each selected port is the same.
Illustratively, assume with T 1 VLAN, T corresponding to the first column in the matrix 2 Corresponds to the VLAN in the second column of the matrix, and so on n The VLANs in the nth column of the corresponding matrix, as will be understood with reference to fig. 2, it can be obtained that one port of the port pair corresponding to each column of VLANs in the matrix is the port in the column corresponding to the destination matrix in which it is located, for example, the VLANs in the first column all correspond to the selected port T 1
Second, there are two ports in each port pair, based on port (T) 1 …T n ) If the maximum number thresholds of the corresponding VLANs are the same, it can be obtained that the number of the VLANs allowed to pass through each port is 2m, wherein m VLANs are the VLANs in the corresponding column, and m is any VLAN in other columns, and finally the condition that each VLAN corresponds to two ports is satisfied.
Through the above configuration process, port a permission V connected with the outside can be obtained 0 、V mn+1 By, in order to achieve analog wide area network data transmission from port A to port B, willDefault VLAN setting for port a to V 0 If the port A receives the message not carrying VLAN Tag, the default is V 0 And does not carry the VLAN Tag when outputting the packet through the port B. Second, port B permission V is available for connection to the outside mn 、V mn+1 By, and, set the default VLAN of port B to V mn+1 If the port B receives the message, the default is V mn+1 And does not carry the VLAN Tag when outputting the packet through the port a. Then, a port (T) is obtained 1 …T n ) The VLAN allowed by the configuration process is determined based on the configuration process as described in the previous embodiment, and passes through the port (T) 1 …T n ) The output message carries the corresponding VLAN Tag, so that VLAN mapping is realized conveniently.
In addition, when the method is implemented, a port self-loop function is configured for each selected port, and after the selected port performs self-loop operation, VLAN mapping is triggered, so that a first VLAN identifier carried by a first message is replaced by a target VLAN identifier, and further forwarding is continued to be performed in a port pair corresponding to the target VLAN.
Wherein, VLAN mapping is implemented between different VLANs based on a set forwarding path, for example, one possible set forwarding path is to implement mapping according to the location of the VLAN in the target matrix, for example, in combination with the target matrix shown in fig. 2, the VLAN mapping rule may be from V 0 Mapping to V 1 From V 1 Mapping to V 2 To say, from V mn-1 Mapping to V mn That is, the mapping rule is the order of mapping from left to right in turn for each row, and the mapping is performed from top to bottom in turn for the rows.
It should be noted that the VLAN, port and mapping rule with numbers given in the above embodiments of the present application are only one possible example given in the present application, and are used to explain the application principle of the present application, and are not used to limit the present application, and the changes of the numbers based on the application principle of the present application also belong to the protection scope of the present application.
In a second aspect: implementation procedure
Referring to fig. 3, a schematic flow chart of a method for simulating data transmission in a wide area network according to an embodiment of the present application is applied to a switch, where configuration of the switch is as described in the configuration process of the first aspect, which is not described herein again, and an implementation process of the method includes the following steps:
step 301: and receiving a first message which does not carry the VLAN identification through the receiving port.
Illustratively, continuing with the assumptions in the foregoing embodiment, the receiving port is port A, since the default VLAN for port A is V 0 Then it defaults to V 0 Where the transmission continues.
Step 302: and forwarding the first message in the corresponding set forwarding path of each port pair.
In implementation, after receiving the first packet sent by the other external device in step 301, based on the configuration process of the first aspect, the first packet may continue to be forwarded according to the configuration rule of the switch, where the implementation process includes:
step 3021: and sending the first message through the other port of the port pair where the receiving port is located.
In implementation, according to the forwarding rule of the VLAN for the packet, after the packet is received through one port, the VLAN to which the port belongs is determined, and then the packet is forwarded in the VLAN. For example, as shown in fig. 2, after receiving the first packet through the port a, it is determined that the VLAN to which the port belongs has V 0 And V mn+1 And further determining V 0 Is the default VLAN of port A, so the first message will be at V 0 Forwarding is performed in the corresponding port pair, and V can be determined through fig. 2 0 The other port of the pair of ports is T1, so the first message is forwarded out through T1, and VLAN Tag V is added to the forwarded first message 0
Due to selected ports T in the switch i All are provided with a port self-loop function, namely a port T 1 A first message forwarded by itself is received. Second, when the port T 1 After receiving the first message, based on the pre-configured VLAN mapping ruleThen, the corresponding target VLAN is determined, and the mapped VLAN is assumed to be V 1 Then VLAN Tag will be replaced by VLAN Tag V 1 Is sent out to make V 1 One port in the corresponding port pair receives the first message.
Step 3022: for any other port pair that does not include the receiving port and does not include the transmitting port in the set forwarding path, executing: and receiving the first message through one port in the current port pair, and sending the first message to the next adjacent port pair behind the current port pair in the set forwarding path after the other port in the current port pair performs self-loop operation.
Exemplarily, the principle of forwarding the first packet is the same for any other port pair that does not include the port a and does not include the port B, a forwarding process of one port pair is described as an example below, implementation processes of other port pairs are similar, and a description in the following embodiments is omitted.
At V 0 After the port T1 in the corresponding port pair sends out the first message, V is determined based on the VLAN mapping rule 0 Mapping to V 1 Then pass through V 1 One port in the corresponding port pair receives the first message, and then the first message passes through V 1 And after the other port in the corresponding port pair performs self-loop operation, forwarding the other port to the first port in the next port pair for continuous transmission. It should be noted that there is no explicit limitation on one port and the other port of a port pair corresponding to the VLAN, and if the first packet is received through one of the ports, the first packet is forwarded through the other port of the port pair.
In one possible embodiment, one way to determine the next port pair is by target VLAN determination after VLAN mapping. The implementation is that a target VLAN identification mapped by the first VLAN identification is determined according to the set forwarding path; and changing the first VLAN identification added to the first message into the target VLAN identification, wherein the target VLAN identification is used for determining the next port pair.
Is combined withOn one hand, the implementation mode of determining the port pair corresponding to each VLAN based on the target matrix, and the specific implementation mode of forwarding based on the set forwarding path may be to obtain a first position of a first VLAN identifier in the target matrix; determining whether the first location is the last location in any row of the target matrix; if yes, the VLAN identification filled in the initial position of the adjacent next line of any line is taken as the target VLAN identification; and if not, taking the VLAN identifier filled in the right side of the first position and the adjacent second position as the target VLAN identifier. Illustratively, in conjunction with the target matrix shown in fig. 2, if the first VLAN is identified as V 0 Then the target VLAN is identified as V in the target matrix in FIG. 2 0 Right and adjacent V 1 (ii) a If the first VLAN is marked as V n-1 Then the target VLAN is identified as V in the target matrix in fig. 2 n-1 V of the initial position of the next line of n
Step 3023: and aiming at the port pair comprising the sending port in the set forwarding path, executing the following steps: and receiving the first message through the other port of the port pair comprising the sending port.
Step 303: and sending the first message through the sending port. Through the above description of the switch configuration process in the first aspect and the above description of the implementation process in the second aspect, it can be determined, with reference to the target matrix shown in fig. 2, that the method for transmitting analog wide area network data in the present application is, after receiving the first packet through the receiving port a connected to the outside, based on the default VLAN of the port a as V 0 Then determine V 0 The other port of the port pair is T 1 Then it passes through T 1 VLAN mapping to other VLAN after self-loop operation, thereby realizing passing (T) 1 …T n ) And forwarding the first message for multiple times among the ports. Finally, up to (T) 1 …T n ) When one of the ports receives the first message, the VLAN Tag is replaced by the V based on the VLAN mapping rule mn Then due to V mn A corresponding port pair contains T i And port B, when T i After receiving the first message, the other port B in the port pair forwards the message to the next connected portAnd (4) an external device.
According to the embodiment of the application, the first message from the port A to the port B is forwarded by two layers in the same VLAN port pair (m.n + 1) times in the switch, so that the simulation of high delay characteristics in a wide area network is realized. Wherein each message is at a port (T) 1 …T n ) Each port T in i The upper-sending loops back m times, so that the practically achievable bandwidth of each port is only 1/m of the minimum port bandwidth, thereby realizing the simulation of the low-bandwidth characteristic in the wide area network. In addition, due to the fact that the flow size of the first message is unstable, simulation of delay jitter characteristics in the wide area network is achieved.
Based on the above embodiment, the simulation of the unidirectional traffic transmitted by the wide area network is realized. Moreover, by the method provided by the application, the simulated bandwidth size can be adjusted as needed, that is, the bandwidth is smaller as the number of times of the first packet passed through the same port is larger, for example, if a smaller bandwidth is desired to be simulated, the row number m of the matrix is configured to be a larger number. Similarly, the method provided by the present application may further adjust the simulated delay size according to a need, that is, the delay is higher for the larger number of times of forwarding the first packet, for example, if a higher bandwidth is to be simulated, the m × n of the matrix is configured to be a larger value. Furthermore, it can be understood that the larger m, the more complex the size mixing of the first message, and the greater the probability of generating delay jitter.
In addition, it should be noted that, since the first packet may be received not only from the port a but also from the port B, after the second packet not carrying the VLAN Tag is received through the port B, the second packet is defaulted to be at V based on the port B mn+1 Forward and then determine V mn+1 And if the other port in the corresponding port pair is A, forwarding the second message through the port A. Since the port a is also connected to the external device, it directly forwards the second packet to the external device of the next connection. Through the scenario, when the port B receives the second packet, the second packet from the port B to the port a is normally forwarded, so as to satisfy the conventional function of the switch in performing two-layer traffic forwarding.
Further, based on the design idea of the present application, a simulation of bidirectional wide area network data transmission of the first packet may be further implemented, in a possible implementation manner, the simulation may be implemented by connecting two switch sending ports B, where both switches are configured according to the configuration process of the first aspect.
For example, there are switch 1 and switch 2, which are both configured based on the configuration process of the first aspect, where the receiving port of switch 1 is A1, the sending port is B1, and the selected port set is (T) 1A …T nA ) And a configured set of VLANs as (V) 0A ,V 1A ,…,V mn+1A ) And wherein switch 2 has a receive port of A2, a transmit port of B2, and a set of selected ports of (T) 1B …T nB ) And the configured VLAN set is (V) 0B ,V 1B ,…,V mn+1B ). In implementation, the port B1 of the switch 1 is connected to the port B2 of the switch 2, so as to realize bidirectional traffic simulation.
Referring to fig. 4, a scene schematic diagram of a method for simulating data transmission in a wide area network according to an embodiment of the present application is shown, where if a transmission direction of a packet is: in the directions from A1 to B2 and A2, the simulation of the data transmission of the wide area network is realized through the first switches A1 to B1; if the transmission direction of the message is as follows: and in the directions from A2 to B1 and A1, the simulation of the data transmission of the wide area network is realized through the second switches A2 to B2. Thereby achieving bidirectional flow simulation.
In another possible implementation, if the number of ports in the switch and the configurable number of VLANs are sufficient, two sets of configurations are implemented on one switch to implement the simulation of bidirectional data transmission in the wide area network according to the principle that the configuration and connection mode of the switch 1 and the switch 2 are the same in the foregoing implementation, which is not described herein again.
Based on the same inventive concept, referring to fig. 5, the present application further provides an analog wide area network data transmission apparatus, and provides an analog wide area network data transmission method and apparatus, which are applied to a switch that sets a VLAN set, a receiving port, a sending port, and a selected port set, where the receiving port and the sending port are ports connected to the outside, the VLAN set includes at least three VLANs, the selected port set includes at least one selected port, and each VLAN in the VLAN set corresponds to a port pair, and the apparatus includes: a transmitting/receiving unit 501 and a processing unit 502;
a transceiving unit 501, configured to receive, through the receiving port, a first packet that does not carry the VLAN identifier;
a processing unit 502, configured to forward the first packet in a set forwarding path corresponding to each port pair;
the transceiver unit 501 is further configured to send the first packet through the sending port.
In a possible implementation manner, the processing unit 502 is configured to, when forwarding the first packet in a set forwarding path corresponding to each port pair, specifically:
sending the first message through the other port of the port pair where the receiving port is located;
for any other port pair that does not include the receiving port and does not include the transmitting port in the set forwarding path, executing: receiving the first message through one port in a current port pair, and sending the first message to a next adjacent port pair behind the current port pair in the set forwarding path after the other port in the current port pair performs self-loop operation;
and aiming at the port pair comprising the sending port in the set forwarding path, executing the following steps: and receiving the first message through the other port of the port pair comprising the sending port.
In a possible implementation manner, the transceiver unit 501, when sending the first packet through the other port of the port pair where the receiving port is located, is specifically configured to:
acquiring a first VLAN identifier corresponding to a port where the receiving port is located, and sending the first message added with the first VLAN identifier through the other port in the port pair where the receiving port is located;
after the other port in the current port pair performs the self-loop operation, sending the first packet to a next adjacent port pair located behind the current port pair in the set forwarding path, which specifically includes:
determining a target VLAN identification mapped by the first VLAN identification according to the set forwarding path;
and changing the first VLAN identification added by the first message into the target VLAN identification.
In a possible implementation, the processing unit 502 is further configured to:
in response to a configuration instruction for row values and column values of a target matrix, determining the number of VLANs included in a VLAN set based on the row values and the column values, and determining the number of selected ports included in a selected port set based on the column values;
setting the VLAN belonging to the VLAN set according to the VLAN number, and setting the selected port belonging to the selected port set according to the selected port number; wherein, the VLAN set comprises a first VLAN, a second VLAN and other VLANs;
configuring the receiving port and any selected port to belong to the first VLAN, configuring the receiving port and the sending port to belong to the second VLAN, and filling a plurality of other VLANs into the target matrix; each VLAN in the VLAN set has different numbers, and any two VLANs with adjacent numbers are filled in different columns in the target matrix;
configuring each port pair corresponding to the VLANs filled into the same column of the target matrix to comprise the same selected port, and configuring that the number threshold value of the VLANs allowed to pass through each selected port is the same to obtain the target matrix.
In a possible implementation manner, the transceiver unit 501, when determining, according to the set forwarding path, a target VLAN id to which the first VLAN id is mapped, is specifically configured to:
acquiring a first position of the first VLAN identifier in the target matrix;
determining whether the first location is the last location in any row of the target matrix;
if yes, taking the VLAN identification filled in the initial position of the adjacent next line of any line as the target VLAN identification; and if not, taking the VLAN identifier filled in the right side of the first position and the adjacent second position as the target VLAN identifier.
In a possible implementation, the transceiver unit 501 is further configured to:
and if a second message which does not carry the VLAN identification is received through the sending port, the second message is directly forwarded through the receiving port.
Having described a method and apparatus for analog wide area network data transmission according to an exemplary embodiment of the present application, an electronic device according to another exemplary embodiment of the present application will be described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. The memory has stored therein program code which, when executed by the processor, causes the processor to perform the steps of the method for analog wide area network data transmission according to various exemplary embodiments of the present application described above in the present specification. For example, the processor may perform steps 301-303 as shown in FIG. 3.
The electronic device 130 according to this embodiment of the present application is described below with reference to fig. 6. The electronic device 130 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 130 is represented in the form of a general electronic device. The port pairs of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different pairs of system ports (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM) 1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include program/utility 1325 having a port pair (at least one) program module 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination of ports may include an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur through input/output (I/O) ports 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
In some possible embodiments, the aspects of a method for simulating data transmission over a wide area network provided by the present application may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps of a method for simulating data transmission over a wide area network according to various exemplary embodiments of the present application described above in this specification when the program product is run on a computer device, for example, the computer device may perform steps 301-303 as shown in fig. 3.
The program product may employ any porting of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing ports. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable port configuration of the foregoing.
The program product for data processing of an embodiment of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable port pairing as described above. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable porting arrangement as described above.
Program code for carrying out operations of the present application may be written in any port pair of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (12)

1. A method for simulating data transmission of a wide area network is applied to a switch provided with a Virtual Local Area Network (VLAN) set, a receiving port, a sending port and a selected port set, wherein the receiving port and the sending port are ports connected with the outside, the VLAN set comprises at least three VLANs, the selected port set comprises at least one selected port, and each VLAN in the VLAN set corresponds to a port pair, and the method comprises the following steps: in response to a configuration instruction for row values and column values of a target matrix, determining the number of VLANs included in a VLAN set based on the row values and the column values, and determining the number of selected ports included in a selected port set based on the column values;
setting the VLAN belonging to the VLAN set according to the VLAN number, and setting the selected port belonging to the selected port set according to the selected port number; wherein, the VLAN set comprises a first VLAN, a second VLAN and other VLANs;
configuring the receiving port and any selected port to belong to the first VLAN, configuring the receiving port and the sending port to belong to the second VLAN, and filling a plurality of other VLANs into the target matrix; each VLAN in the VLAN set has different numbers, and any two VLANs with adjacent numbers are filled in different columns in the target matrix; configuring each port pair corresponding to the VLANs filled into the same column of the target matrix to comprise the same selected port, and configuring that the number threshold value of the VLANs allowed to pass through each selected port is the same to obtain the target matrix;
receiving a first message which does not carry a VLAN identification through the receiving port;
forwarding the first message in a set forwarding path corresponding to each port pair;
and sending the first message through the sending port.
2. The method according to claim 1, wherein forwarding the first packet in the set forwarding path corresponding to each port pair comprises:
sending the first message through the other port of the port pair where the receiving port is located;
for any other port pair that does not include the receiving port and does not include the transmitting port in the set forwarding path, executing: receiving the first message through one port in a current port pair, and sending the first message to a next adjacent port pair behind the current port pair in the set forwarding path after the other port in the current port pair performs self-loop operation;
and aiming at the port pair comprising the sending port in the set forwarding path, executing the following steps: and receiving the first message through the other port of the port pair comprising the sending port.
3. The method according to claim 2, wherein sending the first packet through the other port of the port pair in which the receiving port is located specifically includes:
acquiring a first VLAN identification corresponding to a port where the receiving port is located, and sending the first message added with the first VLAN identification through the other port of the port pair where the receiving port is located;
after the self-loop operation is performed on the other port in the current port pair, the first packet is sent to the next port pair located behind and adjacent to the current port pair in the set forwarding path, which specifically includes:
determining a target VLAN identification mapped by the first VLAN identification according to the set forwarding path;
and changing the first VLAN identification added by the first message into the target VLAN identification.
4. The method of claim 3, wherein said determining a target VLAN identification to which the first VLAN identification is mapped based on the configured forwarding path comprises:
acquiring a first position of the first VLAN identifier in the target matrix;
determining whether the first location is the last location in any row of the target matrix;
if yes, the VLAN identification filled in the initial position of the adjacent next line of any line is taken as the target VLAN identification; and if not, taking the VLAN identifier filled in the right side of the first position and the adjacent second position as the target VLAN identifier.
5. The method according to any one of claims 1 to 4, further comprising:
and if a second message which does not carry the VLAN identification is received through the sending port, the second message is directly forwarded through the receiving port.
6. An apparatus for simulating data transmission in a wide area network, the apparatus being applied to a switch having a VLAN set, a receiving port, a sending port, and a selected port set, the receiving port and the sending port being ports connected to the outside, the VLAN set including at least three VLANs, the selected port set including at least one selected port, and each VLAN in the VLAN set corresponding to a port pair, the apparatus comprising:
the receiving and sending unit is used for receiving a first message which does not carry the VLAN identification through the receiving port;
the processing unit is used for responding to a configuration instruction of row values and column values of a target matrix, determining the number of VLANs included in a VLAN set based on the row values and the column values, and determining the number of selected ports included in a selected port set based on the column values; setting the VLAN belonging to the VLAN set according to the VLAN number, and setting the selected port belonging to the selected port set according to the selected port number; wherein, the VLAN set comprises a first VLAN, a second VLAN and other VLANs; configuring the receiving port and any selected port to belong to the first VLAN, configuring the receiving port and the sending port to belong to the second VLAN, and filling a plurality of other VLANs into the target matrix; each VLAN in the VLAN set has different numbers, and any two VLANs with adjacent numbers are filled in different columns in the target matrix; configuring each port pair corresponding to the VLANs filled into the same column of the target matrix to comprise the same selected port, and configuring that the number threshold value of the VLANs allowed to pass through each selected port is the same to obtain the target matrix; and is used for forwarding the first message in the corresponding set forwarding path of each port pair;
the transceiver unit is further configured to send the first packet through the sending port.
7. The apparatus according to claim 6, wherein the processing unit is configured to, when forwarding the first packet in a set forwarding path corresponding to each port pair, specifically:
sending the first message through the other port of the port pair where the receiving port is located;
for any other port pair that does not include the receiving port and does not include the transmitting port in the set forwarding path, executing: receiving the first message through one port in a current port pair, and sending the first message to a next adjacent port pair behind the current port pair in the set forwarding path after the other port in the current port pair performs self-loop operation;
and aiming at the port pair comprising the sending port in the set forwarding path, executing: and receiving the first message through the other port of the port pair comprising the sending port.
8. The apparatus according to claim 7, wherein the transceiver unit, when sending the first packet through the other port of the port pair where the receiving port is located, is specifically configured to:
acquiring a first VLAN identifier corresponding to a port where the receiving port is located, and sending the first message added with the first VLAN identifier through the other port in the port pair where the receiving port is located;
the transceiver unit is configured to send the first packet to a next port pair located behind and adjacent to the current port pair in the set forwarding path after the other port in the current port pair performs a self-loop operation, and specifically configured to:
determining a target VLAN identification mapped by the first VLAN identification according to the set forwarding path;
and changing the first VLAN identification added to the first message into the target VLAN identification.
9. The apparatus according to claim 8, wherein the transceiver unit, when determining, according to the set forwarding path, the target VLAN id to which the first VLAN id is mapped, is specifically configured to:
acquiring a first position of the first VLAN identifier in the target matrix;
determining whether the first location is the last location in any row of the target matrix;
if yes, the VLAN identification filled in the initial position of the adjacent next line of any line is taken as the target VLAN identification; and if not, taking the VLAN identifier filled in the right side of the first position and the adjacent second position as the target VLAN identifier.
10. The apparatus according to any one of claims 6 to 9, wherein the transceiver unit is further configured to:
and if a second message which does not carry the VLAN identification is received through the sending port, the second message is directly forwarded through the receiving port.
11. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of simulating wide area network data transmission according to any of claims 1-5.
12. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of simulating wide area network data transmission of any of claims 1-5.
CN202011320220.4A 2020-11-23 2020-11-23 Analog wide area network data transmission method and device, electronic equipment and storage medium Active CN112436983B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011320220.4A CN112436983B (en) 2020-11-23 2020-11-23 Analog wide area network data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011320220.4A CN112436983B (en) 2020-11-23 2020-11-23 Analog wide area network data transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112436983A CN112436983A (en) 2021-03-02
CN112436983B true CN112436983B (en) 2023-02-17

Family

ID=74693578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011320220.4A Active CN112436983B (en) 2020-11-23 2020-11-23 Analog wide area network data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112436983B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124760B (en) * 2021-11-23 2024-04-05 江苏信而泰智能装备有限公司 Network test stream number distribution method and device, network tester and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6621818B1 (en) * 1998-10-19 2003-09-16 Texas Instruments Incorporated Ring configuration for network switches
CN101146046A (en) * 2007-11-05 2008-03-19 福建星网锐捷网络有限公司 A throughput testing method and testing system
CN103036747A (en) * 2013-01-07 2013-04-10 深圳市新格林耐特通信技术有限公司 Test method for performance of high-density port network equipment
CN103916286A (en) * 2013-01-09 2014-07-09 昊阳天宇科技(深圳)有限公司 Test method and device for detecting network device
CN110034978A (en) * 2019-04-19 2019-07-19 杭州迪普科技股份有限公司 A kind of method and apparatus of network apparatus test performance

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7002976B2 (en) * 2000-11-01 2006-02-21 Marconi Intellectual Property (Ringfence) Inc. Virtual ethernet ports with automated router port extension

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6621818B1 (en) * 1998-10-19 2003-09-16 Texas Instruments Incorporated Ring configuration for network switches
CN101146046A (en) * 2007-11-05 2008-03-19 福建星网锐捷网络有限公司 A throughput testing method and testing system
CN103036747A (en) * 2013-01-07 2013-04-10 深圳市新格林耐特通信技术有限公司 Test method for performance of high-density port network equipment
CN103916286A (en) * 2013-01-09 2014-07-09 昊阳天宇科技(深圳)有限公司 Test method and device for detecting network device
CN110034978A (en) * 2019-04-19 2019-07-19 杭州迪普科技股份有限公司 A kind of method and apparatus of network apparatus test performance

Also Published As

Publication number Publication date
CN112436983A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN102055667B (en) Methods and apparatus for configuring virtual network switch
US9231849B2 (en) Apparatus and method for controlling virtual switches
US9413645B1 (en) Methods and apparatus for accessing route information in a distributed switch
US9660899B2 (en) End-to-end multipathing through network having switching devices compatible with different protocols
US8787373B2 (en) Multicast miss notification for a distributed network switch
US9628326B2 (en) Managing network connection of a network node
US9237029B2 (en) Directed route load/store packets for distributed switch initialization
CN105978817B (en) It is used for transmission method, memory and the network adapter of data
US9491043B2 (en) Communication path switching device, communication path switching method and communication path switching program
US9282035B2 (en) Directed route load/store packets for distributed switch initialization
CN112787913B (en) Intelligent network card assembly, physical machine, cloud service system and message sending method
CN112436983B (en) Analog wide area network data transmission method and device, electronic equipment and storage medium
US9479438B2 (en) Link aggregation based on virtual interfaces of VLANs
WO2018004931A1 (en) Techniques for virtual ethernet switching of a multi-node fabric
US11411862B2 (en) Method, electronic device and computer-readable medium for processing data generated by service
US10397143B1 (en) Preventing transmission of errors in a computing network
Ra et al. Implementation of FPGA‐based MPLS‐TP linear protection switching for 4000+ tunnels in packet transport network for optical carrier Ethernet
US9413586B2 (en) Spanning tree protocol (STP) implementation on an event driven virtual link aggregation (VLAG) system
US20200052968A1 (en) Switch configuration
CN108390780B (en) Method and apparatus for processing information
CN107948105B (en) Method and system for controlling port state of equipment
US10735292B1 (en) Monitoring interconnections between network devices of different network entities
CN108156098A (en) A kind of communications network system based on POWERLINK

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