Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to send a file from my local computer to my local computer through the network? (Linux prefered)

It must use the network because my goal is to check the transfer speed. I don't use two distinct hosts because I only have one computer. Does this test make any sense at all? (Or will Linux be clever and realize it can just copy the file locally because it's one and the same?)

share|improve this question
    
Please give us additional details about your setup: Does your computer have multiple NICs? Can you configure NIC to assign several IPs to a given one? –  jap1968 Jun 1 '13 at 21:31

2 Answers 2

up vote 0 down vote accepted

It might be possible to install a virtual machine using something like oracle virtual box.

Then change the virtual box's network settings to use a bridged adapter, it will then be assigned an ip by dhcp (or you can give it a static ip on your network whatever way you work your addressing).

Then set up a shared folder and then transfer files across.

I think that this should cause the data to take the 'scenic route'. You could use something like SCP to transfer and measure rate - or many other methods.

This might also be a bit of an extreme solution for your setup :)

share|improve this answer
    
Thank you, that did the trick. I thought of using a VM but I didn't think it could really be considered independent from its host on the network, but apparently "bridged adapter" mode does that. –  Ranzal Jun 9 '13 at 17:39

Well, a network is usually made up of two or more nodes, and a node is a system that originates, routes or terminates data. While you might have a switch or router as part of your local network, these devices do not originate or terminate (usefully) much data themselves. Furthermore, while you can make a linux system a member of multiple networks, inherently, it becomes directly connected to each separate network, such that any attempt to establish a network connection from one network address to another network address that exist on the same host would, by design, be routed by the operating system kernel back to itself before it even made it to a NIC.

There are ways to trick a system into not being able to tell that it's connecting back to itself, but these tricks require the participation of a remote router or system to perform a network address translation of a kind that isn't commonly found on small office/home office networking devices, although linux can do it, but not by itself on one system without encountering the inherent problems I mentioned above.

The main problem, however, is that your requirement to 'test the network', is not defined. What network are you trying to test? Is it your networking code? To my knowledge, if your code will send and receive data over the loopback address (127.0.0.1), in a way that does not concern itself with low-level networking attributes such as packet size, or flow rates and the like, then it will also work between two separate hosts that have the same code base. However, if the networking you wish to test encompasses more than code, then you have to define of what exactly that network consists, and for most foreseeable scenarios, there'll have to be a second system (a linux box is probably the least expensive) to broker the far end of the test network.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.