# FANT: Flexible Attention-Shifting Network Telemetry
## 5 Attention-Switching Strategy
### Implementation
If true, output the current \(A\) as the solution of the entire algorithm. Otherwise, update the allowed cost of the solution to the larger of \(T_{min}\) and \(T+1\), and call the EPCR function again. Note that \(R\) is a subset of the union of \(P\). Therefore, when the allowed cost of the solution is sufficiently large, EPCR will inevitably return true. This avoids non-termination of the search. ## 6 Experiment

Our evaluation focuses on two primary questions:

* Is the FANT capable of supporting the normal operation of network applications? * How does the FANT system perform under various conditions and configurations? To address these questions:

* We built a prototype of the FANT system and used this prototype to provide measurement results for a network application. * We compared the performance of the FANT algorithm with other comparative methods under various conditions and using different parameter settings. ### Testbed

Experiments were conducted on a machine equipped with an Intel i7-13700 processor, 32 GB of memory, and running Ubuntu 18.04. The metrics categorization strategy and attention switching strategy were implemented in Python. We used an existing probe generation algorithm that is implemented in C++ and open source on github [27]. **Prototype:** We implemented the forwarding logic of the device with P4 and loaded this logic into the P4 software (1.15.0) switch (to ensure that the experimental results were not influenced by the performance of BMv2, we disabled log printing by modifying the build flag of BMv2 to accelerate packet forwarding. Additionally, we set BMv2's queue depth to 4096 packets to prevent packet loss due to uneven traffic flows) (Behavioral Model 2, BMv2) to serve as the switch in the prototype. The hosts were instantiated using Linux network namespaces, and business flows were generated using iperf. The switches were interconnected and also connected to hosts using virtual Ethernet (veth) pairs. INT generator/collectors were implemented in Python using Scapy to construct and receive probe packets. INT controllers were also developed in Python and communicated with switches via gRPC and with INT generators/collectors via sockets. We employed Redis to implement the high-speed database, and for simplicity, we did not integrate the Kafka database into the prototype. The label management functionality of SR (i.e., the mapping relationship between adjacency labels and ports) was statically written into.json files and read by BMv2. We implemented a network verification application. The application can compare whether network traffic changes as expected when new network configurations are added, thereby verifying the correctness of the configuration settings. **Large Scale Simulation:** The topology generation, INT-Probe generator/collector selection, and suspicious link generation methods were all implemented in Python. ### Comparative Methods

Since there are no existing methods specifically addressing our problem, we introduce two baseline solutions to better evaluate the performance of our solution, FANT, with a heuristic algorithm (**FANT-H**). **INT-P**: INT-Probe is the state-of-the-art solution that minimizes overhead and has demonstrated its theoretical optimality. We implemented INT-Probe (INT-P) without the attention-switching mechanism for comparison. **FANT-G**: We modeled the probe-switching strategy as a WSCP, which is generally solved using a greedy algorithm. We refer to the FANT system that utilizes a greedy algorithm for the attention-shifting strategy as FANT-Greedy (FANT-G), and we implemented FANT-G for comparison. ### Experiment Setting

Network applications supported by the ANT system, such as Network Verification and Network Performance Analysis, always require a robust measurement system in real networks. Therefore, to closely mimic real network conditions, we have enhanced the robustness of the INT-Probe algorithm and selected this enhanced version as the probe generator algorithm for three methods.