This section describes ONOS features that are still experimental. Such features have not been tested thoroughly, might have various issues, or might be removed in the future.
This section assumes that the reader has installed and is able to run ONOS by following Installing and Running ONOS.
Reactive Forwarding
Description
Reactive Forwarding refers to the mechanism used to install forwarding entries into the network switches - those entries are installed on-demand after a sender starts transmitting packets. The alternative, Proactive Forwarding, refers to installing the forwarding entries proactively, i.e., before a sender starts the transmission. In ONOS, the Reactive Forwarding can be enabled by installing the onos-app-fwd application, either by adding it to the ONOS_FEATURES for the ONOS deployment cell, or by loading it manually from the ONOS CLI:
onos> feature:install onos-app-fwd
Prerequisites
It is highly recommended that the onos-app-proxyarp application is also installed.
Configuration
The behavior of the onos-app-fwd application can be defined in the org.onosproject.fwd.ReactiveForwarding.cfg configuration file. A sample of that file can be found in the tools/package/etc/samples directory. The file should be copied to the tools/package/etc directory and edited as appropriate. All configuration options are listed and described inside that file.
Prerequisites
After each editing of the configuration file, ONOS should be packaged and installed as described in Installing and Running ONOS.
Testing Reactive Forwarding
The simplest way to test Reactive Forwarding between two hosts is to configure those hosts with IP addresses that belong to the same subnet:
- Host A: 10.0.0.2/24
- Host B: 10.0.0.3/24
user@HostA:~$ ifconfig -a eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:02 inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:180 errors:0 dropped:162 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:14542 (14.5 KB) TX bytes:996 (996.0 B) ... user@HostB:~$ ifconfig -a eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:03 inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:3/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:292 errors:0 dropped:268 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:23644 (23.6 KB) TX bytes:780 (780.0 B) ...
Before installing onos-app-fwd, running ping between the hosts should not work:
user@HostA:~$ ping 10.0.0.3 PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data. ^C --- 10.0.0.3 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2014ms
After installing onos-app-fwd, running ping between the hosts should work:
onos> feature:install onos-app-fwd onos> user@HostA:~$ ping 10.0.0.3 PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data. 64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=23.5 ms 64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=0.394 ms 64 bytes from 10.0.0.3: icmp_seq=3 ttl=64 time=0.052 ms 64 bytes from 10.0.0.3: icmp_seq=4 ttl=64 time=0.054 ms 64 bytes from 10.0.0.3: icmp_seq=5 ttl=64 time=0.055 ms 64 bytes from 10.0.0.3: icmp_seq=6 ttl=64 time=0.047 ms ^C --- 10.0.0.3 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 4999ms rtt min/avg/max/mdev = 0.047/4.033/23.596/8.749 ms user@HostA:~$
While ping is running, the corresponding flow entries should be visible in the ONOS CLI. In the example below, there are two switches between the hosts, and each switch has two flow entries, one for each direction:
onos> flows | grep -B 1 -A 1 ETH_DST id=70000f3319c4c, state=ADDED, bytes=10486, packets=107, duration=107, priority=10, tableId=DEFAULT appId=org.onosproject.fwd selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:03}, ETH_DST{mac=00:00:00:00:00:02}, IN_PORT{port=2}] treatment=[OUTPUT{port=3}] id=70000f3319fee, state=ADDED, bytes=10486, packets=107, duration=107, priority=10, tableId=DEFAULT appId=org.onosproject.fwd selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:02}, ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=3}] treatment=[OUTPUT{port=2}] -- id=70000f33210ab, state=ADDED, bytes=10486, packets=107, duration=107, priority=10, tableId=DEFAULT appId=org.onosproject.fwd selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:02}, ETH_DST{mac=00:00:00:00:00:03}, IN_PORT{port=2}] treatment=[OUTPUT{port=3}] id=70000f332144d, state=ADDED, bytes=10486, packets=107, duration=107, priority=10, tableId=DEFAULT appId=org.onosproject.fwd selector=[ETH_TYPE{ethType=800}, ETH_SRC{mac=00:00:00:00:00:03}, ETH_DST{mac=00:00:00:00:00:02}, IN_PORT{port=3}] treatment=[OUTPUT{port=2}] onos>
After ping is stopped, those flow entries should expire within 10 seconds. This expiration time period is configurable.
Previous : Applications and Use Cases
Next : Appendix A: CLI commands