0

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?)

1
  • 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, 2013 at 21:31

2 Answers 2

0

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 :)

1
  • 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, 2013 at 17:39
2

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .