##Introduction ONOS IPFIX application is the demo application that shows the concept of the OpenFlow statistics export over IPFIX protocol and possibly other similar protocols (e.g NetFlow).
Currently, application supports two scenarios of the OpenFlow statistics export:
The intent of the application is to demonstrate the concept which can be possibly extended to export OpenFlow flow statistics for other ONOS applications, like bgprouter, sdnip, mfwd, etc.
#User guide
###Installation ONOS IPFIX requires at least ONOS version 1.3.
ONOS IPFIX application can be downloaded from the onos-app-samples GIT repository with the following command:
git clone https://gerrit.onosproject.org/onos-app-samples.git
Enter the ONOS IPFIX application directory and compile the application:
cd onos-app-samples/onos-app-ipfix mvn clean install
After successful compilation of the application, it can be installed on the running ONOS instance with the following command:
onos-app <ip-address-of-ONOS-instance> reinstall! target/onos-app-ipfix-1.3.0-SNAPSHOT.oar
###General configuration ONOS IPFIX application generally requires that user configures IP address and port of the IPFIX collector. This is configured with the following ONOS configuration commands:
set org.onosporject.ipfix.IpfixManager CollectorAddress <ip-address> cfg set org.onosporject.ipfix.IpfixManager CollectorPort <udp-port>
IPFIX packets are transported over UDP and default port is 2055.
###Flow statistics export for ONOS Reactive Forwarding application The export of the Flow statistics for ONOS Reactive Forwarding application is enabled by default. It is realized over Flow Rule Listener. When the flow rule created by the ONOS reactive forwarding application is removed from ONOS, IPFIX application will collect its statistics, covert them to the appropriate IPFIX format and export them over IPFIX protocol.
Currently, ONOS IPFIX supports three IPFIX record templates that are used for exporting of these flows:
MAC template (template ID = 331) - matches only MAC addresses, VLAN and switch ports. This template is used with default configuration of the reactive forwarding application that matches only source and destination MAC address and input port. This template has following IPFIX information elements (IEs):
IPv4 template (template ID = 332) - matches MAC template with addition to IPv4 addresses, Protocol, DSCP and TCP/UDP port. This template will be used if the matching of the IPv4 address is enabled in the ONOS Reactive Forwarding Application. This template has following IPFIX information elements (IEs) in addition to MAC template:
IPv6 template (template ID = 333) - matches MAC template with addition to IPv6 addresses, Next-Header, Flow Label and TCP/UDP port. This template will be used if the matching of the IPv6 address is enabled in the ONOS Reactive Forwarding application. This template has following IPFIX information elements (IEs) in addition to MAC template:
User can enable matching of the IPv4 address and other IPv4 fields in ONOS Reactive Forwarding application with following ONOS commands:
cfg set org.onosproject.fwd.ReactiveForwarding matchIpv4Addresses true cfg set org.onosproject.fwd.ReactiveForwarding matchIpv4Dscp true
User can enable matching of the IPv4 address and other IPv4 fields in ONOS Reactive Forwarding application with following ONOS commands:
cfg set org.onosproject.proxyarp.ProxyArp ipv6NeighborDiscovery true cfg set org.onosproject.provider.host.impl.HostLocationProvider ipv6NeighborDiscovery true cfg set org.onosproject.fwd.ReactiveForwarding ipv6Forwarding true cfg set org.onosproject.fwd.ReactiveForwarding matchIpv6Addresses true cfg set org.onosproject.fwd.ReactiveForwarding matchIpv6FlowLabel true
User can enable matching of the VLAN, TCP/UDP ports and ICMP type and code fields in ONOS Reactive Forwarding application with following ONOS commands:
cfg set org.onosproject.fwd.ReactiveForwarding matchVlan true cfg set org.onosproject.fwd.ReactiveForwarding matchTcpUdpPorts true cfg set org.onosproject.fwd.ReactiveForwarding matchIcmpFields true
To disable IPFIX export of the flow statistics for Reactive Forwarding application flows use following ONOS command:
cfg set org.onosproject.ipfix.IpfixManager ReactiveForwardingExport false
###Export of the switch port statistics Export of the switch port statistics over IPFIX is disabled by default. To enable it, use following ONOS command:
cfg set org.onosproject.ipfix.IpfixManager PortStatsFlowExport true
Export of the switch port statistics is realized over DeviceListener. When ONOS updates its internal port statistics for the OpenFlow switch, IPFIX application will export port statistics over IPFIX protocol. The export is done only by the ONOS instance that is “master” for the specific OpenFlow switch. The exported values represent difference between switch port counters collected by ONOS in the current and the previous polling. Polling interval is controlled by the ONOS OpenFlow Device Provider which actually collects statistics and by default is very frequent on 5 seconds interval. IPFIX application will export port statistics for every ONOS update of the statistics. It is recommended to configure ONOS port statistics polling interval to appropriate value with the following command:
cfg set org.onosproject.org.provider.of.device.impl.OpenFlowDeviceProvider PortStatsPollFrequency 30
The export of the switch port statistics uses two IPFIX record templates:
These templates consist of the following information elements (IEs):
##Known shortcomings and issues The purpose of the application is demonstration of the possibility for export of the OpenFlow statistics over IPFIX protocol. For this reason, export of IPFIX records is realized in very simplified way:
Some of the IPFIX analyzer application will use source IP address of the IPFIX packets to identify “IPFIX exporter”. Because the ONOS IPFIX application exports IPFIX records on behalf of OpenFlow switches, IPFIX packets have ONOS controller IP address. ONOS IPFIX application uses exporterIPv4Address and exporterIPv6Address to further identify OpenFlow switch that matched the flow and on which behalf statistics are exported: