Points to way ahead:
========
QoS
Link quality based path selection
Application level visibility
Connection level visibility
Manual selection of tunnels architecture
Automatic policy based creation of tunnels (full mesh/hub & spoke)
Encryption
Application detection by destination IP/Port
DPI based application detection
Security
Multi VRF
IPv6
==================================
1) curl http://10.184.39.159:8080/wm/core/controller/switches/json
[{"inetAddress":"/127.0.0.1:58410","connectedSince":1572888848497,"openFlowVersion":"OF_13","switchDPID":"00:00:00:0f:fe:f2:14:24"}]
2) ovs-vsctl set bridge br-eth0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13
Reference:
=========
http://docs.openvswitch.org/en/latest/faq/qos/
https://www.networkcomputing.com/networking/how-set-floodlight-and-test-openflow-rules
https://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/DesignSetup
https://viveksubbarao.wordpress.com/tag/openflow/
https://viveksubbarao.wordpress.com/2015/11/17/how-to-setup-a-sdn-using-openvswitch-and-odl-controller/
https://danny270degree.blogspot.com/2012/04/tutorial-how-to-setup-qos-on-open.html
https://www.slideshare.net/ireri339/sdndstw-ryu-developing?next_slideshow=1
QoS:
===
There are two ways to do that:
1. Interface Rate Limiting ( on Interface )
For instance:
> sudo ovs-vsctl set Interface eth1 ingress_policing_rate=10000
> sudo ovs-vsctl set Interface eth1 ingress_policing_burst=1000
2. Port QoS Policy ( on Port )
For instance:
> sudo ovs-vsctl set port eth1 qos=@newqos \
-- --id=@newqos create qos type=linux-htb \
other-config:max-rate=200000000 queues=0=@q0,1=@q1 \
-- --id=@q0 create queue \
other-config:min-rate=100000000 \
other-config:max-rate=100000000 \
-- --id=@q1 create queue \
other-config:min-rate=50000000 \
other-config:max-rate=50000000
Qos can have more than 1 queue
Add Patch port to OVS
====================
1) root@sakthis:tunctl -t vport2
2) root@sakthis:/home/sakthis/Desktop# ip link set vport2 up
3) root@sakthis:/home/sakthis/Desktop# ovs-vsctl add-port br-eth0 vport2
4) ip link delete tap0
OpenStack Trouble Shooting
========================
https://www.yet.org/2014/09/openvswitch-troubleshooting/
RYU SDN Controller
=================
http://sdnhub.org/releases/sdn-starter-kit-ryu/
http://sdnhub.org/tutorials/ryu/
http://dannykim.me/danny/openflow/86577
case 1:
======
mn --controller=remote,ip=10.184.39.159,port=6653 --switch ovsk,protocols=OpenFlow13 --mac --topo=tree,3
mininet
=======
mininet> py net.addHost('h9')
<Host h9: pid=24976>
mininet> py net.addLink(s1,net.get('h9'))
<mininet.link.Link object at 0x7f17682d6690>
mininet> py s1.attach('s1-eth0')
mininet> py net.get('h9').cmd('ifconfig h9-eth0 10.0.0.9')
Bandwith Statistics Floodlight Controller
Enable Bandwidth Configuration
http://10.184.39.159:8080/wm/statistics/config/enable/json
REST URL
curl http://10.184.39.159:8080/wm/statistics/bandwidth/00:00:0:00:00:00:00:03/1/json
https://www.hwchiu.com/2014-05-05-config-qos-on-ovs-with-floodlight.html
QoS Policy:
==========
ovs-ofctl -O OpenFlow13 dump-flows s4
ovs-vsctl -- set port s4-eth1 qos=@newqos -- --id=@newqos create qos type=linux-htb queues=0=@q0,1=@q1 -- --id=@q0 create queue other-config:min-rate=0 other-config:max-rate=7000000 -- --id=@q1 create queue other-config:min-rate=0 other-config:max-rate=3000000
ovs-appctl -t ovs-vswitchd qos/show s4-eth1
ovs-vsctl set interface s4-eth1 ingress_policing_rate=300000 ingress_policing_burst=1000
ovs-vsctl list interface s4-eth1
ovs-vsctl clear Port s4-eth1 qos
Bandwidth:
========
import json
import httplib
class Bandwidth(object):
def __init__(self, server, switchId, portId):
self.server = server
self.switchPid = switchId
self.portId = portId
def get(self):
ret = self.getBandWidth({}, 'GET')
return json.loads(ret[2])
def getBandWidth(self, data, action):
#path = '/wm/staticentrypusher/json'
path='/wm/statistics/bandwidth/%s/%s/json' %(self.switchPid, self.portId)
headers = {
'Content-type': 'application/json',
'Accept': 'application/json',
}
body = json.dumps(data)
conn = httplib.HTTPConnection(self.server, 8080)
conn.request(action, path, body, headers)
response = conn.getresponse()
ret = (response.status, response.reason, response.read())
conn.close()
return ret
switchPid='00:00:00:00:00:00:00:%s' %(raw_input('switchPid '))
portId=raw_input('PortId ')
bandwidth = Bandwidth('10.184.39.159',switchPid,portId)
jsonObject=bandwidth.get()
#print jsonObject
print(json.dumps(jsonObject, indent=4, separators=(", ", " = ")))
FlowPusher.py
===========
import httplib
import json
class StaticEntryPusher(object):
def __init__(self, server):
self.server = server
def get(self, data):
ret = self.rest_call({}, 'GET')
return json.loads(ret[2])
def set(self, data):
ret = self.rest_call(data, 'POST')
return ret[0] == 200
def remove(self, objtype, data):
ret = self.rest_call(data, 'DELETE')
return ret[0] == 200
def rest_call(self, data, action):
path = '/wm/staticentrypusher/json'
headers = {
'Content-type': 'application/json',
'Accept': 'application/json',
}
body = json.dumps(data)
conn = httplib.HTTPConnection(self.server, 8080)
conn.request(action, path, body, headers)
response = conn.getresponse()
ret = (response.status, response.reason, response.read())
print ret
conn.close()
return ret
pusher = StaticEntryPusher('10.184.39.159')
flow1 = {
'switch':"00:00:00:00:00:00:00:03",
"name":"flow_mod_3",
"cookie":"0",
"priority":"32768",
"in_port":"2",
"active":"true",
"actions":"drop"
}
flow2 = {
'switch':"00:00:00:00:00:00:00:04",
"name":"flow_mod_4",
"cookie":"0",
"priority":"32768",
"in_port":"1",
"active":"true",
"actions":"drop"
}
flow3 = {
'switch':"00:00:00:00:00:00:00:01",
'name':"flow_mod_1",
"cookie":"0",
"priority":"32768",
"in_port":"3",
"active":"true",
"actions":"output=flood"
}
#pusher.set(flow1)
pusher.set(flow2)
#pusher.set(flow3)
========
QoS
Link quality based path selection
Application level visibility
Connection level visibility
Manual selection of tunnels architecture
Automatic policy based creation of tunnels (full mesh/hub & spoke)
Encryption
Application detection by destination IP/Port
DPI based application detection
Security
Multi VRF
IPv6
==================================
1) curl http://10.184.39.159:8080/wm/core/controller/switches/json
[{"inetAddress":"/127.0.0.1:58410","connectedSince":1572888848497,"openFlowVersion":"OF_13","switchDPID":"00:00:00:0f:fe:f2:14:24"}]
2) ovs-vsctl set bridge br-eth0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13
Reference:
=========
http://docs.openvswitch.org/en/latest/faq/qos/
https://www.networkcomputing.com/networking/how-set-floodlight-and-test-openflow-rules
https://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/OpenFlowOVS-Floodlight/DesignSetup
https://viveksubbarao.wordpress.com/tag/openflow/
https://viveksubbarao.wordpress.com/2015/11/17/how-to-setup-a-sdn-using-openvswitch-and-odl-controller/
https://danny270degree.blogspot.com/2012/04/tutorial-how-to-setup-qos-on-open.html
https://www.slideshare.net/ireri339/sdndstw-ryu-developing?next_slideshow=1
QoS:
===
There are two ways to do that:
1. Interface Rate Limiting ( on Interface )
For instance:
> sudo ovs-vsctl set Interface eth1 ingress_policing_rate=10000
> sudo ovs-vsctl set Interface eth1 ingress_policing_burst=1000
2. Port QoS Policy ( on Port )
For instance:
> sudo ovs-vsctl set port eth1 qos=@newqos \
-- --id=@newqos create qos type=linux-htb \
other-config:max-rate=200000000 queues=0=@q0,1=@q1 \
-- --id=@q0 create queue \
other-config:min-rate=100000000 \
other-config:max-rate=100000000 \
-- --id=@q1 create queue \
other-config:min-rate=50000000 \
other-config:max-rate=50000000
Qos can have more than 1 queue
Add Patch port to OVS
====================
1) root@sakthis:tunctl -t vport2
2) root@sakthis:/home/sakthis/Desktop# ip link set vport2 up
3) root@sakthis:/home/sakthis/Desktop# ovs-vsctl add-port br-eth0 vport2
4) ip link delete tap0
OpenStack Trouble Shooting
========================
https://www.yet.org/2014/09/openvswitch-troubleshooting/
RYU SDN Controller
=================
http://sdnhub.org/releases/sdn-starter-kit-ryu/
http://sdnhub.org/tutorials/ryu/
http://dannykim.me/danny/openflow/86577
case 1:
======
mn --controller=remote,ip=10.184.39.159,port=6653 --switch ovsk,protocols=OpenFlow13 --mac --topo=tree,3
mininet
=======
mininet> py net.addHost('h9')
<Host h9: pid=24976>
mininet> py net.addLink(s1,net.get('h9'))
<mininet.link.Link object at 0x7f17682d6690>
mininet> py s1.attach('s1-eth0')
mininet> py net.get('h9').cmd('ifconfig h9-eth0 10.0.0.9')
Bandwith Statistics Floodlight Controller
Enable Bandwidth Configuration
http://10.184.39.159:8080/wm/statistics/config/enable/json
REST URL
curl http://10.184.39.159:8080/wm/statistics/bandwidth/00:00:0:00:00:00:00:03/1/json
https://www.hwchiu.com/2014-05-05-config-qos-on-ovs-with-floodlight.html
QoS Policy:
==========
ovs-ofctl -O OpenFlow13 dump-flows s4
ovs-vsctl -- set port s4-eth1 qos=@newqos -- --id=@newqos create qos type=linux-htb queues=0=@q0,1=@q1 -- --id=@q0 create queue other-config:min-rate=0 other-config:max-rate=7000000 -- --id=@q1 create queue other-config:min-rate=0 other-config:max-rate=3000000
ovs-appctl -t ovs-vswitchd qos/show s4-eth1
ovs-vsctl set interface s4-eth1 ingress_policing_rate=300000 ingress_policing_burst=1000
ovs-vsctl list interface s4-eth1
ovs-vsctl clear Port s4-eth1 qos
Bandwidth:
========
import json
import httplib
class Bandwidth(object):
def __init__(self, server, switchId, portId):
self.server = server
self.switchPid = switchId
self.portId = portId
def get(self):
ret = self.getBandWidth({}, 'GET')
return json.loads(ret[2])
def getBandWidth(self, data, action):
#path = '/wm/staticentrypusher/json'
path='/wm/statistics/bandwidth/%s/%s/json' %(self.switchPid, self.portId)
headers = {
'Content-type': 'application/json',
'Accept': 'application/json',
}
body = json.dumps(data)
conn = httplib.HTTPConnection(self.server, 8080)
conn.request(action, path, body, headers)
response = conn.getresponse()
ret = (response.status, response.reason, response.read())
conn.close()
return ret
switchPid='00:00:00:00:00:00:00:%s' %(raw_input('switchPid '))
portId=raw_input('PortId ')
bandwidth = Bandwidth('10.184.39.159',switchPid,portId)
jsonObject=bandwidth.get()
#print jsonObject
print(json.dumps(jsonObject, indent=4, separators=(", ", " = ")))
FlowPusher.py
===========
import httplib
import json
class StaticEntryPusher(object):
def __init__(self, server):
self.server = server
def get(self, data):
ret = self.rest_call({}, 'GET')
return json.loads(ret[2])
def set(self, data):
ret = self.rest_call(data, 'POST')
return ret[0] == 200
def remove(self, objtype, data):
ret = self.rest_call(data, 'DELETE')
return ret[0] == 200
def rest_call(self, data, action):
path = '/wm/staticentrypusher/json'
headers = {
'Content-type': 'application/json',
'Accept': 'application/json',
}
body = json.dumps(data)
conn = httplib.HTTPConnection(self.server, 8080)
conn.request(action, path, body, headers)
response = conn.getresponse()
ret = (response.status, response.reason, response.read())
print ret
conn.close()
return ret
pusher = StaticEntryPusher('10.184.39.159')
flow1 = {
'switch':"00:00:00:00:00:00:00:03",
"name":"flow_mod_3",
"cookie":"0",
"priority":"32768",
"in_port":"2",
"active":"true",
"actions":"drop"
}
flow2 = {
'switch':"00:00:00:00:00:00:00:04",
"name":"flow_mod_4",
"cookie":"0",
"priority":"32768",
"in_port":"1",
"active":"true",
"actions":"drop"
}
flow3 = {
'switch':"00:00:00:00:00:00:00:01",
'name':"flow_mod_1",
"cookie":"0",
"priority":"32768",
"in_port":"3",
"active":"true",
"actions":"output=flood"
}
#pusher.set(flow1)
pusher.set(flow2)
#pusher.set(flow3)
Comments
Post a Comment