简体   繁体   English

如何ping连接到在两个不同的远程控制器下的mininet中创建的两个不同的虚拟交换机的两个虚拟主机

[英]how to ping two virtual hosts connected to two different virtual switches created in mininet under two different remote controllers

Suppose I have a created virtual network in mininet through python script.The network consists of 假设我通过python脚本在mininet中创建了一个虚拟网络。

Two remote controllers(c1,c2), 两个遥控器(c1,c2),

Two switches(s1,s2):s1 is under the control of c1,s2 is under the control of c2,both s1 and s2 are connected to each other. 两个开关(s1,s2):s1在c1的控制下,s2在c2的控制下,s1和s2都相互连接。 Two hosts(h1,h2):h1 is connected to s1,h2 is connected to s2. 两个主机(h1,h2):h1连接到s1,h2连接到s2。

When I have given ping command as h1 ping h2 -it is showing destination host unreachable. 当我给ping命令作为h1 ping h2时-它显示目标主机不可达。

Please let me know why it is not pinging? 请让我知道为什么它不ping通吗? c1 c2 / \\ s1------s2 / \\ h1 h2 c1 c2 / \\ s1 ------ s2 / \\ h1 h2

You have to program the controllers to configure the switches in the following way: 您必须通过以下方式对控制器进行编程以配置交换机:

  • If s1 gets a packet whose destination IP address = IP(h2), the action set should be outport = port that connects to s2 如果s1收到目标IP地址 = IP(h2)的数据包,则操作集应为outport =连接到s2的端口

  • The same vice versa. 反之亦然。

  • If s1 gets a packet destined to h1, push it through the port that connects to h1. 如果s1得到了发往h1的数据包,则将其推入连接到h1的端口。

  • Do similar with s2. 对s2做类似的事情。

Considering that this solution abstract is pretty straight forward, it is possible that you have not considered programming the controller in the first place. 考虑到此解决方案摘要非常简单,可能您一开始就没有考虑对控制器进行编程。 The first thing that would help is going through a small tutorial on a simple (in-built) controller such as POX. 会有所帮助的第一件事是通过一个简单的(内置)控制器(例如POX)上的小教程。 The controller code could be overwhelming in the beginning but it really gets quite simple once you get the pattern of the controller code! 控制器代码一开始可能会让人不知所措,但是一旦您掌握了控制器代码的模式,它的确变得非常简单!

I know I'm answering a little too late, but hope it helps the other people who are looking for similar solutions. 我知道我回答得太晚了,但是希望它对正在寻找类似解决方案的其他人有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM