Erjing’s Blog

July 3, 2006

netflow cflow Netstream…名字可真多。

Filed under: 计算机与 Internet — erjing @ 11:14 am
netflow — cisco
cflow –juniper
netstream –Huawei
大家都知道netflow,很多cisco的router ios都带这个。不过,如果是交换机呢?如果是其他厂家的设备呢?
据我了解:
cisco 3560g,好东西吧?很多人用它直接作汇聚的,可惜…不支持netflow….
cisco 4507r ,这个大家会认为一般都支持吧?可是,即便是引擎V了,还是要加netflow 卡,这个卡和line card不太一样,是一个很小很小的卡,是直接安装在引擎上的。IV以上的引擎才支持。
不知道有没有让iso直接支持的方法,我估计4507 333的cpu够呛。
Huawei 3900系列,我从第一天开始用Huawei的3900就对Huawei….算了不说了,总之给大家建议,Huawei s3900系列的交换机,做cdma网可能比较适合。如果预算能加5000RMB,还是cisco 3560好了。Netstream功能只有在华为的高端机上才有。
cflow,没有研究过,因为还没有用到Juniper的高端。
这篇文章没有中心思想,我想给公司的网络作个流量监控,其中包含一个s3900下面带4个s3000的Huawei网络,由于出口被Wanjet编码了,所以无法使用ntop或者flowtools,在找解决办法的时候了解了这些。目前看来我的唯一出路是打开ntop的snmp支持….还没用,估计packges的分析肯定是没有了。
没准哪天,总结出来了再写。
CISCO支持netflow的supervise是II+plus III IV V,II不支持。

摘录,如何在centos下安装rrdtools.建立cacti用户必看。

Filed under: 计算机与 Internet — erjing @ 8:25 am
最近在公司添加流量监控系统,cati自然是首选。
不过,公司有规定公司IT必须使用redhat as4,由于长时间使用centos,养成了一点点地懒惰…所以,我直接把yum给安装到redhat as4里面去了:P
然后就是按照下面的文章,添加一个源,哈哈,想不到早有人帮我编译好了。哎,大家是不知道,rrdtool在as4下安装需要升级多少pack……
以下是摘录,yum源含内:
摘录自:http://www.hornfordassociates.com/pages/documents/howto/linux/smb_infrastructure_howto-rrd.html
RRD & RRDtools Installation
CentOS    Debian
CentOS Steps
This How-to assumes the server is being built to a standard configuration using Webmin as a primary management interface.  In all cases RPMs are used. If you do not use Webmin skips the steps covering navigation within Webmin.
Dag Wieer’s RPM Repository
The best source for RPMs not part of the CentOS RPM repository is Dag Wieers’ RPM repository system. He has a great how-to on his web-site that was used to build this section. Have a look at it.
1. Import the GPG key for Dag’s site. This helps limit the possibility of installing RPM’s from Dag’s site that are not official.
    * Open Webmin console in browser
    * Select Other Tab
    * Select Command Shell
      In the execute command box type:
      rpm –import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
      Click Execute
2. Create a link to Dag’s repository for Yum. Dag might update applications ahead of Red Hat, which drives the CentOS update cycle. So use includepkgs to limit Dag’s repository to applications you specifically want it used for.
    * Select Other Tab
    * Select the File Manager
      Note: Java must installed on your desktop for this to function, and you will likely have to accept the Certificate for your server.
    * Navigate to:
      /etc/yum.repos.d/
    * Create a new file called: dag.repo
    * Enter the text below in the new file & save
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
includepkgs=rrdtool perl-rrdtool
3. Install the RRDtools rpm.
    * Select Services Tab
    * Select Software Packages
    * At the bottom, select the Upgrade Button
      With Yum this is a serious limitation of Webmin. There is no way to simply update the Yum directory. The issue goes away if APT is used with Webmin, and is a limitation of Webmin. Switching to Apt is beyond the scope of this how-to.
    * Enter perl-rrdtool into the ‘Package from Yum’ box. This will automatically install rrdtool, which perl-rrd-tool is dependent upon.
      Rperl-rrdtool installation screenshot
      The ‘from ftp or http’ box above enables installation directly from Dag’s repository. Following that path is quick and easy, but does not enable automatic notification of updates.
Debian Steps
This How-to assumes the server is being built to a standard configuration using Webmin as a primary management interface.  In all cases .deb files from official repositories are used. If you do not use Webmin skips the steps covering navigation within Webmin.
Debian & Keeping Current
One difficulty with Debian is the past tendency of stable to slowly drift out of step with current application versions. The scope of the organizational, procedural and policy issues that lead to the drift are beyond the scope of this Cookbook How-to and represent the greatest threat to Debian’s longevity.
At time of Writing (August 2005) the Debian RRDtool package in ’stable’ and ‘testing’ are at version 1.0.49-1, and ‘unstable’ at 1.2.11-0.2. RRD released 1.2. in April 2005. If you need features of RRDtools 1.2 you will need to install RRDtool from ‘unstable’ or ‘testing’. While Debian ‘unstable’ & ‘testing’ are very stable operating systems you need to understand both are subject to significant change and that security updates are not managed by Debian’s security team.
You will increase your TCO operating Debian ‘unstable’ and ‘testing’ in a production environment.
Installation for Debian
Installation in Debian is easy with the package included in the main repository.
    * Open Webmin
    * Select Services Tab
    * Select Software Packages
    * At the bottom, select the Update Button
      This step is is only necessary if you have not updated your system recently.
    * Debian maintains two key RRDtool packages, rrdtool and librrds-perl. In most cases you will need librrds-perl to support other applications that use RRDtool.
    * Enter librrds-perl into the ‘Package from Apt’ box. This will automatically install any other packages that are required.
For questions, comments or a discussion of our choices please use the contact button below.

July 2, 2006

fortigate的日志。

Filed under: 计算机与 Internet — erjing @ 7:19 pm
以前一直用pix的,这次换了fortigate,发现也是很好用:)
首先修改
/etc/sysconfig/syslog
将里面的参数
SYSLOGD_OPTIONS=" -m 0"
添加一个"-r"
这样syslog就可以从别的主机接收syslog了。
然后修改/etc/syslog.conf
添加
local5.*                                                /var/log/gw/XXXX.log
如果问我为什么是local5.*,因为我的4.*给华为的设备了,7.*给cisco的设备了。
没有办法,syslog就支持这么点。
为了日志分割,又加了一句在crontab里:
59 11 *** split.sh
split.sh内容如下:
#!/bin/sh
/bin/cp -f /var/log/gw/14sha-defaultgw.log /var/log/gw/history/`date  +%m%d%Y`.log;
/bin/echo > /var/log/gw/14sha-defaultgw.log;
/usr/bin/bzip2 -qf /var/log/gw/history/*.log
看上去是不是很麻烦?不过,为了保证在处理的时候不丢失数据,我想cp因该是最安全的方法。
虽然i写的有点垃圾,呵呵。足够了。

Powered by WordPress