Difference between revisions of "Nc: mengukur bandwidth"

From OnnoWiki
Jump to navigation Jump to search
(New page: You can do pretty much the same thing with plain old nc (netcat) if you're that way inclined. On the server machine: nc -vvlnp 12345 >/dev/null And the client can pipe a gigabyte of zero...)
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
You can do pretty much the same thing with plain old nc (netcat) if you're that way inclined. On the server machine:
+
Topologi:
  
nc -vvlnp 12345 >/dev/null
+
* Sebuah Server (misalnya 192.168.0.1)
 +
* Sebuah Client (misalnya 192.168.0.x/24)
 +
* tersambung melalui jaringan
 +
* port 12345
  
And the client can pipe a gigabyte of zeros through dd over the nc tunnel.
 
  
dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
+
== Di Sisi Server==
  
As demod:
+
Di mesin server (192.168.0.1)
  
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
+
nc -vvlnp 12345 >/dev/null
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
 
1024+0 records in
 
1024+0 records out
 
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s
 
  
The timing there is given by dd but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time call.
+
==Di Sisi Client==
  
Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.
+
Di sisi client kirim gigabyte zero melalui dd lewat nc tunnel
  
 +
dd if=/dev/zero bs=1M count=1K | nc -vvn 192.168.0.1 12345
 +
 +
Waktu demo akan keluar kira-kira
 +
 +
Connection to 192.168.0.1 12345 port [tcp/*] succeeded!
 +
1024+0 records in
 +
1024+0 records out
 +
1073741824 bytes (1,1 GB) copied, 41,3228 s, 26,0 MB/s
 +
 +
Perhatikan bahwa hasilnya dalam megabyte per detik. Bandwidth sebenarnya dikali 8,
 +
 +
8 x 26.0 MB/s = 208 Mbps
  
 
==Referensi==
 
==Referensi==
  
 
* http://askubuntu.com/questions/7976/how-do-you-test-the-network-speed-betwen-two-boxes
 
* http://askubuntu.com/questions/7976/how-do-you-test-the-network-speed-betwen-two-boxes
 +
 +
 +
==Pranala Menarik==
 +
 +
* [[Internet Offline: Ukur Bandwidth]]

Latest revision as of 19:08, 30 March 2022

Topologi:

  • Sebuah Server (misalnya 192.168.0.1)
  • Sebuah Client (misalnya 192.168.0.x/24)
  • tersambung melalui jaringan
  • port 12345


Di Sisi Server

Di mesin server (192.168.0.1)

nc -vvlnp 12345 >/dev/null

Di Sisi Client

Di sisi client kirim gigabyte zero melalui dd lewat nc tunnel

dd if=/dev/zero bs=1M count=1K | nc -vvn 192.168.0.1 12345

Waktu demo akan keluar kira-kira

Connection to 192.168.0.1 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1,1 GB) copied, 41,3228 s, 26,0 MB/s

Perhatikan bahwa hasilnya dalam megabyte per detik. Bandwidth sebenarnya dikali 8,

8 x 26.0 MB/s = 208 Mbps

Referensi


Pranala Menarik