Flow BGP AS配置
ip flow-export version 5 peer-as
| The AS source is AS2, and the AS destination is AS4 |
ip flow-export version 5 origin-as | The AS source is AS1, and the AS destination is AS5 |
origin-as和peer-as的含义
@ origin-as causes NetFlow to determine the origin BGP as of both the source and the destination hosts of the flow.
@ peer-as causes NetFlow to determine the peer BGP as of both the input and output interfaces of the flow.
@ The AS fields will stay empty if you do not configure a peer AS or an origin AS.
netflow AS的特点:从BGP BDR发起的流量不计入AS流量(因此不能用从路由器PING的方法生成flow流)
类似ip account的特点,必须是穿过当前采集路由器的流量,不能是当前采集路由器发起的
netflow 的TCP Flag
NetFlow 会将一个flow中所有包传输时的TCP flag全部储存在flow的TCP Flag 这个字段中
因为是多个包,则一个flow可能会有多种 tcp flag, 比如tcp 三段握手:sync,sync-ack,ack
比如flow的结束肯定有一个fin或rst
这样一个netflow 的tcp flag一定是置了sync,sync-ack,ack,fin位的
netflow tcp flag应用在查找蠕虫和非法扫描————过滤出tcp flag字段只存在SYN的flow
蠕虫进行感染,或非法扫描,由于随机选取的主机并不一定存在,或是即使存在但目标主机没有开放蠕虫所要感染的TCP port.
在这种情况下,受感染主机或非法扫描主机其对外联机所产生的Flow 的TCP Flag 字段会只存在SYN 这个TCP 控制标志,这样就可以找出异常的流量
MPLS-aware和普通netflow的区别
普通flow | 7个same: 接口ifindex,地址,TCP/UDP端口(或其他四层协议端口),L3 protocol,TOS |
MPLS flow | 三个same label |
MPLS-aware export什么?
@ 普通 NetFlow data.(七元组等)
@ up to three labels of interest from the incoming label stack
最多可报告三个label,包括label,exp bit ,s bit
@ TOP label能附加报告的:
Type of top label,一般包括:LDP,×××,BGP, unknown, TE tunnel midpoint, AToM,
the IP address associated with the top label
MPLS-AWARE限制
必须netflow V9
必须IOS 12.3以上
必须CISCO或华为设备(目前只这两厂商支持)
必须要7200以上高端路由器才支持(目前6500、7600系列三层交换机都不支持),MPLS-AWARE是硬件feature,
必须配在PE上(否则top label不是××× label)
MPLS-AWARE提供的信息不足(缺RD),仍要于PAL协作。
Prefix/Application/Label (PAL)提供了什么?
提供了RD,prefix
Router# show mpls flow mappings |
NetFlow v9 Export Template Format for PAL:
@ MPLS label: 3 bytes
@ MPLS label application type: 1 byte
TE = 1 TE为MPLS 隧道技术
ATOM = 2
××× = 3
BGP = 4
LDP = 5
@ MPLS label IP prefix: 4 bytes
@ MPLS ××× prefix RD: 8 bytes
@ MPLS label allocation time: 4 bytes
PAL配置
Router(config)# mpls export interval 360 | export of MPLS PAL 360分钟,建议此值不变,类似于OSPF的那个30分钟传全库 |
Router(config)# mpls export ***v4 prefixes | xport of ×××v4 label information in MPLS PAL |
mpls export ***v4 prefixes语句的作用
虽然配了mpls export interval interval 360,但除LDP LABEL外,BGP LABEL的prefix、××× LABEL,并不显示地址,只显示0.0.0.0
只有LDP的prefix显示地址
而且不显示RD的
Router# show mpls flow mappings Label Owner Route-Distinguisher Prefix Allocated 18 LDP 10.0.0.5 00:52:10 21 BGP 0.0.0.0 00:52:18 22 BGP 0.0.0.0 00:52:18 25 BGP 0.0.0.0 00:51:44 26 LDP 10.32.0.0 00:52:10 27 TE-MIDPT 10.30.0.2 00:52:06 28 LDP 10.33.0.0 00:52:10 29 LDP 10.0.0.1 00:52:10 30 LDP 10.0.0.3 00:52:10
|
只有配了mpls export ***v4 prefixes,才会显示RD,并且prefix不显示0.0.0.0
Router# show mpls flow mappings Label Owner Route-Distinguisher Prefix Allocated 16 LDP 10.0.0.3 00:58:03 17 LDP 10.33.0.0 00:58:03 19 TE-MIDPT 10.30.0.2 00:58:06 20 LDP 10.0.0.5 00:58:03 23 LDP 10.0.0.1 00:58:03 24 LDP 10.32.0.0 00:58:03 27 BGP 100:1 10.34.0.0 00:57:48 31 BGP 100:1 10.0.0.9 00:58:21 32 BGP 100:1 10.3.3.0 00:58:21
|
转载于:https://blog.51cto.com/kwsnh/482388