基于容器快速搭建onos环境

docker pull onosproject/onos:1.14.0

docker pull iwaseyusuke/mininet:latest

docker create --name onos1140 --hostname onos  -p 8101:8101 -p 8181:8181 -p 6633:6633 -it onosproject/onos:1.14.0

docker run -it -d -it --privileged -e DISPLAY  -v /tmp/.X11-unix:/tmp/.X11-unix  -v /lib/modules:/lib/modules     iwaseyusuke/mininet --name mininet

@host  

ssh -p 8101 $ip_of_onos1140

pwd:karaf

app activate org.onosproject.openflow(启用openflow)
app activate org.onosproject.fwd(启用forward转发功能)

docker exec -it mininet bash

mn --topo tree,2 --controller remote,ip=$ip_of_onos1140

mn --topo tree,depth=2,fanout=3 --controller remote,ip=$ip_of_onos1140