Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: Network Duplex speed test

by melora (Scribe)
on Oct 01, 2003 at 16:56 UTC ( [id://295692]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Network Duplex speed test
in thread Network Duplex speed test

Looks like a handy bit of code. I'm trying to use it on our dinky LAN, just testing and hoping to do some benchmarking and learning more about network programming in Perl. However, I'm getting errors from the recv() calls - they are resulting in undefined $remote. I'm giving the program IP addresses on our local LAN (e.g. 10.0.0.20), ones that I can successfully ping. Where do I go from here? (ooh, I opened myself up that time). melora

Replies are listed 'Best First'.
Re: Re: Re: Re: Network Duplex speed test
by melora (Scribe) on Oct 01, 2003 at 20:11 UTC
    Never mind, I found it. The size (10240) used to make up a message was larger than the SIZE 1500 used to specify the maximum length of a message. Thanks for a handy piece of code! melora
      The value of $datasize is deliberately larger than SIZE. This is because the mtu on ethernet (max transmission unit) is 1496 bytes. By setting the packet size larger, you are forcing fragmentation which means you're more likely to get a correct response (since at half duplex the frags tend to collides and thus don't reach the remote host).
      I'd check it against a host you've deliberately set to half duplex, just to make sure it works if you've changed that behaviour.
      Glad it proved useful though.
        That's interesting. I couldn't get it to work at all at the lower size. Sorry, more specifically: I get "Unknown error at pingsniff.pl at line 132" (the recv call, for each call). When I upped the SIZE it started working. (didn't capitalize for emphasis, the constant is caps.) Hmm. Some kind of problem where the incoming packet is bigger than the maximum size anticipated. "Unknown error" is frustrating; doesn't tell enough about what happened. Well, thanks yet again for your help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://295692]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-29 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found