- play_arrow Overview
- play_arrow Configuring Traffic Forwarding for Network Monitoring
- Configuring Traffic Forwarding and Monitoring
- Configuring IPv4 and IPv6 Accounting
- Configuring Discard Accounting
- Configuring Active Flow Monitoring on PTX Series Packet Transport Routers
- Configuring Passive Flow Monitoring
- Configuring Port Mirroring
- Example: Configuring Local Port Mirroring on PTX Routers
- Example: Configuring Remote Port Mirroring on PTX Routers
- Configuring Next-Hop Groups to Use Multiple Interfaces to Forward Packets Used in Port Mirroring
- Defining a Port-Mirroring Firewall Filter
- Defining a Next-Hop Group on MX Series Routers for Port Mirroring
- play_arrow Configuring Forwarding Table Filters to Efficiently Route Traffic
- play_arrow Configuring Forwarding Options for Load Balancing Traffic
- Configuring Load Balancing for Ethernet Pseudowires
- Configuring Load-Balance Groups
- Understanding the Algorithm Used to Load Balance Traffic on MX Series Routers
- Understanding Per-Packet Load Balancing
- Configuring Per-Packet Load Balancing
- Configuring Per-Flow Load Balancing
- Understanding Load Balancing for BGP Traffic with Unequal Bandwidth Allocated to the Paths
- Understanding the Default BGP Routing Policy on Packet Transport Routers (PTX Series)
- ECMP Flow-Based Forwarding on ACX Series Routers
- Per-Flow and Per-Prefix Load Balancing Overview
- Configuring Per-Prefix Load Balancing
- Configuring Per-Flow Load Balancing Based on Hash Values
- Configuring Load Balancing Based on MAC Addresses
- Load Balancing VPLS Non-Unicast Traffic Across Member Links of an Aggregate Interface
- Example: Configuring Multicast Load Balancing over Aggregated Ethernet Links
- play_arrow Configuring Other Forwarding Options
- Configuring Routers, Switches, and Interfaces as DHCP and BOOTP Relay Agents
- Configuring DNS and TFTP Packet Forwarding
- Configuring Port-based LAN Broadcast Packet Forwarding
- Preventing DHCP Spoofing on MX Series 5G Universal Routing Platforms
- Understanding the Hyper Mode Feature on Enhanced MPCs for MX Series Routers and EX9200 Switches
- Configuring Hyper Mode on Enhanced MPCs to Speed Up Packet Processing
- Unsupported Features and CLI Commands When Hyper Mode Is Enabled
- play_arrow Configuration Statements and Operational Commands
Collecting Traffic Sampling Output in a File
You configure
traffic sampling results to a file in the /var/tmp directory.
To collect the sampled packets in a file, include the file
statement at the [edit forwarding-options sampling output]
hierarchy level:
To configure the period of time before an active flow is exported,
include the flow-active-timeout
statement at the [edit
forwarding-options sampling output family (inet | inet6 | mpls)]
hierarchy level:
[edit forwarding-options sampling family (inet | inet6 | mpls) output] flow-active-timeout seconds;
To configure the period of time before a flow is considered
inactive, include the flow-inactive-timeout
statement at
the [edit forwarding-options sampling output]
hierarchy
level:
[edit forwarding-options sampling family (inet | inet6 | mpls) output] flow-inactive-timeout seconds;
To configure the interface that sends out monitored information,
include the interface
statement at the [edit forwarding-options
sampling output]
hierarchy level:
[edit forwarding-options sampling family (inet | inet6 | mpls) output] interface interface-name { engine-id number; engine-type number; source-address address; }
This feature is not supported with the version 9 template format. You must send traffic flows collected using version 9 to a server. For more information see Collecting Traffic Sampling Output in the Cisco Systems NetFlow Services Export Version 9 Format.
Traffic Sampling Output Format
Traffic sampling output is saved to an ASCII text file. The following is an example of the traffic sampling output that is saved to a file in the /var/tmp directory. Each line in the output file contains information for one sampled packet. You can optionally display a timestamp for each line.
The column headers are repeated after each group of 1000 packets.
# Apr 7 15:48:50 Time Dest Src Dest Src Proto TOS Pkt Intf IP TCP addr addr port port len num frag flags Apr 7 15:48:54 192.168.9.194 192.168.9.195 0 0 1 0x0 84 8 0x0 0x0 Apr 7 15:48:55 192.168.9.194 192.168.9.195 0 0 1 0x0 84 8 0x0 0x0 Apr 7 15:48:56 192.168.9.194 192.168.9.195 0 0 1 0x0 84 8 0x0 0x0 Apr 7 15:48:57 192.168.9.194 192.168.9.195 0 0 1 0x0 84 8 0x0 0x0 Apr 7 15:48:58 192.168.9.194 192.168.9.195 0 0 1 0x0 84 8 0x0 0x0
The output contains the following fields:
Time—Time at which the packet was received (displayed only if you include the
stamp
statement in the configuration)Dest addr—Destination IP address in the packet
Src addr—Source IP address in the packet
Dest port—Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port for the destination address
Src port—TCP or UDP port for the source address
Proto—Packet’s protocol type
TOS—Contents of the type-of-service (ToS) field in the IP header
Pkt len—Length of the sampled packet, in bytes
Intf num—Unique number that identifies the sampled logical interface
IP frag—IP fragment number, if applicable
TCP flags—Any TCP flags found in the IP header
To set the timestamp option for the file my-sample, enter the following:
[edit forwarding-options sampling family (inet | inet6 | mpls) output file] user@host# set filename my-sample files 5 size 2m world-readable stamp;
Whenever you toggle the timestamp option, a new header is included in the file. If you set the stamp option, the Time field is displayed.
# Apr 7 15:48:50 # Time Dest Src Dest Src Proto TOS Pkt Intf IP TCP # addr addr port port len num frag flags # Feb 1 20:31:21 # Dest Src Dest Src Proto TOS Pkt Intf IP TCP # addr addr port port len num frag flags