17秋 SDN课程 第五次上机作业
项目地址:https://github.com/Wasdns/new_balance
Task of SDN Course, Realizing Load Balancer: New Balance
Introduction:
This demo introduces a simple load balancer application which schedules traffics based on packet rate. At runtime, the P4 switches counts the processed packets and the controller dynamically queries the packet number per second in order to calculate the packet rate. If the calculated packet rate of one assigned switch is over the threshold(packet/second), the controller would schedules the traffic to other pathes to offload the tasks of this switch.
Hint - All the pathes are selected from docs/lb_scenarios.docx scenario3.
Quick Start:
For running this demo, you are required to open three terminals at least.
Terminal 1:
- ./run_14_demo.sh
Terminal 2:
- ./set_path.py -p 1 // set the default paths
- ./controller.py -p 10 -i 3 // ‘-p‘ means the threshold(pkt/s), ‘-i‘ means the inspection interval(s)
Terminal 3:
- ./utils/sender.py // you could see path scheduling in the console of controller
- ./utils/low_rate_sender.py // nothing happened
[option]Terminal 4:
- ./utils/listener.py // this script listens to all the potential ports, you could also assign port using ‘-p‘
Author: Wasdns
原文地址:https://www.cnblogs.com/qq952693358/p/8313507.html