Oussama
Oussama

Reputation: 31

Mininet bandwidth not updating dynamically via HTTP request in Flask API

I am simulating a custom network topology using Mininet and controlling bandwidth dynamically through a Flask API. The setup involves a server, a router, and two clients. I'm using TCLink in Mininet for bandwidth control and using tc (traffic control) to limit bandwidth per client dynamically.

The code works well initially, and the Flask API successfully executes when I send a request to change the bandwidth for a specific client. However, despite the HTTP request being executed correctly, I don’t see the expected bandwidth change in the monitoring logs, where the bandwidth should be limited to the specified value (e.g., 30 Mbps).

Here’s a summary of the setup:

Example of API call: I send a POST request to /api/set_bandwidth with the following payload:

{
   "client": "client1",
   "bandwidth": 30
}

Relevant Code Snippets:

Expected Behavior: When I set the bandwidth to 30 Mbps via the HTTP request, the monitoring should reflect that the client's bandwidth does not exceed 30 Mbps. However, the bandwidth remains unaffected.

My Question: Why isn’t the bandwidth limitation being enforced dynamically when setting the bandwidth via the API, even though the HTTP request executes successfully? Am I missing something in how tc applies the bandwidth changes, or do I need additional configuration in Mininet?

Upvotes: 0

Views: 28

Answers (0)

Related Questions