Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Go Back  Xtreme Visual Basic Talk > > > Measuring the bandwidth i am recieving from my ISP


Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2006, 07:41 AM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default Measuring the bandwidth i am recieving from my ISP


I am a beginner to VB.Net and am about to undertake a small project in which i have to measure the bandwidth i am recieving from my ISP to see if i am recieving their advertised bandwidth.

I understand that i will have to use sockets, I have looked on the microsoft MSDN site and other sites on the net and come to the conclusion that my application will have to.

1)Perform DNS lookup of my ISP server
2)Send a large packet of data to it ECHO port (port 7) using UDP
3)Measure the time it takes to receive the echo'd packet.

Here is a sample code for DNS lookup.

DNS lookup

Imports System
Imports System.Text
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports Microsoft.VisualBasic

Public Class GetSocket

Private Shared Function ConnectSocket(server As String, port As Integer) As Socket
Dim s As Socket = Nothing
Dim hostEntry As IPHostEntry = Nothing

' Get host related information.
hostEntry = Dns.Resolve(server)

' Loop through the AddressList to obtain the supported AddressFamily. This is to avoid
' an exception that occurs when the host host IP Address is not compatible with the address family
' (typical in the IPv6 case).
Dim address As IPAddress

For Each address In hostEntry.AddressList
Dim endPoint As New IPEndPoint(address, port)
Dim tempSocket As New Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp)

tempSocket.Connect(endPoint)

If tempSocket.Connected Then
s = tempSocket
Exit For
End If

Next address

Return s
End Function

I am unsure of how i am going to send the large packet of data and of how i am going to time it.


Am i going in the right direction?

if not can you guide me a little - I must stress i am a beginner and am learning the language.

Craig
Reply With Quote
  #2  
Old 01-26-2006, 02:35 PM
excaliber's Avatar
excaliberMeasuring the bandwidth i am recieving from my ISP excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

Technically, by sending a Ping packet to the Echo port, you are timing latency, not bandwidth. Latency is the time it takes to complete a single round trip (from you to them and back)

Bandwidth is the amount of data transferred per second. A better test of bandwidth would be downloading a large file on the internet (like a movie or large image) and timing that. Once it is done downloading, you can measure bandwidth by (file size / time).
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
  #3  
Old 01-26-2006, 04:35 PM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default

Quote:
Originally Posted by excaliber
Technically, by sending a Ping packet to the Echo port, you are timing latency, not bandwidth. Latency is the time it takes to complete a single round trip (from you to them and back)

Bandwidth is the amount of data transferred per second. A better test of bandwidth would be downloading a large file on the internet (like a movie or large image) and timing that. Once it is done downloading, you can measure bandwidth by (file size / time).
That would envolve me knowing where the exact file is.

I wanted to create an application that could be used for any ISP, where the user entered their ISP and then the the apllication measures the bandwidth that they are recieving.

This way the application could be executed on multiple PC's with different ISP's. I could then produce a list of the most reliable ISP's.

Craig
Reply With Quote
  #4  
Old 01-26-2006, 06:20 PM
excaliber's Avatar
excaliberMeasuring the bandwidth i am recieving from my ISP excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

Echo ports are often disabled on servers as it is a fairly useless service. ISP's might also become irritated if you pound their echo port with useless data. Your way will work, but it might not work in all situations though.

Downloading a known file on the internet is a reliable, often used method of testing bandwidth. Many bandwidth testing sites use this approach.

Whatever works though. Either method should give you results.
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
  #5  
Old 01-27-2006, 03:05 AM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default

If i use a known file on the internet certain ISP's will gain advantage over other ISP's because of their geographic location and i want to create a fair test. (With some ISP's a packet will incur more hops than others)

Would the results differ greatly between methods?

Craig
Reply With Quote
  #6  
Old 01-27-2006, 11:00 PM
excaliber's Avatar
excaliberMeasuring the bandwidth i am recieving from my ISP excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

Perhaps a small average, on the order of a few milliseconds. Geography plays very little, unless you are on a backwater connection. Then it doesn't really matter anyway, because your backwater connection is the only one you can get.

However, consider this. True performance is measured by real world experience. Using the internet, streaming, downloading. I know for a fact the connection from my house to my ISP is good. It could even be OC3 fiber optic cable. But if the connection from the ISP to the rest of the world is slow, the performance is terrible.

Measuring the latency of data sent solely to your ISP will only measure the ability your ISP has to send data to you on that last hop. If they have a terrible backbone and can't receive data quickly from the internet itself, it doesnt matter how fast they can pump it from their headquarters to your house. Measuring a known quantity on the internet adds a real world element that will give much truer results, in my opinion.
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
  #7  
Old 01-28-2006, 02:52 AM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default

True, thats worth considering.

How hard do you think it would be to code such an application that would download from from a specific place and measure the bandwidth.

I'm going to have really look into the use of Sockets i've never used them before.

Thanks

Craig
Reply With Quote
  #8  
Old 02-01-2006, 02:28 AM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default

I could measure both.

That way i will get an indication of the full ability of my ISP and an indication of the ISP backbone for a real world figure.

Craig
Reply With Quote
  #9  
Old 02-02-2006, 03:08 AM
W_Garabrandt W_Garabrandt is offline
Centurion
 
Join Date: Mar 2004
Location: Altoona, PA USA
Posts: 139
Default

Quote:
Originally Posted by Heple
That would envolve me knowing where the exact file is.

I wanted to create an application that could be used for any ISP, where the user entered their ISP and then the the apllication measures the bandwidth that they are recieving.

This way the application could be executed on multiple PC's with different ISP's. I could then produce a list of the most reliable ISP's.

Craig
what you would be doing here is measuring your UPLOAD speed, now DOWNLOAD. It's best to do both, and you can do this easily here:
http://www.dslreports.com/stest/
(another user just asked the same question in this forum as well...)
Reply With Quote
  #10  
Old 02-02-2006, 03:21 AM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default

Thanks that site will be extremely useful to compare the results from my application for reliability and consistency.

Cheers

Craig
Reply With Quote
  #11  
Old 02-02-2006, 05:57 AM
Heple Heple is offline
Newcomer
 
Join Date: Jan 2006
Posts: 7
Default

I just spoken to my University lectuere who's assigned me this project and he says his favourable method would be to develop a component that will sit on your ISP's web server that acts as a file transmitter (if you like); so that when you load the web page on you client machine and set the required download file size, the component then transmits that file to client whilst monitoring the data rate?
Reply With Quote
  #12  
Old 02-02-2006, 06:41 AM
excaliber's Avatar
excaliberMeasuring the bandwidth i am recieving from my ISP excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

What you are describing is essentially the same idea, except more complicated. You could just place a large file (such as a really big movie, large text file, whatever) on your webserver. Download that file and measure the various aspects (size, time, etc).

No need to write a 'file transmitter' script on top of the web server. You can use the web server itself as a file transmitter. You could make a script that adjusts the download size and pipes out data. It would allow customizability in size of download, but strictly speaking isn't nescessary.\

__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
  #13  
Old 02-02-2006, 12:00 PM
W_Garabrandt W_Garabrandt is offline
Centurion
 
Join Date: Mar 2004
Location: Altoona, PA USA
Posts: 139
Default

Quote:
Originally Posted by Heple
I just spoken to my University lectuere who's assigned me this project and he says his favourable method would be to develop a component that will sit on your ISP's web server that acts as a file transmitter (if you like); so that when you load the web page on you client machine and set the required download file size, the component then transmits that file to client whilst monitoring the data rate?
Well, if that is what you want to do, all I can recommend is making sure you use random data, and not a pattern. You don't want compression affecting your measurements.. Also, use the biggest packet size the connection will put through without fragmenting them, so decrease overhead...

Good Luck.
__________________

I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
 
Measuring the bandwidth i am recieving from my ISP
Measuring the bandwidth i am recieving from my ISP
 
-->