Configuring NetFlow-Lite for Cisco 2960-X Series

download Configuring NetFlow-Lite for Cisco 2960-X Series

of 4

description

Leading Cisco networking products distributor-3network.comConfiguring NetFlow-Lite for Cisco 2960-X Series

Transcript of Configuring NetFlow-Lite for Cisco 2960-X Series

How to configure Cisco 2960 switches

Configuring NetFlow-Lite for Cisco 2960-X SeriesThe Cisco Catalyst 2960-X NetFlow-Lite configuration is pretty straight forward however it is very different from the IPFIX PSAMP NetFlow-Lite we configured on the Cisco 4948E NetFlow-Lite. The 2960x uses flow sampling without any form of packet capture. There are two types of possible NetFlow Lite sampling configurations on the 2960x:

1 Deterministic Sampling

2Random Sampling

Deterministic SamplingDeterministic samplers sample packets exactly as specified (I.e. the first flow out of every 100 flows). Deterministic samplers can only be applied on up to 4 interfaces. For this reason, we decided to configure random sampling.

Random SamplingRandom sampling samples a random flow out of ever X flows. The maximum sample rate for both Deterministic and Random is 1 out-of 32. It is not limited to 4 interfaces like Deterministic sampling.

In the configuration below we used Random sampling. I was able to add the configuration to all interfaces using a random sampler called my-random-sampler. The random sampler called my-random-sampler was configured to randomly sample 1 out of every 100 flows on the interfaces it was applied to.

Setting up NetFlow Lite on the 2960x:!! step 1: create a flow recordflow record flowsmatch datalink mac source address inputmatch datalink mac destination address inputmatch ipv4 tosmatch ipv4 protocolmatch ipv4 source addressmatch ipv4 destination addressmatch transport source-portmatch transport destination-portcollect transport tcp flagscollect interface inputcollect flow sampler! below I specified long because the 2960x supports 64 bit counterscollect counter bytes longcollect counter packets longcollect timestamp sys-uptime firstcollect timestamp sys-uptime last!!! step 2: create a flow exporterflow exporter export-to-insidedescription flexible NF v9destination 10.1.1.1source Vlan7transport udp 2055template data timeout 60!! lets export some cool option templatesoption interface-tableoption exporter-statsoption sampler-table!!! step 3: create a flow monitorflow monitor nftestrecord flowsexporter export-to-insidecache timeout active 60statistics packet protocol!! Below was used for the deterministic sampling configuration! that I didnt like because of the 4 interface limitation! sampler full! mode deterministic 1 out-of 32!! below is the random sampler configuration that I replaced! the above with.sampler my-random-samplermode random 1 out-of 100!!!! step 4: apply the flow monitor nftest to each interface with! the defined sampler my-random-sampler! input is for ingress. Egress was not supported in this releaseinterface GigabitEthernet1/0/1ip flow monitor nftest sampler my-random-sampler input!interface GigabitEthernet1/0/2ip flow monitor nftest sampler my-random-sampler input!interface GigabitEthernet1/0/3ip flow monitor nftest sampler my-random-sampler input!interface GigabitEthernet1/0/4ip flow monitor nftest sampler my-random-sampler input!! #################################! ### Repeat the above for all the interfaces ###

! #################################

!interface GigabitEthernet1/0/50ip flow monitor nftest sampler my-random-sampler inputswitchport mode access!interface TenGigabitEthernet1/0/1!interface TenGigabitEthernet1/0/2

It is referred from: http://www.plixer.com/blog/netflow-lite-2/cisco-2960-x-netflow-lite-configuration/More related:Cisco Catalyst 2960-X Series Switch OverviewPoE Capacity of Cisco Catalyst 2960-X Series SwitchesWhat are the notable differences between the Cisco Catalyst 2960-S and 2960-X Series Switches?More Cisco products and Reviews you can visit: http://www.3anetwork.com/blog 3Anetwork.com is a world leading Cisco networking products wholesaler, we wholesale original new Cisco networking equipments, including Cisco Catalyst switches, Cisco routers, Cisco firewalls, Cisco wireless products, Cisco modules and interface cards products at competitive price and ship to worldwide.Our website: http://www.3anetwork.comTelephone:+852-3069-7733

Email:[email protected]:23/F Lucky Plaza, 315-321 Lockhart Road, Wanchai, Hongkong

PAGE 4