LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   No packetloss over Ethernet in Linux network? (https://www.linuxquestions.org/questions/linux-networking-3/no-packetloss-over-ethernet-in-linux-network-114394/)

bluefiord02 11-10-2003 07:58 AM

No packetloss over Ethernet in Linux network?
 
Hi,

I have a network of two linux computers (processors i586 and i686) connected back to back. Both are equipped with 3com 100Mbps ethernet cards using which they are connected. I am trying to find the performance of Ethernet. I send huge messages as frequently as send() would allow. When I check using 'ifconfig', always 'dropped packets' are zero.

I tried increasing message size. Even 100k bytes, the loss is zero. I am using sockets to make the applications. I tried both TCP sockets and UDP sockets. The result is the same.

Is there some other way to find out loss? Is packet loss somehow prevented in OS level?
(Linux on the computers is 2.4.18)

thanks

zaphodiv 11-10-2003 08:19 AM

Packet loss in ethernet occours due to packet collisions or random bit errors. The signal to noise ratio of the links should be high enough for random bit errors to be one in a few billion.

I take it you are using a crossover cable?
It that case there probably isn't any packet loss.
There are sperate twisted pairs for the data going in each direction so their are no collisions.
When the link is at maximum capacity the data waits in operating system buffers and when the buffers are full the program sending data has to wait.

Plug and unplug the cable a few times while sending lots of data and you might see some packet loss.

bluefiord02 11-10-2003 08:57 AM

Thanks a lot for the response.

Yes, I am using cross over cable. Now I get it.
IS there someway, I connect the computers back to back and still see packet loss?

zaphodiv 11-10-2003 09:08 AM

You could buy a hub but that would not be back to back so;

Make a crossover cable with untwisted bell wire or

Buy 1000metres of unscreened cable and make a very long crossover cable.
Uncoil it all so it has more chance of picking up interference.

Get an amateur radio license and set up a 1500watt radio transmitter nearby.

Build a tesla coil and create artifical lighting in the area.

Make firend with some computer support people and ask if they
have any broken networks cards you can have.

Get some squirrels to chew on the network cable.

Looking_Lost 11-10-2003 09:12 AM

Sorry for having a chuckle, the question "why on earth would you want to..." entered my head.

bluefiord02 11-10-2003 09:46 AM

:) Thanks for the good laugh.

Like I said, I am doing performance measurements for Ethernet. Thats why I am interested to know loss vs network load etc. Especially because I am comparing ethernet with other network technologies like ATM. I can see loss in other cases nicely, but not in ethernet. Thats the problem, you see.

Hubs also allow half duplex talk and not cause any collision, as I understood it?

zaphodiv 11-10-2003 10:25 AM

>I can see loss in other cases nicely, but not in ethernet.

A value of zero over your test timescale is a valid and correct measurement.
You can compare the figure of zero to whatever figure you get for other technologys.

Of course you can only draw a conclusion that a six foot ethernet link using a crossover cable is better or the same as some other technology.

If you want a figure for packet loss for ethernet with longer cables, or with
switches or hubs then you have to actually test that setup.

Since packet loss occours unpredictably you can use the mathematical techniques of statistics to calculate that your value of zero actually means
that you have 99% confidence that the packet loss rate of ethernet is below some small value.

If you want a number other than zero for a crossover ethernet link then you will have to run the test for years so that the effect of cosmic rays, lightening and other such events can been seen.


As for hubs, yes you get ocassional collisions on a hub with two computers.

Edit: spelling

bluefiord02 11-11-2003 03:33 AM

Yes, I agree. But here, having separate links in both directions somehow 'overrides' (not sure its the right word) the medium access property of ethernet ? It seems like the reality is hidden. The results from this network of mine cannot be generalized to a 'practical' network?

Another question, this is not directly related to the original question.

Can I make a cross over cable work in half duplex mode, I mean can anything be done from OS level or NIC driver level or even physically at the NIC/link ? This has nothing to do with the loss thing I was asking earlier. I want to check if a 'ping-pong' delay result would be affected by a half duplex link. (My OS is redhat 2.14.8)

thanks again


All times are GMT -5. The time now is 05:52 PM.