Archive

Category Archives for "Brian Linkletter"

The Wistar network emulator

Wistar is an open-source network emulator originally developed by Juniper Networks and released under the Apache license. It simplifies the presentation of Juniper products on its graphical user interface by making the multiple VMs that make up each JunOS virtual router appear as one node in the network topology.

Wistar also supports Linux virtual machines and, interestingly, uses cloud-init to configure Linux routers from the Wistar user interface. Wistar also supports generic virtual appliances, in a basic way. In this post, I will install Wistar and use it to work through two examples using open source routers.

Wistar Documentation

The Wistar installation procedure is documented in the Wistar GitHib page. The Wistar user guide is available at the Read the Docs website and some unpublished chapters are available on GitHub. Juniper published a presentation about using Wistar. In addition, there are a few other other blog posts available about using Wistar and comparing Wistar to other network emulators.

Wistar documentation is good enough to get started, but seems to be incomplete.

Install Wistar

I installed Wistar on my laptop computer running Ubuntu 18.04 LTS. I modified the Wistar Continue reading

Vrnetlab: Emulate networks using KVM and Docker

Vrnetlab, or VR Network Lab, is an open-source network emulator that runs virtual routers using KVM and Docker. It supports developers and network engineers who use continuous-integration processes for testing network provisioning changes. Researchers and engineers may also use the vrnetlab command line interface to create and modify network emulation labs in an interactive way. In this post, I review vrnetlab’s main features and show how to use it to create a simple network emulation scenario using open-source routers.

Vrnetlab implementation

Vrnetlab users create Docker images for each type of router that will run in their network. They package the router’s disk image together with KVM software, Python scripts, and any other resources required by the router into the Docker image. Vrnetlab uses KVM to create and run VMs based on router software images, and uses Docker to manage the networking between the network nodes.

Virtual nodes

Vrnetlab users create Docker images that incorporate the router’s qemu disk image, along with software packages such as qemu-kvm, and the other resources needed by the router, such as a launch script and license files. The new Docker image represents a “virtual router” that comes with all the software and Continue reading

Build a network emulator using Libvirt

I want to explore some of the network virtualization and emulation building blocks available on a Linux system. In this post, I create a simple network emulation scenario using Libvirt, the Qemu/KVM hypervisor, and Linux bridges to create and manage interconnected virtual machines on a host system.

Libvirt provides a command-line interface that hides the low-level virtualization and networking details, enabling one to easily create and manage virtual networking scenarios. It is already used as a basis for some existing network emulators, and other applications and tools. It is available in almost every Linux distribution.

The network emulation scenario

As you work through the examples in this post, you will create a very simple network topology which is intended to demonstrate the use of Libvirt and other virtualization tools to build a network emulator and is not intended to emulate a real-world network. However, once you understand its operation, you may use Libvirt to create large, complex network topologies intended to emulate real-world network scenarios.

The example I created for this post consists of three virtual machines serving as routers connected to each other in a ring topology. On each side of this emulated network, you will create Continue reading

Python: the seven simple things network engineers need to know

Are you like me? Are you a network engineer, or other professional, transitioning their skill set to include programming and automation? Does your programming experience experience come from a few programming courses you attended in college a long time ago? Then please read on because I created this Python guide for people like you and me.

In this guide, I explain the absolute minimum amount you need to learn about Python required to create useful programs. Follow this guide to get a very short, but functional, overview of Python programming in less than one hour.

When you begin using Python, there are a lot of topics you do not need to know so I omit them from this guide. However, I don’t want you to have to unlearn misconceptions later, when you become more experienced, so I include some Python concepts that other beginner guides might skip, such as the Python object model. This guide is “simple” but it is also “correct”.

Getting Started

In this guide, I will explore the seven fundamental topics you need to know to create useful programs almost immediately. These topics are:

  1. The Python object model simplified
  2. Defining objects
  3. Core types
  4. Statements
  5. Simple programs
  6. Modules
  7. Continue reading

Create a nested virtual machine in a Microsoft Azure Linux VM

Microsoft Azure unofficially supports nested virtualization using KVM on Linux virtual machines, which makes it possible to build network emulation scenarios in the cloud using the same technologies you would use if you were using your own PC or a local server.

In this post, I will show you how to set up a Linux virtual machine in Microsoft Azure and then create a nested virtual machine inside the Azure virtual machine. This is a simple example, but you may use the same procedure as a starting point to create more complex network emulation scenarios using nested virtualization.

Prerequisites

To follow this tutorial, you need an Azure account. Microsoft offers a free-trial period that provides up to $300 in credits for up to 30 days. Creating a free trial account is easy: follow the instructions at: https://azure.microsoft.com/free.

If you have not used MS Azure before, I recommend the free training offered on their web site. The first course you should take is the beginner-level Azure Administrator course, which demonstrates all the basic topics you will need to understands when managing virtual machines in Azure.

In this tutorial, I will use the Azure CLI to create and manage Continue reading

Network Labs Using Nested Virtualization in the Cloud

Many open-source network simulation and emulation tools use full virtualization technologies like VMware, QEMU/KVM, or VirtualBox. These technologies require hardware support for virtualization such as Intel’s VT-x and AMD’s AMD-V. To gain direct access to this hardware support, researchers usually run network emulation test beds on their own PCs or servers but could not take advantage of the inexpensive and flexible computing services offered by cloud providers like Amazon EC2, Google Compute Engine, or Microsoft Azure.

Creative Commons copyright: From http://d203algebra.wikispaces.com/Exponential+Functions-Target+D-Modeling+Data-Investigations

By August 2017, most of the major cloud service providers announced support for nested virtualization. In the cloud context, Nested Virtualization is an advanced feature aimed at enterprises, but it is also very useful for building network emulation test beds. I’ve written about nested virtualization for servers before but, until recently, I was limited to running nested virtual machines on my own PC. Now that the major cloud providers support nested virtualization, I can build more complex network emulation scenarios using cloud servers.

This post will discuss the cloud service providers that support nested virtualization and how this feature supports open source networking simulation and emulation in the cloud.

Cloud service providers support for nested virtualization

The cloud service providers Continue reading

Enable nested virtualization on Google Cloud

Google Cloud Platform introduced nested virtualization support in September 2017. Nested virtualization is especially interesting to network emulation research since it allow users to run unmodified versions of popular network emulation tools like GNS3, EVE-NG, and Cloonix on a cloud instance.

Google Cloud supports nested virtualization using the KVM hypervisor on Linux instances. It does not support other hypervisors like VMware ESX or Xen, and it does not support nested virtualization for Windows instances.

In this post, I show how I set up nested virtualization in Google Cloud and I test the performance of nested virtual machines running on a Google Cloud VM instance.

Create Google Cloud account

Sign up for a free trial on Google Cloud. Google offers a generous three hundred dollar credit that is valid for a period of one year. So you pay nothing until either you have consumed $300 worth of services or one year has passed. I have been hacking on Google cloud for one month, using relatively large VMs, and I have consumed only 25% of my credits.

If you already use Google services like G-mail, then you already have a Google account and adding Google Cloud to your account is easy. Continue reading

Install and run the Cloonix network emulator on Packet.net

This tutorial shows how to set up the Cloonix network emulator on a Packet.net server. It builds on top of my previous post about how to set up a virtualization server on Packet.net. Now, I focus on a specific case: setting up the Cloonix network emulator on the virtualization server. You should read my previous post before reading this one.

Running Cloonix on a remote server enables users to work with more complex network emulation scenarios than would be possible on a standard laptop computer. For example. Cloonix recently added a feature which allows users to run Cisco router images in a Cloonix network emulation scenario. Cisco router images require a large amount of computer resources so I cannot run more than a few on my personal laptop computer. If I use a remote Packet server, I could run dozens of Cisco images in a network emulation scenario if I wanted to.

In this post, I will set up a Cloonix network emulation server on Packet.net so it can be started, stopped, and restarted relatively quickly.

Table of Contents

  1. Cloonix v37 overview
  2. Packet.net overview
  3. Tutorial summary
  4. Start a server and attach storage
  5. Load Files onto Block Continue reading

Set up a dedicated virtualization server on Packet.net

Packet is a hardware-as-a-service vendor that provides dedicated servers on demand at very low cost. For me and my readers, Packet offers a solution to the problem of using cloud services to run complex network emulation scenarios that require hardware-level support for virtualization. Packet users may access powerful servers that empower them to perform activities they could not run on a normal personal computer.

In this post, I will describe the procedure to set up an on-demand bare metal server and to create and maintain persistent data storage for applications. I will describe a generic procedure that can be applied to any application and that works for users who access Packet services from a laptop computer running any of the common operating systems: Windows, Mac, and Linux. In a future post, I will describe how I run network emulation scenarios on a Packet server.

Table of Contents

  1. Packet.net
    1. Controlling costs when using bare metal servers
    2. Create a Packet account and Login
    3. Create a project
  2. Generate SSH Keys
    1. Windows
    2. Mac
    3. Linux
    4. Copy public key to Packet.net
  3. Deploy a Server
  4. SSH Server on local machine
    1. Windows
    2. Mac
    3. Linux
  5. Set up the remote server
    1. Test X11 forwarding
  6. Create block storage
    1. Create Continue reading

Install the CORE Network Emulator from source code

To install the CORE network emulator in recently released Linux distributions, including Ubuntu 16.04 and later, you must install it from source code. There is a bug in CORE that prevents Quagga from starting its routing daemons in newer Linux distributions that is fixed in the latest version of the source code. However, the fix is not in the pre-built CORE packages available on the CORE web site, nor in the Ubuntu repository.

To further create problems, the CORE web site contains old versions of source code and does not point to the latest version of CORE on Github.

Also, the Ubuntu maintainers will remove CORE packages from the Ubuntu repository in the near future because CORE allows unprivileged users to access root privileges, which creates a security problem if CORE is run on a computer used by more than one person.

In this post, I provide a detailed procedure to install CORE from the source code on Github, and to set up your system to run network experiments using the CORE network emulator.

Install CORE from Github

The latest version of CORE is available on Github. To install CORE, first install some prerequisite packages that allow you to Continue reading

Netdev 2.1 conference report

I attended the Netdev 2.1 Conference in Montreal from April 6 to 8. Netdev is a community-driven conference mainly for Linux networking developers and developers whose applications rely on code in the Linux kernel networking subsystem. It focuses very tightly on Linux kernel networking and on how packets are handled through the Linux kernel as they pass between network interfaces and applications running in user space.

In this post, I write about the three-day conference and I offer some commentary on the talks and workshops I attended. I grouped my comments in categories based on my interpretation of each talk’s primary topic. The actual order in which these topics were presented is available in the Netdev 2.1 schedule. The slides from the talks, workshops, and keynotes are posted under each session on the Netdev web site. Videos of the talks are available on the netdevconf Youtube channel.

Keynotes

Each day at the Netdev conference featured a keynote by a prominent member of the Linux networking community. Two of the keynotes covered higher-level views of Linux in the network in the enterprise, cloud, and the Internet of things. The other keynote covered details of the new eXpress Data Path Continue reading

Build a custom Linux Router image for UNetLab and EVE-NG network emulators

In their default configuration, the UNetLab and EVE-NG network emulators support Linux nodes running bootable CDROM or DVDROM images that offer a graphical user interface accessible via VNC.

We may add new Linux node types to both UNetLab and EVE-NG by building Linux VM images and creating custom templates. To support Linux networking emulation scenarios, we will build a linux router image that boots from a virtual hard disk, can be accessed via Telnet to simplify configuration and management, and that has a persistent file system onto which we can install software and modify configuration files.

In this post, we will show how to build a Linux router image and create a custom Linux router template that can be used in UNetLab or EVE-NG.

Add a custom Linux server image to UNetLab or EVE-NG by following the procedure below:

  1. Install a Linux server on a virtual machine on your host computer
  2. Start the new virtual machine and configure it so it is accessible via Telnet after it is moved into UNetLAb or EVE-NG:
    • Install and enable Telnet
    • Add a serial interface
    • Add networking software
    • Stop the virtual machine
  3. Copy the new virtual machine’s disk image to the UNetLab or EVE-NG Continue reading

How to set up the EVE-NG network emulator on a Linux system

EVE-NG is a graphical network emulator that supports both commercial and open-source router images. It’s graphical user interface runs in a web browser. EVE-NG runs in a virtual machine so it can be set up Windows, Mac OS, or Linux computers.

In this post, I will show how to set up an EVE-NG virtual machine on an Ubuntu Linux system. I’ll show the basic steps to creating and running a simple lab consisting of emulated Linux nodes.

To support more complex labs using open-source routers and other open-source network appliances in EVE-NG, we need to create custom templates and build router images specifically for use in EVE-NG. I will cover these topics in a future post. In this post, we’ll focus only on getting an EVE-NG virtual machine set up and running on a Linux system.

EVE-NG Overview

EVE-NG is a clientless network emulator that provides a user interface via a browser. Users may create network nodes from a library of templates, connect them together, and configure them. Advanced users or administrators may add software images to the library and build custom templates to support almost any network scenario.

EVE-NG supports pre-configured multiple hypervisors on one virtual machine. It runs Continue reading

DNS and BIND demonstration using the Cloonix network emulator

The Domain Name System (DNS) is a fundamental Internet technology. Network emulators like Cloonix offer a way for researchers and students to experiment with the DNS protocol and with the various open-source implementations of DNS, such as BIND.

In this post, I will install Cloonix from the Github source code repository. I will run the Cloonix DNS demo script to create a simple DNS scenario and then run some experiments with DNS. Along the way, I will demonstrate some of the new Cloonix version 33 features.

Cloonix version 33

In this demonstration, I am using Cloonix version 33. I last used Cloonix when it was at version 29 and version 33 offers some significant changes and improvements. Compared to version 29, the major changes in version 33 are:

  • The Cloonix source code is now hosted on Github
  • The cloonix-ctrl commands have been renamed to cloonix-cli
  • The Cloonix lan object is now much simpler
  • Cloonix adds a simple GUI called cloonix_zor for managing Cloonix servers that have been started
  • The nat object replaces the cloonix slirp LAN
  • New demo scripts have been added. One of which, the DNS demo script, we will use in this demonstration

Using Cloonix version 33

If Continue reading

OFNet SDN network emulator

OFNet is a new software-defined network (SDN) emulator that offers functionality similar to the Mininet network emulator and adds some useful tools for generating traffic and monitoring OpenFlow messages and evaluating SDN controller performance.

ofnet-splash

OFNet is an open-source project that is distributed as a virtual machine (VM) image. The OFNet source code is available in the OFNet VM’s filesystem. In this post, we will use the OFNet VM provided by the OFNet developer to run SDN emulation scenarios in OFNet.

The OFNet Virtual Machine

The OFNet VM image is packaged as an OVA file which can be imported into most virtual machine managers. In this case, we are using VirtualBox. You may download the OFNet VM from this link.

The OFNet VM contains a Linux system running Ubuntu 12.04 and has the VirtualBox extensions installed.

Create a new virtual machine using the OFNet VM image, start up the VM and log in. After logging in, review the available OFNet documentation and install Wireshark.

Install the OFNet VM in VirtualBox

Import the OFNet.ova file into VirtualBox. Use the File → Import Appliance VirtualBx menu command or press <Ctrl-I>. Navigate to the location where you saved the OFNet.ova file Continue reading

Psimulator2 forked, updated

Roland Kuebert forked the psimulator2 network simulator project from the original, seemingly discontinued source and made the new version available at https://github.com/rkuebert/psimulator.

Roland posted this announcement in the comments under my psimulator2 blog post. So that his announcement receives a bit more visibility, I am re-posting his comment verbatim below:

Hi all,

Just a heads up, I forked the project from the original, seemingly discontinued source and it is available at https://github.com/rkuebert/psimulator .

I have fixed the issue preventing the use of Java 8, but I have yet to look into making a release on GitHub. You can, however, clone the repository and use gradle to build jar files – I recommend using gradle shadowJar to create jar files which can be run without specifying any further dependencies.

For the frontend, use java -jar java -jar frontend/build/libs/psimulator-frontend-master-*.jar (replace the asterisk with the exact name, the star represents the git commit you used to checkout).

For the backend, use java -jar backend/build/libs/psimulator-backend-master-*-all.jar (replace the asterisk with the exact name, the star represents the git commit you used to checkout).

Cheers
Roland

How to use VirtualBox to emulate a network

VirtualBox is an open-source virtual machine manager and hypervisor that may also be used as a network emulator. In addition to creating and managing individual virtual machines, VirtualBox can connect virtual machines together to emulate a network of computers and network appliances such as routers or servers. VirtualBox works on the major computing platforms: Windows, MacOS, and Linux.

VirtualBox network with internal networks and a NAT management network

In this post, I offer a step-by-step tutorial showing how to use the VirtualBox graphical user interface to set up a network of six devices — three routers and three PCs. This tutorial will utilize some of the advanced functions supported by VirtualBox and provide you with the skills to set up a network of virtual machines on your own personal computer.

Required knowledge

I assume you, the reader, are already familiar with the VirtualBox GUI and have used it to create and run virtual machines on your personal computer, using default settings. I also assume you have a basic understanding of Linux shell commands, which will be needed to configure the Linux operating system running on the virtual routers and PCs.

If you need to refresh your knowledge about VirtualBox, the VirtualBox website provides a detailed user manual, and Continue reading

How to build a network of Linux routers using quagga

This post lists the commands required on each node to build a network of three Ubuntu Linux routers. Each router is connected to the other two routers and is running quagga. Each router is also connected to a PC running Ubuntu Linux.

three-nodes-kr

I use this network configuration to evaluate network emulators and open-source networking software in a simple scenario. Readers may find these commands useful in building their own configuration scripts.

I provide “copy and paste” commands so the network can be configured quickly.

Creating a basic topology

The physical — or virtual — network installation and the management network setup is outside the scope of this post. The method used to build the lab topology depends on the equipment, and/or the network emulator and hypervisor technology you are using.

I assume you already have six machines running and connected in a network as shown above, and I assume you have a management network set up so that each machine can communicate with the host computer and with the Internet.

Router configuration

Each router needs to install the quagga router package, configure quagga, and then configure the network using the quagga VTY shell. Optionally, quagga daemon configuration files may be Continue reading

How To Install dCore Linux in a virtual machine

dCore Linux is a minimal Linux system based on the Tiny Core Linux system. Like Tiny Core Linux, dCore loads its file system entirely into RAM, which should provide good performance in large network emulation scenarios running on a single host computer.

tiny-core-linux_kraked

dCore Linux allows users to install additional software from the Debian or Ubuntu repositories, instead of using the pre-built (and often out-of-date) TCE extensions provided for Tiny Core Linux. This should simplify the process of building network appliances for use in a network emulator, as you will not need to compile and build your own extensions, or use out-of-date pre-built extensions.

dCore Linux is designed to run as a “live” Linux system from removable media such as a CD or a USB drive but, for my use, I need to install it on a hard drive. Currently available instructions for installing dCore Linux onto a hard drive are incomplete and hard to follow. This post lists a detailed procedure to install dCore Linux on a virtual disk image connected to a virtual machine. I use VirtualBox in this example, but any other virtual machine manager would also be suitable.

Notes about dCore

Because dCore Linux is a Continue reading

Mininet-WiFi: Software defined network emulator supports WiFi networks

Mininet-WiFi is a fork of the Mininet SDN network emulator. The Mininet-WiFi developers extended the functionality of Mininet by adding virtualized WiFi stations and access points based on the standard Linux wireless drivers and the 80211_hwsim wireless simulation driver. They also added classes to support the addition of these wireless devices in a Mininet network scenario and to emulate the attributes of a mobile station such as position and movement relative to the access points.

mn-wifi-graph-200

The Mininet-WiFi extended the base Mininet code by adding or modifying classes and scripts. So, Mininet-WiFi adds new functionality and still supports all the normal SDN emulation capabilities of the standard Mininet network emulator.

In this post, I describe the unique functions available in the Mininet-WiFi network emulator and work through a few tutorials exploring its features.

How to read this post

In this post, I present the basic functionality of Mininet-WiFi by working through a series of tutorials, each of which works through Mininet-WiFi features, while building on the knowledge presented in the previous tutorial. I suggest new users work through each tutorial in order.

I do not attempt to cover every feature in Mininet-WiFi. Once you work through the tutorials in this post, Continue reading