CentOS && SDN

第一步:上传安装包

省略

第二步: 安装服务

yum install unzip telnet java-1.8.0-openjdk net-tools -y

yum install mininet-2.2.2-2.el7.x86_64.rpm openvswitch-2.5.0-2.el7.x86_64.rpm python-networkx-1.8.1-12.el7.noarch.rpm python-networkx-core-1.8.1-12.el7.noarch.rpm -y

启动ovs

systemctl start openvswitch

第三步:配置karaf

unzip distribution-karaf-0.6.0-Carbon.zip

cd distribution-karaf-0.6.0-Carbon/bin/

./start

./client ##这里需要等待一下在输入

第四步: 安装组件

opendaylight-user@root>feature:install odl-restconf odl-l2switch-switch-ui odl-mdsal-apidocs odl-dluxapps-applications

在浏览器打开 http://ip:8181/index.html

第五步:搭建拓扑

opendaylight-user@root>logout

mn --controller=remote,ip=127.0.0.1,port=6653 --topo=tree,1,3

mininet> pingall

*** Ping: testing ping reachability

h1 -> h2 h3

h2 -> h1 h3

h3 -> h1 h2

*** Results: 0% dropped (6/6 received)

mininet>

第六步: 下发流表

mininet> dpctl add-flow in_port=1,actions=output:3

*** s1 ------------------------------------------------------------------------

mininet> dpctl add-flow in_port=3,actions=output:1

*** s1 ------------------------------------------------------------------------

mininet> pingall

*** Ping: testing ping reachability

h1 -> X h3

h2 -> X X

h3 -> h1 X

*** Results: 66% dropped (2/6 received)

mininet>

第七步:启动http-server功能

mininet> h1 python -m SimpleHTTPServer 8080 &

mininet> sh apt install wget -y

mininet> h3 wget 10.0.0.1:8080

--2022-07-20 12:52:56-- http://10.0.0.1:8080/

Connecting to 10.0.0.1:8080... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1052 (1.0K) [text/html]

Saving to: ‘index.html’

index.html 100%[===================>] 1.03K --.-KB/s in 0s

2022-07-20 12:52:56 (123 MB/s) - ‘index.html’ saved [1052/1052]

mininet>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

network5250

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值