各品牌网络设备SNMP及NetFlow配置集

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一、JUNIPER设备

1.Snmp的配置

set system static-host-mapping E450 inet 192.168.1.45

set system syslog user * any emergency

set system syslog host E450 any any

set system syslog host 192.168.1.251 any any

set snmp community net123 authorization read-write

set snmp community net123 clients 192.168.1.251

set snmp community net123 clients 192.168.1.251

set snmp community net123 clients 0.0.0.0/0

set snmp trap-group version all

set snmp trap-group authentication chassis configuration link remote-operations rmon-alarm routing startup vrrp-events

set snmp trap-group targets 192.168.1.45

set snmp trap-options source-address lo0

set routing-options options syslog level emergency alert critical error warning notice info debug commit

Flow配置

set firewall filter gd-ipnet-m160-1 term net123 then sample

set firewall filter gd-ipnet-m160-1 term net123 then accept

set interfaces ge-4/1/1 unit 0 family inet filter input net123 "在ge-4/1/1口上对input包作采样

set interfaces ge-4/1/1 unit 0 family inet filter output net123 "对output包作采样

set forwarding-options sampling input family inet rate 1000 "采样率为1000

set forwarding-options sampling input family inet run-length 0

set forwarding-options sampling output cflowd 211.139.136.108 port 3055 "接受NetFlow采样包的目的主机为211.139.136.108

set forwarding-options sampling output cflowd 211.139.136.108 version 5

set forwarding-options sampling output cflowd 211.139.136.108 no-local-dump

set forwarding-options sampling output cflowd 211.139.136.108 autonomous-system-type origin "origin和peer选一

commit

"在这里,sampling_rate=(run_length+1)/rate,

" 即sampling_rate=(1+1)/1000

"(set forwarding-options sampling input family inet run-length 1 "run-length缺省为0)

3.SLA配置

set snmp view ping-view oid .1.3.6.1.2.1.80 include "ping-mib

set snmp view ping-view oid .1.3.6.1.4.1.2636.3.7 include

"set snmp view ping-view oid .1.3.6.1.2.1.81 include "traceroute-mib

"set snmp view ping-view oid .1.3.6.1.4.1.2636.3.8 include

set snmp community ping-community authorization read-write

set snmp community ping-community view ping-view

set snmp community ping-community clients 211.139.136.108

commit

4.采样进程的停止与重新启动

先查出sampled进程的PID号:

juniper>show system processes extensive

再juniper>start shell

%su

#kill PID号

退出:#exit

%exit

如果要重新开起sampled进程:

juniper>restart sampling immediately

二、CISCO设备

1、snmp、traps:

router#config t

router(config)#snmp community net123 rw

router(config)#snmp host 192.168.1.45 traps version 2c xxxxxxxx

router(config)#snmp enable traps

router(config-if)#snmp trap link-status

2、syslog:

router(config)#logging 192.168.1.45

router(config)#logging source-interface loopback0

3、netflow:

cisco目前还不支持双向netflow,缺省是针对input

router(config-if)#ip route-cache flow sampled "GSR支持sampled参数,其他的可能不支持sampled 参数

router(config)#ip flow-export version 5 origin-as as_id

router(config)#ip flow-export destination 192.168.1.45 3055

router(config)#ip flow-sampling-mode packet-interval 1000

router#ip flow-export source Loopback0

router#show ip flow sampling

router#show ip flow export

router#show ip cache flow "这些命令查看netflow的状态

相关文档
最新文档