Chapter 3 Flow Collection for SteelCentral : Sample Third-Party Configurations

Sample Third-Party Configurations
This section has several third-party configuration examples that show you how to enable NetFlow export to the NetExpress or NetProfiler. Refer to vendor documentation specific to your device and version software. Commands complete various actions, depending upon device software version.
This section includes the following:
  • Configuring VMware ESXi v5.5 Using vSphere
  • Configuring Cisco 6500 Series Switches Running Native Cisco IOS CLI
  • Configuring Cisco 6500 Series Switches in Hybrid Mode
  • Configuring Cisco 7500 Series Router
  • Configuring Cisco 7600 Series Router
  • Configuring Cisco 3560 and 3750 Flexible NetFlow
  • Configuring the Cisco Nexus 7000 Flexible NetFlow
  • Configuring NetFlow Export for Cisco Nexus 1000V
  • Configuring IPFIX for Avaya (Nortel) 8300 and 8600
  • Configuring sFlow for HP Procurve 3500, 5400, and 6200
  • Configuring VMware ESXi v5.5 Using vSphere
    The following example uses VMware vSphere to configure an ESXi v5.5 distributed vSwitch to export flow data.
    To configure flow on the ESXi v5.5 distributed vSwitch through vSphere
    1.
    2.
    3.
    4.
    5.
    With an IP address to the vSphere distributed switch, the NetFlow collector can interact with the vSphere distributed switch as a single switch rather than interacting with a separate, unrelated switch for each associated host.
    6.
    7.
    The sampling rate determines what portion of data NetFlow collects, with the sampling rate number determining how often NetFlow collects the packets. A collector with a sampling rate of 2 collects data from every other packet. A collector with a sampling rate of 5 collects data from every fifth packet.
    8.
    9.
    Configuring Cisco 6500 Series Switches Running Native Cisco IOS CLI
    The following example uses the native Cisco IOS CLI to configure the SUP and MSFC modules of a 6500 series switch. The following commands generally work with Cisco IOS Release12.2 or later, except where specified. For further information, refer to the documentation for your Cisco IOS software release.
    To configure the SUP and MSFC modules of a 6500 series switch
    1.
    Router(config)# mls netflow
    Router(config)# mls nde sender version 5
    Router(config)# mls flow ip interface-full
    Router(config)# mls nde interface
    Router(config)# mls aging normal 32
    Router(config)# mls aging long 64
    2.
    Router(config)# ip flow-export source loopback 0
    Router(config)# ip flow-export version 9
    Router(config)# ip flow-export destination <flow-gateway-or-netexpress_ip> <udp-port-number>
    Router(config)# ip flow-cache timeout inactive 15 (this might be the default depending upon code version)
    Router(config)# ip flow-cache timeout active 1
    If you are running Cisco IOS Release 12.2(18) or later, use NetFlow v9. If NetFlow v9 is not available, use NetFlow v5.
    If you are running Cisco IOS Release12.3(14) or later and are exporting NetFlow v9, you can include export of the TTL, enabling the NetProfiler and NetExpress to show network segment diagrams:
    Router(config)# ip flow-capture ttl
    If you are running Cisco IOS Release 12.3(14) or later, running NetFlow v9, and have hardware that supports export of NBAR Layer-7 information, include the following command:
    Router(config)# ip flow-capture nbar
    3.
    interface <type> <slot>/<port>
    For example:
    Router(config)# interface fastethernet 0/1
    Router(config-if)# ip route-cache flow
    or
    interface vlan <vlan-id>
    For example:
    Router(config)# interface vlan 3
    Router(config-if)# ip route-cache flow
    or
    interface port-channel <channel-id>
    For example:
    Router(config)# interface port-channel 3
    Router(config-if)# ip route-cache flow
    4.
    Router(config)# ip flow export layer2-switched vlan <vlan-list>
    Configuring Cisco 6500 Series Switches in Hybrid Mode
    The following example configures the SUP and MSFC modules of a Cisco 6500 series switch running in the hybrid mode.
    To configure the SUP and MSFC modules of a 6500 series switch in hybrid mode
    1.
    Router(config)# set mls nde enable
    Router(config)# set mls nde enable <flow-gateway-or-netexpress_ip> <udp-port-number>
    Router(config)# set mls agingtime 16
    Router(config)# set mls agingtime fast 32 0
    Router(config)# set mls agingtime long-duration 64
    Router(config)# set mls flow full
    2.
    Router(config)# ip flow-export <ip-address> <udp-port> <version>
    3.
    Router(config)# interface <type> <slot>/<port-adapter>
    For example:
    Router(config)# interface fastethernet 0/1
    Router(config-if)# ip route-cache flow
    Router(config)# ip flow-cache timeout active 1
    Router(config)# ip flow-cache timeout inactive 15
    Configuring Cisco 7500 Series Router
    The following example uses the Cisco IOS CLI to configure a Cisco 7500 series router.
    To configure a Cisco 7500 series router using the Cisco IOS CLI
    1.
    Router# confg terminal
    Router(config)# ip flow-export <flow-gateway-or-netexpress_ip> <udp-port-number> <version>
    2.
    Router(config)# interface <type> <slot>/<port-adapter>
    For example:
    Router(config)# interface fastethernet 0/1
    For 7500:
    Router(config-if)# ip route-cache flow
    3.
    Router(config)# ip flow-cache timeout active 1
    Router(config)# ip flow-cache timeout inactive 15
    Configuring Cisco 7600 Series Router
    The following example uses the Cisco IOS CLI to configure a Cisco 7600 series router.
    To configure a Cisco 7600 series router using the Cisco IOS CLI
    1.
    Router(config)# ip flow-export <flow-gateway-or-netexpress_ip> <udp-port-number>
    Router(config)# ip flow-export <version>
    Router(config)# mls nde sender <version>
    2.
    interface <type> <slot>/<port-adapter>
    For example:
    Router(config)# interface fastethernet 0/1
    Router(config-if)# ip flow ingress
    3.
    Router(config)# ip flow-cache timeout active 1
    Router(config)# ip flow-cache timeout inactive 15
    Configuring Cisco 3560 and 3750 Flexible NetFlow
    The following example shows an example Flexible NetFlow configuration for the Cisco 3750 and 3560 series switches with NetFlow service module C3KX-SM-10G.
    To configure Flexible NetFlow for a Cisco 3750 or 3560 switch
    1.
    Switch# flow record cascade-record
    Switch# match ipv4 tos
    Switch# match ipv4 protocol
    Switch# match ipv4 source address
    Switch# match ipv4 destination address
    Switch# match ipv4 ttl
    Switch# match transport source-port
    Switch# match transport destination-port
    Switch# collect counter bytes
    Switch# collect counter packets
    Switch# collect timestamp sys-uptime first
    Switch# collect timestamp sys-uptime last
    2.
    Switch# flow exporter Cascade
    Switch# destination <ip address of flow-gateway or netexpress>
    Switch# transport udp <ip address of flow-gateway or netexpress>
    Switch# flow monitor Cascade
    Switch# record Cascade-record
    Switch# exporter Cascade
    Switch# cache timeout active 60
    Switch# cache timeout inactive 60
    3.
    Switch# interface TenGigabitEthernet1/1/1
    Switch# ip flow monitor Cascade input
    Switch# ip flow monitor Cascade output
    Configuring the Cisco Nexus 7000 Flexible NetFlow
    The following example uses Cisco Nexus OS v5.2.1 to configure NetFlow export. You must complete the set of commands in Step 5 for each Layer-3 interface.
    To configure a NetFlow export using a Cisco Nexus 7000 Flexible NetFlow
    1.
    Switch# configure terminal
    Switch(config)# flow record cascade-record
    Switch(config-flow-record)# match interface input
    Switch(config-flow-record)# match interface output
    Switch(config-flow-record)# match ipv4 source address
    Switch(config-flow-record)# match ipv4 destination address
    Switch(config-flow-record)# match protocol
    Switch(config-flow-record)# match transport source-port
    Switch(config-flow-record)# match transport destination-port
    Switch(config-flow-record)# collect flow direction
    Switch(config-flow-record)# collect ipv4 tos
    Switch(config-flow-record)# collect ipv4 ttl max
    Switch(config-flow-record)# collect transport tcp flags
    Switch(config-flow-record)# collect counter bytes
    Switch(config-flow-record)# collect counter packets
    Switch(config-flow-record)# collect routing next-hop address ipv4
    Switch(config-flow-record)# collect timestamp sys-uptime first
    Switch(config-flow-record)# collect timestamp sys-uptime last
    2.
    Switch# configure terminal
    Switch(config)# feature netflow
    Switch(config-netflow)# flow timeout active 60
    Switch(config-netflow)# flow timeout inactive 15
    Switch(config-netflow)# flow timeout session
    3.
    Switch# configure terminal
    Switch(config)# flow exporter cascade-export
    Switch(config-flow-exporter)# destination <ip address of flow-gateway or netexpress>
    Switch(config-flow-exporter)# source ethernet 2/1
    Switch(config-flow-exporter)# transport udp 2055
    !--- Listening port configured on Flow Gateway
    Switch(config-flow-exporter)# version 9
    4.
    Switch# configure terminal
    Switch(config)# flow monitor cascade-monitor
    Switch(config-flow-monitor)# record netflow ipv4 cascade-record
    Switch(config-flow-monitor)# exporter cascade-export
    5.
    Switch# configure terminal
    Switch(config)# vlan 30
    Switch(config-vlan)# ip flow monitor cascade-monitor input
    Configuring NetFlow Export for Cisco Nexus 1000V
    Configuring NetFlow export of the Cisco 1000V is similar to the physical Nexus switches running NX-OS (for example, Cisco Nexus 7000), with some variation in commands. The primary difference is that the Riverbed recommended configuration parameters are for the Cisco Nexus 7000 TTL export. Use the template shown in this example (TTL export is not an option on the Cisco Nexus 1000V).
    To configure NetFlow export for a Cisco Nexus 1000V
    1.
    n1000v# configure terminal
    n1000v(config)# flow exporter cascade-export
    n1000v(config-flow-exporter)# destination <ip address of flow-gateway or netexpress>
    n1000v(config-flow-exporter)# source mgmt 0
    n1000v(config-flow-exporter)# transport udp 2055
    !--- Listening port configured on Flow Gateway
    n1000v(config-flow-exporter)# version 9
    n1000v(config-flow-exporter-version-9)# option exporter-stats timeout 60
    n1000v(config-flow-exporter-version-9)# template data timeout 1200
    n1000v(config-flow-exporter-version-9)# option interface-table timeout 3600
    2.
    n1000v(config)# flow monitor cascade-monitor
    n1000v(config-flow-monitor)# record netflow-original
    n1000v(config-flow-monitor)# exporter cascade-export
    n1000v(config-flow-monitor)# timeout active 60
    n1000v(config-flow-monitor)# timeout inactive 15
    3.
  • For an interface:
  • n1000v(config)# interface veth 2
    n1000v(config-if)# ip flow monitor cascade-monitor input
    n1000v(config-if)# ip flow monitor cascade-monitor output
  • For a port profile (the port profile must be configured with other appropriate parameters and inherited on the appropriate interfaces or port groups):
  • n1000v(config)# port-profile type vethernet <profile-name>
    n1000v(config-port-prof)# ip flow monitor cascade-monitor input
    n1000v(config-port-prof)# ip flow monitor cascade-monitor output
    Configuring IPFIX for Avaya (Nortel) 8300 and 8600
    The following example uses Nortel ERS 8300 and ERS 8600 to configure flow export. You use similar commands to configure other Nortel routers.
    To configure IPFIX for Avaya (Nortel) 8300 and 8600
    1.
    ERS# config ip ipfix state enable
    2.
    ERS# config ip ipfix port 5/2, 5/3, 5/4, 5/5, 5/6 all-traffic enable
    3.
    ERS# config ip ipfix active-timeout 1
    ERS# config ip ipfix aging-interval 15
    ERS# config ip ipfix export-interval 60
    Depending on your router and software version, you might need to specify slot numbers in the previous commands. The following example shows the commands with slot numbers:
    ERS# config ip ipfix slot 5 active-timeout 1
    ERS# config ip ipfix slot 5 aging-interval 15
    ERS# config ip ipfix slot 5 export-interval 60
    4.
    ERS# config ip ipfix exporter-state enable
    ERS# config ip ipfix collector add <ip address of flow-gateway or netexpress> dest-port <listening of flow-gateway or netexpress> enable true
    or
    ERS# config ip ipfix slot 5 exporter-state enable
    ERS# config ip ipfix slot 5 collector add <ip address of flow-gateway or netexpress> dest-port <listening of flow-gateway or netexpress> enable true
    Configuring sFlow for HP Procurve 3500, 5400, and 6200
    The following example uses Procurve 3500, 5400, and 6200 to configure flow export. You use similar commands to configure other HP Procurve devices.
    To configure sFlow for HP Procurve 3500, 5400, and 6200
    1.
    ProCurve# configure
    ProCurve(config)# sflow 1 destination <ip address of flow-gateway or netexpress> dest-port <listening of flow-gateway or netexpress>
    In this example, 1 is the sFlow instance. If this instance ID is already in use, then enter either 2 or 3 in the previous and the following commands.
    2.
    ProCurve(config)# sflow 1 sampling all 500
    The example shows a sampling rate of one out of every 500 packets. Riverbed recommends that you set the sampling rate to the lowest value recommended by HP; the lowest value recommended depends on device and link speed. In the example, all results use this HP-recommended sampling rate for all ports.
    3.
    ProCurve(config)# sflow 1 polling all 60
    In the example, all results are using this polling rate for all ports, and 60 indicates the polling and export interval.
    4.
    ProCurve(config)# write memory