------------恢復內容開始------------
------------恢復內容開始------------node
tar xvf distribution-karaf-0.4.4-Beryllium-SR4.tar.gz
cd distribution-karaf-0.4.4-Beryllium-SR4/bin/ ./karaf feature:install odl-restconf feature:install odl-l2switch-switch-ui feature:install odl-openflowplugin-all feature:install odl-mdsal-apidocs feature:install odl-dlux-core feature:install odl-dlux-node feature:install odl-dlux-yangui
打開瀏覽器可見以下界面:
python
from mininet.topo import Topo class MyTopo(Topo): def __init__(self): #初始化拓撲 Topo.__init__(self) #添加主機和交換機 h1 = self.addHost('h1') h2 = self.addHost('h2') h3 = self.addHost('h3') s1 = self.addSwitch('s1') #添加連線 self.addLink(h1, s1, 1, 1) self.addLink(h2, s1, 1, 2) self.addLink(h3, s1, 1, 3) topos = {'mytopo': (lambda: MyTopo())}
sudo mn --custom ./test.py --topo mytopo --controller=remote,ip=127.0.0.1,port=6633 --switch ovsk,protocols=OpenFlow13
http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/flow-node-inventory:table/0/flow/1
{ "flow": [ { "id": "1", "match": { "in-port": "1", "ethernet-match": { "ethernet-type": { "type": "0x0800" } }, "ipv4-destination": "10.0.0.3/32" }, "instructions": { "instruction": [ { "order": "0", "apply-actions": { "action": [ { "order": "0", "drop-action": {} } ] } } ] }, "flow-name": "flow0", "priority": "65535", "hard-timeout": "20", "cookie": "2", "table_id": "0" } ] }