How xuanmai1812/sdn-server_load_balancing works
This repository is a Mininet/Ryu SDN demo for static, link-based load balancing behind a virtual IP. The client’s first ARP/IP packets reach the controller, which answers VIP ARP, chooses a healthy and preferably uncongested uplink and backend, installs bidirectional NAT flows on the core switch, and forwards the initial packet; later packets use the switch flows. The README documents failover and congestion monitoring as new-flow selection safeguards. The controller excerpt is partial, so links between its internal stages follow documented behavior where code is not shown.
Main entry points: static_linkbased_LB.py Ryu controller · tree-topo.py Mininet topology
Components 13
Test network
- Mininet topology
tree-topo.py
Controller
- Ryu controller
static_linkbased_LB.py - Link monitoring
static_linkbased_LB.py - Link health state
static_linkbased_LB.py - Congestion state
static_linkbased_LB.py
Traffic handling
- VIP ARP proxy
static_linkbased_LB.py - Packet-in handling
static_linkbased_LB.py - Uplink/server selection
static_linkbased_LB.py - Bidirectional NAT flows
static_linkbased_LB.py - Initial packet forwarding
static_linkbased_LB.py
Other components
- External client
- Backend servers
- OpenFlow switches
Connections 22
- Mininet topology → OpenFlow switches: creates
tree-topo.py - Mininet topology → Backend servers: creates
tree-topo.py - Mininet topology → External client: creates
tree-topo.py - External client → OpenFlow switches: sends traffic
README.md - OpenFlow switches → Ryu controller: Packet-In
README.md - Ryu controller → Link monitoring: starts
static_linkbased_LB.py - Link monitoring → OpenFlow switches: requests port stats
README.md - OpenFlow switches → Link monitoring: returns stats
README.md - Link monitoring → Congestion state: updates
static_linkbased_LB.py - OpenFlow switches → Ryu controller: reports port status
README.md - Ryu controller → Link health state: updates
README.md - Ryu controller → Packet-in handling: dispatches
static_linkbased_LB.py - Packet-in handling → VIP ARP proxy: handles ARP
static_linkbased_LB.py - VIP ARP proxy → External client: answers VIP ARP
README.md - Packet-in handling → Uplink/server selection: handles VIP traffic
static_linkbased_LB.py - Uplink/server selection → Link health state: checks health
static_linkbased_LB.py - Uplink/server selection → Congestion state: checks congestion
static_linkbased_LB.py - Uplink/server selection → Bidirectional NAT flows: selects backend
README.md - Bidirectional NAT flows → OpenFlow switches: installs flows
README.md - Packet-in handling → Initial packet forwarding: forwards first packet
README.md - Initial packet forwarding → OpenFlow switches: sends Packet-Out
README.md - OpenFlow switches → Backend servers: forwards traffic
README.md