简体   繁体   English

如何在Macintosh或Linux中模拟OSPF路由表?

[英]How to simulate OSPF routing table in Macintosh or Linux?

I am trying to make a OSPF protocol simulation in Mac or Linux. 我正在尝试在Mac或Linux中进行OSPF协议仿真。 So, basically I want to run many binary OSPF binaries and they should be able to speak to each other and should be able to use pseudo interface to run OSPF on it. 因此,基本上,我想运行许多二进制OSPF二进制文件,它们应该能够相互交谈,并且应该能够使用伪接口在其上运行OSPF。 So, if they share the pseudointerface I should be able to assign the same subnet interface on different interfaces. 因此,如果它们共享伪接口,则我应该能够在不同接口上分配相同的子网接口。

For example, R1 - OSPF Sim1 has 3 pseudo networking interface. 例如,R1-OSPF Sim1具有3个伪网络接口。 The pseudo networking interface IP is en0 - 192.168.2.1/24 and en1 is 111.111.10.1/24. 伪网络接口IP为en0-192.168.2.1/24,en1为111.111.10.1/24。 The loopback is 1.1.1.1 环回为1.1.1.1

now, I have R2 - OSPF sim2 has two pseudo networking interface. 现在,我有R2-OSPF sim2具有两个伪网络接口。 The pseudo networking interface is en0 - 192.168.2.1/24 and loopback is 2.2.2.2 伪网络接口为en0-192.168.2.1/24,环回为2.2.2.2

Now, I have R3 - OSPF sim3 has two pseudo networking interface. 现在,我有了R3-OSPF sim3具有两个伪网络接口。 The pseudo networking interface is en1 - 111.111.10.2/24 and loopback is 3.3.3.3 伪网络接口为en1-111.111.10.2/24,环回为3.3.3.3

I want to simulate in such a way that those are in the subnet can ping each other and rest not. 我想以这样一种方式进行仿真,即子网中的那些设备可以相互ping通,而不能休息。 Any idea? 任何想法? Also, I want them to install routes so that kernel is aware of it. 另外,我希望他们安装路由,以便内核知道它。

I would suggest to use VirtualBox to create three identical linux virtual machines, each one running its own quagga packages. 我建议使用VirtualBox创建三个相同的Linux虚拟机,每个虚拟机运行自己的quagga软件包。

To do so, I would use Alpine Linux as base (it is a extremely compact and functional linux distribution, which has quagga packages available ). 为此,我将使用Alpine Linux作为基础(这是一个非常紧凑且功能强大的linux发行版,其中包含quagga软件包 )。 To create Alpine-based VM, there is a detailed instruction here 要创建基于高山-VM,有一个详细的指示位置

There are several examples of OSPF testbeds, this one seems particularly relevant to what you want to achieve. OSPF测试平台有几个示例, 这一示例似乎与您想要实现的特别相关。

Hope it help! 希望对您有所帮助!

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

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