一、使用介绍:
1、SDN.ova 把SDN的工具集成到了单host之上,包含OFM、ODL、Mininet等工具。平台host使用的ubuntu为14.04桌面版,其中网络使用桥接模式。cpu默认使用的是4核心,使用中可以更改为2个,memory是4096M,2048M也是也是的。
2、用户名/密码:hive/hive。进入桌面以后,“Ctrl+Alt+t”打开命令终端后可以根据自己的环境,去更改为环境中的地址。
二、配置过程:
1、启动ODL模块
hive@hive:~$ sudo -i
[sudo] password for hive: ????//密码为:hive
root@hive:~# cd distribution-karaf-0.3.4-Lithium-SR4/bin/
root@hive:~/distribution-karaf-0.3.4-Lithium-SR4/bin# ./karaf???????//启动karaf
备注:Open Daylight采用了Kaaf作为后台的框架
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
???????????????????????????????????????????????????????????????????????????????????????????
????________ ??????????????????????________ ???????????????.__ ?.__ ??????.__ ????__ ??????
????\_____ ?\ ______ ??____ ??____ \______ \ _____ ?___.__.| ?| |__| ____ | ?|___/ ?|_ ????
?????/ ??| ??\\____ \_/ __ \ / ???\ | ???| ?\\__ ?\< ??| ?|| ?| | ?|/ ___\| ?| ?\ ??__\ ???
????/ ???| ???\ ?|_> > ?___/| ??| ?\| ???` ??\/ __ \\___ ?|| ?|_| ?/ /_/ ?> ??Y ?\ ?| ?????
????\_______ ?/ ??__/ \___ ?>___| ?/_______ ?(____ ?/ ____||____/__\___ ?/|___| ?/__| ?????
????????????\/|__| ???????\/ ????\/ ???????\/ ????\/\/ ???????????/_____/ ?????\/ ?????????
???????????????????????????????????????????????????????????????????????????????????????????
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user@root> ???
#在firefox中输入URL即可进入ODL GUI ?#用户名/密码 admin/admin
http://ODL_地址:8181/index.html
例如:http://192.168.35.3:8181/index.html
ODL效果截图:
2、启动Mininet模块
root@hive:~# sudo mn --topo tree,3 --controller 'remote,ip=192.168.35.3,port=6653' --switch ovsk,protocols=OpenFlow13?--mac
备注:ODL的服务端口为6653;“--mac”:使得主机的MAC地址从00:00:00:00:00:01开始依次分配;“--topo tree,3”:创建一个树形拓扑,深度是3;“--switch ovsk”:定义网络拓扑使用的交换机是OVS型交换机;“protocols=OpenFlow13”:控制交换机转发的协议为OpenFlow1.3。
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 h3 h4 h5 h6 h7 h8
*** Adding switches:
s1 s2 s3 s4 s5 s6 s7
*** Adding links:
(s1, s2) (s1, s5) (s2, s3) (s2, s4) (s3, h1) (s3, h2) (s4, h3) (s4, h4) (s5, s6) (s5, s7) (s6, h5) (s6, h6) (s7, h7) (s7, h8)
*** Configuring hosts
h1 h2 h3 h4 h5 h6 h7 h8
*** Starting controller
c0
*** Starting 7 switches
s1 s2 s3 s4 s5 s6 s7 ...
*** Starting CLI:
mininet>
在ODL GUI中点击reload就可以发现我们刚才启动的7台OpenFlow交换机。
执行pingall以后可以在ODL GUI中reload就可以发现host
mininet> pingall
*** Ping: testing ping reachability
h1 -> h2 h3 h4 h5 h6 h7 h8
h2 -> h1 h3 h4 h5 h6 h7 h8
h3 -> h1 h2 h4 h5 h6 h7 h8
h4 -> h1 h2 h3 h5 h6 h7 h8
h5 -> h1 h2 h3 h4 h6 h7 h8
h6 -> h1 h2 h3 h4 h5 h7 h8
h7 -> h1 h2 h3 h4 h5 h6 h8
h8 -> h1 h2 h3 h4 h5 h6 h7
*** Results: 0% dropped (56/56 received)
mininet>
Mininet效果截图:
3、在控制器中下发策略
4、测试下发策略后的连通性