WO2009157067A1 - 試験装置及び方法 - Google Patents

試験装置及び方法 Download PDF

Info

Publication number
WO2009157067A1
WO2009157067A1 PCT/JP2008/061570 JP2008061570W WO2009157067A1 WO 2009157067 A1 WO2009157067 A1 WO 2009157067A1 JP 2008061570 W JP2008061570 W JP 2008061570W WO 2009157067 A1 WO2009157067 A1 WO 2009157067A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
adapter
packet
network adapter
data
Prior art date
Application number
PCT/JP2008/061570
Other languages
English (en)
French (fr)
Inventor
浩二 高原
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to JP2010517632A priority Critical patent/JP5003821B2/ja
Priority to PCT/JP2008/061570 priority patent/WO2009157067A1/ja
Publication of WO2009157067A1 publication Critical patent/WO2009157067A1/ja
Priority to US12/968,883 priority patent/US20110085451A1/en

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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Definitions

  • the present invention relates to a technique for testing a network adapter (communication control unit) and a network driver.
  • the network adapter is mounted or mounted on computers and used for communication between computers. Since many network adapters are in the form of cards that are inserted into expansion slots of computers, they are also called network cards, network boards, network interface cards, and the like.
  • the network adapter test includes a high load test and performance measurement.
  • the high load test of a network adapter is a test that causes the network adapter to transmit or receive data of the number of bytes or packets as much as possible.
  • the performance measurement of a network adapter is to calculate and determine how much data has flowed per unit time when the network adapter sends or receives as many bytes or packets as possible. is there.
  • performance measurement is also a high-load test in order to transmit and receive as fast as possible.
  • Patent Document 1 there is a technique disclosed in Patent Document 1 below.
  • the performance measurement and the high load test are performed by connecting two computers provided with network adapters with a network cable and communicating using TCP / IP with existing application software such as netperf.
  • packets sent from the application software 91A in the host HA are sent via the stream head 92A, the TCP layer 93A, the IP layer 94A, and the driver 95A. Sent to the network adapter 96A.
  • the network adapter 96A of the host HA transmits the packet to the network adapter 96B of the host HB via the network cable.
  • the packet received by the network adapter 96B is sent to the application software 91B via the driver 95B, the IP layer 94B, the TCP layer 93B, and the stream head 92B.
  • the packet sent from the application software 91 is sent to the IP layer 94 via the stream head 92 and the TCP layer 93. Sent to. Then, the packet is returned at the IP layer 94 and returned to the application software 91 via the TCP layer 93 and the stream head 92.
  • the transmission source IP address becomes the same as the transmission destination IP address. It will be wrapped and the packet will not flow to the network driver or network adapter.
  • the IP address 10.20.1.1 is assigned to the network adapter 96A, and the IP address 10.20.2.1 is assigned to the network adapter 96B.
  • the packet is not transmitted from the network adapter 96A to the network adapter 96B, but the IP address of the network adapter 96B is selected as the transmission source in the IP layer 94. It will be the same.
  • the source IP address is the IP address of the network adapter belonging to the IP subnet. It becomes. In the example of FIG. 55, since the transmission destination is 10.20.2.1, the transmission source is also 10.20.2.1.
  • the packet is sent from the user space to the driver via the stream head and not through the TCP layer and the IP layer, and the packet is received from the driver via the network adapter. Is possible.
  • the stream head 91 and the driver 95 often do not have a function for queuing data, if a received packet is being processed by the stream head, the driver sends the next packet to the stream head. Is often lost without sending.
  • packet 1 packet 2, packet 3,. . . .
  • the interval between each packet is 10 microseconds
  • the interval between packet 10 and packet 11 is 100 microseconds
  • From packet 11 to packet 20 the interval between each packet is 10 microseconds.
  • the interval between packet 20 and packet 21 is 100 microseconds, It may become like this.
  • the time taken to pass a set of data from the kernel space to the user space is often about halfway (for example, 15 microseconds).
  • the driver 2 determines that the stream head is still being processed, and discards the next packet (packet lost).
  • (2-1-1) Host CPU allocation is performed by TSS (Time sharing system). On the packet transmission side, once the CPU is assigned, a plurality of packets are continuously transmitted during that period. However, because of the TSS, transmission is interrupted once somewhere. Thereafter, the CPU is assigned again and transmission is resumed, and a plurality of packets are continuously transmitted.
  • TSS Time sharing system
  • the TCP layer 93 waits without discarding the packet.
  • the IP layer 94 registers data in the queue when the TCP layer 93 is in a standby state or when data in the queue of the IP layer 94 is already accumulated.
  • the IP layer 94 passes data to the TCP layer 93 when the standby state of the TCP layer 93 is released.
  • TCP / IP is the de facto standard in networks such as the Internet and Intranet, there is a problem that tests based on the actual situation cannot be performed if a protocol other than TCP / IP is used.
  • FIG. 56 there is also a network adapter having an intra-adapter return function in which a single network adapter is inserted in one machine and the transmitted packet is received by the adapter itself.
  • TCP / IP cannot be used for the reason (1) above, and therefore the problem (2) occurs.
  • the present invention provides a technique capable of testing a network adapter or a network driver with a single test apparatus.
  • test apparatus As an embodiment of the present invention for solving the above problems, there are a test apparatus, a test method, and a test program.
  • Test equipment At least one network adapter is connected, A transmission application unit that instructs transmission of data using a virtual address as a transmission destination address; In the test mode, the data transmission destination address is converted into an address assigned to the network adapter connected to the own device, and the data is sent to the network adapter or another network adapter connected to the own device.
  • An address conversion unit to be transmitted A receiving application unit that receives the data via a network adapter to which the destination address after conversion is assigned; A calculation unit for calculating a test result based on the transmission result of the data; Is provided.
  • the test method is Test equipment with at least one network adapter connected Instructing transmission of data using a virtual address as a destination address; In the test mode, the data transmission destination address is converted into an address assigned to the network adapter connected to the own device, and the data is sent to the network adapter or another network adapter connected to the own device. Step to send, Receiving the data via a network adapter to which the destination address after the conversion is assigned; Calculating a test result based on the transmission result of the data; Execute.
  • the present invention may be a program that causes a computer to execute the test method.
  • the present invention may be a program in which this program is recorded on a computer-readable recording medium. The function can be provided by causing the computer to read and execute the program of the recording medium.
  • the computer-readable recording medium refers to a recording medium that accumulates information such as data and programs by electrical, magnetic, optical, mechanical, or chemical action and can be read from the computer.
  • Examples of such a recording medium that can be removed from the computer include a flexible disk, a magneto-optical disk, a CD-ROM, a CD-R / W, a DVD, a DAT, an 8 mm tape, and a memory card.
  • FIG. 1 is a functional block diagram of the test apparatus according to the present embodiment
  • FIG. 2 is a hardware configuration diagram of the test apparatus according to the present embodiment.
  • the test apparatus 1 is a general computer provided with a central processing unit (CPU) 12, a main memory 13, an input / output port (I / O) 14 and the like in a main body 11.
  • CPU central processing unit
  • main memory 13 main memory 13
  • I / O input / output port
  • the input / output port 14 includes an input unit 15 for inputting user instructions such as a keyboard and a mouse, a storage unit 16 such as a hard disk storing data and software for arithmetic processing, and communication for controlling communication with other computers.
  • Network adapters 17A and 17B functioning as control units are connected.
  • the storage unit 16 is preinstalled with operating software (OS), application software such as netperf, and network driver.
  • OS operating software
  • application software such as netperf
  • network driver network driver
  • the CPU 12 appropriately reads out and executes the OS, application program, and network driver from the storage unit 16 via the main memory 13, and performs arithmetic processing on information read from the network adapter (hereinafter simply referred to as an adapter) 17 and the storage unit 16.
  • an adapter As shown in FIG. 1, the application unit 21, the stream head 22, the TCP unit (TCP layer) 23, the IP unit (IP layer) 24, the driver units (drive control units) 25A and 25B, the test result calculation unit 26, It also functions as the test result output unit 27.
  • a kernel space is a memory area that the OS reserves for the operation of the kernel and device drivers
  • a user space is a memory area that the OS reserves for the operation of the user process.
  • the application unit 21 includes a transmission application unit and a reception application unit.
  • the CPU 12 When functioning as a transmission application unit, the CPU 12 sends packets to the stream head 22 at the maximum amount or the highest speed that the adapters 17A and 17B can transmit in order to test the adapters 17A and 17B and the network driver.
  • the CPU 12 as the reception application unit receives the packet received by the adapters 17A and 17B via the driver units 25A and 25B, the IP layer 24, the TCP layer 23, and the stream header 22 corresponding to the adapter that has received the packet. .
  • the CPU 12 as the test result calculation unit 26 measures the amount and speed of the transmitted packet, the amount and speed of the received packet, the number of errors, and the like, and sets values as test results such as the transmission speed and error rate per unit time. calculate.
  • the CPU 12 as the test result output unit 27 performs output processing such as recording on a recording medium, display on a display unit, printing, and transmission to another computer with respect to the calculated test result.
  • the CPU 21 as the stream head 22 performs data (packet) transfer processing between the user space and the kernel space.
  • the CPU 12 serving as the TCP layer 23 generates a packet (TCP segment) by adding a TCP header to the data transmitted from the stream head 22 and passes the packet (TCP segment) to the IP layer 24. Further, the CPU 12 as the TCP layer 23 performs processing according to TCP (Transmission Control Protocol) such as removing the TCP header from the packet received from the IP layer and passing it to the stream header 22.
  • TCP Transmission Control Protocol
  • the CPU 12 as the IP layer 24 adds an IP header to the packet transmitted from the TCP layer 23 to generate a packet (IP datagram) and passes it to the driver units 25A and 25B. Also, processing according to IP (Internet Protocol) such as removing the IP header from the packet received from any driver and passing it to the TCP layer 23 is performed. Further, when transmitting the packet, the IP layer 24 selects the adapter 17A or adapter 17B belonging to the same subnet as the transmission destination address, and passes the transmission packet to the driver 25A / 25B corresponding to the selected adapter for transmission.
  • the CPU 12 serving as the driver units 25A and 25B performs a process of transmitting data (for example, packets) from the computer 1 side to the adapters 17A and 17B corresponding to the respective driver units and transmitting the data. Further, the CPU 12 serving as the driver units 25A and 25B performs a process of delivering packets received by the adapters 17A and 17B corresponding to the respective driver units to the IP layer 24.
  • data for example, packets
  • the adapters 17A and 17B send the data received from the corresponding driver units 25A and 25B to a network such as the Internet, and pass the data received via the network to the corresponding driver units 25A and 25B. This enables communication with other computers.
  • the driver units 25A and 25B or the adapters 17A and 17B have an address conversion unit. That is, the CPU 12 as the driver units 25A and 25B, the processing units and some circuits of the adapters 17A and 17B realize the function of the address conversion unit.
  • the address conversion unit converts the data transmission destination address to an address assigned to the network adapter connected to the own device when a test mode which is a mode for testing a driver or an adapter is selected. Then, the data is transmitted to the network adapter or another network adapter connected to the own apparatus and transmitted.
  • the computer 1 When the computer 1 according to this embodiment performs test communication that is communication for testing between two adapters provided in its own apparatus, the user or the application unit 21 uses the IP address of the virtual machine as the IP address of the transmission destination. Is specified. As a result, the transmission destination of the data does not become within the own apparatus, and the packet transmitted by the application unit 21 is not returned by the IP layer 24 but is transmitted from the IP layer 24 to, for example, the driver unit 25A.
  • the computer 1 converts the packet transmission destination into the IP address of the other adapter 17B installed in the own apparatus by the adapter 17A or the driver unit 25A beyond the IP layer 24. This enables a test communication in which a packet is transmitted from the adapter 17A and received by the adapter 17B in the own apparatus via the network cable.
  • the computer 1 uses the adapter 17A or the driver unit 25A to convert the transmission destination IP address to an IP address in its own device, and also converts the transmission source IP address to that on the virtual machine and transmits the packet. .
  • the application unit 21 that has received the packet recognizes the communication from the virtual machine and responds to the virtual machine.
  • the driver 25B or the adapter 17B operates in the same manner as the driver 25A or the adapter 17A, so that the test from the adapter 17B to the adapter 17A is performed. Communication is also possible.
  • the computer 1 of this embodiment prevents the return of packets in the IP layer 24 by pretending to the IP layer 24 to send the packet to the virtual machine from one of the adapters 17A / 17B in the device itself. Actually, the destination address is converted and transmitted to the other adapter. At this time, the computer 1 converts the transmission source address of the packet into the address of the virtual machine, so that the other adapter 17A / 17B receives the packet as a packet from the virtual machine without contradiction.
  • TCP / IP since TCP / IP is used, packet loss does not occur, and it becomes possible to perform a high load test and performance measurement.
  • the IP address IP11 of the adapter 17A is assigned 10.20.1.1
  • the IP address IP21 of the adapter 17B is assigned 10.20.2.1.
  • FIG. 3 is a conceptual diagram of the test method of the first embodiment.
  • the communication partner of the adapter 17A whose IP address is 10.20.1.1 performs communication while pretending to the IP layer as if it were the first virtual machine whose IP address is 10.20.1.2. Further, the communication is performed by making the IP layer 24 appear as if the communication partner of the adapter 17B whose IP address is 10.20.2.1 is the second virtual machine whose IP address is 10.20.2.2.
  • an IP address belonging to the same IP subnet as that of the adapter 17A is assigned to the first virtual machine so that the packet transmission to the first virtual machine is performed from the first adapter 17A.
  • an IP address belonging to the same IP subnet as that of the adapter 17B is assigned to the second virtual machine so that packet transmission to the second virtual machine is performed from the second adapter 17B.
  • the MAC address on the virtual machine is different from that on the test device and other virtual machines. That is, the MAC address MAC11 of the first virtual machine and the MAC address MAC21 of the second virtual machine are made different from the MAC address MAC12 of the adapter 17A and the MAC address MAC22 of the adapter 17B.
  • this embodiment employs a test method in which the IP address and MAC address are converted and communicated by hardware such as an adapter or a driver. To do.
  • FIG. 4 is an explanatory diagram of a test method using the computer 1 according to the present embodiment
  • FIG. 5 is a diagram showing a procedure when communication is started from the adapter 17A to the adapter 17B
  • FIG. 6 is a diagram when communication is started from the adapter 17B to the adapter 17A
  • FIG. 7 to FIG. 12 show the transmission processing of FIG. 4 in the respective steps of FIG. 5 and FIG. 6,
  • FIGS. 13 to 18 show the addresses to be converted in the respective steps of FIG. 7 to FIG. It is explanatory drawing.
  • the computer 1 sets the test mode.
  • the IP address of the first virtual machine that is the communication partner of the adapter 17A and the second virtual machine that is the communication partner of the adapter 17B is specified as shown in FIG.
  • the virtual machine address is not limited to the input by the user, and the computer 1 may automatically generate an address belonging to the same subnet as the IP address assigned to each of the adapters 17A and 17B.
  • the IP address of the adapter 17A is increased or decreased by a predetermined value within the same subnet to obtain the IP address of the first virtual machine.
  • the computer 1 executes the command to start the test (S1), and performs transmission processing according to the command.
  • Perform (S2) Specifically, the following processes (1) to (6) are performed.
  • the application unit 21 attempts to start transmission of a packet addressed to the first virtual machine.
  • the IP address of the first virtual machine is specified as an IP address different from that of the adapter in the own apparatus. Therefore, as shown in FIG. 7, the IP layer 24 makes an address resolution request for obtaining a MAC address corresponding to the transmission destination IP address (S101).
  • the IP layer 24 selects the driver unit 25A belonging to the same IP subnet as the destination IP address of the address resolution request packet, and sends the address resolution request packet to the driver unit 25A (S102).
  • the adapter 17A or the driver unit 25A that has received the packet determines whether or not the set mode is the address translation mode (test mode) (S103). As a result of the determination, if the set mode is the address translation mode, the destination IP address is changed from 10.20.1.2 to 10.20.2.1 and the source IP address is changed from 10.20.1.1 to 10.20 as shown in FIG. In .2.2, the source MAC address is converted from MAC11 to MAC22 (S104). Then, the adapter 17A transmits the packet whose address is converted to the outside (S105).
  • test mode test mode
  • the adapter 17A or the driver 25A sets the address.
  • the packet is transmitted without conversion (S106).
  • the destination address of the packet transmitted by the adapter 17A or the driver 25A is converted as shown in FIG. 13 so that the destination of the packet is the other adapter 17B in the own apparatus.
  • the destination MAC address of this packet is ff.ff.ff.ff.ff.ff.ff for broadcasting.
  • the transmission source IP address and the transmission source MAC address of the packet to be transmitted are converted as shown in FIG. 13 so that the transmission source of the packet is a predetermined virtual machine.
  • the adapter 17A makes the communication partner appear to be the second virtual machine to the adapter 17B as shown in FIG. 3, so in the example of FIG. 13, the source IP address of the packet to be transmitted is 10.20.2.2, the source The MAC address is converted to MAC22 and transmitted.
  • the packet transmitted from the adapter 17A is received by the adapter 17B via the network cable.
  • the adapter 17B sends the received packet to the application unit 21 via the driver unit 25B, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives the packet from the second virtual machine that is the transmission source.
  • the application unit 21 returns an address resolution response to the second virtual machine (S201).
  • the IP layer 24 sends the packet to the driver unit 25B belonging to the same IP subnet as the destination IP address. (S202).
  • the adapter 17B or the driver unit 25B that has received the packet from the IP layer 24 determines whether or not the set mode is the address translation mode (test mode) (S203). If the set mode is the address translation mode, the adapter 17B or the driver unit 25B transmits the destination IP address from 10.20.2.2 to 10.20.1.1 and the destination MAC address from MAC22 to MAC11 as shown in FIG. The source IP address is converted from 10.20.2.1 to 10.20.1.2, and the source MAC address is converted from MAC21 to MAC12 (S204). Then, the adapter 17B transmits the packet with the converted address to the outside (S205). If it is determined in S203 that the set mode is not the address conversion mode, that is, the normal mode, the adapter 17B or the driver 25B transmits the packet without converting the address (S206).
  • test mode test mode
  • the transmission destination IP address and the transmission destination MAC address on the packet transmitted by the adapter 17B or the driver unit 25B so that the transmission destination is the second adapter 17A in the own device from the second virtual machine. Is converted as shown in FIG.
  • the source IP address and source MAC address of the packet to be transmitted are converted as shown in FIG. 14 so that the source becomes the first virtual machine from the adapter 17B.
  • the source IP address is 10.20.1.2 and the source MAC address is MAC12 in the example of FIG.
  • the packet transmitted from the adapter 17B is received by the adapter 17A via the network cable.
  • the adapter 17A sends the received packet to the application unit 21 via the driver unit 25A, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives the packet from the first virtual machine that is the transmission source.
  • the application unit 21 that has recognized the MAC address of the first virtual machine by address resolution sends a packet to the first virtual machine (S301).
  • the IP layer 24 sends the packet to the driver unit 25A belonging to the same IP subnet as the destination IP address (S302). ).
  • the adapter 17A or the driver unit 25A that has received the packet from the IP layer 24 determines whether or not the set mode is the address translation mode (test mode) (S303). If the set mode is the address translation mode, the destination IP address is changed from 10.20.1.2 to 10.20.2.1, the destination MAC address is changed from MAC12 to MAC21, and the source IP address is 10.20 as shown in FIG. The source MAC address is converted from MAC11 to MAC22 from .1.1 to 10.20.2.2 (S304). Then, the adapter 17A transmits the packet whose address is converted to the outside (S305). If it is determined in S303 that the mode is not the address translation mode, the packet is transmitted without converting the address (S306).
  • test mode test mode
  • the transmission destination IP address and the transmission destination MAC address of the packet to be transmitted are converted as shown in FIG. 15 so that the transmission destination is the other adapter 17B in the own apparatus.
  • the source IP address and source MAC address of the packet to be transmitted are converted as shown in FIG. 15 so that the source is a predetermined virtual machine. That is, as shown in FIG. 3, in order to make the communication partner appear to be the second virtual machine to the adapter 17B, as shown in FIG. 15, the source IP address of the packet is 10.20.2.2 and the source MAC address is MAC22. It is said.
  • the packet transmitted from the adapter 17A is received by the adapter 17B via the network cable.
  • the adapter 17B sends the received packet to the application unit 21 via the driver unit 25B, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives the packet from the second virtual machine that is the transmission source.
  • the application unit 21 attempts to start transmission of a packet addressed to the second virtual machine.
  • the IP address of the second virtual machine an IP address different from that of the adapter in the own apparatus is designated as described above.
  • the IP layer 24 makes an address resolution request for obtaining a MAC address corresponding to the destination IP address (S401).
  • the IP layer 24 selects the driver unit 25B belonging to the same IP subnet as the destination IP address of the address resolution request packet, and sends the address resolution request packet to the driver unit 25B (S402).
  • the adapter 17B or the driver unit 25B that has received the packet determines whether or not the set mode is the address translation mode (test mode) (S403). As a result of the determination, if the set mode is the address translation mode, the destination IP address is changed from 10.20.2.2 to 10.20.1.1 and the source IP address is changed from 10.20.2.1 to 10.20.1.2 as shown in FIG. The source MAC address is converted from MAC21 to MAC12 (S404). Then, the adapter 17B transmits the packet with the converted address to the outside (S405). If it is determined in S403 that the set mode is not the address conversion mode, that is, the normal mode, the adapter 17B or the driver 25B transmits the packet without converting the address (S406).
  • test mode test mode
  • the transmission destination address of the packet transmitted by the adapter 17B or the driver 25B is converted as shown in FIG. 16 so that the transmission destination of the packet is the other adapter 17A in the own apparatus.
  • the transmission destination MAC address of this packet is ff.ff.ff.ff.ff.ff.ff for broadcasting.
  • the transmission source IP address and the transmission source MAC address of the packet to be transmitted are converted as shown in FIG. 16 so that the transmission source of the packet is a predetermined virtual machine.
  • the adapter 17B makes the communication partner appear to be the first virtual machine to the adapter 17A. Therefore, in the example of FIG. 16, the source IP address of the packet to be transmitted is 10.20.1.2, the source The MAC address is MAC12.
  • the packet transmitted from the adapter 17B is received by the adapter 17A via the network cable.
  • the adapter 17A sends the received packet to the application unit 21 via the driver unit 25A, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives the packet from the first virtual machine that is the transmission source.
  • the application unit 21 returns an address resolution response to the first virtual machine (S501).
  • the IP layer 24 sends the packet to the driver unit 25A belonging to the same IP subnet as the destination IP address. (S502).
  • the adapter 17A or the driver unit 25A that has received the packet from the IP layer 24 determines whether or not the set mode is the address translation mode (test mode) (S503). If the set mode is the address translation mode, the adapter 17A or the driver unit 25A changes the destination IP address from 10.20.1.2 to 10.20.2.1 and the destination MAC address from MAC12 to MAC21 as shown in FIG. Then, the source IP address is converted from 10.20.1.1 to 10.20.2.2, and the source MAC address is converted from MAC11 to MAC22 (S504).
  • test mode test mode
  • the adapter 17A transmits the packet whose address is converted to the outside (S505). If it is determined in S503 that the mode is not the address conversion mode, the packet is transmitted without converting the address (S506).
  • the adapter 17A or the driver unit 25A causes the transmission destination IP address and the transmission destination MAC on the packet to be transmitted so that the transmission destination is the first virtual machine to the other adapter 17B in the own device.
  • the address is converted as shown in FIG.
  • the source IP address and source MAC address of the packet to be transmitted are converted as shown in FIG. 17 so that the source becomes the second virtual machine from the adapter 17A. That is, as shown in FIG. 3, in order to make the communication partner appear to be the second virtual machine to the adapter 17B, the source IP address is 10.20.2.2 and the source MAC address is MAC22 in the example of FIG.
  • the packet transmitted from the adapter 17A is received by the adapter 17B via the network cable.
  • the adapter 17B sends the received packet to the application unit 21 via the driver unit 25B, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives the packet from the second virtual machine that is the transmission source.
  • the application unit 21 that has recognized the MAC address of the second virtual machine by address resolution sends a packet to the second virtual machine (S601).
  • the IP layer 24 sends the packet to the driver unit 25B belonging to the same IP subnet as the destination IP address. (S602).
  • the adapter 17B or the driver unit 25B that has received the packet from the IP layer 24 determines whether or not the set mode is the address translation mode (test mode) (S603). If the set mode is the address translation mode, the adapter 17B or the driver unit 25B transmits the destination IP address from 10.20.2.2 to 10.20.1.1 and the destination MAC address from MAC22 to MAC11 as shown in FIG. The source IP address is converted from 10.20.2.1 to 10.20.1.2, and the source MAC address is converted from MAC21 to MAC12 (S604). Then, the adapter 17B transmits the packet with the converted address to the outside (S605). If it is determined in S603 that the set mode is not the address conversion mode, that is, the normal mode, the adapter 17B or the driver 25B transmits the packet without converting the address (S606).
  • test mode test mode
  • the transmission destination IP address and the transmission destination MAC address on the packet transmitted by the adapter 17B or the driver unit 25B so that the transmission destination is the second adapter 17A in the own device from the second virtual machine. Is converted as shown in FIG.
  • the source IP address and source MAC address of the packet to be transmitted are converted as shown in FIG. 18 so that the source becomes the first virtual machine from the adapter 17B. That is, as shown in FIG. 3, in order to make the communication partner appear as the first virtual machine to the adapter 17A, the source IP address is 10.20.1.2 and the source MAC address is MAC12 in the example of FIG.
  • the packet transmitted from the adapter 17B is received by the adapter 17A via the network cable.
  • the adapter 17A sends the received packet to the application unit 21 via the driver unit 25A, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives the packet from the first virtual machine that is the transmission source.
  • the computer 1 pretends that the communication partner of the adapter 17A is the first virtual machine and the communication partner of the adapter 17B is the second virtual machine in S2 of FIG. 4 according to the procedure of FIGS.
  • the test is repeated by repeating the communication between the adapters 17A and 17B (S3).
  • the application unit 21 obtains the amount of transmitted / received data and the speed per unit time as a test result (S4), and outputs such as writing to a recording medium, display on a display device, transmission to another computer, printing, etc. Processing is performed (S5).
  • the mode for performing the address translation that is, the transition to the test mode and the cancellation of the mode are specified by the user with a command.
  • addrtrans-s is used as a command for shifting to the address translation mode. Further, when inputting this command, the user specifies from the input unit 15 as follows in order to specify the communication direction and the address of the virtual machine. > Addrtrans -s driver # 1 10.20.1.2 driver # 2 10.20.2.2
  • driver # 1 is the driver name of the driver unit 25A
  • driver # 2 is the driver name of the driver unit 25B
  • 10.20.1.2 is the IP address of the first virtual machine
  • 10.20.2.2 is This is the IP address of the second virtual machine.
  • addrtrans -d is used as a command for canceling the address translation mode, that is, for setting the normal mode.
  • the user specifies from the input unit 15 as follows. > Addrtrans -d driver # 1 driver # 2
  • FIG. 19 is a diagram illustrating a transmission path when communicating from the adapter 17A to the adapter 17B in the test mode.
  • IP12 10.20.1.2
  • the above conversions (1) to (3) As a result of the processing, as shown in FIG. 19, the netperf command 21 ⁇ stream head 22 ⁇ TCP 23 ⁇ IP 24 ⁇ driver 25 A ⁇ adapter 17 A ⁇ adapter 17 B ⁇ driver 25 B ⁇ IP 24 ⁇ TCP 23 ⁇ stream head 22 ⁇ Can be executed.
  • netperf is used as a command for transmitting a packet for testing. After entering the address translation mode, execute the command as follows: > Netperperf -H 10.20.1.2
  • FIG. 20 is a diagram illustrating a transmission path when communicating from the adapter 17A to the adapter 17B in the test mode.
  • the conversion processes (4) to (6) described above transmission via the netperf command 21 ⁇ stream head 22 ⁇ TCP 23 ⁇ IP 24 ⁇ driver 25B ⁇ adapter 17B ⁇ adapter 17A ⁇ driver 25A ⁇ IP 24 ⁇ TCP 23 ⁇ stream head 22 ⁇ netserver daemon 21 can be executed. .
  • the command is executed as follows. > Netperperf -H 10.20.2.2
  • FIG. 21 is an explanatory diagram of the address translation register
  • FIG. 22 is an explanatory diagram of the address translation register update process
  • FIG. 23 is a diagram illustrating an example of a value written to the address translation register of the adapter 17A
  • FIG. 24 is an address translation of the adapter 17B
  • FIG. 25 is a diagram illustrating an example of a value written in a register
  • FIG. 25 is a diagram illustrating an example in which the value of the address conversion register is cleared and the normal mode is set.
  • An area shown in FIG. 21, that is, an address conversion register is secured in a predetermined place in the memory space on the adapters 17A and 17B.
  • the address translation register in FIG. 21 shows the currently set mode, the IP address of the local virtual machine, the IP address of the local real machine, the MAC address of the local virtual machine, and the local adapter. Items such as the MAC address, the IP address of the opposing virtual machine, the IP address of the opposing real machine, the MAC address of the opposing virtual machine, and the MAC address of the opposing adapter are stored.
  • the currently set mode is set to 1 for the address conversion mode and 0 for the normal mode, for example.
  • the address conversion register of the adapter 17A the own virtual machine is the first virtual machine, the opposite virtual machine is the second virtual machine, and the address on the own real machine is the address of the adapter 17A.
  • the address on the opposite real machine is the address of the adapter 17B.
  • the CPU 12 When the addrtrans -s command is executed, the CPU 12 performs the following operation.
  • the MAC address and the IP address of the adapter 17A and the adapter 17B are checked with the existing interface provided in the OS, the IP address on the real machine on the own side of the address conversion register, the MAC address on the own adapter, The IP address on the real machine on the side and the MAC address on the adapter on the opposite side are stored.
  • the MAC address and the IP address are stored in the memory in association with the driver names related to the adapters 17A and 17B by the OS.
  • MAC addresses are assigned to the first virtual machine and the second virtual machine, and stored as the MAC address on the own virtual machine and the MAC address on the opposite virtual machine of the address translation register.
  • the values are designated as MAC21 and MAC22.
  • the MAC address MAC21 of the first virtual machine, the MAC address MAC22 of the second virtual machine, the MAC address MAC11 of the adapter 17A, and the MAC address MAC12 of the adapter 17B are respectively unique values. Assign MAC21 and MAC22.
  • the application unit 21 passes the values to be written to the address conversion registers of the adapter 17A and the adapter 17B to the driver unit 25A and the driver unit 25B, respectively, by a command for controlling the driver as shown in FIG. 22, for example, ioctl. .
  • the driver units 25A and 25B Upon receiving ioctl, the driver units 25A and 25B write the values of the items received by the ioctl into the address conversion registers on the adapters 17A and 17B corresponding to the driver units.
  • the driver unit 25A writes each information into the address conversion register of the adapter 17A as shown in FIG. That is, the mode is 1, the IP address of its own virtual machine is 10.20.1.2, the IP address of its own real machine is 10.20.1.1, the MAC address of its own virtual machine is MAC12, and it is on its own adapter MAC address is MAC11, the IP address of the opposite virtual machine is 10.20.2.2, the IP address of the opposite real machine is 10.20.2.1, the MAC address of the opposite virtual machine is MAC22, and on the opposite adapter The MAC address is MAC21.
  • the driver unit 25B writes each information into the address conversion register of the adapter 17B as shown in FIG.
  • FIG. 26 is an explanatory diagram of the address translation information update process.
  • the driver units 25A and 25B hold a data structure called “control structure” in the memory 13 on the computer 1 in order to save the status of the adapter and information instructed by higher-order elements. Yes.
  • address conversion information The information equivalent to the address translation register of FIG. 21 is taken into the control structure. This is called “address conversion information”.
  • the driver units 25A and 25B When the driver units 25A and 25B receive ioctl, the values of the control structure are updated as shown in FIG. For example, when “addrtrans-s driver # 1 10.20.1.2 driver # 2 10.20.2.2” is executed, the driver unit 25A writes the value of FIG. 23 as the address conversion information of the control structure. In addition, the driver unit 25B writes the value of FIG. 24 as the address conversion information of the control structure.
  • driver units 25A and 25B clear the address translation information of the control structure as shown in FIG.
  • FIG. 27 is a functional block diagram of the adapter showing a state in the normal mode, that is, when performing normal communication. Since the adapters 17A and 17B have the same configuration and perform the same processing in contrast to each other at the time of transmission and at the time of reception, the adapter 17A will be described for convenience and the description of the adapter 17B will be omitted. The same applies to the driver units 25A and 25B, and the description of the driver unit 25B is omitted.
  • the adapter 17A includes a transmission queue 71, a transceiver 72, a data converter 73, and a reception queue 74.
  • the transmission packet is first registered in the transmission queue 71 and sent to the transmitter / receiver 72 by FIFO (first in, first out).
  • the transmitter / receiver 72 adds an error detection bit for detecting an error in the transmission path to the packet sent from the transmission queue 71 and designates transmission of the packet.
  • the packet is in the form of a bit string of 0s and 1s.
  • the packet for which transmission is designated by the transceiver 72 reaches the data converter 73, is converted into an electric signal or optical signal format, and is sent to a transmission line such as a LAN cable.
  • the received packet enters the data converter 73 from the transmission line in the form of an electric signal or an optical signal.
  • the data converter 73 converts the packet into a bit string of 0 and 1.
  • the transceiver 72 compares the error detection bit of the received packet with the contents of data other than the error detection bit, and confirms whether an error has occurred in the transmission path. If an error has occurred in the received packet, the received data is discarded, and the driver unit 25A is notified of the error. If no error has occurred, the transmitter / receiver 72 removes the error detection bit, registers the received packet in the reception queue 74, and notifies the driver unit 25A that reception has occurred by an interrupt or the like.
  • Driver unit 25A takes out received packets from reception queue 74 in the order of arrival.
  • FIG. 28 is a functional block diagram of the adapter 17A showing a situation when address conversion is performed.
  • the address of the packet is converted between the transmission queue 71 and the transmitter / receiver 72 using an address converter 75 as shown in FIG. .
  • the packet sent from the memory 13 on the main body to the adapter 17A by the driver unit 25A is written in the memory on the adapter 17A, that is, the transmission queue 71.
  • the packet at this stage is expressed by 0 and 1 bits only depending on whether it is written in the memory 13 on the main body or in the memory on the adapter 17A. Is the same as it was in the main memory. Also, the packet has no error detection bit before it enters the transceiver 72.
  • the test converter 75 reads the packet from the transmission queue 71, converts the address of the packet as described in (1) to (3) above, and sends the packet address to the transceiver 72.
  • the process of transmitting a packet via the transceiver 72 and the data converter 73 is the same as the process of FIG. Even in the test mode, the packet reception process is the same as in the normal mode.
  • FIG. 29 is a configuration diagram of the test converter 75.
  • the test converter 75 includes an address conversion register 50, a mode determination unit 51, and an address conversion unit 76.
  • the address conversion unit 76 includes a packet type determination unit 52, an ARP packet converter 53, a TCP / IP packet converter 54, and a checksum calculator 55.
  • the address conversion register 50 stores the contents shown in FIG. 21, and is referred to by the mode determination unit 51, the ARP packet converter 53, and the TCP / IP packet converter 54.
  • Each element 51-55 of the test converter 75 performs the processing shown in FIGS. 30 and 31 are explanatory diagrams of the address conversion process.
  • the mode determination unit 51 refers to the address conversion register 50 to determine whether or not the mode is 1, that is, the test mode (S21). If the mode is 1 (s21 Yes), the mode determiner 51 reads the earliest packet from the transmission queue 71 and sends it to the packet type determiner 52. On the other hand, if the mode is 0 (No in S21), the mode determination unit 51 sends the packet read from the transmission queue 71 to the transmitter / receiver 72 without conversion, that is, without going through the address conversion unit. In this case, the process proceeds to X2.
  • the packet type determination unit 52 that has received the packet from the mode determination unit 51 determines whether the ether type of the packet is 0x806 (S22). If the ether type is 0x806, it indicates that the packet is an ARP request or an ARP reply. Therefore, if the ether type is 0x806 (S22 Yes), the packet type determination unit 52 sends the packet to the ARP packet conversion unit 53. In this case, the process proceeds to X1.
  • the packet type determination unit 52 determines whether the ether type is 0x800 (S23). If the ether type is 0x800 (S23 Yes), it indicates that the packet is an IP packet. Therefore, if the ether type is not 0x800 (No in S23), the packet type determination unit 52 sends the packet directly to the transceiver 72 without conversion. In this case, the process proceeds to X2.
  • the packet type determination unit 52 determines whether the value of the PRT field in the IP header is 6, that is, TCP (S24). If the value of the PRT field is 6 (S24 Yes), the packet type determination unit 52 sends the packet to the TCP / IP packet conversion unit 54. On the other hand, if the value of the PRT field is not 6 (No in S24), the packet is sent directly to the transceiver 72 without being converted. In this case, the process proceeds to X2.
  • the ARP packet converter 53 that has received the ARP packet from the packet type determiner 52 determines whether or not the destination MAC address in the packet is a broadcast address, that is, ff.ff.ff.ff.ff.ff (S25). .
  • the ARP packet converter 53 refers to the address conversion register 50 to obtain the MAC address of the opposite side net adapter, and uses the obtained MAC address in the packet.
  • the destination MAC address is rewritten (S26).
  • the ARP packet converter 53 After rewriting the transmission destination MAC address in S26, or when the transmission destination MAC address is a broadcast address in S25 (Yes in S25), the ARP packet converter 53 refers to the address conversion register 50, and addresses the following addresses: Rewrite (S27).
  • the transmission source IP address is rewritten with the IP address on the opposite virtual machine.
  • the ARP packet converter 53 sends the converted packet to the transceiver 72 (S28).
  • the transmission source MAC address is the transmission source MAC in the MAC header shown in FIG. 32 and the SHAd in the format shown in FIG. The above rewriting is performed on both the transmission source MAC and the SHAd.
  • FIG. 32 is a diagram showing a format of a packet including a MAC header
  • FIG. 33 is an explanatory diagram of each field of FIG. 32
  • FIG. 34 is a diagram showing a format of an ARP packet
  • FIG. 35 is an explanatory diagram of each field of FIG. is there.
  • the transmission destination MAC address is the transmission destination MAC in the MAC header shown in FIG. 32 and THAd in the format shown in FIG. 34, and the above rewriting applies to both the transmission destination MAC and THAd. Is going.
  • the source IP address is SPAd in the format shown in FIG. 34
  • the destination IP address is TPAd in the format shown in FIG.
  • the TCP / IP packet converter 54 that has received the TCP / IP packet from the packet type determination unit 52 refers to the address conversion register 50 and rewrites the following addresses (S29). 1. Rewrite the source MAC address with the MAC address on the opposite virtual machine. 2. Rewrite the destination MAC address with the MAC address of the opposite adapter. 3. The transmission source IP address is rewritten with the IP address on the opposite virtual machine. 4). Rewrite the destination IP address to the IP address of the opposite adapter.
  • the TCP / IP packet converter 54 sends the converted packet to the checksum calculator 55 (S30).
  • the transmission source MAC address is the transmission source MAC in the MAC header shown in FIG.
  • the transmission destination MAC address is the transmission destination MAC in the MAC header shown in FIG.
  • FIG. 36 is a diagram showing the format of the IP header
  • FIG. 37 is an explanatory diagram of each field of the IP header of FIG.
  • each adapter does not use its own address in the address translation register for translation processing, but may use it for validity checking of a packet before address translation (overwriting).
  • the adapter checks whether the source address and destination address before conversion match the address of the adapter itself and the address of the opposing virtual machine as shown in FIG.
  • the adapter If it is not valid here, that is, if the addresses do not match, the adapter notifies the driver of an error, and the driver receives it and outputs an error message. For invalid packets, measures such as discarding without sending or sending without conversion are performed.
  • This legitimacy check prevents incorrect performance measurement values when an unexpected packet is requested for transmission.
  • An unexpected packet may occur when the machine is set to an IP router and a packet of another network is mixed by the IP forward function.
  • the checksum value in the IP header (SUM in FIGS. 36 and 37) and the checksum value in the TCP header shown in FIGS. ) Is not correct. Therefore, the address-converted packet is input to the checksum calculator 55, and the checksum value in the IP header and the checksum value in the TCP header are recalculated to check the checksum value in the IP header and the TCP header. Overwrite the checksum value inside. Note that the calculation of the checksum value in the IP header and the checksum value in the TCP header in the adapter itself is performed using an existing technique called “checksum offload” or “hardware checksum”. Can do.
  • the checksum calculator 55 When the checksum calculator 55 receives the converted packet from the TCP / IP packet converter 54, the checksum calculator 55 receives the value of each field in the IP header of the packet, for example, VER, IHL, ST, LEN, ID, FC, TTL, The PRT, FROM, TO, and OPT values are read to recalculate the checksum value, and the checksum (SUM) value of the packet is overwritten with the calculated value. Similarly, the checksum calculator 55 reads the value of each field in the TCP header, recalculates the checksum value, and overwrites the checksum (SUM) value with the calculated value (S31).
  • the checksum calculator 55 transmits the packet with the modified checksum to the transceiver 72 (S32).
  • the driver units 25A and 25B from the upstream element, that is, the upstream element in the flow of transmission processing, transmit the elements constituting the MAC header such as the transmission source MAC address, the transmission destination MAC address, and the Ethertype to the packet. Receive on every transmission.
  • a set of transmission packet + source MAC address + destination MAC address + Ethertype is referred to as a transmission stream message.
  • FIG. 40 is an explanatory diagram of processing at the time of packet transmission by the driver unit 25A or 25B.
  • the driver 25A will be described for convenience, but the same applies to the driver 25B.
  • the driver unit 25A waits for reception of information related to transmission such as a transmission stream message and a transmission completion notification (S41).
  • information related to transmission such as a transmission stream message and a transmission completion notification (S41).
  • the transmission stream message is received, it is determined whether or not the transmission stream message already exists in the transmission queue 61 of the driver units 25A and 25B (S42).
  • the driver units 25A and 25B register the received transmission stream message at the end of the transmission queue 61 (S43), and the next information Is received (S41).
  • the driver units 25A and 25B determine whether or not the transmission queue 71 of the adapters 17A and 17B is full. Is determined (S45).
  • the driver units 25A and 25B register the received transmission stream message at the end of the transmission queue 61 (S43), and the next information Wait for reception (S41). If the transmission queues 71 of the adapters 17A and 17B are not full (S45, No), the driver units 25A and 25B proceed to step 46 for converting addresses.
  • the driver units 25A and 25B perform the address conversion process shown in FIGS. That is, instead of the mode determination unit 51 and the address conversion unit 56, the CPU 12 performs the same processing as in FIGS.
  • the driver units 25A and 25B add a MAC header to the address-converted packet (S47), send it to the adapters 17A and 17B, request transmission (S48), and return to S41.
  • Netperf consists of a sending application executed with the netperf command and a netserver daemon as a receiving application.
  • the CPU 12 functions as the above-described transmission application unit and transmits a packet for performance measurement. Further, the CPU 12 functions as the above-described reception application unit by the reception application, and receives a packet transmitted by the transmission application.
  • the CPU 12 executes the command and shifts to the test mode.
  • the application unit 21 transmits data to the address designated by the option, in this example, to the first virtual machine. > Netperf -H 10.20.1.2 ...
  • the IP layer 24 When the application 21 instructs the packet to be transmitted in response to the netperf command, the IP layer 24 first determines the ARP request with the setting before conversion shown in FIG. 13 because the MAC address for the destination IP address 10.20.1.2 is unknown. Is generated.
  • ARP request in the pre-conversion state is addressed to an address that does not exist in its own device, it is passed to the driver unit 25A of the adapter 17A belonging to the same subnet as the transmission destination IP address.
  • the driver unit 25A or the adapter 17A broadcasts the ARP request by converting the address so that the converted setting shown in FIG.
  • the ARP request is received by the other adapter 17B via the cable, and is sent to the driver unit 25B and the IP layer 24 in order.
  • the ARP request is converted into the same ARP request broadcast from the second virtual machine when the transmission source is the second virtual machine shown in FIG. 3 and the transmission destination is the adapter 17B. Therefore, even an ARP request transmitted from the adapter 17A is received as an ARP request from the second virtual machine in the order of the adapter 17B ⁇ the driver unit 25B ⁇ the IP layer 24 without contradiction.
  • the IP layer 24 generates an ARP reply in response to the ARP request. Since the ARP reply is a packet for the second virtual machine, it is as set before the conversion shown in FIG.
  • the IP layer 24 sends the ARP reply to the driver unit 25B of the adapter 17B belonging to the same subnet as the destination IP address of the ARP reply. give.
  • the driver unit 25B or the adapter 17B converts the address so that the ARP reply becomes the setting after conversion shown in FIG. 14, and transmits it to the adapter 17A that is the transmission destination after conversion.
  • the ARP reply is received by the other adapter 17A via the cable and is sent to the driver unit 25A and the IP layer 24 in order.
  • the ARP reply is converted into the same ARP reply returned from the first virtual machine when the transmission source is the first virtual machine shown in FIG. 3 and the transmission destination is the adapter 17A. Therefore, even the ARP reply transmitted from the adapter 17B is received as the ARP reply from the first virtual machine from the adapter 17A ⁇ the driver unit 25A ⁇ the IP layer 24 without contradiction.
  • the IP layer 24 passes the TCP / IP packet set before conversion of FIG. 15 to the driver unit 25A, and the driver unit 25A or the adapter 17A converts the TCP / IP packet shown in FIG. The data is converted as described later and transmitted to the adapter 17B.
  • the TCP / IP packet is received as a TCP / IP packet from the second virtual machine by the adapter 17B via a cable.
  • each adapter 17A performs communication between the adapters 17A and 17B by making the adapter 17B appear to be the second virtual machine.
  • the packet is transmitted from the adapter 17A to the adapter 17B, but can be transmitted from the adapter 17B to the adapter 17A in the same manner.
  • the command is executed by specifying the address of the second virtual machine, such as netperf-H 10.20.2.2 ...
  • the driver unit 25A and the adapter 17A, and the driver unit 25B and the adapter 17b are compared with the above. Operates in the switched state. That is, the conversion processing of FIGS. 16 to 18 is performed instead of the conversion processing of FIGS. 13 to 15 to perform communication between the adapters 17B and 17A.
  • Netserver -p 5000 Note 1.
  • the TCP port number is specified in the -p option.
  • the following options may be specified. > Netperf -H 10.20.1.2 -l 10 -p 5000 -s 65536 Note 1.
  • the -l option specifies the measurement time. The netperf command will return after that time. In this case, it is 10 seconds.
  • the same TCP port number as specified by the netserver command is specified. In this case, the TCP port number is 5000.
  • the -s option means the TCP window size, but the data size passed to the send () function is also set to this value, and the size of the packet to be transmitted is designated.
  • the application unit 21 When the TCP connection between the adapters 17A and 17B is established by executing the netperf command, the application unit 21 continues to transmit data to the IP address specified with -H as fast as possible. Specifically, the transmission request is continued with the Socket function send () (S2 in FIG. 4).
  • the application unit 21 continues to receive data with the Socket function recv () by executing the netserver daemon.
  • the data transmission speed may depend on the processing capability of the CPU 12.
  • the processing capacity of the normal CPU 12 is sufficiently higher than the transmission speed of the network adapter. For example, there is no problem in measurement even if a plurality of performance measurement tools are activated simultaneously or bidirectionally.
  • the driver unit 25A sends a transmission packet to the transmission queue 61 of the driver unit 25A instead of making a transmission request to the adapter 17A as described above. Will be accumulated.
  • the send () function does not return until the transmission queue becomes free, that is, a return delay of the send () function occurs.
  • TCP layer of the computer 1 determines whether or not the transmitted data has reached the communication destination. If the TCP ACK (data reception confirmation packet) from the communication partner does not return after a certain time or after a certain amount of data has been transmitted, it is determined that the transmission data has not reached the communication destination and the next transmission is suspended. Alternatively, retransmission processing is performed.
  • the application unit 21 aborts the data transmission, and calculates the performance value from the data amount and time (in this case 10 seconds) transmitted by the test result calculation unit 26. (S7), the test result output unit 27 outputs the test result (S8).
  • the performance value is displayed as follows.
  • the throughput is 782.52 Mbps when tested for 10 seconds with a socket size of 65536 bytes and a transmission message size of 65536 bytes.
  • TCP STREAM TEST Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10 ⁇ 6bits / sec 65536 65536 65536 10.00 782.52
  • communication using TCP / IP can be performed between the network adapters 17A and 17B installed in one test apparatus 1, the network adapters 17A and 17B or Can do driver testing.
  • the network adapter is not limited to a separate one from the test apparatus 1 such as a network card to be installed in the expansion slot, but may be built in the test apparatus 1, for example, mounted on a motherboard.
  • FIG. 41 is a diagram illustrating the computer 1 according to the second embodiment
  • FIG. 42 is a conceptual diagram of the test method according to the second embodiment
  • FIG. 43 is a diagram illustrating an example of address conversion
  • FIG. 44 is a diagram illustrating an example of address conversion.
  • 45 is a diagram illustrating an example of address conversion
  • FIG. 46 is a diagram illustrating a transmission path in the test mode
  • FIG. 47 is a diagram illustrating an address translation register
  • FIG. 48 is a diagram illustrating an address translation register update process
  • FIG. 49 is an address diagram.
  • FIG. 50 is a diagram illustrating an example of a value written to the conversion register
  • FIG. 50 is a diagram illustrating an example in which the value of the address translation register is cleared and the normal mode is set
  • FIG. 51 is a functional block diagram of the adapter in the normal mode
  • FIG. It is a functional block diagram of the adapter at the time of mode.
  • the second embodiment is different from the first embodiment in that one network card (adapter) 17 is mounted on the test apparatus 1 shown in FIGS. Since the other configuration is the same as that of the first embodiment, the same elements are denoted by the same reference numerals and the description thereof is omitted.
  • the adapter 17 has an in-adapter return function for receiving data to be sent to the network side as data from the network side. For example, there is a path 19 for bypassing data from the transmitting side of the interface with the transmitter / receiver 72 and the network in FIG. 44 to its receiving side.
  • communication is performed by making the IP layer look like the IP layer so that the IP address of the adapter 17 is 10.20.1.1 and the IP address of the virtual machine that is the communication partner is 10.20.1.2.
  • an IP address belonging to the same IP subnet as the adapter 17 is assigned to the virtual machine so that transmission to the virtual machine is performed from the adapter 17.
  • a different MAC address from the adapter 17 is assigned to the virtual machine. That is, the virtual machine MAC2 and the MAC address MAC1 of the adapter 17 are different addresses.
  • the test is performed by converting the IP address and the MAC address by hardware (adapter) or driver.
  • Adopt the method.
  • the flow of the test method is different from that of FIG. 4 in that the address to be converted is different as follows because data is transmitted and received by one adapter.
  • the destination IP address is changed from 10.20.1.2 to 10.20.1.1 as shown in FIG. 43, and the source IP address is changed.
  • the source MAC address is converted from MAC1 to MAC2 from 10.20.1.1 to 10.20.1.2.
  • the application unit 21 sends data to be transmitted to the stream head 22 using an IP address that does not exist in its own device as a communication destination.
  • the IP layer 24 generates an address resolution request packet with the settings before conversion shown in FIG. 43 (S101).
  • the IP layer 24 sends the packet to the driver unit 25 belonging to the same IP subnet as the destination IP address of the address resolution request (S102).
  • the adapter 17 or the driver unit 25 that has received the packet from the IP layer 24 determines whether or not it is in the address conversion mode (test mode) (S103). If it is the address conversion mode, the address is converted as shown in FIG. S104), the packet is transmitted (S105). If it is not the address translation mode in S103, the packet is transmitted without translating the address (S106).
  • the transmission destination IP address and the transmission destination MAC address are converted as shown in FIG. 43 so that the transmission destination is the adapter 17 in the own apparatus.
  • the destination MAC address is ff.ff.ff.ff.ff.ff.ff for broadcasting.
  • the source IP address and source MAC address of the packet to be transmitted are converted as shown in FIG. 43 so that the source is a predetermined virtual machine.
  • the transmission source IP address is converted to 10.20.1.2 and the transmission source MAC address is converted to MAC2, and then transmitted.
  • the transmission packet is returned by the adapter 17 via the detour 19.
  • the adapter 17 sends the received packet to the application unit 21 via the driver unit 25, the IP layer 24, the TCP layer 23, and the stream header 22.
  • the application unit 21 receives the packet received by the adapter 17 as a packet from the transmission source virtual machine.
  • the destination IP address is changed from 10.20.1.2 to 10.20.1.1, and the destination MAC address is changed from MAC2 to MAC1 as shown in FIG.
  • the source IP address is converted from 10.20.1.1 to 10.20.1.2, and the source MAC address is converted from MAC1 to MAC2.
  • the application 21 returns an address resolution response to the virtual machine (S201).
  • the IP layer 24 sends the packet to the driver unit 25 belonging to the same IP subnet (S202).
  • the adapter 17 or the driver unit 25 that has received the packet determines whether or not it is in the address translation mode (test mode) (S203). If it is the address translation mode, the address is translated as shown in FIG. 44 (S204), Is transmitted (S205). In step S203, the packet is transmitted without converting the address if it is not the address conversion mode (206).
  • the transmission destination IP address and the transmission destination MAC address are converted as shown in FIG. 44 so that the transmission destination is the adapter 17 in the own apparatus.
  • the source IP address and the source MAC address are converted as shown in FIG. 44 so that the source is a predetermined virtual machine.
  • the source IP address is 10.20.1.2 and the source MAC address is MAC2 in order to make the communication partner appear as a virtual machine.
  • the transmission packet is received by the adapter 17 via the detour 19.
  • the adapter 17 sends the received packet to the application unit 21 via the driver unit 25, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives a packet from the virtual machine that is the transmission source.
  • the destination IP address is changed from 10.20.1.2 to 10.20.1.1, the destination MAC address is changed from MAC2 to MAC1, as shown in FIG.
  • the source IP address is converted from 10.20.1.1 to 10.20.1.2, and the source MAC address is converted from MAC1 to MAC2.
  • the application unit 21 that has recognized the MAC address of the virtual machine by address resolution sends a packet to the virtual machine (S301).
  • the transmission destination IP address of the packet sent out by the application unit 21 is not in its own device, so the IP layer 24 sends the packet to the driver unit 25 belonging to the same IP subnet as the transmission destination IP address. It is sent out (S302).
  • the adapter 17A or the driver unit 25A that has received the packet determines whether or not it is in the address conversion mode (test mode) (S303). If it is the address conversion mode, the address is converted as shown in FIG. 45 (S304). Is transmitted (S305). If it is not the address translation mode in S303, the packet is transmitted without translating the address (S306).
  • the transmission destination IP address and the transmission destination MAC address in the packet are converted as shown in FIG. 45 so that the transmission destination is the adapter 17 in the own apparatus.
  • the source IP address and source MAC address of the packet are converted as shown in FIG. 45 so that the source is a predetermined virtual machine.
  • the source IP address is 10.20.1.2 and the source MAC address is MAC2 in order to make the communication partner appear as a virtual machine.
  • the transmission packet is received by the adapter 17 via the detour 19.
  • the adapter 17 sends the received packet to the application unit 21 via the driver unit 25, the IP layer 24, the TCP layer 23, and the stream header 22. That is, the application unit 21 receives a packet from the virtual machine that is the transmission source.
  • the mode for performing the address translation that is, the transition to the test mode and the cancellation of the mode are specified by the user with a command.
  • the transition to the address translation mode is designated by the user from the input unit 15 as follows. > Addrtrans1 -s driver # 1 10.20.1.2
  • driver # 1 is the driver name of the driver unit 25, and 10.20.1.2 is the IP address of the virtual machine.
  • the netperf command 21 ⁇ stream head 22 ⁇ TCP 23 ⁇ IP 24 ⁇ driver 25 as shown in FIG. ⁇ Adapter 17 ⁇ Driver 25 ⁇ IP 24 ⁇ TCP 23 ⁇ Stream head 22 ⁇ Transmission via the netserver daemon 21 can be executed.
  • the command is executed as follows. > Netperperf -H 10.20.1.2
  • the adapter 17 secures the address conversion register shown in FIG. 47 in a predetermined area in the memory space.
  • the 47 stores items such as the currently set mode, the IP address of the virtual machine, the IP address on the real machine, the MAC address on the virtual machine, and the MAC address on the adapter.
  • the currently set mode is set to 1 for the address conversion mode and 0 for the normal mode, for example.
  • the IP address on the real machine is the IP address of the driver 25 or the adapter 17.
  • the CPU 12 performs the following operation.
  • the MAC address and IP address of the adapter 17 are checked using an existing interface provided in the OS. Note that the MAC address and IP address are stored in the memory in association with the driver name related to the adapter 17 by the OS.
  • the application unit 21 sets the MAC address, IP address, and virtual machine MAC address of the adapter 17 as values to be written in the address conversion register of the adapter 17 to the driver unit 25 by ioctl as shown in FIG. hand over.
  • the driver unit 25 When the driver unit 25 receives the value according to the ioctl, it writes the MAC address on the adapter, the IP address on the real machine, and the MAC address on the virtual machine in the address conversion register on the adapter.
  • the mode is 1, the IP address of the virtual machine is 10.20.1.2, the IP address on the real machine is 10.20.1.1, the MAC address on the virtual machine is MAC2, and the MAC address on the adapter is MAC1.
  • the driver unit 25 holds a data structure called a “control structure” in the memory 13 on the test apparatus 1 in order to save the adapter state and information instructed by the host.
  • address conversion information information equivalent to the address conversion register of FIG. 47 is taken. This is called “address conversion information”.
  • the process up to passing the value to be written to the address translation information to the driver unit 25 by ioctl is the same as the process of passing the value to be written to the address translation register in FIG. Details of the address conversion information writing process will be described below.
  • the driver unit 25 When the driver unit 25 receives ioctl, it updates the value of the control structure. For example, when “addrtrans1-s driver # 1 10.20.1.2” is executed, the driver unit 25 writes the value of FIG. 49 as the address conversion information of the control structure.
  • the driver unit 25 clears the address translation information of the control structure as shown in FIG.
  • FIG. 51 is a functional block diagram of the adapter 17 showing a state in the normal mode, that is, when performing normal communication.
  • the adapter 25 includes a transmission queue 71, a transceiver 72, a data converter 73, and a reception queue 74.
  • FIG. 52 is a functional block diagram of the adapter 17 showing a situation when address conversion is performed.
  • the address is converted between the transmission queue 71 and the transmitter / receiver 72 using the test converter 75 as shown in FIG.
  • each part of the adapter 17 is substantially the same as in FIGS. 28 and 29 of the first embodiment.
  • data is transmitted from one adapter 17A and received by the other adapter 17B via a cable.
  • the test conversion unit 75 and the transmitter / receiver 72 are the same except that the addresses to be converted are different. Processing of transmission and reception can be performed by logic.
  • the communication can be performed using the TCP / IP within the single network adapter 17 installed in the test apparatus 1, the network adapter or the driver can be tested with a simple configuration. It can be performed.

Abstract

 1台の試験装置でネットワークアダプタ又はネットワークドライバの試験を行う技術を提供する。少なくとも一つのネットワークアダプタが接続された試験装置が、仮想アドレスを送信先アドレスとしてデータの送信を指示し、試験モードが設定されている場合、前記データの送信先アドレスを自装置と接続された前記ネットワークアダプタに割り当てられたアドレスに変換して、該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させ、前記変換後の送信先アドレスが割り当てられたネットワークアダプタを介して前記データを受信し、前記データの送信結果に基づいて試験結果を算出する。

Description

試験装置及び方法
 本発明は、ネットワークアダプタ(通信制御部)やネットワークドライバの試験を行う技術に関する。
 ネットワークアダプタは、コンピュータに装着或は実装され、コンピュータ間の通信に用いられる。ネットワークアダプタは、コンピュータの拡張スロットに挿入するカード状のものが多いため、ネットワークカード、ネットワークボード、ネットワークインタフェースカード等とも称される。
 ネットワークアダプタの試験としては、高負荷テストや性能測定が挙げられる。
 ネットワークアダプタの高負荷テストとは、そのネットワークアダプタに可能な限りのバイト数またはパケット数のデータを送信または受信させるテストのことである。
 ネットワークアダプタの性能測定とは、そのネットワークアダプタに可能な限りのバイト数またはパケット数のデータを送信または受信させた時、単位時間あたりにどれだけのデータが流れたのかを計算して求めることである。
 性能測定時は、可能な限り高速な送受信を行うため、性能測定が高負荷テストにもなっている。
 しかし、一つのTCPコネクションでは必ずしもネットワークアダプタの能力を最大限に使いきれない場合もあるため、高負荷テストは性能測定ツールを複数同時に起動したり、双方向に起動したりといった手法を採ることが多い。
 また、本願発明に関連する先行技術として、例えば、下記の特許文献1に開示される技術がある。
特開平08-335198号公報 特開平04-027239号公報 特開平06-309251号公報 特開平04-172843号公報
 性能測定や高負荷テストは、図53に示すように、ネットワークアダプタを設けたコンピュータ2台をネットワークケーブルで接続し、netperfといった既存のアプリケーションソフトウェアによりTCP/IPを用いて通信することで行う。
 しかし、コンピュータは、一般に高価であるため、高負荷テストや性能測定のたびにマシンが2台必要となると、それらにかかる費用が高くなってしまう。
 また、最近のコンピュータは、複数のCPUを備えるものが多く、且つCPUの高速化が図られ、メモリ容量も1ギガバイト以上と大容量化されているため、処理能力が高く、ネットワークアダプタの試験のために2台のコンピュータを占有するのは無駄が多い。
 例えば、図54に示すように、ネットワークアダプタ2枚をマシン1台に挿して、そのネットワークアダプタ間で通信を行わせた場合であっても、処理能力が不足することは少ない。
 しかしながら、コンピュータの処理能力に不足がないにも関わらず、図54のようにコンピュータ1台の構成で、高負荷テストや性能測定を行うことは、次の理由により出来なかった。
 (1)IP層を経由して通信すると、1台のコンピュータではパケットがIP層で折り返してしまい、ネットワークアダプタにはデータが流れない。
 例えば、図53のように2台のコンピュータ(ホスト)間で通信する場合、ホストHAにおいてアプリケーションソフトウェア91Aから送出されたパケットは、ストリームヘッド92A、TCP層93A、IP層94Aそしてドライバ95Aを介してネットワークアダプタ96Aに送られる。
 そして、ホストHAのネットワークアダプタ96Aは、ネットワークケーブルを介してパケットをホストHBのネットワークアダプタ96Bに送信する。
 ホストHBにおいて、ネットワークアダプタ96Bで受信されたパケットは、ドライバ95B、IP層94B、TCP層93Bそしてストリームヘッド92Bを介してアプリケーションソフトウェア91Bに送られる。
 これに対し、図54のように1台のコンピュータに装着したネットワークアダプタ96A,96B間で通信する場合、アプリケーションソフトウェア91から送出されたパケットは、ストリームヘッド92及びTCP層93を介してIP層94に送られる。そして、パケットは、IP層94で折り返し、TCP層93及びストリームヘッド92を介してアプリケーションソフトウェア91に戻る。
 即ち、ホストHA上で、同じホストHAに装着されているネットワークアダプタ96A或はネットワークアダプタ96BのIPアドレス宛てにパケットを送信すると、送信元IPアドレスと送信先IPアドレスが同じとなり、IP層94で折り返してしまい、ネットワークドライバやネットワークアダプタにパケットは流れない。
 図55の例では、ネットワークアダプタ96AにIPアドレス10.20.1.1が割りつけてあり、ネットワークアダプタ96BにIPアドレス10.20.2.1が割りつけられている。
 そして、アプリケーションソフトウェアとしてnetperfを用いてネットワークアダプタ96Bへパケットを送る場合、次のように入力する。
 > netperf -H 10.20.2.1
 この場合、パケットは、ネットワークアダプタ96Aが送信元となってネットワークアダプタ96Bへ送信するのではなく、IP層94で送信元としてネットワークアダプタ96BのIPアドレスが選択されるので、送信先のIPアドレスと同じになってしまう。
 このようになる理由は、IPの送信のルールが以下のようになっているからである。
  (1-1)送信元IPアドレスは、送信先IPアドレスと同じIPサブネットに属しているネットワークアダプタ96A,96Bが、そのホスト内に装着されていれば、当該IPサブネットに属するネットワークアダプタのIPアドレスとなる。図55の例の場合、送信先が10.20.2.1なので、送信元も10.20.2.1となる。
  (1-2)送信先IPアドレスが、同じホスト内に存在すれば、下位のドライバにパケットを渡すことはせずに、IP層で折り返して上位にデータ(パケット)を渡す。
 (2)IPを使わないでユーザ空間から送受信するとパケットロストが多発する。
 IP以外のプロトコル、例えばioctlを使用すれば、ユーザ空間からストリームヘッドを経て、TCP層およびIP層を通さずに、ドライバへパケットを送信すること、またネットワークアダプタを経てドライバからパケットを受信することが可能である。
 しかし、ストリームヘッド91およびドライバ95は、データをキューイングしておく機能を実装していないことが多いため、ある受信パケットをストリームヘッドで処理中であれば、ドライバは次のパケットをストリームヘッドへは送らずロストさせる場合が多い。
  (2-1)受信時パケットロストする理由
 一般に、高負荷送受信時の、送受信パケット間隔は、相対的に短い時間が何個か続いた後、相対的に長い時間の間隔となる場合が多い。
 例えば、パケット1、パケット2、パケット3、....の順に受信したとして、
 パケット1~パケット10までは、各パケット同士の間隔が10マイクロ秒、
 パケット10とパケット11の間隔が、100マイクロ秒、
 パケット11~パケット20までは、各パケット同士の間隔が10マイクロ秒、
 パケット20とパケット21の間隔が、100マイクロ秒、
 のようになることがある。(*1)
 一方、カーネル空間からユーザ空間に1かたまりのデータを渡すのにかかる時間は、その中間くらい(例えば、15マイクロ秒)であることが多い。
 この場合、あるパケットがストリームヘッドに到着して、10マイクロ秒が経過した時、ストリームヘッドは、まだパケットをユーザ空間にまだ渡せていない。このため、ドライバ2は、ストリームヘッドがまだ処理中であると判定して、次のパケットを破棄する(パケットロストさせる)。
 なお、(*1)のようになる理由は以下の2点である。
  (2-1-1)ホストのCPU割当は、TSS(Time sharing system)で行われている。パケットを送信する側において、一度CPUが割りつけられると、その期間に複数個パケットを連続して送信するが、TSSであるためにどこかで送信が一度中断になる。その後またCPUが割りつけられて送信を再開し、複数個のパケットを連続して送信するが、その間、時間がかかる場合がある。
  (2-1-2)ハードウェアのキューが満杯ならば、ドライバは送信を待つが、送信完了通知は、その通知処理(割込み)によるCPU使用率向上を避けるために、何十パケットかに一度しか上がらないようにしてあることが多い。そのため、ドライバは何十パケットかを短い時間間隔で送信処理したあと、ハードウェアからの送信完了通知を相対的に長い時間待つような動作をすることになる。
 一方、TCP/IPを使用すると、以下の仕組みのため、パケットロストが発生しない。
 ストリームヘッドが処理中の場合、TCP層93はパケットを破棄せず待機する。
 IP層94は、TCP層93が待機状態、または、既にIP層94のキューのデータが溜まっている場合は、キューにデータを登録する。
 IP層94は、TCP層93の待機状態が解除されると、データをTCP層93に渡す。
 このように、パケットが溜まっている場合でもキューイングによりパケットを待機させることにより、パケットロストを防止している。
 なお、TCP/IPと同様にキューイングを行い、且つ宛先IPアドレスが自装置内であるパケットをドライバの手前で折り返さない通信プロトコルを新たに作成すれば、上記問題を回避することも可能である。しかし、インターネットやイントラネットといったネットワークではTCP/IPがデファクトスタンダードとなっているので、TCP/IP以外のプロトコルを用いたのでは、実態に則した試験が行えないという問題があった。
 また、図56に示すように、1台のマシンに1枚のネットワークアダプタを挿し、送信したパケットを、そのアダプタ自身が受信するアダプタ内折り返し機能を持つネットワークアダプタもある。
 この方式では、ホスト1台、アダプタ1枚、ケーブル無しでアダプタやドライバのテストが可能である。
 しかし、上記(1)の理由でTCP/IPは使用できず、そのため(2)の問題が発生する。
 そこで本発明は、1台の試験装置でネットワークアダプタ又はネットワークドライバの試験が行える技術を提供する。
 上記課題を解決する本発明の一形態として、試験装置や、試験方法、試験プログラムが挙げられる。
 試験装置は、
 少なくとも一つのネットワークアダプタが接続され、
 仮想アドレスを送信先アドレスとしてデータの送信を指示する送信アプリケーション部と、
 試験モードの場合に前記データの送信先アドレスを自装置と接続された前記ネットワークアダプタに割り当てられたアドレスに変換して該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させるアドレス変換部と、
 前記変換後の送信先アドレスが割り当てられたネットワークアダプタを介して前記データを受信する受信アプリケーション部と、
 前記データの送信結果に基づいて試験結果を算出する算出部と、
を備える。
 また、試験方法は、
 少なくとも一つのネットワークアダプタが接続された試験装置が、
 仮想アドレスを送信先アドレスとしてデータの送信を指示するステップと、
 試験モードの場合に前記データの送信先アドレスを自装置と接続された前記ネットワークアダプタに割り当てられたアドレスに変換して該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させるステップと、
 前記変換後の送信先アドレスが割り当てられたネットワークアダプタを介して前記データを受信するステップと、
 前記データの送信結果に基づいて試験結果を算出するステップと、
を実行する。
 また、本発明は、上記試験方法をコンピュータに実行させるプログラムであっても良い。更に、本発明は、このプログラムをコンピュータが読み取り可能な記録媒体に記録したものであっても良い。コンピュータに、この記録媒体のプログラムを読み込ませて実行させることにより、その機能を提供させることができる。
 ここで、コンピュータが読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的、または化学的作用によって蓄積し、コンピュータから読み取ることができる記録媒体をいう。このような記録媒体の内コンピュータから取り外し可能なものとしては、例えばフレキシブルディスク、光磁気ディスク、CD-ROM、CD-R/W、DVD、DAT、8mmテープ、メモリカード等がある。
 また、コンピュータに固定された記録媒体としてハードディスクやROM(リードオンリーメモリ)等がある。
 本発明によれば、1台の試験装置でネットワークアダプタ又はネットワークドライバの試験を行う技術を提供できる。
実施例1の試験装置の機能ブロック図 試験装置のハードウェア構成図 試験方法の概念図 試験方法の説明図 アダプタ17Aからアダプタ17Bへの通信手順を示す図 アダプタ17Bからアダプタ17Aへの通信手順を示す図 アドレスを変換してパケットを送信する処理の説明図 アドレスを変換してパケットを送信する処理の説明図 アドレスを変換してパケットを送信する処理の説明図 アドレスを変換してパケットを送信する処理の説明図 アドレスを変換してパケットを送信する処理の説明図 アドレスを変換してパケットを送信する処理の説明図 アドレスの変換例を示す図 アドレスの変換例を示す図 アドレスの変換例を示す図 アドレスの変換例を示す図 アドレスの変換例を示す図 アドレスの変換例を示す図 試験モード時の送信経路を示す図 試験モード時の送信経路を示す図 アドレス変換レジスタの説明図 アドレス変換レジスタの更新処理の説明図 アドレス変換レジスタに書き込まれる値の一例を示す図 アドレス変換レジスタに書き込まれる値の一例を示す図 アドレス変換レジスタの値をクリアして通常モードとした例を示す図 アドレス変換情報の更新処理の説明図 通常モード時のアダプタの機能ブロック図 試験モード時のアダプタの機能ブロック図 試験変換器の機能ブロック図 アドレス変換処理の説明図 アドレス変換処理の説明図 MACヘッダを付加したパケットのフォーマットを示す図 MACヘッダの説明図 ARPパケットのフォーマットを示す図 ARPパケットの説明図 IPヘッダのフォーマットを示す図 IPヘッダの説明図 TCPヘッダのフォーマットを示す図 TCPヘッダの説明図 ドライバ部の送信処理の説明図 実施例2の試験装置の機能ブロック図 試験方法の概念図 アドレスの変換例を示す図 アドレスの変換例を示す図 アドレスの変換例を示す図 試験モード時の送信経路を示す図 アドレス変換レジスタの説明図 アドレス変換レジスタの更新処理の説明図 アドレス変換レジスタに書き込まれる値の一例を示す図 アドレス変換レジスタの値をクリアして通常モードとした例を示す図 通常モード時のアダプタの機能ブロック図 試験モード時のアダプタの機能ブロック図 従来の試験装置の概略図 一台の試験装置に一つのアダプタを装着した例を示す図 一台の試験装置に二つのアダプタを装着した場合の処理の流れを示す図 一台の試験装置に一つのアダプタを装着した場合の処理の流れを示す図
 〈概略構成〉
 図1は、本実施例に係る試験装置の機能ブロック図、図2は本実施例に係る試験装置のハードウェア構成図である。
 図2に示すように、試験装置1は、本体11内にCPU(central processing unit)12やメインメモリ13、入出力ポート(I/O)14等を備えた一般的なコンピュータである。
 入出力ポート14には、キーボードやマウスといったユーザの指示を入力する入力部15や、演算処理の為のデータやソフトウェアを記憶したハードディスクなどの記憶部16、他のコンピュータとの通信を制御する通信制御部として機能するネットワークアダプタ17A,17Bが接続される。
 記憶部16には、オペレーティングシステム(OS)やnetperfなどのアプリケーションソフト、ネットワークドライバがインストールされている。
 CPU12は、メインメモリ13を介して前記OSやアプリケーションプログラム、ネットワークドライバを記憶部16から適宜読み出して実行し、ネットワークアダプタ(以下単にアダプタとも称す)17や記憶部16から読み出した情報を演算処理することにより、図1に示すようにアプリケーション部21、ストリームヘッド22、TCP部(TCP層)23、IP部(IP層)24、ドライバ部(駆動制御部)25A,25B、試験結果算出部26、試験結果出力部27としても機能する。なお、図1において、カーネル空間とは、OSがカーネルやデバイスドライバの動作のために確保するメモリ領域であり、ユーザ空間とは、OSがユーザプロセスの動作のために確保するメモリ領域である。
 アプリケーション部21は、送信アプリケーション部と受信アプリケーション部を有する。
 送信アプリケーション部として機能する場合、CPU12は、アダプタ17A,17B及びネットワークドライバの試験を行うため、アダプタ17A,17Bが送信可能な最大量或は最高速でパケットをストリームヘッド22に送出する。
 また、受信アプリケーション部としてのCPU12は、アダプタ17A,17Bで受信したパケットを、パケットを受信したアダプタに対応するドライバ部25A,25B、IP層24、TCP層23、ストリームヘッダ22を介して受信する。
 試験結果算出部26としてのCPU12は、送信したパケットの量や速度、受信したパケットの量や速度、エラー数などを測定し、単位時間当りの送信速度やエラー率などの試験結果としての値を算出する。
 試験結果出力部27としてのCPU12は、算出した試験結果について、記録媒体への記録、表示部への表示、印刷、他のコンピュータへの送信といった出力処理を行う。
 ストリームヘッド22としてのCPU21は、ユーザ空間とカーネル空間との間のデータ(パケット)の受け渡しの処理を行う。
 TCP層23としてのCPU12は、ストリームヘッド22からの送信するデータにTCPヘッダを付加してパケット(TCPセグメント)を生成してIP層24へ渡す。また、TCP層23としてのCPU12は、IP層から受信したパケットからTCPヘッダを外してストリームヘッダ22へ渡す等、TCP(Transmission Control Protocol)に従う処理を行う。
 IP層24としてのCPU12は、TCP層23からの送信するパケットにIPヘッダを付加してパケット(IPデータグラム)を生成してドライバ部25A,25Bへ渡す。また、いずれかのドライバから受信したパケットからIPヘッダを外してTCP層23へ渡す等、IP(Internet Protocol)に従う処理を行う。また、IP層24は、パケットを送信する際、送信先アドレスと同じサブネットに属するアダプタ17A或はアダプタ17Bを選択し、選択したアダプタに対応するドライバ25A/25Bへ送信パケットを渡して送信させる。本実施例のパケット生成部は、インターネットプロトコルに従って、前記データに前記送信先アドレスを付加したパケットを生成するものであり、前記TCP層23とIP層24を備えている。本実施例のIP層24は、ドライバ25A,アダプタ17AにアドレスIP11=10.20.1.1、ドライバ25B,アダプタ17BにアドレスIP21=10.20.2.1を割り当てている。
 ドライバ部25A,25BとしてのCPU12は、コンピュータ1側からのデータ(例えばパケット)を、それぞれのドライバ部に対応するアダプタ17A,17Bへ渡して送信させる処理を行う。また、ドライバ部25A、25BとしてのCPU12は、それぞれのドライバ部に対応したアダプタ17A,17Bで受信したパケットをIP層24へ受け渡す処理を行う。
 アダプタ17A,17Bは、それぞれに対応するドライバ部25A,25Bから受けたデータをインターネット等のネットワークへ送出し、また該ネットワークを介して受信したデータをそれぞれに対応するドライバ部25A,25Bへ渡すことで、他のコンピュータとの通信を可能にする。
 本実施例のコンピュータでは、ドライバ部25A,25B或はアダプタ17A,17Bがアドレス変換部を有している。即ち、ドライバ部25A,25BとしてのCPU12や、アダプタ17A,17Bの処理部や一部の回路が、アドレス変換部の機能を実現する。
 アドレス変換部は、ドライバ或はアダプタの試験を行うモードである試験モードが選択された場合には、前記データの送信先アドレスを、自装置と接続された前記ネットワークアダプタに割り当てられたアドレスに変換して、当該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させる。
 本実施例のコンピュータ1は、自装置内に備えた2つのアダプタ間で試験のための通信である試験通信を行う場合に、ユーザまたはアプリケーション部21が送信先のIPアドレスとして仮想マシンのIPアドレスを指定する。これにより、データの送信先が自装置内にならず、アプリケーション部21が送出したパケットはIP層24で折り返されず、IP層24から例えばドライバ部25Aへ送られる。
 そして、コンピュータ1は、IP層24を越えたアダプタ17Aまたはドライバ部25Aで、パケットの送信先を自装置内に装着された他方のアダプタ17BのIPアドレスに変換する。これにより、アダプタ17Aからパケットを送信し、ネットワークケーブルを介して自装置内のアダプタ17Bで受信する試験通信を可能にしている。
 ここで、コンピュータ1は、アダプタ17Aまたはドライバ部25Aで送信先IPアドレスを自装置内のIPアドレスに変換すると共に、送信元IPアドレスも仮想マシン上のものに変換してパケットを送信している。これにより、パケットを受信したアプリケーション部21は、仮想マシンからの通信として認識し、仮想マシンに対して応答する。なお、上記はアダプタ17Aからアダプタ17Bへの試験通信の例を示したが、ドライバ25B或はアダプタ17Bが上記ドライバ25A或はアダプタ17Aと同様に動作することで、アダプタ17Bからアダプタ17Aへの試験通信も行うことができる。
 即ち、本実施例のコンピュータ1は、自装置内のアダプタ17A/17Bの一方から仮想マシンに対してパケットを送信するようにIP層24に見せかけることでIP層24でのパケットの折り返しを防止し、実際には送信先アドレスを変換して他方のアダプタに送信する。このときコンピュータ1は、パケットの送信元アドレスを仮想マシンのアドレスに変換するので、このパケットを仮想マシンからのパケットであるものとして他方のアダプタ17A/17Bで矛盾なく受信する。
 これにより、1台の試験装置上で、2つのアダプタ間で、TCP/IPを用いて試験を行うことができる。
 また、TCP/IPを用いるので、パケットロストが発生せず、高負荷テストや性能測定を行うことが可能となる。
 〈実施例1〉
  -1台のマシンに2枚のカードを挿す場合-
 図1,図2に示した試験装置1に、2枚のアダプタ(ネットワークカード)17A,17Bを搭載した例を以下に詳述する。
 本実施例では、アダプタ17AのIPアドレスIP11を10.20.1.1、アダプタ17BのIPアドレスIP21を10.20.2.1と割り当てている。
 図3は、本実施例1の試験方法の概念図である。図3に示すように、IPアドレスが10.20.1.1のアダプタ17Aの通信相手が、IPアドレスが10.20.1.2の第一の仮想マシンであるようにIP層に見せかけて通信を行う。また、IPアドレスが10.20.2.1のアダプタ17Bの通信相手がIPアドレス10.20.2.2の第二の仮想マシンであるようにIP層24に見せかけて、通信を行う。
 仮想マシン上のIPアドレスは、試験装置1上に存在しないものを選択する。これは、仮想マシン上のIPアドレスが試験装置1上に存在するものであると、そのIPアドレスを送信先アドレスとしたときにパケットがIP層24で折り返してしまうためである。
 また、第一の仮想マシンへのパケット送信が第一のアダプタ17Aから行われるように、アダプタ17Aと同じIPサブネットに属するIPアドレスを第一の仮想マシンに割り当てている。同じく、第二の仮想マシンへのパケット送信が第二のアダプタ17Bから行われるように、アダプタ17Bと同じIPサブネットに属するIPアドレスを第二の仮想マシンに割り当てている。
 仮想マシン上のMACアドレスは、試験装置上および他の仮想マシンとは異なるものとする。即ち第一の仮想マシンのMACアドレスMAC11と,第二の仮想マシンのMACアドレスMAC21とが,アダプタ17AのMACアドレスMAC12,アダプタ17BのMACアドレスMAC22とそれぞれ別のアドレスになるようにする。
 上記のように、あたかも仮想マシンと通信しているようにIP層にみせかけるため、本実施例では、アダプタなどのハードウェアまたはドライバでIPアドレスおよびMACアドレスを変換して通信する試験方法を採用する。
 図4は本実施例のコンピュータ1による試験方法の説明図、図5はアダプタ17Aからアダプタ17Bへ通信を開始する際の手順を示す図、図6はアダプタ17Bからアダプタ17Aへ通信を開始する際の手順を示す図、図7~図12は、図4の送信処理を図5,図6の各手順において示した図、図13~18は図7~図12の各手順で変換するアドレスの説明図である。
 ユーザが試験モードへの移行指示、例えば試験モードへ移行するためのコマンドとして後述の”addrtrans -s”を入力すると、コンピュータ1は試験モードを設定する。なお、本実施例では、ユーザが試験モードへ移行のコマンドを入力する際に、アダプタ17Aの通信相手である第一の仮想マシンのIPアドレス及びアダプタ17Bの通信相手である第二の仮想マシンのIPアドレスを図3に示すように指定する。仮想マシンのアドレスは、ユーザによる入力に限らず、コンピュータ1が各アダプタ17A,17Bに割り当てられたIPアドレスと同じサブネットに属するアドレスを自動生成しても良い。例えばアダプタ17AのIPアドレスを同じサブネット内で所定の値だけ増減させて第一の仮想マシンのIPアドレスとする。
 そして、ユーザが送信の指示、例えば試験を行うためのコマンドとして後述の”netperperf”を入力すると、コンピュータ1は該コマンドを実行して試験を開始(S1)し、前記コマンドに応じた送信処理を行う(S2)。具体的には、以下の(1)~(6)の処理を行う。
 先ず、前記試験を行うためのコマンドの入力によって、図5に示すようにアダプタ17Aからアダプタ17Bへの通信が指定された場合について説明する。
 (1)前記試験用を行うためのコマンドに応じ、アプリケーション部21は、第一の仮想マシン宛てのパケットの送信を開始しようとする。ここで第一の仮想マシンのIPアドレスは、前述のように自装置内のアダプタとは異なるIPアドレスが指定されている。このためIP層24は、図7に示すように、送信先IPアドレスと対応するMACアドレスを求めるアドレス解決要求を行う(S101)。
 そしてIP層24は、アドレス解決要求パケットの送信先IPアドレスと同じIPサブネットに属するドライバ部25Aを選択して該ドライバ部25Aにアドレス解決要求パケットを送出する(S102)。
 パケットを受信したアダプタ17Aまたはドライバ部25Aは、設定されているモードがアドレス変換モード(試験モード)か否かを判定する(S103)。判定の結果、設定されているモードがアドレス変換モードであれば、図13のように送信先のIPアドレスを10.20.1.2から10.20.2.1に変更し、送信元のIPアドレスを10.20.1.1から10.20.2.2に、送信元MACアドレスをMAC11からMAC22に変換する(S104)。そしてアダプタ17Aは、アドレスが変換されたパケットを外部に送信する(S105)。
 なお、S103で、設定されているモードがアドレス変換モードで無いと判定された場合、即ち試験用のコマンドでない通信が指示され、通常モードが設定されている場合、アダプタ17Aあるいはドライバ25Aはアドレスを変換せずにパケットを送信する(S106)。
 また、S104におけるアドレスの変換では、パケットの送信先が自装置内の他方のアダプタ17Bとなるように、アダプタ17Aまたはドライバ25Aが送信するパケットの送信先アドレスを図13に示すように変換する。但し、図13の例では、アドレス解決要求のパケットなので、このパケットの送信先MACアドレスはブロードキャスト用のff.ff.ff.ff.ff.ffとする。
 更に、S104におけるアドレスの変換では、パケットの送信元が所定の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図13に示すように変換する。例えば、アダプタ17Aは、図3に示したようにアダプタ17Bに対して通信相手を第二の仮想マシンと見せかけるため、図13の例では送信するパケットの送信元IPアドレスを10.20.2.2、送信元MACアドレスをMAC22と変換して送信している。
 アダプタ17Aから送信されたパケットは、ネットワークケーブルを介してアダプタ17Bに受信される。アダプタ17Bは、受信したパケットをドライバ部25B、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である第二の仮想マシンからのパケットとして受信する。
 (2)アダプタ17Bまたはドライバ部25Bにおいて、アドレス解決応答(ARP reply)を送信時、図14のようにMACアドレスおよびIPアドレスを変換する。以下、アダプタ17Bまたはドライバ25Bにおけるアドレス変換処理の詳細を図8を用いて説明する。
 即ち、アプリケーション部21は、第二の仮想マシンに対してアドレス解決応答を返す(S201)
 この場合も送信先IPアドレスが第二の仮想マシンであり、図3に示すとおり自装置内ではないため、IP層24は、送信先IPアドレスと同じIPサブネットに属するドライバ部25Bにパケットを送出する(S202)。
 IP層24からパケットを受信したアダプタ17Bまたはドライバ部25Bは、設定されたモードがアドレス変換モード(試験モード)か否かを判定する(S203)。アダプタ17Bまたはドライバ部25Bは、設定されたモードがアドレス変換モードであれば、図14のように送信先IPアドレスを10.20.2.2から10.20.1.1に、送信先MACアドレスをMAC22からMAC11に、送信元IPアドレスを10.20.2.1から10.20.1.2に、送信元MACアドレスをMAC21からMAC12に変換する(S204)。そして、アダプタ17Bは、アドレスを変換したパケットを外部へ送信する(S205)。
 なお、S203で、設定されたモードがアドレス変換モードでない、即ち通常モードと判定された場合、アダプタ17Bあるいはドライバ25Bはアドレスを変換せずにパケットを送信する(S206)。
 S204におけるアドレスの変換では、送信先が第二の仮想マシンから自装置内の他方のアダプタ17Aとなるように、アダプタ17Bまたはドライバ部25Bが送信するパケット上の送信先IPアドレス及び送信先MACアドレスを図14に示すように変換する。
 また、S204におけるアドレスの変換では、送信元がアダプタ17Bから第一の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図14に示すように変換する。図3に示したように、アダプタ17Aに対して通信相手を第一の仮想マシンと見せかけるため、図14の例では送信元IPアドレスを10.20.1.2、送信元MACアドレスをMAC12としている。
 アダプタ17Bから送信されたパケットは、ネットワークケーブルを介してアダプタ17Aに受信される。アダプタ17Aは、受信したパケットをドライバ部25A、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である第一の仮想マシンからのパケットとして受信する。
 (3)アダプタ17Aまたはドライバ部25Aにおいて、TCP/IPパケットを送信時、図15のようにMACアドレスとIPアドレスとを変換する。以下、アダプタ17Aまたはドライバ部25Aによるアドレス変換処理の詳細を図9を用いて説明する。
 アドレス解決によって第一の仮想マシンのMACアドレスを認識したアプリケーション部21は、第一の仮想マシン宛にパケットを送出する(S301)。
 送信先IPアドレスが第一の仮想マシンであり、図3に示すように自装置内ではないため、IP層24は、宛先IPアドレスと同じIPサブネットに属するドライバ部25Aにパケットを送出する(S302)。
 IP層24からパケットを受信したアダプタ17Aまたはドライバ部25Aは、設定されたモードがアドレス変換モード(試験モード)か否かを判定する(S303)。設定されたモードがアドレス変換モードであれば、図15のように送信先のIPアドレスを10.20.1.2から10.20.2.1に、送信先のMACアドレスをMAC12からMAC21に、送信元のIPアドレスを10.20.1.1から10.20.2.2に、送信元MACアドレスをMAC11からMAC22に変換する(S304)。そしてアダプタ17Aは、アドレスが変換されたパケットを外部に送信する(S305)。なお、S303で、アドレス変換モードでないと判定されればアドレスを変換せずにパケットを送信する(S306)。
 S304におけるアドレスの変換では、送信先が自装置内の他方のアダプタ17Bとなるように、送信するパケットの送信先IPアドレス及び送信先MACアドレスを図15に示すように変換する。
 また、S304におけるアドレスの変換では、送信元が所定の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図15に示すように変換する。即ち、図3に示したように、アダプタ17Bに対して通信相手を第二の仮想マシンと見せかけるため、図15のように、パケットの送信元IPアドレスを10.20.2.2、送信元MACアドレスをMAC22としている。
 アダプタ17Aから送信されたパケットは、ネットワークケーブルを介してアダプタ17Bに受信される。アダプタ17Bは、受信したパケットをドライバ部25B、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である第二の仮想マシンからのパケットとして受信する。
 次に、前記試験を行うためのコマンドの入力によって、図6に示すようにアダプタ17Bからアダプタ17Aへの通信が指定された場合について説明する。
 (4)前記試験を行うためのコマンドに応じ、アプリケーション部21は、第二の仮想マシン宛てのパケットの送信を開始しようとする。ここで第二の仮想マシンのIPアドレスは、前述のように自装置内のアダプタとは異なるIPアドレスが指定されている。このためIP層24は、図10に示すように、送信先IPアドレスと対応するMACアドレスを求めるアドレス解決要求を行う(S401)。
 そしてIP層24は、アドレス解決要求パケットの送信先IPアドレスと同じIPサブネットに属するドライバ部25Bを選択して該ドライバ部25Bにアドレス解決要求パケットを送出する(S402)。
 パケットを受信したアダプタ17Bまたはドライバ部25Bは、設定されているモードがアドレス変換モード(試験モード)か否かを判定する(S403)。判定の結果、設定されているモードがアドレス変換モードであれば、図16のように送信先IPアドレスを10.20.2.2から10.20.1.1に、送信元IPアドレスを10.20.2.1から10.20.1.2に、送信元MACアドレスをMAC21からMAC12に変換する(S404)。そして、アダプタ17Bは、アドレスを変換したパケットを外部へ送信する(S405)。
 なお、S403で、設定されたモードがアドレス変換モードでない、即ち通常モードと判定された場合、アダプタ17Bあるいはドライバ25Bはアドレスを変換せずにパケットを送信する(S406)。
 また、S404におけるアドレスの変換では、パケットの送信先が自装置内の他方のアダプタ17Aとなるように、アダプタ17Bまたはドライバ25Bが送信するパケットの送信先アドレスを図16に示すように変換する。但し、図16の例では、アドレス解決要求のパケットなので、このパケットの送信先MACアドレスはブロードキャスト用のff.ff.ff.ff.ff.ffとする。
 更に、S404におけるアドレスの変換では、パケットの送信元が所定の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図16に示すように変換する。例えばアダプタ17Bは、図3に示したように、アダプタ17Aに対して通信相手を第一の仮想マシンと見せかけるため、図16の例では送信するパケットの送信元IPアドレスを10.20.1.2、送信元MACアドレスをMAC12としている。
 アダプタ17Bから送信されたパケットは、ネットワークケーブルを介してアダプタ17Aに受信される。アダプタ17Aは、受信したパケットをドライバ部25A、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である第一の仮想マシンからのパケットとして受信する。
 (5)アダプタ17Aまたはドライバ部25Aにおいて、アドレス解決応答(ARP reply)を送信時、図17のようにMACアドレス及びIPアドレスを変換する。以下、アダプタ17A又はドライバ25Aにおけるアドレス変換処理の詳細を図11を用いて説明する。
 即ち、アプリケーション部21は、第一の仮想マシンに対してアドレス解決応答を返す(S501)
 この場合も送信先IPアドレスが第一の仮想マシンであり、図3に示すとおり自装置内ではないため、IP層24は、送信先IPアドレスと同じIPサブネットに属するドライバ部25Aにパケットを送出する(S502)。
 IP層24からパケットを受信したアダプタ17Aまたはドライバ部25Aは、設定されたモードがアドレス変換モード(試験モード)か否かを判定する(S503)。アダプタ17Aまたはドライバ部25Aは、設定されたモードがアドレス変換モードであれば、図17に示すように送信先のIPアドレスを10.20.1.2から10.20.2.1に、送信先のMACアドレスをMAC12からMAC21に、送信元のIPアドレスを10.20.1.1から10.20.2.2に、送信元MACアドレスをMAC11からMAC22に変換する(S504)。
 そしてアダプタ17Aは、アドレスが変換されたパケットを外部に送信する(S505)。なお、S503で、アドレス変換モードでないと判定されればアドレスを変換せずにパケットを送信する(S506)。
 S504におけるアドレスの変換では、送信先が第一の仮想マシンから自装置内の他方のアダプタ17Bとなるように、アダプタ17Aまたはドライバ部25Aが、送信するパケット上の送信先IPアドレス及び送信先MACアドレスを図17に示すように変換する。
 また、S504におけるアドレスの変換では、送信元がアダプタ17Aから第二の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図17に示すように変換する。即ち、図3に示したように、アダプタ17Bに対して通信相手を第二の仮想マシンと見せかけるため、図17の例では送信元IPアドレスを10.20.2.2、送信元MACアドレスをMAC22としている。
 アダプタ17Aから送信されたパケットは、ネットワークケーブルを介してアダプタ17Bに受信される。アダプタ17Bは、受信したパケットをドライバ部25B、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である第二の仮想マシンからのパケットとして受信する。
 (6)アダプタ17Bまたはドライバ部25Bにおいて、TCP/IPパケットを送信時、図18のようにMACアドレスとIPアドレスとを変換する。以下、アダプタ17Bまたはドライバ部25Bによるアドレス変換処理の詳細を図12を用いて説明する。
 アドレス解決によって第二の仮想マシンのMACアドレスを認識したアプリケーション部21は、第二の仮想マシン宛にパケットを送出する(S601)。
 この場合、送信先IPアドレスが第二の仮想マシンであり、図3に示すとおり自装置内ではないため、IP層24は、送信先IPアドレスと同じIPサブネットに属するドライバ部25Bにパケットを送出する(S602)。
 IP層24からパケットを受信したアダプタ17Bまたはドライバ部25Bは、設定されたモードがアドレス変換モード(試験モード)か否かを判定する(S603)。アダプタ17Bまたはドライバ部25Bは、設定されたモードがアドレス変換モードであれば、図18のように送信先IPアドレスを10.20.2.2から10.20.1.1に、送信先MACアドレスをMAC22からMAC11に、送信元IPアドレスを10.20.2.1から10.20.1.2に、送信元MACアドレスをMAC21からMAC12に変換する(S604)。そして、アダプタ17Bは、アドレスを変換したパケットを外部へ送信する(S605)。
 なお、S603で、設定されたモードがアドレス変換モードでない、即ち通常モードと判定された場合、アダプタ17Bあるいはドライバ25Bはアドレスを変換せずにパケットを送信する(S606)。
 S604におけるアドレスの変換では、送信先が第二の仮想マシンから自装置内の他方のアダプタ17Aとなるように、アダプタ17Bまたはドライバ部25Bが送信するパケット上の送信先IPアドレス及び送信先MACアドレスを図18に示すように変換する。
 また、S604におけるアドレスの変換では、送信元がアダプタ17Bから第一の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図18に示すように変換する。即ち、図3に示したようにアダプタ17Aに対して通信相手を第一の仮想マシンと見せかけるため、図18の例では送信元IPアドレスを10.20.1.2、送信元MACアドレスをMAC12としている。
 アダプタ17Bから送信されたパケットは、ネットワークケーブルを介してアダプタ17Aに受信される。アダプタ17Aは、受信したパケットをドライバ部25A、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である第一の仮想マシンからのパケットとして受信する。
 上記のように、コンピュータ1は、図4のS2を図7-図13の手順でアダプタ17Aの通信相手が第一の仮想マシン、アダプタ17Bの通信相手が第二の仮想マシンであるように見せかけて、アダプタ17A,17B間の通信を繰り返して試験を行う(S3)。
 そして、アプリケーション部21は、送受信したデータ量や単位時間当たりの速度を求めて試験結果とし(S4)、記録媒体への書き出しや表示装置への表示、他のコンピュータへの送信、印刷などの出力処理を行う(S5)。
 -ユーザインタフェース-
 アドレス変換を行うモード、つまり試験モードに移行すること、および、そのモードを解除することは、ユーザがコマンドで指定するようにする。
 ここで、コンピュータ1は、図1の状態、即ち1台の試験装置上で、アダプタ17A,17Bがケーブルで直結してあり、ドライバ部25Aがアダプタ17AのIPアドレスIP11=10.20.1.1と対応付けられ、ドライバ部25Bがアダプタ17BのIPアドレスIP21=10.20.2.1と対応付けられている状態であるとする。
 例えば、アドレス変換モードへ移行するコマンドとして、「addrtrans-s」を用いる。また、このコマンドの入力時には、通信方向や仮想マシンのアドレスを指定するため、ユーザが入力部15から、次のように指定する。
 > addrtrans -s ドライバ#1 10.20.1.2  ドライバ#2  10.20.2.2
 ここで、「ドライバ#1」はドライバ部25Aのドライバ名、「ドライバ#2」はドライバ部25Bのドライバ名、「10.20.1.2」は第一の仮想マシンのIPアドレス、「10.20.2.2」は第二の仮想マシンのIPアドレスである。
 一方、アドレス変換モードを解除する、即ち通常モードを設定するコマンドとして、例えば「addrtrans -d」を用いる。このコマンドの入力時にアドレス変換モードを解除するドライバを指定するため、ユーザが入力部15から、以下のように指定する。
 > addrtrans -d ドライバ#1 ドライバ#2
 図19は、試験モード時のアダプタ17Aからアダプタ17Bへ通信する際の送信経路を示す図である。
 アドレス変換モードへ移行後、送信先アドレスとして第一の仮想マシンのIPアドレス(IP12=10.20.1.2)を指定してパケットを送信すると、前述の(1)~(3)の変換処理により、図19のように、netperfコマンド21→ストリームヘッド22→TCP23→IP24→ドライバ25A→アダプタ17A→アダプタ17B→ドライバ25B→IP24→TCP23→ストリームヘッド22→netserverデーモン21を経由したパケットの送信が実行できる。
 例えば、試験を行うためパケットを送信するコマンドとして「netperperf」を用いる。アドレス変換モードへ移行後に次のようにコマンドを実行する。
 > netperperf -H 10.20.1.2
 また、図20は、試験モード時のアダプタ17Aからアダプタ17Bへ通信する際の送信経路を示す図である。
 アドレス変換モード移行後、送信先アドレスとして第二の仮想マシンのIPアドレス(=IP12=10.20.2.2)を指定してパケット送信すると、前述の(4)~(6)の変換処理により、図20のように、netperfコマンド21→ストリームヘッド22→TCP23→IP24→ドライバ25B→アダプタ17B→アダプタ17A→ドライバ25A→IP24→TCP23→ストリームヘッド22→netserverデーモン21を経由した送信が実行できる。
 例えば、アドレス変換モードへ移行後に次のようにコマンドを実行する。
 > netperperf -H 10.20.2.2
  -アダプタでアドレス変換する場合のコマンドの実装-
 図21はアドレス変換レジスタの説明図、図22はアドレス変換レジスタの更新処理の説明図、図23はアダプタ17Aのアドレス変換レジスタに書き込まれる値の一例を示す図、図24はアダプタ17Bのアドレス変換レジスタに書き込まれる値の一例を示す図、図25はアドレス変換レジスタの値をクリアして通常モードとした例を示す図である。
 アダプタ17A,17B上のメモリ空間における所定の場所に図21に示す領域、つまりアドレス変換レジスタを確保しておく。
 図21のアドレス変換レジスタは、現在設定されているモード、自分側の仮想マシンのIPアドレス、自分側の実マシン上のIPアドレス、自分側の仮想マシン上のMACアドレス、自分側のアダプタ上のMACアドレス、対向側の仮想マシンのIPアドレス、対向側の実マシン上のIPアドレス、対向側の仮想マシン上のMACアドレス、対向側のアダプタ上のMACアドレス等の項目を記憶する。
 なお、現在設定されているモードは、例えばアドレス変換モードであれば1、通常モードであれば0のように設定する。また、例えばアダプタ17Aのアドレス変換レジスタであれば、自分側の仮想マシンは第一の仮想マシン、対向側の仮想マシンは第二の仮想マシン、自分側の実マシン上のアドレスがアダプタ17Aのアドレス、対向側の実マシン上のアドレスがアダプタ17Bのアドレスである。
 そして、addrtrans -sコマンドを実行した場合に、CPU12が以下の動作を行うこととする。
 まず、OSに備わっている既存のインタフェースで、アダプタ17A及びアダプタ17BのMACアドレスおよびIPアドレスを調べ、アドレス変換レジスタの自分側の実マシン上のIPアドレス、自分側のアダプタ上のMACアドレス、対向側の実マシン上のIPアドレス、対向側のアダプタ上のMACアドレスを記憶する。なお、MACアドレスやIPアドレスは、OSにより、各アダプタ17A,17Bに係るドライバ名と対応付けられてメモリ中に格納されている。
 次に、第一の仮想マシンおよび第二の仮想マシンにMACアドレスを割り当て、アドレス変換レジスタの自分側の仮想マシン上のMACアドレス及び対向側の仮想マシン上のMACアドレスとして記憶する。その値をMAC21,MAC22とする。ここで、第一の仮想マシンのMACアドレスMAC21及び第二の仮想マシンのMACアドレスMAC22と、アダプタ17AのMACアドレスMAC11と,アダプタ17BのMACアドレスMAC12とが、それぞれユニークな値となるように、MAC21、MAC22を割り当てる。
 第一の仮想マシンおよび第二の仮想マシンのIPアドレスは、上記のようにaddrt rans-sコマンドの引数で与えられているため、この引数をアドレス変換レジスタ の自分側の仮想マシンのIPアドレス及び対向側の仮想マシンのIPアドレスとして記憶す る。
 次に、図22のようにドライバを制御するコマンド、例えばioctlによって、アプリケーション部21は、ドライバ部25Aおよびドライバ部25Bのそれぞれに、アダプタ17Aおよびアダプタ17Bのアドレス変換レジスタに書きこむべき値を渡す。
 ドライバ部25A,25Bは、ioctlを受けると、各ドライバ部に対応するアダプタ17A,17B上のアドレス変換レジスタに該ioctlで受けた前記各項目の値を書きこむ。
 例えば、”addrtrans -s ドライバ#1 10.20.1.2  ドライバ#2  10.20.2.2” が実行された場合、ドライバ部25Aはアダプタ17Aのアドレス変換レジスタに図23のように各情報を書きこむ。
 即ち、モードが1、自分側の仮想マシンのIPアドレスが10.20.1.2、自分側の実マシン上のIPアドレスが10.20.1.1、自分側の仮想マシン上のMACアドレスがMAC12、自分側のアダプタ上のMACアドレスがMAC11、対向側の仮想マシンのIPアドレスが10.20.2.2、対向側の実マシン上のIPアドレスが10.20.2.1、対向側の仮想マシン上のMACアドレスがMAC22、対向側のアダプタ上のMACアドレスがMAC21となる。
 同様に、ドライバ部25Bは、アダプタ17Bのアドレス変換レジスタに図24のように各情報を書きこむ。
 そして、”addrtrans -d ドライバ#1 ドライバ#2” が実行されてアドレス変換モードが解除された場合、ドライバ部25Aからアダプタ17Aに対して、また、ドライバ部25Bからアダプタ17Bに対して、図25に示すようにアドレス変換レジスタの全ての値を0にクリアする指示を発する。
 -ドライバでアドレス変換する場合のコマンドの実装-
 図26はアドレス変換情報の更新処理の説明図である。
 ドライバ部25A,25Bは、アダプタの状態や、上位の要素から指示された情報を保存しておくために、“制御構造体”と呼ばれるデータの構造体をコンピュータ1上のメモリ13に保持している。
 制御構造体内に、図21のアドレス変換レジスタと同等な情報を取り込む。これを“アドレス変換情報”と呼ぶことにする。
 ioctlによって、ドライバ部25Aおよびドライバ部25Bのそれぞれにアドレス変換情報に書きこむべき値を渡す処理までは、図22においてアドレス変換レジスタに書きこむべき値を渡す処理と同様である。以下、アドレス変換情報の書き込み処理の詳細を説明する。
 ドライバ部25A,25Bはioctlを受けると、図26に示すように制御構造体の値を更新する。例えば、”addrtrans -s ドライバ#1 10.20.1.2  ドライバ#2  10.20.2.2” が実行された場合、ドライバ部25Aは、制御構造体のアドレス変換情報として図23の値を書きこむ。また、ドライバ部25Bは、制御構造体のアドレス変換情報として図24の値を書きこむ。
 一方、”addrtrans -d ドライバ#1 ドライバ#2” が実行されてアドレス変換モードが解除された場合、ドライバ部25A,25Bはそれぞれ制御構造体のアドレス変換情報を図25に示すようにクリアする。
 -アダプタでアドレス変換する場合のアダプタの実装例-
 図27は、通常モード時、即ち通常の通信を行う場合の状態を示したアダプタの機能ブロック図である。なお、アダプタ17A,17Bは同じ構成を有し、それぞれ送信時と受信時で対照的に同じ処理を行うので、便宜上アダプタ17Aについて説明し、アダプタ17Bについての説明を省略する。また、ドライバ部25A,25Bについても同様であり、ドライバ部25Bについての説明を省略する。
 図27のようにアダプタ17Aは、送信キュー71、送受信器72、データ変換器73、受信キュー74を有する。
 ドライバ部25Aが、アダプタ17Aにパケットの送信依頼を行うと、送信パケットはまず送信キュー71に登録され、FIFO(first in, first out)で送受信器72へ送られる。
 送受信器72は、送信キュー71から送られたパケットに、伝送路でのエラーを検出するためのエラー検出ビットを付与して、そのパケットの送信を指定する。この段階までは、パケットは0と1のビット列の形式である。
 そして送受信器72で送信の指定を受けたパケットは、データ変換器73に届き、電気信号または光信号の形式に変換されて、LANケーブルなどの伝送路へ送出される。
 受信パケットは、電気信号または光信号の形で伝送路から、データ変換器73に入る。
 データ変換器73は、そのパケットを0と1のビット列に変換する。
 送受信器72は、受信したパケットのエラー検出ビットと、エラー検出ビット以外のデータの内容を比較して、伝送路でエラーが発生していないかどうかを確認する。受信パケットにエラーが発生していれば受信したデータを破棄し、ドライバ部25Aにエラーの発生を通知する。エラーが発生していなければ、送受信器72はエラー検出ビットを除去して、受信キュー74に受信パケットを登録し、ドライバ部25Aに対して受信が発生したことを、割込みなどで通知する。
 ドライバ部25Aは、受信キュー74から、先に到着した順に受信パケットを取りだす。
 一方、図28は、アドレス変換を行う場合の状況を示したアダプタ17Aの機能ブロック図である。
 試験モード時、即ち、アドレス変換して通信する場合、本実施例では、図28に示すように、アドレス変換器75を用いて、送信キュー71と送受信器72の間でパケットのアドレスを変換する。
 ドライバ部25Aによって本体上のメモリ13からアダプタ17Aへ送られたパケットは、アダプタ17A上のメモリ、つまり送信キュー71に書き込まれる。この段階のパケットは、本体上のメモリ13上に書かれているのか、アダプタ17A上のメモリに書かれているかの違いだけで、どちらも0と1のビットで表されたものであり、内容も本体メモリ上に存在していた時と同じである。また、パケットは、送受信器72に入る前までエラー検出ビットも付けられていない。
 試験変換器75は、送信キュー71からパケットを読み出し、パケットのアドレスを前述の(1)~(3)のように変換して送受信器72へ送る。送受信器72及びデータ変換器73を介してパケットを送信する処理は、図27の処理と同じである。また、試験モードであってもパケットの受信処理は通常モードと同じである。
 図29は、試験変換器75の構成図である。図29に示すように、試験変換器75は、アドレス変換レジスタ50、モード判定器51、アドレス変換部76を備えている。また、アドレス変換部76は、パケット種別判定器52、ARPパケット変換器53、TCP/IPパケット変換器54、チェックサム計算器55を有している。
 アドレス変換レジスタ50は、図21に示した内容を記憶しており、モード判定器51や、ARPパケット変換器53、TCP/IPパケット変換器54に参照される。
 試験変換器75の各要素51-55は、図30,31に示す処理を行う。図30,31はアドレス変換処理の説明図である。
 先ず、モード判定器51は、アドレス変換レジスタ50を参照し、モードが1、即ち試験モードか否かを判定する(S21)。モード判定器51は、モードが1であれば(s21 Yes)、送信キュー71から最先のパケットを読み出してパケット種別判定器52へ送る。一方、モードが0であれば(S21 No)、モード判定器51は送信キュー71から読み出したパケットを変換せずに、つまりアドレス変換部76を介することなく送受信器72へ送る。この場合、処理はX2へ移行する。
 モード判定器51からパケットを受信したパケット種別判定器52は、パケットのイーサタイプが0x806であるか否かを判定する(S22)。イーサタイプが0x806であれば、当該パケットがARPリクエスト又はARPリプライであることを示している。従って、パケット種別判定器52は、イーサタイプが0x806であれば(S22 Yes)パケットをARPパケット変換部53へ送る。この場合、処理はX1へ移行する。
 また、パケット種別判定器52は、イーサタイプが0x806でなければ(S22 No)、イーサタイプが0x800か否かを判定する(S23)。イーサタイプが0x800であれば(S23 Yes)、当該パケットがIPパケットであることを示している。従って、パケット種別判定器52は、イーサタイプが0x800でなければ(S23 No)当該パケットを変換せずに直接送受信器72へ送る。この場合、処理はX2へ移行する。
 そして、パケット種別判定器52は、イーサタイプが0x800であれば(S23 Yes)IPヘッダ中のPRTフィールドの値が6、即ちTCPであるか否かを判定する(S24)。ここでPRTフィールドの値が6であれば(S24 Yes)、パケット種別判定器52は、当該パケットをTCP/IPパケット変換部54に送る。一方、PRTフィールドの値が6でなければ(S24 No)、当該パケットを変換せず直接送受信器72へ送る。この場合、処理はX2へ移行する。
 パケット種別判定器52からARPパケットを受信したARPパケット変換器53は、パケット中の送信先MACアドレスがブロードキャストアドレス、即ちff.ff.ff.ff.ff.ffか否かを判定する(S25)。
 ARPパケットのMACアドレスがブロードキャストアドレスでなければ(S25 No)、ARPパケット変換器53は、アドレス変換レジスタ50を参照して対向側のネットアダプタのMACアドレスを求め、求めたMACアドレスでパケット中の送信先MACアドレスを書き換える(S26)。
 S26での送信先MACアドレスの書き換え後、或はS25で送信先MACアドレスがブロードキャストアドレスであった場合(S25 Yes)、ARPパケット変換器53は、アドレス変換レジスタ50を参照し、以下のアドレスについて書き換える(S27)。
 1.送信元MACアドレスを、対向側の仮想マシン上のMACアドレスで書き換える。
 2.送信元IPアドレスを、対向側の仮想マシン上のIPアドレスで書き換える。
 3.送信先IPアドレスを、対向側のアダプタのIPアドレスに書き換える。
 そして、ARPパケット変換器53は、変換後のパケットを送受信器72へ送る(S28)。
 なお、上記ARPパケット変換器53で変換するARPパケットにおいて、送信元MACアドレスとは、図32に示すMACヘッダ中の送信元MAC、及び図34に示すフォーマットのSHAdのことである。上記の書換えは、この送信元MAC、SHAdの両方に対して行っている。
 図32は、MACヘッダを含むパケットのフォーマットを示す図、図33は図32の各フィールドの説明図、図34はARPパケットのフォーマットを示す図、図35は図34の各フィールドの説明図である。
 また、送信先MACアドレスとは、図32に示すMACヘッダ中の送信先MAC、および、図34に示すフォーマットのTHAdのことであり、上記の書換えはこの送信先MAC、THAdの両方に対して行っている。
 更に、送信元IPアドレスとは、図34に示すフォーマットのSPAdのことであり、送信先IPアドレスとは、図34に示すフォーマットのTPAdのことである。
 また、パケット種別判定器52からTCP/IPパケットを受信したTCP/IPパケット変換器54は、アドレス変換レジスタ50を参照し、以下のアドレスについて書き換える(S29)。
 1.送信元MACアドレスを、対向側の仮想マシン上のMACアドレスで書き換える。
 2.送信先MACアドレスを、対向側のアダプタのMACアドレスで書き換える。
 3.送信元IPアドレスを、対向側の仮想マシン上のIPアドレスで書き換える。
 4.送信先IPアドレスを、対向側のアダプタのIPアドレスに書き換える。
 そして、TCP/IPパケット変換器54は、変換後のパケットをチェックサム計算器55へ送る(S30)。
 なお、上記TCP/IPパケット変換器54で変換するTCP/IPパケットについて、送信元MACアドレスとは、図32に示すMACヘッダ中の送信元MACのことである。
 同様に送信先MACアドレスとは、図32に示すMACヘッダ中の送信先MACのことである。
 更に、送信元IPアドレスとは、図36に示すIPヘッダのFROM、送信先IPアドレスとは、図36に示すIPヘッダのTOのことである。図36はIPヘッダのフォーマットを示す図、図37は図36のIPヘッダの各フィールドの説明図である。
 なお、本実施例において、各アダプタは、アドレス変換レジスタ中の自身のアドレスを変換処理には用いなかったが、アドレス変換(上書き)前のパケットの正当性チェックに用いても良い。
 例えば、変換前の送信元アドレスや送信先アドレスが、図3に示すように送信元がアダプタ自身のアドレス、送信先が対向する仮想マシンのアドレスと一致しているか否かをアダプタがチェックする。
 ここで正当でなかった、つまりアドレスが一致しなかった場合には、アダプタがドライバにエラーを通知し、ドライバがそれを受けてエラーメッセージを出力するなどの処置を行う。また、正当でなかったパケットについては、送信せずに破棄する、または、変換せずに送信する、などの処置を行う。
 この正当性チェックは、想定外のパケットが送信依頼された場合に、正しくない性能測定値となることを防ぐ。なお、想定外のパケットは、マシンがIPルータの設定になっていて、IPのフォワード機能によって、他のネットワークのパケットが混入した場合などに発生することがある。
 上記TCP/IPパケット変換器54によってアドレスの上書を行うと、IPヘッダ中のチェックサム値(図36,37のSUM)、および、図38,39に示すTCPヘッダ中のチェックサム値(SUM)が正しい値ではなくなる。そこで、アドレス変換後のパケットをチェックサム計算器55に入力して、IPヘッダ中のチェックサム値及びTCPヘッダ中のチェックサム値をそれぞれ再計算して該IPヘッダ中のチェックサム値及びTCPヘッダ中のチェックサム値を上書する。なお、アダプタ中でIPヘッダ中のチェックサム値及びTCPヘッダ中のチェックサム値を計算すること自体は、“チェックサムオフロード”あるいは“ハードウェアチェックサム”と呼ばれる既存の技術を用いて行うことができる。
 チェックサム計算器55は、TCP/IPパケット変換器54から変換後のパケットを受信すると、該パケットのIPヘッダ中の各フィールドの値、例えばVER、IHL、ST、LEN、ID、FC、TTL、PRT、FROM、TO、OPTの値を読み出してチェックサム値を再計算し、算出した値で当該パケットのチェックサム(SUM)の値を上書きする。同様に、チェックサム計算器55は、TCPヘッダ中の各フィールドの値を読み出してチェックサム値を再計算し、算出した値でチェックサム(SUM)の値を上書きする(S31)。
 そして、チェックサム計算器55は、チェックサムを改めたパケットを送受信器72へ送信する(S32)。
 -ドライバでアドレス変換する場合のドライバの実装例-
 ドライバ部25A,25Bは送信時、上位、つまり送信処理の流れの上流側の要素から、送信パケットの他に、送信元MACアドレス、送信先MACアドレス、EthertypeといったMACヘッダを構成する要素を、パケット送信のたびに受取る。以降、送信パケット+送信元MACアドレス+送信先MACアドレス+Ethertypeのセットのことを、送信ストリームメッセージと称す。
 図40は、ドライバ部25A或は25Bによるパケット送信時の処理の説明図である。以下、便宜上ドライバ25Aについて説明するが、ドライバ25Bについても同様である。
 ドライバ部25Aは、送信ストリームメッセージや送信完了通知といった送信に係る情報の受信を待つ(S41)。送信ストリームメッセージを受信した場合には、ドライバ部25A,25Bの送信キュー61に、既に送信ストリームメッセージが存在するか否かを判定する(S42)。
 ここで、送信キュー内61に既に送信ストリームメッセージが存在する場合(S42 Yes)、ドライバ部25A,25Bは、受信した送信ストリームメッセージを送信キュー61の末尾に登録して(S43)、次の情報の受信を待つ(S41)。
 一方、S41において、送信キュー61に送信ストリームメッセージが登録された状態で、送信完了通知を受信した場合、ドライバ部25A,25Bは送信キュー61から先頭の送信ストリームメッセージを1つ取り出す(S44)。
 S44の後、或はドライバ部25A,25Bの送信キュー61に送信ストリームメッセージが存在しないと判定した場合(S42 No)、ドライバ部25A,25Bは、アダプタ17A,17Bの送信キュー71が満杯か否かを判定する(S45)。
 ここでアダプタ17A,17Bの送信キュー71が満杯であれば(S45 Yes)、ドライバ部25A,25Bは、受信した送信ストリームメッセージを送信キュー61の末尾に登録して(S43)、次の情報の受信を待つ(S41)。また、アダプタ17A,17Bの送信キュー71が満杯でなければ(S45 No)、ドライバ部25A,25Bは、アドレスを変換するステップ46へ移行する。
 S46では、図30,31で示したアドレス変換処理をドライバ部25A,25Bが行う。即ち、モード判定器51、アドレス変換部56に換わりCPU12が図22,23と同様の処理を行う。
 そしてドライバ部25A,25Bは、アドレス変換後のパケットにMACヘッダを付加して(S47)、アダプタ17A,17Bに送って送信を依頼し(S48)、S41へ戻る。
 -試験モード時の動作-
 性能測定アプリケーションとしてnetperfを用い、netperfに従って実行するアプリケーション部21の動作について説明する。
 netperfは、netperfコマンドで実行される送信用アプリケーションと、受信用アプリケーションとしてのnetserverデーモンで構成されている。送信用アプリケーションにより、CPU12は、前述の送信アプリケーション部として機能し、性能測定のためにパケットを送信する。また、受信用アプリケーションにより、CPU12は前述の受信アプリケーション部として機能し、送信用アプリケーションによって送信されたパケットを受信する。
 先ずnetserverコマンドが入力されると、CPU12はnetserverデーモンを起動させる。これによりユーザ空間にデーモンが生成され、netperfコマンドに対する受信側の処理を行えるようにする。
 また、上述のようにaddrtrans -sが入力されると、CPU12は該コマンドを実行して試験モードに移行する。
 そして、次のnetperfコマンドが入力されるとアプリケーション部21は、オプションで指定したアドレス、本例では第一の仮想マシン宛てにデータを送信する。
 > netperf -H 10.20.1.2 ... 
 netperfコマンドに応じアプリケーション21がパケットを送信を指示すると、IP層24は、先ず、送信先のIPアドレス10.20.1.2に対するMACアドレスが不明であるため、図13に示した変換前の設定でARPリクエストを生成する。
 変換前状態のARPリクエストは、自装置内に存在しないアドレス宛てであるので、送信先IPアドレスと同じサブネットに属するアダプタ17Aのドライバ部25Aに渡される。
 ドライバ部25A或はアダプタ17Aは、該ARPリクエストを図5に示す変換後の設定となるようにアドレスを変換してブロードキャストする。
 該ARPリクエストは、ケーブルを介して他方のアダプタ17Bで受信され、ドライバ部25B、IP層24へ順に送られる。
 該ARPリクエストは、送信元が図3に示した第二の仮想マシン、送信先がアダプタ17Bである場合に、第二の仮想マシンからブロードキャストされるARPリクエストと同じに変換されている。従ってアダプタ17Aから送信されたARPリクエストであっても第二の仮想マシンからのARPリクエストとして矛盾なくアダプタ17B→ドライバ部25B→IP層24の順に受信される。
 そして、IP層24は、該ARPリクエストに応じてARPリプライを生成する。該ARPリプライは、第二の仮想マシンに対するパケットであるため、図14に示した変換前の設定の通りである。
 従って、ARPリプライの送信先IPアドレスが10.20.2.2であり、自装置内に存在しないため、IP層24は、ARPリプライの送信先IPアドレスと同じサブネットに属するアダプタ17Bのドライバ部25BにARPリプライを渡す。
 ドライバ部25B或はアダプタ17Bは、該ARPリプライを図14に示す変換後の設定となるようにアドレスを変換して変換後の送信先であるアダプタ17Aへ送信する。
 該ARPリプライは、ケーブルを介して他方のアダプタ17Aで受信され、ドライバ部25A、IP層24へ順に送られる。
 該ARPリプライは、送信元が図3に示した第一の仮想マシン、送信先がアダプタ17Aである場合に、第一の仮想マシンから返信されるARPリプライと同じに変換されている。従って、アダプタ17Bから送信されたARPリプライであっても、第一の仮想マシンからのARPリプライとして矛盾なくアダプタ17A→ドライバ部25A→IP層24に受信される。
 従ってIP層24は、送信元IPアドレス=10.20.1.2に対応する送信元MACアドレスがMAC12であると解釈して、アドレス解決が正常に終了する。
 アドレス解決後、IP層24は、図15の変換前の設定としたTCP/IPパケットをドライバ部25Aに渡し、ドライバ部25A或はアダプタ17Aが、該TCP/IPパケットを図15に示した変換後の設定のとおり変換してアダプタ17Bへ送信する。
 該TCP/IPパケットは、ケーブルを介してアダプタ17Bで第二の仮想マシンからのTCP/IPパケットとして受信される。
 このように各アダプタ17Aが、第二の仮想マシンであるようにアダプタ17Bに見せかけることでアダプタ17A,17B間の通信を行う。
 また、上記の例では、アダプタ17Aからアダプタ17Bへパケットを送信したが、アダプタ17Bからアダプタ17Aへも同様に送信できる。例えばnetperf -H 10.20.2.2 ...のように第二の仮想マシンのアドレスを指定してコマンドを実行した場合、上記と比べてドライバ部25A及びアダプタ17Aと、ドライバ部25B及びアダプタ17bとを入れ換えた状態で動作する。即ち、図13~15の変換処理に換えて図16~18の変換処理を行いアダプタ17B,17A間の通信を行う。
 ここで前記netserverコマンドを実行する場合、次のようなオプションを指定しても良い。
  > netserver -p 5000
  注1.‐pオプションではTCPポート番号を指定する。
 また、netperfコマンドを実行する場合、次のようなオプションを指定しても良い。
  > netperf -H 10.20.1.2 -l 10 -p 5000 -s 65536
  注1.-Hオプションでは、送信先のIPアドレスを指定する。
  注2.-lオプションでは、測定時間を指定している。netperfコマンドは、その時間経過した後復帰する。この場合10秒である。
  注3.-pオプションでは、netserverコマンドで指定したのと同じTCPポート番号を指定する。この場合TCPポート番号は5000である。
  注4.-sオプションは、TCPウインドウサイズを意味するが、send()関数に渡すデータサイズもこの値とし、送信するパケットのサイズを指定する。
 アプリケーション部21は、前記netperfコマンドの実行により、アダプタ17A,17B間のTCPコネクションが確立されると、可能な限り高速に-Hで指定されたIPアドレスに対してデータを送信しつづける。具体的には、Socket関数send()で送信依頼しつづける(図4のS2)。
 また、アプリケーション部21は、netserverデーモンの実行により、Socket関数recv()でデータを受信しつづける。
 なお、可能な限りデータを送信する場合に、CPU12の処理速度能力が非常に低いとデータの送信速度がCPU12の処理能力に依存することも考えられる。しかし、通常のCPU12の処理能力は、ネットワークアダプタの送信速度と比べて十分に高い。例えば性能測定ツールを複数同時に起動したり、双方向に起動したりしても測定に支障はない。
 具体的には、図27に示すアダプタ17Aの送信キュー71に空きが無くなると、前述のようにドライバ部25Aはアダプタ17Aへの送信依頼をする代りに、ドライバ部25Aの送信キュー61に送信パケットを溜め込むようになる。
 そして、ドライバ部25Aの送信キュー61にも空きが無くなると、IP層の送信キューに送信パケットが溜まることになる。
 そして更に、IP層の送信キューにも空きが無くなると、該送信キューに空きができるまでの間はsend()関数が復帰しない、即ちsend()関数の復帰遅延が発生する。
 また、送信したデータが通信先に届いているか否かは、コンピュータ1のTCP層によってチェックされている。つまり、通信相手からのTCP ACK(データ受信確認パケット)が一定時間後、あるいは、一定データ量送信後に返ってこなければ、送信データが通信先に届いていないと判断し、次の送信を保留するか、あるいは、再送処理を行う。
 この現象も、アプリケーション部21からは、send()関数の復帰遅延として観測される。
 netperfコマンドの-lオプションで指定された時間になると、アプリケーション部21がデータの送信を打ち切り、試験結果算出部26が送信したデータ量と時間(この場合10秒)から、性能値を算出して(S7)、試験結果出力部27が試験結果を出力する(S8)。
 例えば、以下のように性能値を表示する。この場合は、ソケットサイズが65536バイト、送信メッセージサイズ65536バイトで10秒間試験した場合のスループットが782.52Mbpsであったことを示している。
TCP STREAM TEST
Recv    Send     Send
Socket  Socket   Message   Elapsed
Size    Size     Size      Time      Throughput
bytes   bytes    bytes     secs.     10^6bits/sec
65536   65536    65536     10.00      782.52
 以上のように、本実施例1によれば、一台の試験装置1に搭載したネットワークアダプタ17A,17B間でTCP/IPを用いた通信が行えるので、簡易な構成でネットワークアダプタ17A,17B或はドライバの試験を行うことができる。
 なお、上記ネットワークアダプタは、拡張スロットに装着するネットワークカードのように試験装置1と別体のものに限らず、試験装置1に内蔵、例えばマザーボードに実装されたものでも良い
 〈実施例2〉
 -1台の試験装置に1枚のカードを挿す場合-
 図41は、実施例2のコンピュータ1を示す図、図42は実施例2の試験方法の概念図、図43はアドレスの変換例を示す図、図44はアドレスの変換例を示す図、図45はアドレスの変換例を示す図、図46は試験モード時の送信経路を示す図、図47はアドレス変換レジスタの説明図、図48はアドレス変換レジスタの更新処理の説明図、図49はアドレス変換レジスタに書き込まれる値の一例を示す図、図50はアドレス変換レジスタの値をクリアして通常モードとした例を示す図、図51は通常モード時のアダプタの機能ブロック図、図52は試験モード時のアダプタの機能ブロック図である。
 本実施例2は、実施例1と比べて図1,図2の試験装置1に搭載するネットワークカード(アダプタ)17を1枚とした点が異なっている。その他の構成は実施例1と同じであるので、同一の要素には同符号を付すなどして再度の説明を省略する。
 アダプタ17は、ネットワーク側へ送出するデータをネットワーク側からのデータとして自身で受信するアダプタ内折り返し機能を有している。例えば、図44の送受信器72やネットワークとのインタフェースの送信側から自身の受信側へデータを迂回させる経路19を有している。
 本実施例2では、図42に示すようにアダプタ17のIPアドレスを10.20.1.1、通信相手である仮想マシンのIPアドレスが10.20.1.2であるように、IP層に見せかけて通信を行う。
 仮想マシン上のIPアドレスは、試験装置1上に存在しないものを選択する。これは、仮想マシン上のIPアドレスが試験装置1上に存在するものであると、送信先アドレスとしたときにパケットがIP層24で折り返してしまうためである。
 また、仮想マシンへの送信がアダプタ17から行われるように、仮想マシンにアダプタ17と同じIPサブネットに属するIPアドレスを割り当てている。
 仮想マシンには、アダプタ17とは異なるMACアドレスを割り当てている。即ち、仮想マシンMAC2とアダプタ17のMACアドレスMAC1とを別のアドレスとしている。
 上記のように、あたかも仮想マシンと通信しているようにIP層にみせかることを実現するため、本実施例では、ハード(アダプタ)またはドライバでIPアドレスおよびMACアドレスを変換して通信する試験方法を採用する。試験方法の流れは、図4と比較して、データを送信も受信も一つのアダプタで行うため、変換するアドレスが以下のように異なっている。
 具体的には、以下のような変換を行う。
 (1)アダプタ17またはドライバ部25において、アドレス解決要求(ARP request)を送信時、図43のように送信先のIPアドレスを10.20.1.2から10.20.1.1に変更し、送信元のIPアドレスを10.20.1.1から10.20.1.2に、送信元MACアドレスをMAC1からMAC2に変換する。
 即ち、先ずアプリケーション部21が、自装置内に存在しないIPアドレスを通信先として送信するデータをストリームヘッド22へ送出する。これにより、IP層24は、図43の変換前の設定でアドレス解決要求のパケットを生成する(S101)。
 アドレス解決要求のパケットの送信先IPアドレスが自装置内ではないため、IP層24は、アドレス解決要求の送信先IPアドレスと同じIPサブネットに属するドライバ部25にパケットを送出する(S102)。
 IP層24からパケットを受信したアダプタ17またはドライバ部25は、アドレス変換モード(試験モード)か否かを判定し(S103)、アドレス変換モードであれば、図43のようにアドレスを変換し(S104)、パケットを送信する(S105)。なお、S103で、アドレス変換モードでなければアドレスを変換せずにパケットを送信する(S106)。
 S104におけるアドレスの変換では、送信先が自装置内のアダプタ17となるように、送信先IPアドレス及び送信先MACアドレスを図43に示すように変換する。但し、図43の例では、アドレス解決要求のパケットなので、送信先MACアドレスはブロードキャスト用のff.ff.ff.ff.ff.ffとする。
 また、S104におけるアドレスの変換では、送信元が所定の仮想マシンとなるように、送信するパケットの送信元IPアドレス及び送信元MACアドレスを図43に示すように変換する。例えば、図42に示したように通信相手を仮想マシンと見せかけるため、送信元IPアドレスを10.20.1.2、送信元MACアドレスをMAC2と変換して送信する。
 送信パケットは、迂回路19を介してアダプタ17で折り返し受信される。アダプタ17は、受信したパケットをドライバ部25、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、アダプタ17が折り返し受信したパケットを、送信元である仮想マシンからのパケットとして受信する。
 (2)アダプタ17またはドライバ部25において、アドレス解決応答(ARP reply)を送信時、図44のように送信先IPアドレスを10.20.1.2から10.20.1.1に、送信先MACアドレスをMAC2からMAC1に、送信元IPアドレスを10.20.1.1から10.20.1.2に、送信元MACアドレスをMAC1からMAC2に変換する。
 即ち、アプリケーション21は、仮想マシンに対してアドレス解決応答を返す(S201)。
 この場合も、図44に示す変換前の設定のとおり送信先IPアドレスが自装置内ではないため、IP層24は、同じIPサブネットに属するドライバ部25にパケットを送出する(S202)。
 パケットを受信したアダプタ17またはドライバ部25は、アドレス変換モード(試験モード)か否かを判定し(S203)、アドレス変換モードであれば、図44のようにアドレスを変換し(S204)、パケットを送信する(S205)。なお、S203で、アドレス変換モードでなければアドレスを変換せずにパケットを送信する(206)。
 S204におけるアドレスの変換では、送信先が自装置内のアダプタ17となるように送信先IPアドレス及び送信先MACアドレスを図44のように変換する。
 また、S204におけるアドレスの変換では、送信元が所定の仮想マシンとなるように送信元IPアドレス及び送信元MACアドレスを図44のように変換する。図42に示したように、通信相手を仮想マシンと見せかけるため、送信元IPアドレスを10.20.1.2、送信元MACアドレスをMAC2としている。
 送信パケットは、迂回路19を介してアダプタ17で受信される。アダプタ17は、受信したパケットをドライバ部25、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である仮想マシンからのパケットとして受信する。
 (3)アダプタ17またはドライバ部25において、TCP/IPパケットを送信時、図45のように送信先のIPアドレスを10.20.1.2から10.20.1.1に、送信先のMACアドレスをMAC2からMAC1に、送信元のIPアドレスを10.20.1.1から10.20.1.2に、送信元MACアドレスをMAC1からMAC2に変換する。
 アドレス解決によって仮想マシンのMACアドレスを認識したアプリケーション部21は、仮想マシン宛にパケットを送出する(S301)。
 図37の変換前の設定のとおりアプリケーション部21が送出したパケットの送信先IPアドレスが自装置内ではないため、IP層24は、送信先IPアドレスと同じIPサブネットに属するドライバ部25にパケットを送出する(S302)。
 パケットを受信したアダプタ17Aまたはドライバ部25Aは、アドレス変換モード(試験モード)か否かを判定し(S303)、アドレス変換モードであれば、図45のようにアドレスを変換し(S304)、パケットを送信する(S305)。なお、S303で、アドレス変換モードでなければアドレスを変換せずにパケットを送信する(S306)。
 S304におけるアドレスの変換では、送信先が自装置内のアダプタ17となるように、パケット内の送信先IPアドレス及び送信先MACアドレスを図45のように変換する。
 また、S304におけるアドレスの変換では、送信元が所定の仮想マシンとなるように、パケットの送信元IPアドレス及び送信元MACアドレスを図45のように変換する。図42に示したように、通信相手を仮想マシンと見せかけるため、送信元IPアドレスを10.20.1.2、送信元MACアドレスをMAC2としている。
 送信パケットは、迂回路19を介してアダプタ17で受信される。アダプタ17は、受信したパケットをドライバ部25、IP層24、TCP層23、ストリームヘッダ22を介してアプリケーション部21へ送る。即ち、アプリケーション部21は、送信元である仮想マシンからのパケットとして受信する。
 -ユーザインタフェース-
 アドレス変換を行うモード、つまり試験モードに移行すること、および、そのモードを解除することは、ユーザがコマンドで指定するようにする。
 ここで、試験装置1は、図34の状態、即ち1台の試験装置1に1つのアダプタ17を搭載し、ドライバ部25がIPアドレスIP1=10.20.1.1と対応付けられている状態であるとする。
 この場合、アドレス変換モードへの移行は、ユーザが入力部15から、次のように指定する。
 > addrtrans1 -s ドライバ#1 10.20.1.2
 ここで、ドライバ#1はドライバ部25のドライバ名、10.20.1.2は仮想マシンのIPアドレスである。
 アドレス変換モードの解除は以下のように指定する。
 > addrtrans1 -d ドライバ#1
 アドレス変換モードへ移行後、送信先アドレスとして仮想マシンのIPアドレス(IP2=10.20.1.2)を指定して送信すると、図38のように、netperfコマンド21→ストリームヘッド22→TCP23→IP24→ドライバ25→アダプタ17→ドライバ25→IP24→TCP23→ストリームヘッド22→netserverデーモン21を経由した送信が実行できる。
 例えば、アドレス変換モードへ移行後に次のようにコマンドを実行する。
 > netperperf -H 10.20.1.2
  -アダプタでアドレス変換する場合のコマンドの実装-
 アダプタ17は、メモリ空間における所定の領域に、図47に示すアドレス変換レジスタを確保する。
 図47のアドレス変換レジスタは、現在設定されているモード、仮想マシンのIPアドレス、実マシン上のIPアドレス、仮想マシン上のMACアドレス、アダプタ上のMACアドレス等の項目を記憶する。なお、現在設定されているモードは、例えばアドレス変換モードであれば1、通常モードであれば0のように設定する。また、実マシン上のIPアドレスは、ドライバ25やアダプタ17のIPアドレスである。
 そして、addrtrans1 -sコマンドを実行した場合に、CPU12が以下の動作を行うこととする。
 まず、OSに備わっている既存のインタフェースで、アダプタ17のMACアドレスおよびIPアドレスを調べる。なお、MACアドレスやIPアドレスは、OSにより該アダプタ17に係るドライバ名と対応付けられてメモリ中に格納されている。
 次に仮想マシンにMACアドレスを割り当てる。その値をMAC2とする。ここで、仮想マシンのMACアドレスMAC2と、アダプタ17のMACアドレスMAC1が、それぞれユニークな値となるように割り当てる。
 仮想マシンのIPアドレスは、上記のようにaddrtrans1コマンドの引数で与えられているため、これで変換レジスタに書きこむべき値は全てそろったことになる。
 次に、アプリケーション部21は、図48のようにioctlによってドライバ部25に、アダプタ17のアドレス変換レジスタに書きこむべき値として、前記アダプタ17のMACアドレス、IPアドレス、および仮想マシンのMACアドレスを渡す。
 ドライバ部25は、そのioctlによる前記値を受けると、アダプタ上のアドレス変換レジスタのアダプタ上のMACアドレス、実マシン上のIPアドレス、仮想マシン上のMACアドレスのフィールドにそれぞれ書きこむ。
 例えば、”addrtrans1 -s ドライバ#1 10.20.1.2”が実行された場合、ドライバ部25からアダプタ17のアドレス変換レジスタに図49のように書きこむ。
 即ち、モードが1、仮想マシンのIPアドレスが10.20.1.2、実マシン上のIPアドレスが10.20.1.1、仮想マシン上のMACアドレスがMAC2、アダプタ上のMACアドレスがMAC1となる。
 そして、”addrtrans1 -d ドライバ#1”が実行されてアドレス変換モードが解除された場合、ドライバ部25からアダプタ17に対して、図50に示すように全ての値を0にクリアする。
 -ドライバでアドレス変換する場合のコマンドの実装-
 ドライバ部25は、アダプタの状態や、上位から指示された情報を保存しておくために“制御構造体”と呼ばれるデータの構造体を試験装置1上のメモリ13に保持している。
 この制御構造体内に、図47のアドレス変換レジスタと同等な情報を取り込む。これを“アドレス変換情報”と呼ぶことにする。
 ioctlによってドライバ部25へ、アドレス変換情報に書きこむべき値を渡す処理までは、図48においてアドレス変換レジスタに書きこむべき値を渡す処理と同様である。以下、アドレス変換情報の書き込み処理の詳細を説明する。
 ドライバ部25はioctlを受けると制御構造体の値を更新する。例えば、”addrtrans1 -s ドライバ#1 10.20.1.2”が実行された場合、ドライバ部25は、制御構造体のアドレス変換情報として図49の値を書きこむ。
 一方、”addrtrans1 -d ドライバ#1”が実行されてアドレス変換モードが解除された場合、ドライバ部25は制御構造体のアドレス変換情報を図50に示すようにクリアする。
 -アダプタでアドレス変換する場合のアダプタの実装例-
 図51は、通常モード時、即ち通常の通信を行う場合の状態を示したアダプタ17の機能ブロック図である。図51のようにアダプタ25は、送信キュー71、送受信器72、データ変換器73、受信キュー74を有する。
 一方、図52は、アドレス変換を行う場合の状況を示したアダプタ17の機能ブロック図である。
 試験モード時、即ち、アドレス変換して通信する場合、本実施例2では、図52に示すように、試験変換器75を用い送信キュー71と送受信器72の間でアドレスを変換する。
 本実施例2において、アダプタ17の各部の動作は、前述の実施例1の図28,29と略同じである。例えば、実施例1の図28,29では、一方のアダプタ17Aから送信し、ケーブルを介して他方のアダプタ17Bで受信している。これに対し、本実施例2では、アダプタ17から送信するパケットを迂回路19を介してアダプタ17自身で受信するため、変換するアドレスが異なるだけで、試験変換部75や送受信器72は、同じロジックで送信や受信の処理を行うことができる。
 以上のように、本実施例2によれば、試験装置1に搭載した一つのネットワークアダプタ17内で折り返してTCP/IPを用いた通信が行えるので、簡易な構成でネットワークアダプタ或はドライバの試験を行うことができる。

Claims (15)

  1.  少なくとも一つのネットワークアダプタが接続された試験装置であって、
     仮想アドレスを送信先アドレスとしてデータの送信を指示する送信アプリケーション部と、
     試験モードが設定されている場合、前記データの送信先アドレスを自装置と接続されたネットワークアダプタに割り当てられたアドレスに変換して、該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させるアドレス変換部と、
     前記変換後の送信先アドレスが割り当てられたネットワークアダプタを介して前記データを受信する受信アプリケーション部と、
     前記データの送信結果に基づいて試験結果を算出する算出部と、
    を備えた試験装置。
  2.  前記アドレス変換部が、試験モードの場合に前記データの送信元アドレスを仮想アドレスに変換する請求項1に記載の試験装置。
  3.  インターネットプロトコルに従って、前記データに前記送信先アドレスを付加したパケットを生成するパケット生成部を備えた請求項1又は2に記載の試験装置。
  4.  前記ネットワークアダプタが、送信するデータを該ネットワークアダプタ内で折り返して受信する機能を有し、試験モードの場合に一つのネットワークアダプタで前記変換後のデータの送信及び受信を行う請求項1から3の何れか1項に記載の試験装置。
  5.  前記試験装置に第一のネットワークアダプタと第二のネットワークアダプタが接続され、該第一のネットワークアダプタからデータを送信し、ネットワークケーブルを介して第二のネットワークアダプタで受信する場合に、
     前記アドレス変換部が、前記データの送信先アドレスを第二のネットワークアダプタに割り当てられたアドレスに変換する請求項1から3の何れか1項に記載の試験装置。
  6.  少なくとも一つのネットワークアダプタが接続された試験装置が、
     仮想アドレスを送信先アドレスとしてデータの送信を指示するステップと、
     試験モードの場合に前記データの送信先アドレスを自装置と接続された前記ネットワークアダプタに割り当てられたアドレスに変換して該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させるステップと、
     前記変換後の送信先アドレスが割り当てられたネットワークアダプタを介して前記データを受信するステップと、
     前記データの送信結果に基づいて試験結果を算出するステップと、
    を実行する試験方法。
  7.  試験モードの場合に前記データの送信元アドレスを仮想アドレスに変換する請求項6に記載の試験方法。
  8.  インターネットプロトコルに従って、前記データに前記送信先アドレスを付加したパケットを生成するステップを実行する請求項6又は7に記載の試験方法。
  9.  前記ネットワークアダプタが、送信するデータを該ネットワークアダプタ内で折り返して受信する機能を有し、試験モードの場合に一つのネットワークアダプタで前記変換後のデータの送信及び受信を行う請求項6から8の何れか1項に記載の試験方法。
  10.  前記試験装置に第一のネットワークアダプタと第二のネットワークアダプタが接続され、該第一のネットワークアダプタからデータを送信し、ネットワークケーブルを介して第二のネットワークアダプタで受信する場合に、
     前記データの送信先アドレスを第二のネットワークアダプタに割り当てられたアドレスに変換する請求項6から8の何れか1項に記載の試験方法。
  11.  少なくとも一つのネットワークアダプタが接続された試験装置に、
     仮想アドレスを送信先アドレスとしてデータの送信を指示するステップと、
     試験モードの場合に前記データの送信先アドレスを自装置と接続された前記ネットワークアダプタに割り当てられたアドレスに変換して該ネットワークアダプタ或は自装置に接続された他のネットワークアダプタに当該データを送って送信させるステップと、
     前記変換後の送信先アドレスが割り当てられたネットワークアダプタを介して前記データを受信するステップと、
     前記データの送信結果に基づいて試験結果を算出するステップと、
    を実行させるプログラム。
  12.  試験モードの場合に前記データの送信元アドレスを仮想アドレスに変換する請求項11に記載のプログラム。
  13.  インターネットプロトコルに従って、前記データに前記送信先アドレスを付加したパケットを生成するステップを実行する請求項11又は12に記載のプログラム。
  14.  前記ネットワークアダプタが、送信するデータを該ネットワークアダプタ内で折り返して受信する機能を有し、試験モードの場合に一つのネットワークアダプタで前記変換後のデータの送信及び受信を行う請求項11から13の何れか1項に記載のプログラム。
  15.  前記試験装置に第一のネットワークアダプタと第二のネットワークアダプタが接続され、該第一のネットワークアダプタからデータを送信し、ネットワークケーブルを介して第二のネットワークアダプタで受信する場合に、
     前記データの送信先アドレスを第二のネットワークアダプタに割り当てられたアドレスに変換する請求項11から13の何れか1項に記載のプログラム。
PCT/JP2008/061570 2008-06-25 2008-06-25 試験装置及び方法 WO2009157067A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010517632A JP5003821B2 (ja) 2008-06-25 2008-06-25 試験装置及び方法
PCT/JP2008/061570 WO2009157067A1 (ja) 2008-06-25 2008-06-25 試験装置及び方法
US12/968,883 US20110085451A1 (en) 2008-06-25 2010-12-15 Testing device and testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2008/061570 WO2009157067A1 (ja) 2008-06-25 2008-06-25 試験装置及び方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/968,883 Continuation US20110085451A1 (en) 2008-06-25 2010-12-15 Testing device and testing method

Publications (1)

Publication Number Publication Date
WO2009157067A1 true WO2009157067A1 (ja) 2009-12-30

Family

ID=41444144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2008/061570 WO2009157067A1 (ja) 2008-06-25 2008-06-25 試験装置及び方法

Country Status (3)

Country Link
US (1) US20110085451A1 (ja)
JP (1) JP5003821B2 (ja)
WO (1) WO2009157067A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013131476A1 (en) * 2012-03-07 2013-09-12 Tencent Technology (Shenzhen) Company Limited Service access method and device for conducting the same
JP2015039130A (ja) * 2013-08-19 2015-02-26 沖電気工業株式会社 冗長構成のネットワークインターフェースを備える通信装置及び導通確認方法
CN110460492A (zh) * 2019-07-12 2019-11-15 苏州浪潮智能科技有限公司 一种实现ocpa、ocpc网卡同时测试的装置及测试方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9374290B2 (en) * 2010-12-13 2016-06-21 Verizon Patent And Licensing Inc. System and method for providing TCP performance testing
JP6433146B2 (ja) * 2014-04-22 2018-12-05 キヤノン株式会社 情報処理装置、システム、情報処理方法、コンピュータプログラム
CN109787864A (zh) * 2019-01-25 2019-05-21 郑州云海信息技术有限公司 一种基于Netperf的网络自动测试方法、装置、终端及存储介质
CN116055371B (zh) * 2021-10-27 2024-04-02 成都鼎桥通信技术有限公司 通信模组性能测试系统及方法、上位机、介质和程序产品
CN114124773B (zh) * 2021-11-24 2024-01-23 北京天融信网络安全技术有限公司 一种端口块地址转换的测试系统及方法
US11863441B2 (en) * 2022-01-03 2024-01-02 Vmware, Inc. Methods and systems for generating data packets in smart network interface controllers

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1084384A (ja) * 1996-09-09 1998-03-31 Nec Commun Syst Ltd パケットデータ通信における負荷試験装置
JPH1188330A (ja) * 1997-09-12 1999-03-30 Nec Eng Ltd シミュレータ装置及びそれを用いたリモートメンテナンスシステム
JP2007129534A (ja) * 2005-11-04 2007-05-24 Digital Design Co Ltd データ通信方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10271143A (ja) * 1997-03-25 1998-10-09 Hitachi Ltd スイッチングhub対応フロー制御方式
KR20010057434A (ko) * 1999-12-23 2001-07-04 이계철 임의 가상망 생성에 기반한 라우팅 시험 방법
KR100385996B1 (ko) * 2001-09-05 2003-06-02 삼성전자주식회사 하나의 NIC(Network InterfaceCard)에 복수개의 IP 어드레스를 할당하는 방법 및이에 적합한 장치
US7440415B2 (en) * 2003-05-30 2008-10-21 Ixia Virtual network addresses
US7643431B2 (en) * 2006-11-10 2010-01-05 Ixia Distributed packet group identification for network testing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1084384A (ja) * 1996-09-09 1998-03-31 Nec Commun Syst Ltd パケットデータ通信における負荷試験装置
JPH1188330A (ja) * 1997-09-12 1999-03-30 Nec Eng Ltd シミュレータ装置及びそれを用いたリモートメンテナンスシステム
JP2007129534A (ja) * 2005-11-04 2007-05-24 Digital Design Co Ltd データ通信方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013131476A1 (en) * 2012-03-07 2013-09-12 Tencent Technology (Shenzhen) Company Limited Service access method and device for conducting the same
CN103312661A (zh) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 一种服务访问方法及装置
CN103312661B (zh) * 2012-03-07 2016-02-17 腾讯科技(深圳)有限公司 一种服务访问方法及装置
US9407600B2 (en) 2012-03-07 2016-08-02 Tencent Technology (Shenzhen) Company Limited Service access method and device for conducting the same
JP2015039130A (ja) * 2013-08-19 2015-02-26 沖電気工業株式会社 冗長構成のネットワークインターフェースを備える通信装置及び導通確認方法
CN110460492A (zh) * 2019-07-12 2019-11-15 苏州浪潮智能科技有限公司 一种实现ocpa、ocpc网卡同时测试的装置及测试方法

Also Published As

Publication number Publication date
US20110085451A1 (en) 2011-04-14
JPWO2009157067A1 (ja) 2011-12-01
JP5003821B2 (ja) 2012-08-15

Similar Documents

Publication Publication Date Title
JP5003821B2 (ja) 試験装置及び方法
JP4477613B2 (ja) AXIプロトコルを適用したNoCシステム
JP2003308262A (ja) ハードウェアプロトコルプロセシングロジックで実現されたインタネット通信プロトコル装置、及びその装置を用いたデータ並列処理方法
US20110106518A1 (en) System and method of network emlation for test of on-line server processing heavy traffic
US10372633B1 (en) Interconnection of peripheral devices on different electronic devices
US20030182440A1 (en) Network processor with high-speed transceiver
JP5091121B2 (ja) 埋め込み型システムのための高速データ処理・通信方法及び装置
JP2002111704A (ja) データ送受信装置及び方法
JP4754018B2 (ja) 経路データ収集方法、レイヤ2装置、キャリア網内装置及び経路データ収集装置
US6457079B1 (en) Communication apparatus with means for allocating alternate designation information to each function unit, and communication system with said two communication apparatuses
US11106359B1 (en) Interconnection of peripheral devices on different electronic devices
JP5309580B2 (ja) ネットワーク・プロセッサ
US7321938B2 (en) Data transfer apparatus, network system, and data transfer method
JP4519090B2 (ja) 送信装置、受信装置およびそれらの方法
JP4690294B2 (ja) Usb通信装置、usb通信装置の通信方法、及びusb通信装置のプログラム
JP3719253B2 (ja) データ受信ノード
JP3678238B2 (ja) データ転送方法
JP2003218887A (ja) 通信装置およびネットワークシステム
US20060104212A1 (en) Method of dynamically determining optimum size of buffer
JP3767578B2 (ja) データ送信ノード
JP3714341B2 (ja) データ転送方法
CN117667300A (zh) 计算系统及相关方法
JP2004328221A (ja) 通信制御方式、及び、通信機器、及び、記録媒体
JP2006094509A (ja) Ieee1394−イーサネット変換が可能な端末用アダプダ装置
JP2005204173A (ja) データ変換装置およびデータ変換方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08777586

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010517632

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08777586

Country of ref document: EP

Kind code of ref document: A1