IMUNES on Linux


http://www.brianlinkletter.com/imunes-on-linux/


August 13, 2015 — 2 Comments

The IMUNES open-source network simulator can now be installed on and run on Linux. Previously, IMUNES was available only for the FreeBSD operating system.

IMUNES-linux

The Linux version of IMUNES is ready to be used and can set up and run network emulation scenarios. It does not yet have all the features offered in the FreeBSD version of IMUNES but the development team intends make add in more features until both versions support similar capabilities.

In this post, we will show how to install the Linux version of IMUNES on Ubuntu 14.04, look at the tool set used by IMUNES on Linux, and experiment with a simple network simulation scenario.

Compatibility with Linux versions

IMUNES is compatible with all popular Linux distributions.

The IMUNES development team seems to be testing IMUNEs on the latest available Linux distributions. If you are using Linux distributions like Ubuntu 15.04, you can follow the standard IMUNES install directions. However, if you are using a long-term-supported distribution like Ubuntu 14.04, there are some extra software dependencies that you must install.

Install IMUNES in Ubuntu 14.04

I am using Ubuntu 14.04 LTS as my host operating system. When installing IMUNES on Ubuntu 14.04, we must install some additional software that IMUNES depends upon. Check the IMUNES documentation for the correct minimum versions for each required software package. Do not assume your package manager will install the minimum required version of each package. For example, IMUNES requires Docker 1.4 while Ubuntu 14.04 offers only Docker 0.9 by default.

Install software dependencies

For Ubuntu 14.04, install the following packages, upon which IMUNES depends. Execute the following command:

$ sudo apt-get install openvswitch-switch xterm wireshark ImageMagick tcl tcllib tk user-mode-linux

If you are using a different Linux distribution, see the IMUNES README file for the correct lists of dependencies for your distribution.

Install current version of Docker

Next, install the latest version of Docker. Do not install Docker from the Ubuntu 14.04 software repository1 because it contains an old version of Docker. Use the following procedure recommended by the Docker development team to ensure your Docker installation is fully up-to-date.

$ wget -qO- https://get.docker.com/ | sh

Start the Docker service on your system:

$ sudo service docker start

The above procedure is for Ubuntu 14.04 LTS. To install Docker on other Linux distributions, see the Docker installation guide.

Install nsenter (for Ubuntu 14.04)

The nsenter tool provides access to the namespace of another process. IMUNES needs nsenter to communicate with the Docker containers that emulate each node in the network topology.

In newer Linux distributions, nsenter is part of the util-linux package but the version of util-linux in Ubuntu 14.04 is an older version that does not include nsenter. Install nsenter using the following command, recommended by the Docker blog:

$ sudo docker run -v /usr/local/bin:/target jpetazzo/nsenter

This drops a pre-compiled binary of nsenter into the /usr/local/bin directory on your host computer2.

Install IMUNES

Now, install IMUNES using the following commands:

$ sudo git clone https://github.com/imunes/imunes.git
$ cd imunes
$ sudo make install
$ sudo imunes -p
Run IMUNES

Start IMUNES with super-user privileges. IMUNES will not start if you run it with normal user permissions in Ubuntu. You will need to start the Docker service, if it is not already running, before starting IMUNES.

$ sudo imunes

The IMUNES graphical user interface appears.

IMUNES graphical user interface

IMUNES graphical user interface

Upgrade IMUNES

IMUNES on Linux is being updated regularly. To upgrade to the latest version of IMUNES, execute the following commands.

$ cd imunes
$ sudo git pull
$ sudo make install
$ sudo imunes -p

IMUNES on Linux architecture

IMUNES on Linux uses a fundamentally different tool set compared to IMUNES on FreeBSD. From a user’s perspective, IMUNES on Linux functionality looks the same as IMUNES on FreeBSD. However, when we look into how it works “under the hood” we see the differences, and the potential.

IMUNES uses Docker containers to create virtual L3 nodes like routers and PCs, and uses Open vSwitch to emulate L2 nodes like LAN switches. The IMUNES development team is currently focused on completing functionality of IMUNES on Linux so it matches the functionality available in IMUNES on FreeBSD. Using Docker and Open vSwitch makes IMUNES on Linux potentially more flexible than its FreeBSD implementation so it will be interesting to see how IMUNES on Linux evolves in the future.

Docker containers

IMUNES on Linux uses Docker containers to create virtual L3 nodes. Please read the Introduction to Docker in the Docker documentation web page to better understand how Docker works in IMUNES. Also read the Docker Cheat Sheet to see how to interact with Docker containers.

The L3 nodes in an IMUNES simulation scenario are built on a Docker image provided by the IMUNES project team: the vroot-linux image. When we ran the imunes -p command during the install process, IMUNES downloaded the vroot-linux image. This image is based on the baseimage-docker Docker image so for more information about the vroot-linux image, check both the baseimage-docker documentation and the vroot-linux documentation (which discusses changes made to the baseimage-docker image).

Filesystems

Because it uses Docker containers to emulate virtual network nodes, IMUNES offers fully independent filesystems on each node, but each node will use the same Linux kernel as the host computer. This is the “best of both worlds” for users. It allows the user to use each node in a more realistic manner without worrying about creating overwriting the host computer’s filesystem and it still enables excellent performance by using the “lightweight” virtualization provided by Linux container technology.

Open vSwitch

IMUNES on Linux uses Open vSwitch to implement the LAN Switch L2 node.

To inspect the Open vSwitch bridges created by IMUNES, open a terminal window and use the ovs-vsctl command. To see an overview of commands that can be used to view and verify operations, read this Open vSwitch Cheat Sheet.

Conflicts with Network Manager

The Ubuntu Network Manager wants to manage all interfaces on my Ubuntu Linux 14.04 computer. So Network Manager gets confused when IMUNES creates Linux bridge ports with names like: il5fc0.n3.e1. This may inject a small amount of protocol traffic from your host computer into your IMUNES simulation while the Network Manager application checks each new interface.

If this becomes an issue for you, install an alternative network manager like WICD and disable Network Manager. See my post about installing WICD for more information.

Using IMUNES on Linux

From the user’s point of view, IMUNES on Linux works almost the same as IMUNES on FreeBSD. Some features have not yet been ported to Linux, but many of the main features are available. I will not discuss missing features because they will probably be added back to IMUNES on Linux as more development continues and it will be difficult to keep a list of missing features up-to-date.

I wrote a review of IMUNES running on FreeBSD in a previous post. Please read that post to learn more about IMUNES.

Create network scenario

We’ve already started IMUNES. Next, we will add some routers switches and hosts in a simple scenario. You can configure nodes by double-clicking on them or right-clicking on them and selecting Configure from the drop-down menu.

Configure network node

Configure network node

For example, if you are configuring a router, you may select configuration options in the router configuration dialogue box or create a custom configuration script that will run when the router starts. In the example below, we just use the default settings.

Router configuration widget

Router configuration dialogue box

Start the experiment

Start the simulation running using the Experiment → Execute menu command, as shown below.

start simulation

Create network and start simulation

Using all default settings, IMUNES will set up basic configurations on each emulated node so you should be able open a console on each node and ping any other node in the network.

Interacting with nodes

When the experiment is running, double-clicking on a node opens he console window, allowing the user to run commands on that node. If we run vtysh and view the running config, we see the router configuration that IMUNES automatically created based on the information we entered in the router’s configuration dialogue box.

console

console

Users may modify the configuration of any node in the console window using the standard command-line interface. For example, the user may change configurations in quagga or at the Linux command line.

However, these configuration are not saved when the IMUNES project is saved. If you need a specific start-up configuration that cannot be automatically generated by IMUNES, then create and run a custom startup scripts for each node and select the scripts in each node’s configuration dialogue box.

Inspecting status with widgets

Users may view node status information using Widgets, which show information when the pointer is placed over a node.

widgets

widgets

For example, if the IPv4 Routing Table widget is chosen, a text box will pop up showing the routing table of a node if you place the mouse point on top of the node.

Routing table widget

Routing table widget

Conclusion

By creating a version of IMUNES that runs on Linux, the IMUNES development team is making this simple and effective network emulation tool available to a broader set of users.

IMUNES for Linux is undergoing active development and the IMUNES development team needs users who will test IMUNES on Linux and report any bugs or suggest improvements. If you are interested in trying IMUNES, and if you have any issues or find any bugs, contact the IMUNES development team using their Github project page.


  1. If you are using Ubuntu 15.04, which supports Docker 1.5, then you may install Docker from the software repository ↩

  2. NOTE: If you are not comfortable installing nsenter as a binary from someone’s git repository, then download the latest util-linux source and compile it on your system using the steps outlines in the codecentric blog↩



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
目标检测(Object Detection)是计算机视觉领域的一个核心问题,其主要任务是找出图像中所有感兴趣的目标(物体),并确定它们的类别和位置。以下是对目标检测的详细阐述: 一、基本概念 目标检测的任务是解决“在哪里?是什么?”的问题,即定位出图像中目标的位置并识别出目标的类别。由于各类物体具有不同的外观、形状和姿态,加上成像时光照、遮挡等因素的干扰,目标检测一直是计算机视觉领域最具挑战性的任务之一。 二、核心问题 目标检测涉及以下几个核心问题: 分类问题:判断图像中的目标属于哪个类别。 定位问题:确定目标在图像中的具体位置。 大小问题:目标可能具有不同的大小。 形状问题:目标可能具有不同的形状。 三、算法分类 基于深度学习的目标检测算法主要分为两大类: Two-stage算法:先进行区域生成(Region Proposal),生成有可能包含待检物体的预选框(Region Proposal),再通过卷积神经网络进行样本分类。常见的Two-stage算法包括R-CNN、Fast R-CNN、Faster R-CNN等。 One-stage算法:不用生成区域提议,直接在网络中提取特征来预测物体分类和位置。常见的One-stage算法包括YOLO系列(YOLOv1、YOLOv2、YOLOv3、YOLOv4、YOLOv5等)、SSD和RetinaNet等。 四、算法原理 以YOLO系列为例,YOLO将目标检测视为回归问题,将输入图像一次性划分为多个区域,直接在输出层预测边界框和类别概率。YOLO采用卷积网络来提取特征,使用全连接层来得到预测值。其网络结构通常包含多个卷积层和全连接层,通过卷积层提取图像特征,通过全连接层输出预测结果。 五、应用领域 目标检测技术已经广泛应用于各个领域,为人们的生活带来了极大的便利。以下是一些主要的应用领域: 安全监控:在商场、银行
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值