spacedancers's People
spacedancers's Issues
Homework for 581
For the homework, you are required to set up a simulation environment with the following specifications:
- Connect two hosts to a switch.
- Connect the switch to a remote controller (RYU, ONOS, or another controller of your choice).
- Ensure that the hosts can ping each other.
Furthermore, you should complete at least three tasks from the following list:
Writing Algorithm
We should learn how to read input and process it for processing dataset
Writing mininet topology in python
The following links can be used for creating topology in python:
- https://github.com/XuyangCaoUCSD/LeoEM/blob/4488b000c80fe540cd162741186dcbc9486bf88e/emulation_stage/emulator.py#L215 -> can be used to simulate satellite
- https://github.com/rubiruchi/Mininet-emulation/blob/54e0ff878481ab66b47614cd5eb2aa6cb942d003/mininet-testbed/mininet-sim.py#L77
- https://github.com/santhisenan/SDN_DDoS_Simulation/blob/master/tree_topology.py -> a topology using random flows
- https://github.com/parasgulati8/SDN-Simulation-with-OpenFlow/blob/master/topology.py -> a simple topology
- https://github.com/GuTaoZi/SDN_Simulation/blob/main/controller.py -> for handling adding host and links for the controller
Changing priority of table miss rule and other packet in rules
Packet in flows should have higher priority over table miss rule. With that, we dont have duplicate add_flow function.
Study Flow Rule statistics
| flags
| cookie
| packet_count
| byte_count
| match
| instructions
what are these?
Attach the boolean is_last_proactive_removed to every flow
Create data table for idle timeout allocation
Find how to get T_(last_duration), T_(packet_in) - T_(last_removed), # of flows and attach it to every flow
Why we get mininet crashes
We have an isue to debug which can be fixed after code correction + changing class name for the switch
Adding something new to our satellite handling
Our algorithm is more focused on a general solution in the current form. We should enhance it to be a more satellite-related solution.
We can add on our handover mechanism or try to simulate satellite or find something else.
Proactive Eviction Issue
In the proactive eviction, what we aim is to delete the flows with minimum heuristic values but sorting algorithm takes very long. This is not a ideal case, so we should find another way for this.
We may put a threshold to heuristic values and then select random flows among the list. Also, we can change this threshold value dynamically for considering the dataset.
Trying dynamic timeout setting mechanisms
Find delete threshold for controller data tables
Flow delete from flow table
A way to remove flow rules from table should be implemented
bug
Handler Conflict
In our code, the flow statistics and flow removal handlers conflict. Conflicts between event handlers can occur if they interfere with each other or if they make conflicting assumptions about the state of the application. In Ryu, event handlers are executed asynchronously, and it's crucial to ensure that they don't interfere with each other's logic.
Here are some tips to resolve or prevent conflicts between event handlers:
- Avoid Global State: Minimize the use of global state in your Ryu application. If multiple event handlers modify shared state, it can lead to conflicts. Instead, use attributes of your RyuApp class or pass necessary information through event objects.
- Ordering of Decorators: The order in which you apply the set_ev_cls decorators can affect the order in which handlers are called. Consider the order of decorators and whether the order influences the logic.
@set_ev_cls(EventA, MAIN_DISPATCHER)
@set_ev_cls(EventB, MAIN_DISPATCHER)
def handler_ab(self, ev):
# ...
@set_ev_cls(EventB, MAIN_DISPATCHER)
@set_ev_cls(EventA, MAIN_DISPATCHER)
def handler_ba(self, ev):
# ...
- Avoid Blocking Operations: Ensure that your event handlers don't perform long-running or blocking operations that can delay the processing of other events. Use asynchronous programming techniques if needed.
- Logging and Debugging: Add logging statements or print statements within your event handlers to understand the flow of execution and identify any unexpected behavior.
- Review Event Dependencies: If events are related or dependent on each other, ensure that the dependencies are handled correctly. For example, if one event handler relies on the results of another, make sure that the order of execution is appropriate.
- Handle Exceptions Gracefully: Use try-except blocks to catch and handle exceptions within your event handlers. This prevents exceptions in one handler from affecting the execution of others.
@set_ev_cls(EventA, MAIN_DISPATCHER)
def handler_a(self, ev):
try:
# Your code here
except Exception as e:
self.logger.error(f"Error in handler_a: {e}")
- Check Ryu Documentation and Release Notes: Be aware of any specific requirements or considerations for the events you are handling. Review the Ryu documentation and release notes for the version you are using.
- Separate Logic into Methods: If a single event handler has grown too complex, consider separating its logic into multiple methods within your RyuApp class.
Getting Flow table size?
Assign a flow table size to the switch.
Fix bug related to actual dataset topology creation
Even though we can create and replay dataset with a small dataset, with univ1 there are some issues. Need o fix that
Changing the proactive eviction heuristics
We cannot get the last hit info, so we should change our heuristics
Clear proactive eviction data table and cache periodically
Get flow table full message
Table Stats Issue
From the table stats reply handler, the matched count and lookup count in the response, adds up on subsequent runs, they are not reset by the system. To find the hit rate we need those, or we can do this manually.
It is better to find a way to reset the system maybe before running.
Create manual dataset for testing algorithm
Midterm Progress Report
We should find a dataset for network
https://figshare.com/articles/dataset/Flow_entries_of_the_OpenFlow_/12282341/1 -> flow rules dataset
Where does Self.logger.debug messages go?
Cookie value 0 should be specific to table-miss rule
Packet-in flow cookie value starts from 0 in our code, thus it conflicts with the table-miss rule. We should fix it and start from 1.
Find coefficients (for dynamic tmax calculation) for idle timeout
Find TCAM thresholds
Dataset search for network simulation
https://figshare.com/articles/dataset/Flow_entries_of_the_OpenFlow_/12282341/1 -> flow rules dataset
We cannot get total number of flows from add_flow
Because of this, we cannot get right flow table occupancy. Thus, we cannot set the idle timeout correctly. We can do so by requesting stats reply but this is not a reasonable way.
We should find a better way to get total number of active flows in the network.
Add_flow may not be working as expected.
Calculate and test heuristic for PE
Find T_max
Create data table for proactive eviction
Retrieve flow rule statistics.
We need to be able to retrieve flow table statistics periodically, or in any other timely manner. ofp_parser.OFPFlowStatsRequest(datapath, 0) can be used with a handler
Adding proactive eviction to code
Find how to integrate dataset to project
We need to integrate dataset into our project
Gettingg Flow table occupancy ratio
Getting the ratio of occupancy of table size from packet-in and removal
learn how to use tools
Can merge add-flow functions
Currently we have two different add-flow s for miss-entry and other flows. They can be merged into one. Not sure how was it. Gonna check later
Dynamic Thresholds for flow table size check in IF-ELSE
found a repo to emulate satellite network
The repo link is this.
We can check it
Integrate dataset
How to set the simulation
- We should find a dataset
- How to read dataset, one host reads it and apply it?
- Using an application?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.