Software Defined Network week 4(二) Network Virtualization with Mininet

2 篇文章 0 订阅

Network Virtualization with Mininet

在这里插入图片描述
The first part of the lesson will cover the why and how of Mininet, in particular, what Mininet is useful for and how it works.

In the next part of this lesson we will look at various examples of using Mininet to create emulated network topologies, and I will also present various demonstrations of how to use Mininet.
在这里插入图片描述

What is Mininet?

Mininet runs a real kernel, it can run real switch software, and it can run real application code on a single machine.
It provides Command-line graphical user interfaces and Python interfaces to interact with it. And, most importantly for this course, many OpenFlow features are already built in to the environment. So this is particularly useful for developing, deploying, and sharing various things you might do in the Mininet programming environment.
在这里插入图片描述

Why use Mininet?

Third, hosts in the Mininet environment can actually run real programs. So anything that can run on Linux can actually run on a Mininet host as well. That’s because Mininet uses something called OS virtualization, which basically means that it’s running on Linux. So, any program that can run on Linux can also run on a Mininet virtual host. 虚拟操作系统??
Fourth, it supports programmable open flow switches. What that means is that, we can create a virtual network in Mininet, and connect a real open flow controller to real software open flow switches, that are running in the virtual network environment.
在这里插入图片描述

various design alternatives

Another way that you could do this is to use network virtual machines. So you could imagine running lots and lots of virtual machines, say, on your laptop, or on your desktop. And then, network them together with a software switch that’s running on your host. The problem with that is that typically virtual machines are fairly heavy weight, so there’s a limit to the number of virtual machines that you can run concurrently on a single host.

So, one of the advantages to Mininet that we’ll see is that the OS based virtualization that it uses is lightweight enough that it can support hundreds, or potentially even thousands of hosts even on a single PC. Of course the third alternative is to use simulation, but the problem with that is that there’s no clear path to hardware deployment. In particular, because everything is simulated and there’s no real running software, and time or timing is not necessarily accurate, then it can be somewhat unclear how to transition an experiment that’s run in simulation to a real working deployment…
在这里插入图片描述
I just want to take one slide where we look at how Mininet works in a nutshell and as we walk through certain examples, I’d like you to understand what’s actually going on.
So, let’s start over here on the left side of this figure.

When we run Mininet, we’ll often run something called MN, which is a launcher for the Mininet process. That process then controls the sub-processes, each of which represent a single host running in the network. So, for example, let’s suppose that I want to have a network with two hosts. The Mininet launcher would launch two bash processes and then it would create a unique network namespace for each of those processes, so host 2, h2, and h3 would each have their own network name space.

And that’s done with the Linux network namespaces mechanism which is now native in the Linux kernel.

At that point, each host or each process represents a host, and each of these processes has its own network namespace.
7:44
And the next thing that happens is Mininet creates what are called, virtual ethernet pairs. And so the idea here is to create a tunnel between the virtual interface that’s in the namespace of a particular subprocess. For example, here the h2 namespace has a virtual interface. We need to connect that to a real interface that’s sitting in the root network namespace.

The reason we want to do that is because eventually we’re going to connect it to a switch. So each one of these hosts has a virtual ethernet pair.

And each pair is assigned to the namespace that corresponds to the virtual host that represents that particular node in the virtual network. [BLANK_AUDIO]. Once those virtual ethernet pairs are assigned, are created and assigned to namespaces. We can then create an OpenFlow switch, to connect those hosts. And finally, we can instantiate a controller that uses the OpenFlow protocol to control flow table entries in that switch and those entries that sit in this switch here ultimately allow packets to travel between each of these hosts in the virtual network.

And finally, this entire setup is contained within a single virtual machine. So all this is basically running in a virtual machine on your PC.
在这里插入图片描述
In summary, Mininet is a network emulator that runs in a virtual machine on a single node. It uses lightweight OS virtualization to achieve scale and it’s fast, easy to use and it makes it very easy to share various configurations, solutions, set-ups, etc. In the next part of the lesson we will use Mininet to construct various examples of network topologies using both the MN wrapper and directly with the Python API.

在这里插入图片描述
switch默认的fanout是2,深度是1
在这里插入图片描述
在最下面一层每个switch上挂2个host

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值