Skip to content

Instantly share code, notes, and snippets.

View hyhilman's full-sized avatar
🏠
Working from home

Hilman Nihri hyhilman

🏠
Working from home
View GitHub Profile
@hyhilman
hyhilman / loadbalancer.py
Last active September 13, 2017 12:26
Load Balancer Swtich with Round Robin or Weighted RR or Simple Least Connection algorithm with Pyretic
from pyretic.lib.corelib import *
from pyretic.lib.std import *
from pyretic.lib.query import *
from pyretic.modules.mac_learner import *
from sys import maxint
################################################
# Translate from
# client -> public address : client -> servers
# server -> client : public address -> client
################################################
@hyhilman
hyhilman / simpleforward.mn
Last active September 13, 2017 12:24
simple forwarding switch with pyretic
{
"application": {
"dpctl": "",
"ipBase": "10.0.0.0/8",
"netflow": {
"nflowAddId": "0",
"nflowTarget": "",
"nflowTimeout": "600"
},
"openFlowVersions": {