Google
 

Archive for April, 2007

2007-04
29

VOIP Call Bandwidth Consumption

Filed under: Tech articles — woojar @ 5:23 pm

In VOIP system,voice quality lies on your network bandwidth to a large extent. Every codec type has different codec rate. So it brings diffrent bandwidth consumption. In the following we can calculate each codec type bandwidth consumption.

Calculation Formula:

Total packet size = (L2 header: MP or FRF.12 or Ethernet) + (IP/UDP/RTP header) + (voice payload size)

PPS = (codec bit rate) / (voice payload size)

Bandwidth = total packet size * PPS
You also find different bandwidth consumption fast in the following table:

Codec Information

Bandwidth Calculations

Codec & Bit Rate (Kbps)

Codec Sample Size (Bytes)

Codec Sample Interval (ms)

Mean Opinion Score (MOS)

Voice Payload Size (Bytes)

Voice Payload Size (ms)

Packets Per Second (PPS)

Bandwidth MP or FRF.12 (Kbps)

Bandwidth w/cRTP MP or FRF.12 (Kbps)

Bandwidth Ethernet (Kbps)

G.711 (64 Kbps)

80 Bytes

10 ms

4.1

160 Bytes

20 ms

50

82.8 Kbps

67.6 Kbps

87.2 Kbps

G.729 (8 Kbps)

10 Bytes

10 ms

3.92

20 Bytes

20 ms

50

26.8 Kbps

11.6 Kbps

31.2 Kbps

G.723.1 (6.3 Kbps)

24 Bytes

30 ms

3.9

24 Bytes

30 ms

34

18.9 Kbps

8.8 Kbps

21.9 Kbps

G.723.1 (5.3 Kbps)

20 Bytes

30 ms

3.8

20 Bytes

30 ms

34

17.9 Kbps

7.7 Kbps

20.8 Kbps

G.726 (32 Kbps)

20 Bytes

5 ms

3.85

80 Bytes

20 ms

50

50.8 Kbps

35.6 Kbps

55.2 Kbps

G.726 (24 Kbps)

15 Bytes

5 ms

60 Bytes

20 ms

50

42.8 Kbps

27.6 Kbps

47.2 Kbps

G.728 (16 Kbps)

10 Bytes

5 ms

3.61

60 Bytes

30 ms

34

28.5 Kbps

18.4 Kbps

31.5 Kbps

In details,you can check the cisco website: http://www.cisco.com/en/US/tech/tk652/tk698/technologies_tech_note09186a0080094ae2.shtml


Technorati :

2007-04
28

公司网络流量控制

Filed under: Tech articles — woojar @ 7:36 pm

近来公司上网很慢,查看一下出口流量,2M的流量几乎占満。查看一下防火墙LOG,发现P2P的下载有很多,难怪会很慢。我分析了一下有以下的几种流量在占用出口带宽

1.用Emule,eDonkey,BT等p2p软件下载
2.用迅雷下载
3.FlashGet等正常下载软件下载
4.浏览网页,收发mail等

故对前两种流量的限制是解决问题的关键,对前两种流量的限制可用以下几种途径来解决

1.在公司的cisco 3550上做端口限速,QoS等
2.在公司流量出口之前加一台LINUX Router, 在其上做iptables + ipp2p 的限定
3. 在公司Netscreen 100上做policy,限制前两种的流量

经过分析以后,我们知道,对于第一种解决方案,我们对每个VLAN进行限速从而达到出口的解压。这样做虽然出口缓压了,但每个VLAN很容易达到上限,只要每个VLAN有一个在用前两种的软件在下载,其他的立刻会感受到网络很慢。所以这个方案不能从根本上对前两种的下载做限制。对于第二种方案,我没有去部署,只是觉得外国人在linux上开发的ipp2p虽然对一些知名的p2p软件能够限制,但对国人开发的迅雷却不一定有用,因为迅雷不仅仅是通过p2p来下载,所以这种方案由于实施起来有点麻烦(还要在前面加台主机),暂不采用。对于第三种方案,由于是在固有的设备上做限制,实施起来会容易些。

由于P2P软件下载时,基本上不用http的80端口,所以我们在防火墙上只允许我们需要的流量的通过,其它的不需要的TCP,UD主P流量则全部屏蔽掉。这样做确实限制了大部分的P2P流量,但一些迅雷下载却不能阻止。因为,迅雷软件在启动下载的时候,它会连接它自己的服务器进行资源搜索,之后可以同时对几个站点进行HTTP 80下载,这样的流量还是很大。经过抓包发现,它连的这些迅雷服务器的地址一般都210.22.12.0/24范围之内,于是我封了对这些IP地址的访问。用迅雷试了一下,果然只有一个资源在下载。

从而搞定收工。


Technorati :

2007-04
28

居然我也炒股了

Filed under: 闲言碎语 — woojar @ 6:02 pm

沪市由两三年前的1000点以下到现在的3700多点,最高突破到3800点。个股有几倍的增长,大部分的股民赚得不少。同事去开户了,我也图个新鲜,去中投法华镇路开了个沪深A股的账户。

开户流程: 1.拿身份证到证券营业部开户,领取股东卡。深沪两市开户费共90元(交易额达50000时退还)2.设立对应的股市资金账户(此账户号码登录网上交易系统要用到)3.到对应的银行开设第三方托管银行账号,此账号充钱用于向资金账户转账,以前有银证通,现在好象不符合规定而取消。开此银行卡最好同时开通网上银证转账功能。

查看股市行情软件:常用的有大智慧,同花顺等

炒了两天股赚了两块多钱,结论:短线炒股还是挺累的。不管怎么样,中国的股市正在走向正规化,大量的散户资金拥入可使近段股市不会下降太厉害,所以钱放在银行不如放在股市里(当然要投一些国有大企业,做长线投资)。有空多了解些财经方面的信息还有用的,但切记,工作第一,炒股只能算业余。


Technorati :

2007-04
28

Woojar theme changed

Filed under: 闲言碎语 — woojar @ 5:38 pm

My web space have been successfully revised on theme. Simple at structure, as well as color. The background color is #F5F5F5. Maybe called smoke color.

Revise Cause: The former theme is dynamic width on text area, which make wordpress’ sidebar to the end of pages if inputing longer text lines. Additionally, the former color layout is not preferable to me.

After Revise: Sympleness is still my persistent principle.


Technorati :

2007-04
20

Recover MySQL Database root password

Filed under: Tech articles — woojar @ 10:34 am

By default, MySQL Server will be installed with root superuser without any password. You can connect to MySQL server as root without requiring password or by keying in blank password. However, if you have set the password for root and forget or unable to recall the password, then you will need to reset the root password for MySQL.

Login as root to the Unix-like (Unix, Linux or BSD) machine with the MySQL server.

Stop the MySQL server by using either of the following command

#/etc/init.d/mysql stop

Now you need to Start MySQL server without password

# mysqld_safe --skip-grant-tables &

Connect to mysql server using mysql client with the following command

# mysql -u root

Now you should be having mysql prompt

mysql>

Now you need to Setup new MySQL root user password

mysql> use mysql;

mysql> update user set password=PASSWORD(”newrootpassword”) where user=’root’;

mysql> flush privileges;

mysql> quit

Note: Replace newrootpassword with the new root password for MySQL server. Flush Privileges is needed to making the password change effect immediately.

Now you need to Stop mysql with the following command

# /etc/init.d/mysql stop

Test Your New Mysql root password

First you need to start mysql server using the following command

# /etc/init.d/mysql start

# mysql -u root -p

Now it will prompt for root password and enter your new root password


Technorati :

 Page 1 of 2  1  2 »
28 queries. 4.108 seconds. Powered by WordPress
沪-ICP备07003363号 Stat.