Cloud Native应用交付

  • 首页
  • 关于本站
  • 个人介绍
  • Downloads
  • Repo
    • Github
    • Container
  • F5
    • F5 Python SDK
    • F5-container
    • F5-LBaaS
  • 社交
    • 联系我
    • 微信/微博
    • 公众号
    • 打赏赞助
行至水穷处 坐看云起时
Cloud Native Application Services: cnadn.net
  1. 首页
  2. SDN
  3. 正文

Floodlight+mininet初体验SDN(openflow)

2015年06月12日 11509点热度 0人点赞 0条评论

思路,在mininet模拟器上安装floodlight SDN控制器,通过floodlight观察控制器学习到的拓扑,以及下发产生的拓扑

1. mininet可以从https://github.com/mininet/openflow-tutorial/wiki 这个地方直接下载虚机镜像,比较方便,下载的ubuntu是14.04。导入到虚机启动后,参考文档熟悉mininet基本操作,熟悉openvswitch基本操作。

2.在mininet虚机上直接安装floodlight,安装方法:

1
2
3
4
5
6
7
8
9
10
sudo apt-get update
sudo apt-get install build-essential default-jdk ant python-dev
 
git clone git://github.com/floodlight/floodlight.git
 
cd floodlight
 
ant
//下面命令为启动命令
java -jar target/floodlight.jar

启动后用浏览器访问http://yourIP/ui/index.html 得到如下界面

floodlight

然后启动mininet模拟一个openvswitch+host环境:

mn --topo tree,2 --mac --switch ovsk --controller=remote,ip=127.0.0.1,port=6653

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
root@mininet-vm:/home/mininet# mn --topo tree,2 --mac --switch ovsk --controller=remote,ip=127.0.0.1,port=6653
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 h3 h4
*** Adding switches:
s1 s2 s3
*** Adding links:
(s1, s2) (s1, s3) (s2, h1) (s2, h2) (s3, h3) (s3, h4)
*** Configuring hosts
h1 h2 h3 h4
*** Starting controller
c0
*** Starting 3 switches
s1 s2 s3
*** Starting CLI:

 

注意端口是6653,这样ovs就通过floodlight的南向接口与控制器通信了

查看此时floodlight学习到的:

floodlight sdn

学习到的拓扑:

A({(2TR0S@TLYVDWL`T]]DP

交换机2此时还没有任何flows,和命令输出一致:

1
2
root@mininet-vm:/home/mininet# ovs-ofctl dump-flows s2
NXST_FLOW reply (xid=0x4):

openvswitch

下面从h1 ping h4 看看:

1
2
3
4
5
6
7
8
9
10
mininet> h1 ping h4
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=7.89 ms
64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=0.217 ms
64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=0.047 ms
64 bytes from 10.0.0.4: icmp_seq=4 ttl=64 time=0.045 ms
64 bytes from 10.0.0.4: icmp_seq=5 ttl=64 time=0.047 ms
64 bytes from 10.0.0.4: icmp_seq=6 ttl=64 time=0.062 ms
64 bytes from 10.0.0.4: icmp_seq=7 ttl=64 time=0.051 ms
64 bytes from 10.0.0.4: icmp_seq=8 ttl=64 time=0.047 ms

floodlight将自动根据网络下发对应的flows给交换机:

1
2
3
4
5
root@mininet-vm:/home/mininet# ovs-ofctl dump-flows s2
NXST_FLOW reply (xid=0x4):
cookie=0x20000000000000, duration=2.519s, table=0, n_packets=1, n_bytes=42, idle_timeout=5, idle_age=2, priority=1,arp,in_port=3,dl_src=00:00:00:00:00:04,dl_dst=00:00:00:00:00:01 actions=output:1
cookie=0x20000000000000, duration=2.514s, table=0, n_packets=2, n_bytes=196, idle_timeout=5, idle_age=0, priority=1,ip,in_port=3,dl_src=00:00:00:00:00:04,dl_dst=00:00:00:00:00:01,nw_src=10.0.0.4,nw_dst=10.0.0.1 actions=output:1
cookie=0x20000000000000, duration=2.517s, table=0, n_packets=2, n_bytes=196, idle_timeout=5, idle_age=0, priority=1,ip,in_port=1,dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:04,nw_src=10.0.0.1,nw_dst=10.0.0.4 actions=output:3

openflow flows

这只是简单演示了sdn 控制器对网络的简单控制,可以基于floodlight接口开发更多的应用直接操纵底层网络,控制数据path。

相关文章

  • 初识SDN
  • mininet/openflow-tutorial
  • 密码保护:F5OS tenant部署后的容器情况、网络接口情况
  • 密码保护:F5OS tenant镜像实例化后信息
  • DOCKER容器跨宿主机通信方法-(3):Openvswitch
本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: mininet openflows openvswitch sdn
最后更新:2015年06月12日

纳米

linjing.io

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

页面AI聊天助手

纳米

linjing.io

☁️迈向Cloud Native ADC ☁️

认证获得:
TOGAF: ID 152743
Kubernetes: CKA #664
Microsoft: MCSE MCDBA
Cisco: CCNP
Juniper: JNCIS
F5:
F5 Certified Solution Expert, Security
F5 Certified Technology Specialist, LTM/GTM/APM/ASM
F5 Certified BIG-IP Administrator
  • 点击查看本博技术要素列表
  • 归档
    分类
    • AI
    • Automation
    • Avi Networks
    • Cisco ACI
    • CISCO资源
    • F5 with ELK
    • F5-Tech tips
    • F5技术
    • Juniper
    • Linux
    • NGINX
    • SDN
    • ServiceMesh
    • WEB编程
    • WINDOWS相关
    • 业界文章
    • 交换机技术
    • 化云为雨/Openstack
    • 协议原理
    • 容器/k8s
    • 我的工作
    • 我的生活
    • 网站技术
    • 路由器技术
    • 项目案例
    标签聚合
    envoy api k8s flannel DNS nginx openstack network istio irule docker F5 gtm bigip neutron
    最近评论
    汤姆 发布于 8 个月前(09月10日) 嗨,楼主,里面的json怎么下载啊,怎么收费啊?
    汤姆 发布于 8 个月前(09月09日) 大佬,kib的页面可以分享下吗?谢谢
    zhangsha 发布于 1 年前(05月12日) 资料发给我下,谢谢纳米同志!!!!lyx895@qq.com
    李成才 发布于 1 年前(01月02日) 麻烦了,谢谢大佬
    纳米 发布于 1 年前(01月02日) 你好。是的,因为以前下载系统插件在一次升级后将所有的下载生成信息全弄丢了。所以不少文件无法下载。DN...
    浏览次数
    • Downloads - 183,766 views
    • 联系我 - 118,966 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 116,499 views
    • Github - 103,659 views
    • F5常见log日志解释 - 79,774 views
    • 从传统ADC迈向CLOUD NATIVE ADC - 下载 - 74,623 views
    • Sniffer Pro 4 70 530抓包软件 中文版+视频教程 - 74,320 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 67,770 views
    • 关于本站 - 60,905 views
    • 这篇文档您是否感兴趣 - 55,495 views
    链接表
    • F5SE创新
    • Jimmy Song‘s Blog
    • SDNlab
    • Service Mesh社区
    • 三斗室
    • 个人profile
    • 云原生社区

    COPYRIGHT © 2023 Cloud Native 应用交付. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    京ICP备14048088号-1

    京公网安备 11010502041506号