Software Defined Network week 4

Learning Objectives

Discover what network virtualization is and why it is used
Identify various ways of implementing virtual networks
Explain why Mininet is useful
Practice how Mininet works
Gain more experience using Mininet, setting up topologies, etc.
Prior Knowledge Check

Prior Knowledge Check

Encapsulation(封装),有时也叫隧道(tunneling),是将一个协议报文分组插入另一个协议报文分组。本地协议分组“背”着被封装的分组跨过本地协议网传输。
尽管这增加了额外开销,但它提供了一种将一个网上报文分组通过一个使用不同协议的中间网传送到另一个网上的方法。

网络隧道技术指的是利用一种网络协议来传输另一种网络协议,它主要利用网络隧道协议来实现这种功能。
layering? 分层?
虚拟机体验之 Xen 篇 —— 令人脑洞大开的奇异架构
在经典的虚拟机架构中,虚拟机软件运行于 Host System 之中,而 Guest System 运行于虚拟机软件之中。为了提高 Guest System 的运行速度,虚拟机软件一般会在 Host System 中使用内核模块开一个洞,将 Guest System 的运行指令直接映射到物理硬件上。但是在 Xen 中,则根本没有 Host System 的概念,传说它所有的虚拟机都直接运行于硬件之上,虚拟机运行的效率非常的高,虚拟机之间的隔离性非常的好。

Key Terms

  • Network virtualization: Technology that allows multiple logical networks to be hosted on a single shared physical platform. The technology is commonly used in data centers, for example, to allow multiple tenants to share the same physical data center infrastructure.
  • Network emulation: The process of creating a network environment that mimics real network conditions; in contrast to simulation environments, emulation environments run in real-time and also allow the experimenter to run real software and operating systems. A common network emulator is Mininet, which we are using in this course.
  • Virtual network interfaces: Network interfaces that are instantiated in a virtual network node (e.g., a virtual machine). Virtual network interfaces must commonly be “bridged” to a machine’s physical network interface(s) using a software/kernel switch, such as Open vSwitch.在虚拟网络节点中实例化的网络接口。虚拟网络接口通常必须使用软件/内核交换机“桥接”到计算机的物理网络接口

video

Virtualization

在这里插入图片描述

what is network virtualization ?

在这里插入图片描述

So simply put, network virtualization is a particular abstraction of a physical network that allows the support of multiple logical networks running on a common shared physical substrate. In other words, you can have a common set of physical routers, links, and so forth. That support multiple logical network topologies on top of that physical infrastructure.
Another way of viewing it is as, as, as a container of network services from layer two all the way up to layer seven, that can be instantiated on some underlying physical platform.
There are various aspects of the network that can be virtualized, and together these technologies support network virtualization.

So, on one hand, the nodes need to be virtualized. One technology for virtualizing those nodes is with virtual machines, and we’ll look at various examples of virtual machine technology in this lesson.
The links themselves also have to be virtualized, and a common way of doing that is with tunnels. And we’ll look at various ways of doing that as well.

Finally, there are other parts of the network that also can be virtualized such as storage and so forth. And we won’t really look at those in this lesson, but they are certainly relevant to network virtualization in general.

examples of virtual machine technology

在这里插入图片描述
So here’s a pretty good picture describing the analogy of network virtualization.
On the left hand side, we have sort of a more conventional virtualization environment which you may be familiar with, which is the virtual machine environment. In this environment, the machine’s physical CPU, memory, and IO are essentially abstracted by a hypervisor on top of which multiple virtual machines can run.

Each of these virtual machines essentially gives the appearance of running on a dedicated platform, when in fact the hypervisor sitting below the virtual machines is responsible for ensuring isolation and resource control.

Now, in the same way that a machine can be virtualized, a physical network can also be virtualized. So, similarly to the hypervisor which virtualizes a single machine, a virtualization layer can provide support so that multiple virtual networks can coexist on top of a single, shared, physical network. And similarly, that virtualization layer is responsible for insuring isolation, and proper resource sharing between these distinct virtual networks.

motivation for network virtualization

在这里插入图片描述
So what’s the motivation for network virtualization? Well, one of the original motivations was, The ossification of the internet architecture. And there’s lots of work on overlay networks in the 2000s in networking that essentially was trying to make changes to network functions by yielding overlay networks on top of the underlying IP infrastructure. Acknowledging the fact that it was rather difficult to change the underlying IP infrastructure. In the course of doing this work, many people began to realize that a one size fits all architecture is, is actually rather difficult. It’s very difficult to design a new network that would be everything to everyone.

Overlay
在网络技术领域,指的是一种网络架构上叠加的虚拟化技术模式,其大体框架是对基础网络不进行大规模修改的条件下,实现应用在网络上的承载,并能与其它网络业务分离,并且以基于IP的基础网络技术为主(如图2所示)。其实这种模式是以对传统技术的优化而形成的。

So the motivation then was to provide some kind of infrastructure that allowed network technologies to evolve so that once that platform was deployed. The technologies could evolve on top of that platform independently of the underlying infrastructure.

And in particular the motivation for network virtualization was to create some kind of substrate where 1,000 flowers can bloom. So you could have one particular experimental virtual network running aside the production network, and these virtual networks need not interfere with one another.
在这里插入图片描述
Virtual networks are often even more difficult to troubleshoot than physical networks because of the multiple layers of abstraction that network virtualization introduces. Although SDN may ultimately make troubleshooting in virtual networks easier, this is merely a promise, as we currently have no good ways of troubleshooting virtual networks. This point was discussed at length in the interview with Teemu Koponen.

在这里插入图片描述

the promise of network virtualization

So these days the promise of network virtualization is significant.

One particular promise is rapid innovation, services could be delivered at software speeds.

Another is that it makes possible new forms of network control. Since network virtualization makes it possible to instantiate multiple logical networks on top of a single physical network, the ability to deploy and instantiate multiple different kinds of networks makes it possible to explore different kinds of control as well.

A third promises vendor choice. So because the logical network is decoupled from the underlying physical infrastructure, in some sense it matters less what the underlying physical infrastructure is in terms of vendors and so forth. Because all the magic is happening at higher layers of extraction.

Network Virtualization also provides the promise of simplified programming and operations by allowing the network operator to see the network through a logical abstraction, rather than having to tinker with the details of the underlying physical network.

So, in looking at the promise of network virtualization, it’s important to recognize a distinction because many of these promises are sometimes touted as the promises of SDN. But, it’s important to recognize that SDN itself does not inherently abstract the details of the physical network. Essentially what it does is separate the data plane from the control plane. But network virtualization is the technology that provides the abstraction, so that multiple logical networks can be instantiated on top of that single physical network.
在这里插入图片描述

区分VPN和Virtual networks

在这里插入图片描述
So related topic is Virtual Private Networks, which you may have heard of, but it’s a, it’s a quite a different thing from network virtualization or virtual networks.
Virtual private networks are essentially virtual networks that connect distributed sites. So, for example, if you’re in an enterprise or company, you may use a virtual private network, or a VPN, to securely tunnel back to different parts of that enterprise network.

But, in contrast to the types of network virtualization that we’re talking about in this course, VPNs are not designed to let multiple custom architectures run on the same underlying physical infrastructure. So, for example, it would be very tough to run an IPv4 network in parallel with some kind of next generation non-IP network, for example, on conventional VPNs.
7:46
Virtual networks, on the other hand, are explicitly designed to enable and support that kind of heterogeneity.
在这里插入图片描述

design goals

Let’s now have a quick look at some of the design goals of virtual networks. One of the design goals is flexibility. That is, virtual networks should be able to support many different kinds of topologies, routing and forwarding architectures and paradigms, and they should be able to allow each virtual network to be configured independently from the others.

Virtual networks should separate policy and mechanism as well, thereby enabling better manageability. And a good virtual network’s platform should maximize the number of virtual networks that can co-exist on the same underlying physical substrate. 数量最大化虚拟网络

Network virtualization technology should also isolate both the logical networks that are running on top of the shared physical substrate, as well as the resources to ensure that no single virtual network can take more than it’s fair share of the underlying physical resources. Or otherwise interfere with resource allocations of other virtual networks.
9:01
Virtual networks should be programmable. That supports the goal of customizability. And they also should support many different underlying technologies. The idea being that a logical network in some sense should be unaware, or not need to be aware of the underlying physical infrastructure that supports that logical network.
在这里插入图片描述

build virtual nodes ,links or machines

So building a virtual network requires, of course, the technology to build virtual nodes or machines.
One particular approach for doing that is the Xen Virtual Machine Monitor. Another is User-Mode Linux, with something called network namespaces. Network namespaces were originally an add on to the Linux kernel and they’re now part of the main line Linux kernel. The idea with network namespace is, is essentially that each container gets it’s own view of the network. It’s own network stack. IP addresses, MAC addresses, interfaces, and so forth.

KVM is another virtualization technology. And there’s certainly others as well.

VMWare of course makes their own commercial virtual machine technology. And Virtual Box is one that we’ll use in this course.
在这里插入图片描述
So, in this picture, which describes the Xen architecture, you can see that Xen essentially allows multiple what are called guest operating systems to run on the same underlying shared physical hardware. So the hardware here, of course, which is processor memory, the physical network interfaces, and so forth. Is then abstracted away by the Xen hypervisor. And Domain0, which is shown over here on the left, essentially runs the control software that arbitrates how these other guest OSs gain access to the underlying resources. 在这里插入图片描述
We also need a way of constructing virtual links. And there are many possible ways to do that, all essentially based on different types of tunneling technology. One approach is to take Ethernet frames that are generated by virtual nodes and encapsulate those Ethernet frames in IP packets that may travel multiple hops over an IP network.

So, two virtual machines or virtual nodes, have the appearance of being connected by a point to point, layer two Ethernet link. But are in fact sending the frames over a multi-hop IP network. There are other approaches to generating or constructing virtual links, such as VXLAN.

Now, each one of these containers or virtual nodes also has virtual interfaces, here denoted as Ztun. Which have to be connected to the physical interfaces on each of these physical network nodes. And that requires some kind of virtual switching technology.

The trellis architecture shown here, devised something called a short bridge which was essentially a fast, mechanism for taking Ethernet frames inside a virtual machine, and passing them to the physical interface on the node that was hosting that virtual machine. But, since this architecture was proposed, there have been other technologies to do this.
在这里插入图片描述
还有MPLS tunnel也可以
在这里插入图片描述
One is Open vSwitch.
12:57
Now as I mentioned, the problem here is to network these virtual machines together over a Layer 2 topology.
13:04
VINI or Trellis use shortbridge, which is an extension of Linux bridging. The Open vSwitch basically performs a similar set of glue functions, but also the Open vSwitch can be configured remotely with control protocols like OpenFlow or JSON.

在这里插入图片描述

summary

So in summary, the motivation for virtual networks is flexible and agile deployment. Thereby enabling rapid innovation, independence from vendors, and scale. There are various technologies that are requirements to support for virtual networks including virtual nodes, links and switch. And we’ve discussed some of the technologies that have been developed to support each one of those components of a virtual network.
13:51
We also talked about the distinction between software-defined networks, and virtual networks.
13:58
So let’s review that briefly. SDN effectively separates the data plane and the control plane. Whereas, virtual networks separate logical and physical networks. So, SDN’s are in some sense a useful tool for implementing virtual networks, but the two concepts are certainly distinct from one another.

Applications of Virtual Networking

three broad applications of virtual networking

在这里插入图片描述
We’ll look at three broad applications of virtual networking.

We will first look at how virtual networking has enabled experimentation on production networks. And in particular how it allows researchers to run virtual experimental infrastructure in parallel with production networks on the same underlying physical network infrastructure.

We’ll also look at how virtual networking enables rapid deployment and development of new network services. And in particular, how it allows operators to deploy services independently from the underlying
0:52
vendor hardware.

Finally, we’ll look at how virtual networking enables the dynamic scaling of resources by exposing the abstraction of a logical network that is distinct from the underlying physical resources.
在这里插入图片描述
So, historically, network researchers have designed new network protocols or architectures and they’d like to evaluate or test them. Now, there are various approaches to doing so. One could run the new protocol or architecture in a simulator, or test it in an emulator like VINI or Emulab. But, when it comes to actually deploying that new architectural protocol in production, researchers have historically hit a roadblock. And there’s a bit of a catch-22 situation. In order to prove or show that that protocol or architecture works in production, they need to deploy it on a production network. But, of course, it’s experimental. So, no operator would take that experimental protocol or architecture and want to run that on production traffic with real users. So, ideally, we’d have something that lets that researcher deploy that experimental infrastructure in parallel with the production network.
VINI和Emulab是两个传统的测试平台
a catch-22 situation. 第二十二条军规 意为本身就有问题、不符合逻辑而难以实现的规则或者进退两难的境地
在这里插入图片描述
And, that’s effectively what a piece of software called FlowVisor does. FlowVisor basically virtualizes network control by letting experimental traffic run in parallel on the production network with the real user, and real production traffic. So the idea here is that a user, Doug for example, might have manydifferent types of network traffic, and many different applications.voice over IP, web, gaming and so forth. And that user might be willing to let researchers run experimental protocols or architectures on some subset of the traffic, particularly if the traffic is not as critical.
So what FlowVisor allows Doug to do, is specify some subset of the traffic that he is willing to let run over that experimental network control. Now this virtualization is achieved using a concept called flow space.
网络虚拟化之FlowVisor:网络虚拟层(上) 一个系列有三篇,但是我现在看不下去了
FlowVisor是建立在OpenFlow之上的网络虚拟化工具,它可以将物理网络划分成多个逻辑网络,从而实现虚网划分
作为一个网络虚拟化平台,FlowVisor部署在标准OpenFlow控制器和OpenFlow交换机之间,成为二者的透明代理。FlowVisor能够与多个控制器连接使得每个控制器控制一个虚网,保证各虚网相互隔离。
三. 网络虚拟化所关注的主要资源

带宽:划分链路带宽给每个网络切片
拓扑:每个网络切片应该拥有自己的网络拓扑
流量:流量和虚拟网络关联
计算资源:划分交换机和路由的计算资源
转发表:网络设备支持一定数量的转发表
四. FlowVisor

FLowVisor为一个网络抽象层,包含了一种新的交换机层网络虚拟化技术,同一个硬件转发平面可以被多个逻辑网络共享。类似于计算机的虚拟层,FLowVisor位于底层硬件和上层软件之间,他的结构如下图所示。操作系统利用指令集控制底层硬件,FLowVisor利用的是前文提到的OpenFlow协议,有如下如特性:

FLowVisor定义切片为由OpenFlow交换机组成的拓扑上的一组流
FLowVisor位于每个OpenFlow控制器和OpenFlow交换机之间,确保每个控制器只能看到和控制他应该管理的OpenFlow交换机
FLowVisor通过给组成切片的流一个最小的数据速率来划分带宽
FLowVisor通过追踪流表项属于哪个控制器来划分交换机的流表
The idea here, is basically that some subset of traffic flows, based on IP address, port, and so forth, might be specified as being controlled by an experimental network controller, as opposed to the production network controller.

We’ll talk a lot more about virtualization of network control when we discuss the nuts and bolts of SDN control in later modules.
在这里插入图片描述
在这里插入图片描述
A second application for network virtualization is the deployment of new services. Now one particular platform that allows this is Nicira’s network virtualization platform.

And the idea here, is that the platform provides an abstraction layer between hosts and the underlying network. So, hosts essentially see their version of a virtual network that’s running potentially independently of other virtual networks.

And the provisioning of these virtual networks is all managed by a distributed controller. So you can see, again, the potential connection between software defined networks and network virtualization here in this particular application because a controller might be managing the provisioning and configuration of those virtual network resources。 So, various applications for the network virtualization platform include dynamic workload placement.
在这里插入图片描述
重点从用户互相不影响
For example, suppose you are a very large data center operator and you have multiple tenants running applications or services on the servers and switches in that data center. If you are that operator, you need some kind of platform to allow for the creation of isolated virtual networks, for each tenant.
5:25
Each tenant needs the appearance of running on their own dedicated infrastructure that’s isolated and separate from other tenants. Technology that allows for the creation and management of separate virtual networks makes this possible.
5:45
By contrast, imagine if you did not have network virtualization. Each tenant would effectively have to deploy their own resources, their own servers and switches. And the pool of physical resources that support those services, applications and tenants couldn’t be reused as demands change.
6:08
Another application for network virtualization is the enforcement of dynamic security policies. So, by creating the appearance of a single logical network, a network operator then has the opportunity to specify a central higher level security policy that can be managed based on what the logical network looks like. As opposed to having to manage each firewall and switch independently.
在这里插入图片描述

Nicira was a network virtualization company and is now a key component of VMware’s Software Defined Data Center strategy. Nicira’s Network Virtualization Platform (NVP) enables the dynamic creation of virtual network infrastructure and services that are completely decoupled and independent from the physical network hardware. Innovative companies such as AT&T, DreamHost, eBay, NTT and Rackspace used Nicira NVP to accelerate service delivery from weeks to minutes and dramatically reduce data center complexity and cost.
被VMware收购了

A third application for virtual networking is the dynamic scaling of resources.
在这里插入图片描述
So, here’s an example that shows that. Suppose that you’re an enterprise network and you have a particular set of resources that you’ve allocated for the tasks that you need to perform. Well, depending on various circumstances, such as a sudden fluctuation in demand disaster and so forth, you might suddenly need additional resources. Now, if you didn’t have network virtualization, you’d need to go out and buy those resources yourself. But instead, what you might do is use something like Amazon’s Virtual Private Cloud to dynamically provision and configure additional resources on demand. This application offers many benefits, including the ability to dynamically scale the resources that are available to you based on demand
遇到突发情况可以直接去买亚马逊的云
在这里插入图片描述
The Virtual Private Cloud effectively allows each customer to define their own network, address space and so forth. And actually connect it to the physical network that they already have, typically using a virtual private network between the Amazon Virtual Private Cloud and their existing data center.
There are various additional benefits and applications to this type of virtual networking application, including the ability to say, for example, potentially recover from a disaster. Or, outsource the management of some of your network resources to a third party.

There are many other examples of network virtualization.
在这里插入图片描述
One class of virtual networks, which we’ve already discussed, are those that support virtual networks in the wide area.
So there are a variety of classes of wide area virtual networks, some that support network experimentation such as VINI and GENI. Some that support value added services like CABO, and some that support multiple control infrastructures like the Tempest architecture.
9:00
Another type of virtual network that’s becoming increasingly popular is the virtual network in a box. And the idea here is that there is often the need to dynamically slice the resources on a single server and connect those virtual machines, on a single server, to the network or to each other. And various commercial offerings of a virtual network in a box are available.

Finally, another class of network virtualization that’s gaining some traction is something called network functions virtualization. And the idea here is essentially the unification of middle box function. Presently, network operators have to purchase a variety of middle boxes, such as firewalls, load balancers, deep packet inspection boxes, and so forth.

NFV

知识贴 | 一篇文章让你搞懂NFV威实网络A10Networks
NFV负责各种网元的虚拟化,而SDN负责网络本身的虚拟化(比如,网络节点和节点之间的相互连接)

NFV(network function virtulization,网络功能虚拟化)是指一种操作框架,目的是为了将部署在COTS硬件上的、在虚拟基础架构中的VNF软件设备编排和自动化起来,然后进行VNF设备的全生命周期管理。

NFV依赖SDN(软件定义网络)原理,把网络操作分成用户平面、控制平面、管理和编排(MANO)平面。

补充知识:
VNF(virtualized network function)通常是指路由器、防火墙、负载均衡等网络设备的软件化。大多数时候,VNF是作为虚机被部署在基于Linux命令行KVM虚拟机上,或者部署在基于VMware vSphere hypervisor的商用现成(COTS)的硬件上。
PNF(physical network function,物理网络功能)是指在专用硬件上的传统网络设备。
CNF(cloud-native network function,云原生网络功能)是指容器化的VNF和可以成为微服务中的容器网络和服务网格。

And the idea behind And the idea behind network functions virtualization is, let’s suppose instead that we had a distributed compute pool where we could dynamically install many of those functions as software potentially running in virtual machines. And then network them together using existing virtual network technology such as that which we’ve discussed in this and other lessons.is, let’s suppose instead that we had a distributed compute pool where we could dynamically install many of those functions as software potentially running in virtual machines. And then network them together using existing virtual network technology such as that which we’ve discussed in this and other lessons.
在这里插入图片描述 So, in summary, there are many applications of virtual networking. Virtual networking can support experimental deployments. It can provide isolation to different tenants running on a shared infrastructure. It can allow dynamic reuse of resources from a common pool, as well as dynamic scaling. And it can also allow for easier management of those logical resources.

概念补充

Overlay

在网络技术领域,指的是一种网络架构上叠加的虚拟化技术模式,其大体框架是对基础网络不进行大规模修改的条件下,实现应用在网络上的承载,并能与其它网络业务分离,并且以基于IP的基础网络技术为主(如图2所示)。其实这种模式是以对传统技术的优化而形成的。

NFV

知识贴 | 一篇文章让你搞懂NFV威实网络A10Networks
NFV负责各种网元的虚拟化,而SDN负责网络本身的虚拟化(比如,网络节点和节点之间的相互连接)

NFV(network function virtulization,网络功能虚拟化)是指一种操作框架,目的是为了将部署在COTS硬件上的、在虚拟基础架构中的VNF软件设备编排和自动化起来,然后进行VNF设备的全生命周期管理。

NFV依赖SDN(软件定义网络)原理,把网络操作分成用户平面、控制平面、管理和编排(MANO)平面。

补充知识:
VNF(virtualized network function)通常是指路由器、防火墙、负载均衡等网络设备的软件化。大多数时候,VNF是作为虚机被部署在基于Linux命令行KVM虚拟机上,或者部署在基于VMware vSphere hypervisor的商用现成(COTS)的硬件上。
PNF(physical network function,物理网络功能)是指在专用硬件上的传统网络设备。
CNF(cloud-native network function,云原生网络功能)是指容器化的VNF和可以成为微服务中的容器网络和服务网格。

VINI和Emulab

是两个传统的测试平台
a catch-22 situation. 第二十二条军规 意为本身就有问题、不符合逻辑而难以实现的规则或者进退两难的境地

FLowVisor

网络虚拟化之FlowVisor:网络虚拟层(上) 一个系列有三篇,但是我现在看不下去了
FlowVisor是建立在OpenFlow之上的网络虚拟化工具,它可以将物理网络划分成多个逻辑网络,从而实现虚网划分
作为一个网络虚拟化平台,FlowVisor部署在标准OpenFlow控制器和OpenFlow交换机之间,成为二者的透明代理。FlowVisor能够与多个控制器连接使得每个控制器控制一个虚网,保证各虚网相互隔离。
三. 网络虚拟化所关注的主要资源

带宽:划分链路带宽给每个网络切片
拓扑:每个网络切片应该拥有自己的网络拓扑
流量:流量和虚拟网络关联
计算资源:划分交换机和路由的计算资源
转发表:网络设备支持一定数量的转发表
四. FlowVisor

FLowVisor为一个网络抽象层,包含了一种新的交换机层网络虚拟化技术,同一个硬件转发平面可以被多个逻辑网络共享。类似于计算机的虚拟层,FLowVisor位于底层硬件和上层软件之间,他的结构如下图所示。操作系统利用指令集控制底层硬件,FLowVisor利用的是前文提到的OpenFlow协议,有如下如特性:

FLowVisor定义切片为由OpenFlow交换机组成的拓扑上的一组流
FLowVisor位于每个OpenFlow控制器和OpenFlow交换机之间,确保每个控制器只能看到和控制他应该管理的OpenFlow交换机
FLowVisor通过给组成切片的流一个最小的数据速率来划分带宽
FLowVisor通过追踪流表项属于哪个控制器来划分交换机的流表

emulation和simulation

理解:simulation、emulation、模拟、仿真
wiki中关于emulation的解释中提到:

An emulator duplicates (provides an emulation of) the functions of one system using a different system, so that the second system behaves like (and appears to be) the first system. This focus on exact reproduction of external behavior is in contrast to some other forms of computer simulation, which can concern an abstract model of the system being simulated

wiki中关于simulation的解释中提到:

A simulator may imitate only a few of the operations and functions of the unit it simulates. Contrast with: emulate

在这里插入图片描述
从上面的资料可以看到,simulation和emulation的区别还是比较明显的。根据我的理解,simulation和emulation都是在制造一个“假象”,但是emulation比simulation要“假”得更完全。
simulation是模拟出原系统的一个抽象模型,而不需要真的去做真实系统要做的事情。因此它其实不具备真实系统的功能,只是当某一功能执行时,通常不必输出功能执行的结果,只是在simulator中记录下由此引发的状态变化。因此它通常用于设计初期的模型验证。
emulation则更进一步,要真正地去做所有真实系统能做的事情,只不过做的“过程”不同,它一般用于处理兼容性问题和在资源有限的条件下完成系统原型的实现。

如果把真实系统比作一个人的话,simulator就是这个人的一幅肖像画,而emulator则是这个人的一个克隆人

举个例子,我们要实现一个p2p文件分发系统。
最开始的时候我们可以实现一个simulator:它用一个函数来模拟节点间的通信,这个函数的输入是网络性能(带宽,跳数...),输出是通信时延————注意,并没有真正的数据在传输和拷贝,甚至都没有真正的节点,我们只是模拟了通信时延这个“特征(feature)”。
接下来,我们把这个分发系统实现了,编译成一个exe文件,但这时我们发现我们没有足够多的计算机来组成一个真实的、具有足够规模的网络来进一步测试(通常p2p网络的节点数成百上千),这时,我们可以写一个emulator:它可以区分同一个计算机上的不同进程,因此我们可以在一台计算机上开100个进程,这样可以用100台计算机模拟出10000台计算机的网络————注意,此时数据真的是通过Socket在传输,只不过有的数据走的是loopback口,并没有真的进网卡。

有一种流行的说法是,simulation是用软件实现,emulation要涉及到硬件实现的部分。这个区分很简单明了,在很多情况下也是适用的(包括上面举的p2p分发系统的例子)。但是这种说法只是对于大多数情况的一种归纳性解释,因此在某些情况下就无法区分二者了。比如,这种解释无法区分Operating System Emulator和Operating System Simulator————这个时候二者都不涉及硬件,这是因为真实系统(Operating System)本身就不涉及硬件。

再说说“模拟”与“仿真”。首先,即使在正式场合下(如论文标题),{模拟,仿真}和{simulation,emulation}这两个集合并不是一一映射的。你可以看到"模拟-simulation"的组合,也可以看到"仿真-simulation"的组合。显然,这个不一致现象是由于同时存在两种一一映射造成的。这个问题不是说理能解决的,还得随着使用次数越来越大,看大多数人的习惯。个人感觉,simulation翻译成“模拟”,而emulation翻译成“仿真”的情况多一些。

最后,提一下“虚拟”这个概念。这个概念最近火的不行,英文名叫virtualization。我还没有仔细调查它和前两个概念的细微差别,但是可以肯定的是,virtualization和emulation比较相似,和simulation不是一回事。其他的,以后查到再补进来吧。

在这里插入图片描述

在这里插入图片描述
去掉第一个就是正确答案了
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
mininet只能运行在一台host上
所有的虚拟host在mininet虚拟的OS下的不同的名称空间,因此虚拟host必须是相同的OS
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
去掉那个就对了
在这里插入图片描述
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值