Cisco Nexus 7000 Series NX-OS System Management Command Reference, Release 4.0
C Commands

Table Of Contents

C Commands

check logflash

checkpoint

clear checkpoint database

clear cores

clear flow exporter

clear flow monitor

clear logging ip access-list cache

clear logging logfile

clear logging nvram

clear logging onboard

clear logging session

clear ntp session

clear ntp statistics

clear nvram

clear platform flow ip

clear session state name

clear system reset-reason

collect counter

collect flow

collect interface

collect routing

collect timestamp sys-uptime

collect transport tcp flags

commit

configure session


C Commands


This chapter describes the Cisco NX-OS system management commands that begin with the letter C.

check logflash

To check the compactFlash, use the check logflash command.

check logflash [bad-blocks]

Syntax Description

bad-blocks

(Optional) Finds bad blocks in compactFlash.


Defaults

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(3)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to check compactFlash:

switch# check logflash

checkpoint

To configure the rollback checkpoint, use the checkpoint command. To delete the checkpoint files, use the no form of the command.

checkpoint {name}

no checkpoint name

Syntax Description

name

(Optional) Name of the checkpoint file. The name can be any alphanumeric string up to 63 characters.


Defaults

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

If you use the checkpoint command without a name, Cisco NX-OS creates the file with the name auto-x, where x is a decimal number that increases each time you create an unnamed checkpoint file.

This command does not require a license.

Examples

This example shows how to configure the rollback checkpoint:

switch# checkpoint stable

switch#

This example shows how to delete the checkpoint file:

witch# no checkpoint stable

switch#

Related Commands

Command
Description

clear checkpoint database

Displays the contents of the checkpoint file.


clear checkpoint database

To delete all checkpoint files in the database, use the clear checkpoint database command.

clear checkpoint database

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the checkpoint database:

switch# clear checkpoint database
Processing the Request... Please Wait
..... Done
switch#

Related Commands

Command
Description

show checkpoint

Displays the contents of the checkpoint file.


clear cores

To clear the core files, use the clear cores command.

clear cores [archive]

Syntax Description

archive

(Optional) Clears the core file on the logflash filesystem.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

Use the show system cores command to display information about the core files.

This command does not require a license.

Examples

This example shows how to clear the core file:

switch# clear cores

This example shows how to clear the core on the logflash filesystem:

switch# clear cores archive

Related Commands

Command
Description

show system cores

Displays the core filename.

system cores

Configures the core filename.


clear flow exporter

To clear the statistics for a Flexible NetFlow flow exporter, use the clear flow exporter command in Any mode.

clear flow exporter {name exporter-name | exporter-name}

Syntax Description

name

Specifies the name of a flow exporter.

exporter-name

Name of an existing flow exporter.


Command Default

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

You must have already enabled traffic monitoring with Flexible NetFlow using an exporter before you can use the clear flow exporter command.

This command does not require a license.

Examples

The following example clears the statistics for the flow exporter named NFC-DC-PHOENIX:

switch# clear flow exporter name NFC-DC-PHOENIX
switch#

Related Commands

Command
Description

clear flow exporter

Clears the statistics for exporters.

flow exporter

Creates a flow exporter.

show flow exporter

Displays flow exporter status and statistics.


clear flow monitor

To clear a Flexible NetFlow flow monitor, flow monitor cache, or flow monitor statistics and to force the export of the data in the flow monitor cache, use the clear flow monitor command in Any mode.

clear flow monitor {name monitor-name | monitor-name} [[cache] [force-export] | statistics]

Syntax Description

name

(Optional) Specifies the name of a flow monitor.

monitor-name

Name of an existing flow monitor.

cache

(Optional) Clears the flow monitor cache information.

force-export

(Optional) Forces the export of the flow monitor cache statistics.

statistics

(Optional) Clears the flow monitor statistics.


Command Default

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

Flexible NetFlow monitor must be enabled before you can use the clear flow monitor command.

clear flow monitor monitor-name cache

This command removes all entries from the flow monitor cache. These entries will not be exported and the data gathered in the cache will be lost.


Note The statistics for the cleared cache entries are maintained.


clear flow monitor monitor-name force-export

This command removes all entries from the flow monitor cache and exports them to all Flow Exporters assigned to the Flow Monitor. This can result in an short term increase in the CPU utilization.


Note Use the clear flow monitor monitor-name force-export command with caution due to the short term increase in the CPU utilization.



Note The statistics for the cleared cache entries are maintained.


clear flow monitor monitor-name statistics

This command clears the statistics and cache entries for this Flow Monitor.


Note The "Current entries" statistic will not be cleared as this is an indicator of how many entries are in the cache and the cache is not cleared with this command.


This command does not require a license.

Examples

The following example clears the statistics and cache entries for the flow monitor named NFC-DC-PHOENIX:

switch# clear flow monitor name NFC-DC-PHOENIX
switch#

The following example clears the statistics and cache entries for the flow monitor named NFC-DC-PHOENIX and forces an export:

switch# clear flow monitor NFC-DC-PHOENIX force-export
switch#

The following example clears the cache for the flow monitor named NFC-DC-PHOENIX and forces an export:

switch# clear flow monitor NFC-DC-PHOENIX cache force-export
switch#

The following example clears the statistics for the flow monitor named NFC-DC-PHOENIX:

switch# clear flow monitor NFC-DC-PHOENIX statistics
switch#

Related Commands

Command
Description

clear flow monitor

Clears the flow monitor.

flow monitor

Creates a flow monitor.

show flow monitor

Displays flow monitor status and statistics.


clear logging ip access-list cache

Use the clear logging ip access-list cache command to clear all the entries from the Optimized ACL Logging (OAL) cache and send them to the syslog.

clear logging ip access-list cache

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any

Supported User Roles

Super user
VDC administrator
VDC user

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear all the entries from the OAL cache and send them to the syslog:

switch# clear logging ip access-list cache 
switch# 

Related Commands

Command
Description

show logging ip access-list

Displays logging status for IP access lists.


clear logging logfile

Use the clear logging logfile command to clear messages from the logging file.

clear logging logfile

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any

Supported User Roles

Super user
VDC administrator
VDC user

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear messages from the logging file:

switch# clear logging logfile 
switch# 

Related Commands

Command
Description

show logging logfile

Displays the logs in the local log file.


clear logging nvram

Use the clear logging nvram command to clear the NVRAM logs.

clear logging nvram

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any

Supported User Roles

Super user
VDC administrator
VDC user

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the NVRAM logs:

switch# clear logging nvram 
switch#

Related Commands

Command
Description

show logging nvram

Displays the NVRAM logs.


clear logging onboard

To clear the OBFL entries in the persistent log, use the clear logging onboard command.

clear logging onboard [counter-stats] [environmental-history] [error-stats] [exception-log] [interrupt-stats] [module num] [obfl-log] [stack-trace]

Syntax Description

counter-stats

(Optional) Clears the OBFL counter statistics.

environmental-history

(Optional) Clears the OBFL environmental history.

error-stats

(Optional) Clears the OBFL error statistics.

exception-log

(Optional) Clears the OBFL exception log entries.

interrupt-stats

(Optional) Clears the OBFL interrupt statistics.

module num

(Optional) Clears the OBFL information for a specific module.

obfl-log

(Optional) Clears the OBFL (boot-uptime/device-version/obfl-history).

stack-trace

(Optional) Clears the OBFL stack trace entries.


Command Default

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.

4.0(2)

Added counter-stats keyword.


Usage Guidelines

This command does not require a license.

Examples

The following example shows how to clear the OBFL environmental history entries:

switch# clear logging onboard environmental-history
switch# 

The following example shows how to clear the OBFL error statistics:

switch# clear logging onboard error-stats
switch# 

The following example shows how to clear the OBFL exception-log entries:

switch# clear logging onboard exception-log
switch# 

The following example shows how to clear the OBFL interrupt statistics:

switch# clear logging onboard interrupt-stats
switch# 

The following example shows how to clear the OBFL information for a specific module:

switch# clear logging onboard module 2
switch# 

The following example shows how to clear the OBFL (boot-uptime/device-version/obfl-history) entries:

switch# clear logging onboard obfl-log
switch# 

The following example shows how to clear the OBFL stack trace entries.

switch# clear logging onboard stack-trace
switch# 

Related Commands

Command
Description

hw-module logging onboard

Enables OBFL based on the error type.

show logging onboard

Displays onboard failure logs.


clear logging session

Use the clear logging session command to clear the current logging session.

clear logging session

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any

Supported User Roles

Super user
VDC administrator
VDC user

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the current logging session:

switch# clear logging session 
switch#

Related Commands

Command
Description

show logging session

Displays logging session status


clear ntp session

To do clear the Network Time Protocol (NTP) session, use the clear ntp session command.

clear ntp session

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin
network-operator
vdc-admin
vdc-operator

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the NTP session:

switch(config)# clear ntp session

clear ntp statistics

To do clear the Network Time Protocol statistics, use the clear ntp statistics command.

clear ntp statistics {all-peers | io | local | memory}

Syntax Description

all-peers

Clear statistics for all NTP peers.

io

Clear IO statistics.

local

Clear local statistics.

memory

Clear memory statistics.


Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin
network-operator
vdc-admin
vdc-operator

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear statistics for all NTP peers:

switch(config)# clear ntp statistics all-peers

Related Commands

Command
Description

show ntp peers

Displays information about NTP peers.


clear nvram

To do clear the NVRAM, use the clear nvram command.

clear nvram

Syntax Description

This command has no keywords or arguments.

Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin
network-operator
vdc-admin
vdc-operator

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear NVRAM:

switch(config)# clear nvram

clear platform flow ip

To clear NetFlow hardware IPv4 entries, use the clear platform flow ip command.

clear platform flow ip [type] [force-export] [module mod-num]

Syntax Description

type

(Optional) Specifies the type of entry to clear. See the "Usage Guidelines" section for valid values.

force-export

(Optional) Specifies a forced export of the cleared data to a collector.

module mod-num

(Optional) Specifies a module. The ranges for the module number depends on the chassis used.


Command Default

If you do not specify the type, all types are cleared.

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

The following example shows how to specify a forced export of the cleared data to a collector:

switch# clear platform flow ip forced-export
switch#

The following example shows how to clear the NetFlow statistics for a module:

switch# clear platform flow ip module 2
switch#

Related Commands

Command
Description

flow exporter

Creates a flow exporter.

clear flow monitor

Clears the flow monitor.

flow monitor

Creates a flow monitor.

show flow monitor

Displays flow monitor status and statistics.


clear session state name

To clear the state information for a session, use the clear session state name command

clear session state name name

Syntax Description

name

Name of the session. The name can be any case-sensitive alphanumeric string up to 63 characters.


Defaults

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the internal state for a configuration session:

switch# clear session state name myACLs 


Related Commands

Command
Description

show configuration session

Displays information about the configuration sessions.


clear system reset-reason

To clear the device reset-reason history, use the clear system reset-reason command.

clear system reset-reason

Syntax Description

This command has no arguments or keywords.

Defaults

None

Command Modes

Any command mode

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the device reset-reason history:

switch# clear system reset-reason

Related Commands

Command
Description

show system reset-reason

Displays the device reset-reason history.


collect counter

To configure the number of bytes or packets in a flow as a non-key field and collect the counter values (number of bytes or packets seen) for a Flexible NetFlow flow record, use the collect counter command in Flexible NetFlow flow record configuration mode. To disable the use of the number of bytes or packets in a flow (counters) as a non-key field for a Flexible NetFlow flow record, use the no form of this command.

collect counter {bytes [long] | packets [long]}

no collect counter {bytes [long] | packets [long]}

Syntax Description

bytes

Configures the number of bytes seen in a flow as a non-key field and enables collecting the total number of bytes from the flow.

long

(Optional) Enables collecting the total number of bytes from the flow using a 64 bit counter.

packets

Configures the number of bytes seen in a flow as a non-key field and enables collecting the total number of packets from the flow.


Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure non-key fields for the flow monitor record, and to enable capturing the values in the fields for the flow created with the record. The values in non-key fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a non-key field does not create a new flow. In most cases the values for non-key fields are taken from only the first packet in the flow.

collect counter packets

This command configures a 32-bit counter that is incremented for each packet seen in the flow. For extremely long flows it is possible for this counter to wrap when it reaches the limit of 4 billion or so packets. On detection of a scenario which would cause a wrap, a flow monitor with a normal cache type will export the flow and start a new flow.

collect counter packets long

This command configures a 64-bit counter that is incremented for each packet seen in the flow. It is unlikely that a 64-bit counter will ever wrap.

This command does not require a license.

Examples

The following example enables collecting the total number of bytes from the flows as a non-key field:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect counter bytes

The following example enables collecting the total number of bytes from the flows as a non-key field using a 64 bit counter:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect counter bytes long

The following example enables collecting the total number of packets from the flows as a non-key field:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect counter packets

The following example enables collecting the total number of packets from the flows as a non-key field using a 64 bit counter:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect counter packets long

Related Commands

Command
Description

collect counter

Configures the counters as a non-key field and collects the counter values.

collect flow

Configures flow identifying fields as a non-key fields and collects their values.

collect interface

Configures the input and/or output interface as a non-key field and collects the values.

collect ipv4

Configures an IPv4 field as a non-key field and collects the value in it.

collect routing

Configures a routing attribute as a non-key field and collects the value of the field.

collect timestamp

Configures the timestamp fields as a non-key field and collects the values.

collect transport

Configures a transport layer field as a non-key field and collects the values.

debug flow record

Enables debugging output for flow records.

flow record

Creates a flow record.

match flow

Configures one or more of the flow fields as key fields.

match interface

Configures the direction that traffic flows in respect to an interface (interface field) as a key field.

match ipv4

Configures one or more of the IPv4 fields as a key field.

match routing

Configures one or more of the routing fields as a key field.

match timestamp

Configures a timestamp field as a key field.

match transport

Configures one or more of the transport fields as a key field.

show flow record

Displays flow record status and statistics.


collect flow

To configure the flow direction and/or the flow sampler ID number as a non-key field and collect their values for a Flexible NetFlow flow record, use the collect flow command in Flexible NetFlow flow record configuration mode. To disable the use of the flow direction and/or the flow sampler ID number as a non-key field for a Flexible NetFlow flow record, use the no form of this command.

collect flow {direction | sampler}

no collect flow {direction | sampler}

Syntax Description

direction

Configures the flow direction as a non-key field and enables collecting the direction that the flow was monitored in.

sampler

Configures the flow sampler ID as a non-key field and enables collecting the ID of the sampler that is assigned to the flow monitor.


Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure non-key fields for the flow monitor record, and to enable capturing the values in the fields for the flow created with the record. The values in non-key fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a non-key field does not create a new flow. In most cases the values for non-key fields are taken from only the first packet in the flow.

collect flow direction

This field indicates the direction of the flow. This is of most use when a single flow monitor is configured for input and output flows and can be used to find and eliminate flows which are being monitored twice, once on input and once on output.

collect flow sampler

This field contains the ID of the flow sampler used to monitor the flow. This is useful when more than one flow sampler is being used with different sampling rates. The Flow Exporter option sampler-table command will export options records with mappings of the flow sampler ID to sampling rate so the collector can calculate the scaled counters for each flow.

This command does not require a license.

Examples

The following example enables collecting the direction the flow was monitored in as a non-key field:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect flow direction

The following example configures ID of the flow sampler that is assigned to the flow as a non-key field and enables collecting the ID of the flow sampler:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect flow sampler

Related Commands

Command
Description

collect counter

Configures the counters as a non-key field and collects the counter values.

collect flow

Configures flow identifying fields as a non-key fields and collects their values.

collect interface

Configures the input and/or output interface as a non-key field and collects the values.

collect ipv4

Configures an IPv4 field as a non-key field and collects the value in it.

collect routing

Configures a routing attribute as a non-key field and collects the value of the field.

collect timestamp

Configures the timestamp fields as a non-key field and collects the values.

collect transport

Configures a transport layer field as a non-key field and collects the values.

flow record

Creates a flow record.

match flow

Configures one or more of the flow fields as key fields.

match interface

Configures the direction that traffic flows in respect to an interface (interface field) as a key field.

match ipv4

Configures one or more of the IPv4 fields as a key field.

match routing

Configures one or more of the routing fields as a key field.

match timestamp

Configures a timestamp field as a key field.

match transport

Configures one or more of the transport fields as a key field.

show flow record

Displays flow record status and statistics.


collect interface

To configure the input and/or output interface as a non-key field and collect the values for a Flexible NetFlow flow record, use the collect interface command in Flexible NetFlow flow record configuration mode. To disable the use of the input and/or output interface as a non-key field for a Flexible NetFlow flow record, use the no form of this command.

collect interface {input | output}

no collect interface {input | output}

Syntax Description

input

Configures the input interface as a non-key field and enables collecting the input interface from the flows.

output

Configures the output interface as a non-key field and enables collecting the output interface from the flows.


Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure non-key fields for the flow monitor record, and to enable capturing the values in the fields for the flow created with the record. The values in non-key fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a non-key field does not create a new flow. In most cases the values for non-key fields are taken from only the first packet in the flow.

This command does not require a license.

Examples

The following example configures the input interface as a non-key field and enables collecting the input interface value:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect interface input

The following example configures the input interface as a non-key field and enables collecting the output interface value:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect interface output

Related Commands

Command
Description

collect counter

Configures the counters as a non-key field and collects the counter values.

collect flow

Configures flow identifying fields as a non-key fields and collects their values.

collect interface

Configures the input and/or output interface as a non-key field and collects the values.

collect ipv4

Configures an IPv4 field as a non-key field and collects the value in it.

collect routing

Configures a routing attribute as a non-key field and collects the value of the field.

collect timestamp

Configures the timestamp fields as a non-key field and collects the values.

collect transport

Configures a transport layer field as a non-key field and collects the values.

flow record

Creates a flow record.

match flow

Configures one or more of the flow fields as key fields.

match interface

Configures the direction that traffic flows in respect to an interface (interface field) as a key field.

match ipv4

Configures one or more of the IPv4 fields as a key field.

match routing

Configures one or more of the routing fields as a key field.

match timestamp

Configures a timestamp field as a key field.

match transport

Configures one or more of the transport fields as a key field.

show flow record

Displays flow record status and statistics.


collect routing

To configure a routing attribute as a non-key field and collect the value of the field for a Flexible NetFlow flow record, use the collect routing command in Flexible NetFlow flow record configuration mode. To disable the use of a routing attribute as a non-key field for a Flexible NetFlow flow record, use the no form of this command.

collect routing {{destination | source} as [peer] | traffic-index | forwarding-status | next-hop address ipv4 [bgp]}

no collect routing {{destination | source} as [peer] | traffic-index | forwarding-status | next-hop address ipv4 [bgp]}

Syntax Description

destination

Configures one or more of the destination routing attributes fields as a non-key field and enables collecting the values from the flows.

source

Configures one or more of the source routing attributes fields as a non-key field and enables collecting the values from the flows.

as

Configures the destination AS field as a non-key field and enables collecting the value in the AS field from the flows.

peer

(Optional) Configures the destination AS number of the peer network as a non-key field and enables collecting the value of the AS number of the peer network from the flows.

traffic-index

Configures the BGP source or destination traffic index as a non-key field and enables collecting the value of the BGP destination traffic index from the flows.

forwarding-status

Configures the forwarding status as a non-key field and enables collecting the value of the forwarding status of the packet from the flows.

next-hop address ipv4

Configures the next hop value as a non-key field and enables collecting information regarding the next hop from the flows.

bgp

(Optional) Configures the IP address of the next hop BGP network as a non-key field and enables collecting the value of the IP address of the BGP next hop network from the flows.


Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure non-key fields for the flow monitor record, and to enable capturing the values in the fields for the flow created with the record. The values in non-key fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a non-key field does not create a new flow. In most cases the values for non-key fields are taken from only the first packet in the flow.

collect routing source as [peer]

This collects the 16-bit AS number based on a lookup of the router's routing table using the source IP address. The optional peer keyword will provide the expected next network as opposed to the originating network.


Note This is based on how packets are routed back from this router and the value may not be accurate for asymmetrical routes.


collect routing destination as [peer]

This collects the 16-bit AS number based on a lookup of the router's routing table using the destination IP address. The optional peer keyword will provide the expected next network as opposed to the destination network.

collect routing source traffic-index

This collects the traffic index field based on the source AS for this flow. The traffic-index field is a value propagated through BGP.

collect routing forwarding-status

This collects a field to indicate if the packets were successfully forwarded. The field is in two parts and may be up to 4 bytes in length. At this time only the status field is used:

    +-+-+-+-+-+-+-+-+
    | S | Reason    |
    | t | codes     |
    | a | or        |
    | t | flags     |
    | u |           |
    | s |           |
    +-+-+-+-+-+-+-+-+
     0 1 2 3 4 5 6 7

  Status:
  00b=Unknown, 01b = Forwarded, 10b = Dropped, 11b = Consumed

This command does not require a license.

Examples

The following example configures the 16-bit AS number based on a lookup of the router's routing table using the source IP address as a non-key field and enables collecting the 16-bit AS number value:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect routing source as 

The following example configures the 16-bit AS number based on a lookup of the router's routing table using the destination IP address as a non-key field and enables collecting the 16-bit AS number value:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect routing destination as 

The following example configures the value in the traffic index field based on the source AS for a flow as a non-key field and enables collecting the value in the traffic index field value:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect routing source traffic-index 

The following example configures the forwarding status as a non-key field and enables collecting the the forwarding status value:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect routing forwarding-status

Related Commands

Command
Description

collect counter

Configures the counters as a non-key field and collects the counter values.

collect flow

Configures flow identifying fields as a non-key fields and collects their values.

collect interface

Configures the input and/or output interface as a non-key field and collects the values.

collect ipv4

Configures an IPv4 field as a non-key field and collects the value in it.

collect routing

Configures a routing attribute as a non-key field and collects the value of the field.

collect timestamp

Configures the timestamp fields as a non-key field and collects the values.

collect transport

Configures a transport layer field as a non-key field and collects the values.

flow record

Creates a flow record.

match flow

Configures one or more of the flow fields as key fields.

match interface

Configures the direction that traffic flows in respect to an interface (interface field) as a key field.

match ipv4

Configures one or more of the IPv4 fields as a key field.

match routing

Configures one or more of the routing fields as a key field.

match timestamp

Configures a timestamp field as a key field.

match transport

Configures one or more of the transport fields as a key field.

show flow record

Displays flow record status and statistics.


collect timestamp sys-uptime

To configure the TIMESTAMP SYS-UPTIME field as a non-key field and collect the values in them for a Flexible NetFlow flow record, use the collect timestamp sys-uptime command in Flexible NetFlow flow record configuration mode. To disable the use of the TIMESTAMP SYS-UPTIME field as a non-key for a Flexible NetFlow flow record, use the no form of this command.

collect timestamp sys-uptime {first | last}

no collect timestamp sys-uptime {first | last}

Syntax Description

first

Configures the sys-uptime for the time the first packet was seen from the flows as a non-key field and enables collecting time stamps based on the sys-uptime for the time the first packet was seen from the flows.

last

Configures the sys-uptime for the time the last packet was seen from the flows as a non-key field and enables collecting time stamps based on the sys-uptime for the time the most recent packet was seen from the flows.


Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure non-key fields for the flow monitor record, and to enable capturing the values in the fields for the flow created with the record. The values in non-key fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a non-key field does not create a new flow. In most cases the values for non-key fields are taken from only the first packet in the flow.

This command does not require a license.

Examples

The following example configures timestamps based on the sys-uptime for the time the first packet was seen from the flows as a non-key field and enables collecting the sys-uptime for the time the first packet was seen from the flows:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect timestamp sys-uptime first

The following example configures timestamps based on the sys-uptime for the time the most recent packet was seen from the flows as a non-key field and enables collecting the sys-uptime for the time the most recent packet was seen from the flows:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect timestamp sys-uptime last

Related Commands

Command
Description

collect counter

Configures the counters as a non-key field and collects the counter values.

collect flow

Configures flow identifying fields as a non-key fields and collects their values.

collect interface

Configures the input and/or output interface as a non-key field and collects the values.

collect ipv4

Configures an IPv4 field as a non-key field and collects the value in it.

collect routing

Configures a routing attribute as a non-key field and collects the value of the field.

collect timestamp

Configures the timestamp fields as a non-key field and collects the values.

collect transport

Configures a transport layer field as a non-key field and collects the values.

flow record

Creates a flow record.

match flow

Configures one or more of the flow fields as key fields.

match interface

Configures the direction that traffic flows in respect to an interface (interface field) as a key field.

match ipv4

Configures one or more of the IPv4 fields as a key field.

match routing

Configures one or more of the routing fields as a key field.

match timestamp

Configures a timestamp field as a key field.

match transport

Configures one or more of the transport fields as a key field.

show flow record

Displays flow record status and statistics.


collect transport tcp flags

To configure a Transmission Control Protocol (TCP) field as a non-key field and collect the value in it for a Flexible NetFlow flow record, use the collect transport tcp flags command in Flexible NetFlow flow record configuration mode. To disable the use of a TCP field as a non-key field for a Flexible NetFlow flow record, use the no form of this command.

collect transport tcp flags

no collect transport tcp flags

Syntax Description

This command has no arguments or keywords

Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure non-key fields for the flow monitor record, and to enable capturing the values in the fields for the flow created with the record. The values in non-key fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a non-key field does not create a new flow. In most cases the values for non-key fields are taken from only the first packet in the flow.

This command does not require a license.

Examples

The following example configures the TCP flags as a non-key field:

switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect transport tcp flags

Related Commands

Command
Description

collect counter

Configures the counters as a non-key field and collects the counter values.

collect flow

Configures flow identifying fields as a non-key fields and collects their values.

collect interface

Configures the input and/or output interface as a non-key field and collects the values.

collect ipv4

Configures an IPv4 field as a non-key field and collects the value in it.

collect routing

Configures a routing attribute as a non-key field and collects the value of the field.

collect timestamp

Configures the timestamp fields as a non-key field and collects the values.

collect transport

Configures a transport layer field as a non-key field and collects the values.

flow record

Creates a flow record.

match flow

Configures one or more of the flow fields as key fields.

match interface

Configures the direction that traffic flows in respect to an interface (interface field) as a key field.

match ipv4

Configures one or more of the IPv4 fields as a key field.

match routing

Configures one or more of the routing fields as a key field.

match timestamp

Configures a timestamp field as a key field.

match transport

Configures one or more of the transport fields as a key field.

show flow record

Displays flow record status and statistics.


commit

To apply the commands in the configuration session, use the commit command.

Syntax Description

verbose

(Optional) Commits the current configuration session and displays more details on the results.


Defaults

None

Command Modes

Session configuration

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

Use the commit command to apply this configuration session to the device, You can use the exit command to exit session configuration mode without committing the commands. Use the abort command to delete this session without committing the commands.

This command does not require a license.

Examples

This example shows how to commit a session:

switch# configure session myACLs

switch(config-s)# commit 
switch#

Related Commands

Command
Description

abort

Deletes the session and exists session configuration mode.

exit

Exits session configuration mode without committing the commands.


configure session

To create or modify a configuration session, use the configure session command.

configure session name

Syntax Description

name

Name of the session. The name can be any case-sensitive alphanumeric string up to 63 characters.


Defaults

None

Command Modes

Any

Supported User Roles

network-admin
vdc-admin

Command History

Release
Modification

4.0(1)

This command was introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to create a configuration session:

switch# configure session myACLs 
switch(config-s)# 


Related Commands

Command
Description

show configuration session

Displays the information about the configuration sessions.