[CALC] Streaming + bandwith calc

Sve u vezi mreža i povezivanja na Internet

Moderator: Urednik

Post Reply

Stalni član
Stalni član
offline

Posts: 47
Joined: 23 Dec 2011, 00:25

Post Napisano: 18 Jul 2012, 00:48


vjerujem da su se svi susretali sa ovim problemom pa da malo pojasnim.

Streaming:

192 KBps / 8 = 24 KB/s

24577 * 3600= 84 MB/h

Sto znaci da stream od 192 Kbps generise oko 84 MB za jedan sat.

Bandwith:

recimo da imamo 100 MBps. Koliko bi to bilo paketa ?
8300 * 1500 * 8 = 99.6 MBps

Kako napraviti ovako nesto ?

Na PC2:

Code: Select all

netsniff-ng -s -d eth0
na PC1 (saljemo 100 paketa da provjerimo rad):

Code: Select all

ping -c 100 -q -s 1472 -f <IP PC2> &  # << ovo cemo da vratimo u pozadinu

na PC2 (ctrl+c) dobijamo:

Code: Select all

captured frames: 203, captured bytes: 303016 [295 KB, 0 MB, 0 GB]

Ako ovo prodje ok, pokrenucemo nekoliko instanci pinga i to ovako:

Code: Select all

ping -q -s 1472 -f <IP PC2> & # (uradite nekoliko puta)
ili

Code: Select all

#!/bin/bash 
#-------------- scripta za testiranje
#za 1 GBps je broj 100 ok , za 100 mbps bi trebalo oko 20 
for i in {1..100}
do
   ping -q -s 1472 -f <IP PC2> >> /dev/null &
done
# 200 sek flooda
sleep 200 
killall -HUP ping
# pobij stoku
Kao sto vidimo , mozemo koristiti i ovako.
Na drugoj strani pokrecemo:

Code: Select all

netsniff-ng -s -d eth0
i kad odradi ping uradite sljedece:

CTRL+c i dobijete

Code: Select all

netsniff-ng 0.5.4.2 -- pid (1754)

nice (-20), scheduler (1 prio 99)
1 of 1 CPUs online, affinity bitstring (1)

No filter applied. Sniffing all traffic.

128.00 MB allocated for rx ring 
 [ 8192 blocks, 65536 frames ] 
 [ 8 frames per block ]
 [ framesize: 2048 bytes, blocksize: 16384 bytes ]

^Ccaught SIGINT! ... bye bye
203 frames incoming
203 frames passed filter
0 frames failed filter (due to out of space)
captured frames: 202, captured bytes: 302962 [295 KB, 0 MB, 0 GB]

A inace 100 MBps je 104 857 600 bytes
(104 857 600 / 1500) / 8 = 8 738.13333

mada je otp do 8300 packeta neki maksimum.

guglajte packet generatori: hping3, i sl
Last edited by qki on 18 Jul 2012, 19:27, edited 2 times in total.
Reason: BBkod.


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest