The content of the invention
In view of the above the shortcomings that prior art, it is an object of the invention to provide a kind of soft routing performance test side
Method, the soft routing performance for solving to test the network switch that employs Layer3 Switching technology in the prior art are asked
Topic.
In order to achieve the above objects and other related objects, the present invention provides a kind of soft routing performance method of testing, is applied to
In the network equipment for employing Layer3 Switching technology, soft routing performance method of testing includes:By the first of the network equipment
Port is connected with the first network interface card of the first computer, the second port of the network equipment and the second network interface card phase of second computer
Even, establishment is given out a contract for a project VLAN, and first port is configured into the VLAN that gives out a contract for a project, with setting the IP for the network segment that first port connected
Location;Packet receiving VLAN is created, at least one in remaining port of the network equipment is configured to the packet receiving VLAN, set
It is configured to the IP address for the network segment that the port of the packet receiving VLAN is connected;Second computer is communicated with the network equipment
Test;The IP address of at least one network segment using the vlan port connection of giving out a contract for a project of first computer construction is source address, described
The IP address of the network segment of packet receiving VLAN connections is the packet of purpose address, and the different packets have different source addresses
Or different destination addresses, and packet sending speed is set, constructed packet is sent with the packet sending speed;Calculated according to second
Machine adjusts the packet sending speed with the network device communications test mode, and then determines to be in not packet loss in the communication test
Maximum packet sending speed under state.
Alternatively, the destination address of the packet is inaccessible IP address.
Alternatively, the communication test includes testing by ping orders.
Alternatively, the soft routing performance method of testing also includes:In setting time section, with the maximum packet sending speed
Give out a contract for a project, while detect the communication test state.
Alternatively, first computer and the second computer are same computer, first network interface card with it is described
Second network interface card is the different network interface cards of same computer.
Alternatively, the soft routing performance method of testing also includes:The network equipment passes through serial ports and the 3rd computer
It is connected, the running status of the network equipment is checked on the 3rd computer.
Alternatively, the running status of the network equipment includes the CPU usage of the equipment.
Alternatively, the running status of the network equipment also includes the memory usage of the network equipment.
Alternatively, the running status of the network equipment also includes the quantity of route processing message.
Alternatively, the 3rd computer checks the running status of the network equipment by Command Line Interface.
Alternatively, first computer, the second computer and the 3rd computer are same computer, described
One network interface card and the different network interface cards that second network interface card is same computer.
As described above, a kind of soft routing performance method of testing of the present invention, has the advantages that:Pass through a simulation
Different packet sending speeds sends the packet for needing to route, and the network equipment with soft routing capabilities sends association while packet receiving
Packet is discussed, to detect the performance of the soft routing capabilities and CPU of the network equipment.
Embodiment
Illustrate embodiments of the present invention below by way of specific instantiation, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through specific realities different in addition
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.
It should be noted that the diagram provided in the present embodiment only illustrates the basic conception of the present invention in a schematic way,
Then the component relevant with the present invention is only shown in schema rather than is painted according to component count, shape and the size during actual implement
System, kenel, quantity and the ratio of each component can be a kind of random change during its actual implementation, and its assembly layout kenel also may be used
Can be increasingly complex.
The present invention provides a kind of soft routing performance method of testing, applied to the network equipment for employing Layer3 Switching technology
In.The soft routing performance method of testing has used message to send the principle needed by route processing between different sub-network.Below
Illustrate two websites by three-tier switch realize cross-network segment communicating be how a process.It is assumed that website A, B lead to
Three-tier switch is crossed to be communicated.The network segment where website A and B belongs to the directly connected subnet on interchanger, if website A and website B
Not in same subnet, dispatching station A first has to send ARP request message to its " default gateway ", and the IP of " default gateway "
Location is exactly the IP address of the affiliated VLAN of website A on three-tier switch in fact.When dispatching station A is broadcasted the IP address of " default gateway "
When going out an ARP request, interchanger just returns an ARP to dispatching station A and replys message, tells this VLAN of website A interchangers MAC
Address, while the information such as website A IP address, MAC Address, the port numbers that are joined directly together with interchanger can be set by software
Put in three layers of hardware table item of exchange chip.After website A receives this ARP reply messages, carry out target MAC (Media Access Control) address and replace
Change, B to be issued bag is issued interchanger first.After interchanger receives this bag, source MAC is equally carried out first
Practise, target MAC (Media Access Control) address is searched, in this case will be this because now target MAC (Media Access Control) address is the MAC Address of interchanger
Message is sent to three layers of engine processing of exchange chip.In general, three layers of engine have two tables, and one is Host routes table,
This table is the information such as the inside storage purpose IP address, next-hop mac address, port numbers using IP address as index.If find
One matching list item, will afterwards will carrying out certain operations (such as purpose MAC and source MAC is replaced, TTL subtracts 1) to message
The port that message is specified from table forwards.If not finding matching entry in Host routes table, may proceed to search another
Individual table-- network segment routing table.The information such as this table storage network segment address, next-hop mac address, port numbers.In general this
The entry of table wants much less, but the scope covered is very big, as long as setting is proper, can substantially ensure that major part enters interchanger
Message all walk hardware forwarding, so not only greatly improve forwarding speed, while also mitigate CPU load.If search the network segment
Routing table does not find matching list item yet, then exchange chip can give bag CPU processing, carry out soft route, is also referred to as
CPU., can be directly using B IP as rope after CPU receives this IP message because website B belongs to one of directly connected subnet of interchanger
Draw inspection arp cache, if without website B MAC Address, stood according to routing iinformation to B and broadcast an ARP request, B stations obtain
Its MAC Address is replied to interchanger after this ARP request, CPU again may be by while this ARP reply messages are received
Software sets three layers of hardware to exchange chip website B IP address, MAC Address, into information such as the port numbers of interchanger
In list item, the IP messages sent by website A are then transmitted to website B, the first time this completes website A to website B
One-way communication.Due to saved website A, B routing iinformation in three layers of engine of chip internal, enter between later website A, B
The website of row communication or other network segments is wanted to be communicated with A, B, and exchange chip then can be directly bag from three layers of hardware table item
The port specified forwards, without giving CPU processing bag again.This mode by " once routeing, repeatedly exchange ",
Substantially increase forwarding speed.It should be noted that the route table items in three layers of engine are mostly by software design patterns.
In one embodiment, as shown in figure 1, the soft routing performance method of testing includes:
Step S1, the first port of the network equipment is connected with the first network interface card of the first computer, the network is set
Standby second port is connected with the second network interface card of second computer, creates the VLAN that gives out a contract for a project, and first port is configured into the hair
Wrap VLAN, the IP address for the network segment that setting first port is connected;Packet receiving VLAN is created, by remaining end of the network equipment
At least one in mouthful is configured to the packet receiving VLAN, sets the IP for the network segment that the port for being configured to the packet receiving VLAN connected
Address.Specifically, the VLAN and packet receiving VLAN that gives out a contract for a project is different VLAN, is when the network equipment receives source address
The packet of the IP address of the network segment of the port of giving out a contract for a project, the IP address for the network segment that destination address is the packet receiving port, and should
Packet is the IP address for the network segment that the source address that the network equipment receives for the first time is the port of giving out a contract for a project, destination address is
During the packet of the IP address of the network segment of the packet receiving port, because the packet is that travelling across VLAN is sent, therefore, the network is set
It is standby that hardware forwarding can not be directly carried out to the packet, it is necessary to carry out soft route processing.
Step S2, second computer carry out communication test with the network equipment.Specifically, second computer and the net
Whether network equipment carries out continual communication test, determine the network equipment working in abnormal by the result of communication test
State, when the situation of packet loss occurs in the communication test, then illustrate that the network equipment working is in packet loss state, i.e., abnormal shape
State.When the communication test does not occur the situation of packet loss, then illustrate that the network equipment working is in not packet loss state, i.e., normally
State.In one embodiment, the communication test includes testing by ping orders.
Step S3, the IP address of at least one network segment using the vlan port connection of giving out a contract for a project of the first computer construction is source
Address, the packet receiving VLAN connections the network segment IP address be purpose address packet, the different packets have not
Same source address or different destination addresses, and packet sending speed is set, constructed packet is sent with the packet sending speed.Tool
Body, the packet includes IP messages.In one embodiment, the packet of the first computer construction can be multiple
Packet with different source addresses or different destination addresses, to ensure that these packets are required for described in tested
Routing forwarding is carried out in the network equipment.In one embodiment, the destination address of the packet is inaccessible IP address.By
In when the destination address of the packet is inaccessible IP address, MAC Address corresponding to destination address can not be determined, i.e., without
Method establishes hardware forwarding table.Therefore, when to send this destination address every time be the packet of inaccessible IP address, will all carry out
Soft route processing.So, first computer can detect the network equipment by continuously transmitting same packet
Soft routing capabilities.
Step S4, the packet sending speed is adjusted according to second computer and the network device communications test mode, and then
It is determined that the maximum packet sending speed being in the communication test under not packet loss state.Specifically, when the second computer and institute
State network device communications test mode for not packet loss state (i.e. normal communication state) when, the speed of giving out a contract for a project of the first computer of raising
Rate;When the second computer and the network device communications test mode are packet loss state (i.e. abnormal communication states), drop
The packet sending speed of low first computer.By continuously attempting to, and then determine to be under not packet loss state in the communication test
Maximum packet sending speed.
In one embodiment, the soft routing performance method of testing also includes:In setting time section, with the maximum
Packet sending speed is given out a contract for a project, while detects the communication test state.Specifically, the first computer in setting time section all with described
Maximum packet sending speed sends packet, while detects whether the communication test is constantly in not packet loss state in real time.Such as fruit
When detect the communication test and be constantly in not packet loss state, then the maximum packet sending speed correspond to the tested network equipment
Maximum soft routing capabilities.If detect the communication test in real time needs sometimes in packet loss state, the maximum packet sending speed
It is adjusted, that is, reduces the packet sending speed and further tested.
In one embodiment, first computer and the second computer are same computer, first net
Block the different network interface cards for same computer from second network interface card.Specifically, the computer comprises at least two pieces of network interface cards, wherein one
Block connects the first port of the network equipment, the second port of another piece of connection network equipment.
In one embodiment, the soft routing performance method of testing also includes:The network equipment passes through serial ports and
Three computers are connected, and the running status of the network equipment is checked on the 3rd computer.In one embodiment, the network
The running status of equipment includes the CPU usage of the equipment.The running status of the network equipment can also include the net
The memory usage of network equipment.The running status of the network equipment can also include the quantity of route processing message.At one
In embodiment, the 3rd computer checks the running status of the network equipment by Command Line Interface.It is described by checking
The running status of the network equipment may further determine that the performance and stability of the network equipment.In one embodiment, institute
It is same computer to state the first computer, the second computer and the 3rd computer, first network interface card and described second
Network interface card is the different network interface cards of same computer.Specifically, the computer comprises at least two pieces of network interface cards, and one of connection network is set
Standby first port, the second port of another piece of connection network equipment, meanwhile, the computer also passes through Serial Port Line and the network
Equipment is attached, and the running status of the network equipment is checked by serial port command.
In summary, a kind of soft routing performance method of testing of the invention is sent by the different packet sending speed of a simulation
The packet routeing is needed, the network equipment with soft routing capabilities sends protocol data bag while packet receiving, to detect net
The performance of the soft routing capabilities and CPU of network equipment.The soft routing capabilities of the network equipment are the significant capabilities of the network equipment, this hair
The bright power of test that greatly strengthen to the performance of the network equipment.So the present invention effectively overcome it is of the prior art a variety of
Shortcoming and have high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.It is any ripe
Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.