flow 高級feature (BGP_AS TCP_FLAG MPLS_AWARE

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全部儲存在flowTCP Flag 這個字段中
因爲是多個包,則一個flow可能會有多種 tcp flag, 比如tcp 三段握手:sync,sync-ack,ack
比如flow的結束肯定有一個finrst
這樣一個netflow  tcp flag一定是置了sync,sync-ack,ack,fin位的

 netflow tcp flag
應用在查找蠕蟲和非法掃描————過濾出tcp flag字段只存在SYNflow
蠕蟲進行感染,或非法掃描,由於隨機選取的主機並不一定存在,或是即使存在但目標主機沒有開放蠕蟲所要感染的TCP port.
在這種情況下,受感染主機或非法掃描主機其對外聯機所產生的Flow TCP Flag 字段會只存在SYN 這個TCP 控制標誌,這樣就可以找出異常的流量

 MPLS-aware和普通netflow的區別

 普通flow

 7same:      

接口ifindex,地址,TCP/UDP端口(或其他四層協議端口),L3 protocol,TOS

 MPLS flow   

三個same label  
其中label same要求label,experimental bit,s bit都要same


   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以上高端路由器才支持(目前65007600系列三層交換機都不支持),MPLS-AWARE是硬件feature,
   
必須配在PE上(否則top label不是*** label
    MPLS-AWARE
提供的信息不足(缺RD),仍要於PAL協作。

Prefix/Application/Label (PAL)
提供了什麼?
提供了RDprefix

 Router# show mpls flow mappings
Label Owner Route-Distinguisher Prefix Allocated
27     BGP     100:1                        10.34.0.0 00:57:48



   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 LABELprefix*** LABEL,並不顯示地址,只顯示0.0.0.0

只有LDPprefix顯示地址

而且不顯示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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章