2019 SDN上机第4次作业
sudo gedit ~/.bashrc
2.安装插件
opendaylight-user@root>feature:install odl-restconf
opendaylight-user@root>feature:install odl-l2switch-switch-ui
opendaylight-user@root>feature:install odl-openflowplugin-all
opendaylight-user@root>feature:install odl-mdsal-apidocs
opendaylight-user@root>feature:install odl-dlux-core
opendaylight-user@root>feature:install odl-dlux-node
opendaylight-user@root>feature:install odl-dlux-yangui
from mininet.topo import Topo
class Mytopo(Topo):
def __init__(self):
Topo.__init__(self)
sw=self.addSwitch('s1')
h1 = self.addHost('h1')
h2 = self.addHost('h2')
h3 = self.addHost('h3')
self.addLink(h1,sw,1,1)
self.addLink(h2,sw,1,2)
self.addLink(h3,sw,1,3)
topos = {'mytopo': (lambda:Mytopo())}
打开浏览器访问http://127.0.0.1:8181/index.html进入ODL图形化界面(以下是启动完成界面)
sudo mn --custom sdn4.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": "2",
"ethernet-match": {
"ethernet-type": {
"type": "0x0800"
}
},
"ipv4-destination": "10.0.0.3/32"
},
"instructions": {
"instruction": [
{
"order": "0",
"apply-actions": {
"action": [
{
"order": "0",
"drop-action": {}
}
]
}
}
]
},
"priority": "65535",
"hard-timeout": "20",
"table_id": "0"
}
]
}
使用命令如下,即可安装成功
sudo tar -xzf Postman-linux-x64-7.11.0.tar.gz
./Postman/Postman