<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									To configure Netflow in cisco nexus - Cisco R&amp;S				            </title>
            <link>https://www.hacktheforum.com/cisco-routing-switching/to-configure-netflow-in-cisco-nexus/</link>
            <description>Hack The Forum Discussion Board</description>
            <language>en</language>
            <lastBuildDate>Wed, 15 Jul 2026 23:50:25 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>To configure Netflow in cisco nexus</title>
                        <link>https://www.hacktheforum.com/cisco-routing-switching/to-configure-netflow-in-cisco-nexus/#post-869</link>
                        <pubDate>Tue, 17 Dec 2024 13:22:23 +0000</pubDate>
                        <description><![CDATA[To configure NetFlow on a Cisco Nexus switch, you&#039;ll need to configure both the NetFlow exporter (which exports flow data) and the NetFlow monitor (which defines the flow characteristics). C...]]></description>
                        <content:encoded><![CDATA[<p>To configure <strong>NetFlow</strong> on a Cisco Nexus switch, you'll need to configure both the <strong>NetFlow exporter</strong> (which exports flow data) and the <strong>NetFlow monitor</strong> (which defines the flow characteristics). Cisco Nexus devices use <strong>NetFlow v9</strong> and <strong>IPFIX</strong> as the primary flow export protocols.</p>
<p>Here’s a step-by-step guide to enabling <strong>NetFlow</strong> on a Cisco Nexus switch:</p>
<h3>Step 1: Enable NetFlow Globally</h3>
<p>Before you can configure NetFlow on interfaces, you need to enable it globally on the Nexus switch.</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus# configure terminal 
Nexus(config)# feature netflow</pre>
</div>
</div>
<p>This command enables the NetFlow feature on the device.</p>
<h3>Step 2: Define a NetFlow Exporter</h3>
<p>The exporter defines where the NetFlow data is sent. This typically points to a NetFlow collector or analysis tool (such as SolarWinds, PRTG, etc.).</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus(config)# flow exporter EXPORTER_NAME 
Nexus(config-flow-exporter)# destination &lt;collector-ip&gt; 
Nexus(config-flow-exporter)# transport udp &lt;port&gt; 
Nexus(config-flow-exporter)# source-interface &lt;interface&gt; 
Nexus(config-flow-exporter)# export-protocol netflow-v9</pre>
</div>
</div>
<ul>
<li><strong>EXPORTER_NAME</strong>: Name of the exporter (you can choose any name, like <code>NetFlowExporter</code>).</li>
<li><strong>destination</strong>: IP address of the NetFlow collector.</li>
<li><strong>transport udp &lt;port&gt;</strong>: Specifies the UDP port (default is 2055).</li>
<li><strong>source-interface</strong>: The interface used to send the flow data to the collector (optional but recommended for best performance).</li>
<li><strong>export-protocol</strong>: Choose <code>netflow-v9</code> or <code>ipfix</code> depending on your collector’s capabilities.</li>
</ul>
<h3>Step 3: Define a NetFlow Monitor</h3>
<p>The NetFlow monitor defines which flow information to collect and how to classify traffic flows.</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus(config)# flow monitor MONITOR_NAME 
Nexus(config-flow-monitor)# record netflow-original 
Nexus(config-flow-monitor)# exporter EXPORTER_NAME</pre>
</div>
</div>
<ul>
<li><strong>MONITOR_NAME</strong>: Name of the flow monitor (e.g., <code>NetFlowMonitor</code>).</li>
<li><strong>record netflow-original</strong>: Defines the flow record. In most cases, <code>netflow-original</code> is used, which captures a standard set of flow information.</li>
<li><strong>exporter</strong>: Points to the previously configured exporter.</li>
</ul>
<h3>Step 4: Apply the NetFlow Monitor to Interfaces</h3>
<p>Now that the exporter and monitor are configured, apply the NetFlow monitor to specific interfaces or globally.</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus(config)# interface Ethernet1/1 
Nexus(config-if)# flow monitor MONITOR_NAME input 
Nexus(config-if)# flow monitor MONITOR_NAME output</pre>
</div>
</div>
<ul>
<li><strong>input</strong>: Captures incoming traffic.</li>
<li><strong>output</strong>: Captures outgoing traffic.</li>
</ul>
<p>You can apply the flow monitor to multiple interfaces as needed.</p>
<h3>Step 5: Verify NetFlow Configuration</h3>
<p>After you’ve configured NetFlow, you can verify the settings with the following commands:</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus# show flow exporter 
Nexus# show flow monitor 
Nexus# show flow statistics</pre>
</div>
</div>
<p>These commands will provide you with information on the flow exporter status, configured monitors, and traffic statistics.</p>
<h3>Example Configuration:</h3>
<p>Here’s an example of the full configuration:</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus# configure terminal
Nexus(config)# feature netflow

! Define the flow exporter
Nexus(config)# flow exporter NetFlowExporter
Nexus(config-flow-exporter)# destination 192.168.1.100
Nexus(config-flow-exporter)# transport udp 2055
Nexus(config-flow-exporter)# source-interface Ethernet1/1
Nexus(config-flow-exporter)# export-protocol netflow-v9

! Define the flow monitor
Nexus(config)# flow monitor NetFlowMonitor
Nexus(config-flow-monitor)# record netflow-original
Nexus(config-flow-monitor)# exporter NetFlowExporter

! Apply the flow monitor to interfaces
Nexus(config)# interface Ethernet1/1
Nexus(config-if)# flow monitor NetFlowMonitor input
Nexus(config-if)# flow monitor NetFlowMonitor output

! Verify configuration
Nexus# show flow exporter
Nexus# show flow monitor
Nexus# show flow statistics
</pre>
</div>
</div>
<h3>Step 6: Optional - Configure Sampling (if required)</h3>
<p>If you want to reduce the volume of flow data, you can configure <strong>flow sampling</strong> on specific interfaces. For example, to sample 1 out of every 100 packets:</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus(config)# interface Ethernet1/1
Nexus(config-if)# flow sampler SAMPLER_NAME input rate 100
</pre>
</div>
</div>
<p>This configures a flow sampler that captures 1 out of every 100 packets on the input side.</p>
<h3>Step 7: Configure Flow Timeout (Optional)</h3>
<p>You can also adjust the timeout for flows, which defines how long flows remain active before they are exported to the collector.</p>
<div class="contain-inline-size rounded-md border- border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950">
<div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none">
<pre contenteditable="false">Nexus(config)# flow timeout active 60
Nexus(config)# flow timeout inactive 15
</pre>
</div>
</div>
<ul>
<li><strong>active</strong>: Time in seconds to wait before a flow is considered "active" and exported.</li>
<li><strong>inactive</strong>: Time in seconds before an inactive flow is exported.</li>
</ul>
<h3> </h3>]]></content:encoded>
						                            <category domain="https://www.hacktheforum.com/cisco-routing-switching/">Cisco R&amp;S</category>                        <dc:creator>paul0000</dc:creator>
                        <guid isPermaLink="true">https://www.hacktheforum.com/cisco-routing-switching/to-configure-netflow-in-cisco-nexus/#post-869</guid>
                    </item>
							        </channel>
        </rss>
		