maxonthegit / netkit-core Goto Github PK
View Code? Open in Web Editor NEWScripts and tools that make up the Netkit core
Home Page: http://www.netkit.org/
License: Other
Scripts and tools that make up the Netkit core
Home Page: http://www.netkit.org/
License: Other
Welcome to Netkit version 2.8. WHAT IS NETKIT -------------- Netkit is a self-contained environment that makes it easy and costless to emulate complex network configurations on a single host machine. The idea underlying Netkit is that each network device is implemented by a virtual machine running the appropriate software. Virtual machines can then be interconnected as desired by configuring virtual collision domains. Interconnected machines may be organized to form a laboratory (lab), which can be used to emulate the behavior of a particular service or protocol (e.g., DNS). The configuration of the lab can be saved to ease its distribution and replication. Netkit, in itself, is an open source project aiming at integrating different other open source products. See the THANKS section for a brief list of the software resources integrated into Netkit. The project was born (and is still carried on) with the main purpose of supporting teaching of networking subjects with realistic experiences. SYSTEM REQUIREMENTS ------------------- Netkit virtual machines can be configured in a flexible way, so that you can decide how many system resources on the host machine should be allocated to them. System requirements are not very strict. Netkit can run on a personal computer with: - An i386/amd64 architecture (read: Pentiums and AMDs are fine). For best performance, CPU frequency should be above 600MHz. Netkit works fine also on slower systems, but this may impact usability. If your host runs a 64-bit OS, you may need to install 32-bit compatibility libraries (most notably, libc6-i386 and ia32-libs). - At least 256MB of RAM (this mainly depends on the requirements of the Linux installation you are using: Netkit virtual machines may consume slightly more than 32MB each). - At least 1GB of free hard disk space (this is required to install the virtual machines filesystem that is distributed with Netkit); even if not explicitly required, it is *strongly* recommended that Netkit is installed on an ext2/ext3 partition. Not doing so is likely to result in performance losses and/or malfunctions. - A Linux operating system installation running a 2.6 kernel (2.4 kernels may still be supported though); the installation should be capable of running a graphical session (read: should include a configured X server); this is not strictly required, but it eases running multiple virtual machines a lot. Due to the particular nature of the User Mode Linux kernel (which Netkit is based on), Netkit cannot be natively run on operating systems which are different from Linux. DOCUMENTATION ------------- Netkit documentation is available in two separate forms: the Netkit environment is fully described by man pages (you can start your reading from 'man netkit'), while some other documentation and the description of the labs are provided as slides. Standard Netkit documentation is included in the Netkit package itself. Additional documentation can be downloaded from http://www.netkit.org/. BUG REPORTING ------------- Being an integration of different software products, Netkit is a somewhat complex product. We are doing our best to make it be a stable, fast, solid and reliable product. However, due to the complex interactions between the various components, misbehaviors or malfunctions may occur in the presence of particular configurations. We put our effort in trying to fix these bugs as fast as possible (remember that this is not the only activity in our lives ;) ). In turn, we expect users to signal them so that we can improve the quality of Netkit as time goes on. Please make sure you have carefully read the documentation (including man pages and FAQs, if available) before submitting a bug report. Instructions for doing this are provided in the man pages. Bug reports should be sent to <[email protected]> or submitted for public discussion to <[email protected]>. CREDITS AND CONTACTS -------------------- This distribution has been released by the Computer Networks (CompuNet) Research Group at the University of Roma Tre (http://www.dia.uniroma3.it). People involved in the project include (but are not limited to): Giuseppe Di Battista Maurizio Patrignani Stefano Pettini Maurizio Pizzonia Fabio Ricci Massimo Rimondini The project has been carried on in the past with significant contributions from the Linux User Group "LUG Roma Tre" (http://www.lugroma3.org). Apart from people from CompuNet and from the LUG, another special mention is due for contributions provided by Andrea Cecchetti, Lorenzo Colitti, Federico Mariani, and Flavia Picard. The current official Netkit site is http://www.netkit.org/. Here you can find the Netkit distribution itself and also some additional resources (e.g., some labs). Contact information is provided as well. You can reach the Netkit team by writing to <[email protected]> or by subscribing to the mailing list <[email protected]>. THANKS ------ Netkit is a software integration project. Hence, we would like to thank at least the following people for having made all this possible: - Linus Torvalds for Linux - All the people working on the Linux kernel - James R. Leu and Ramon Casellas for their work on MPLS routing - Jeff Dike, Paolo Giarrusso, and the other contributors for User Mode Linux specific resources - Kunihiro Ishiguro, Paul Jakma, and the other developers for the Zebra/Quagga routing daemon - Lennert Buytenhenk and the other people working on bridge sources and utilities at http://bridge.sourceforge.net - many many others...
In public classroom your /etc/sudoers should contain only a line like this:
student ALL=NOPASSWD: /usr/local/netkit/bin/manage_tuntap
Still, netkit scripts run 'sudo /bin/sh ...' and it is rather unconvinient.
At the very least, vlist
reports xterm-attached consoles as "stdin/stdout".
It also fails to recognize the kernel currently used by a virtual machine.
The path used by uml_mconsole
to locate Netkit's Unix sockets should not replace the standard path (.uml/
) but rather be added. A patch is likely ready, but did not make it in the current release (2.8).
I am trying to install BIRD on the vm. Therefore, I have to install build-essential (gcc, make...). However , I tried both ways of installing packages as described in the FAQ section and always the same error happens:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but itis not going to be installed or libc-dev
....
locales: Depends: glibc-2.19-1
E: Unmet dependecies. Try 'apt-get -f install'
So, I tried 'apt-get -f install' but it also fails with some error.
Any ideas?
I also tried following the solution for the following issue (#26). Unfortunately, it did not help either.
At present, launching multiple labs is only possible if there are no overlaps on virtual machine names.
An option could be introduced to allow starting multiple labs with equally-named virtual machines (achievable, e.g., by adding a prefix/suffix to virtual machine names, but beware of changing vm names because this may break lab-specific scripts).
When virtual machine options are explicitly configured inside lab.conf, these options may be passed twice to vstart
, thus resulting in user-specific settings being overridden by lstart
. Most notably, this happens with the filesystem
setting.
Hello,
I followed the installation guide and netkit was installed without an error. I then put the command line . $NETKIT_HOME/check_configuration.sh
in my .bashrc. EDIT: $NETKIT_HOME/bin/netkit_bash_completion
When opening a new terminal I receive the following error :
bash: /opt/netkit/bin/netkit_bash_completion: line 129: syntax error near unexpected token `('
bash: /opt/netkit/bin/netkit_bash_completion: line 129: ` --eth+([0-9]))'
I don't know how to fix it.
It seems that publish and manpublish targets in Makefile are related to some internal tasks for netkit authors. Because a generic makefile is better, is that possible to get rid of them ?
There are some around (most notably, http://kartoch.msi.unilim.fr/blog/?p=19).
Consider the possibility to include them in order, e.g., to attach a host-side sniffer (e.g., wireshark) directly to a collision domain.
At present, vstart
offers low-level support for attaching consoles to pseudo-terminals. The user then has to manually attach a terminal multiplexer (e.g., screen, tmux) to these terminals in order to get the actual consoles.
This process could be made automatic, i.e., in such a way that a user can tell vstart
to attach a console directly to a terminal multiplexer.
This could allow users of text-only environments to play nicely with Netkit.
All netkit scripts are '/bin/sh', still they have a lot of bashisms (use 'checkbashisms' to know how much exactly).
I believe it is better to just replace '#!/bin/sh' with '#!/bin/bash' in all netkit scripts,
The another way is to remove all bashisms one by one.
In Ubuntu and Debian '/bin/sh' does not point to '/bin/bash' by default, btw.
If Netkit does not start (FAQ 05), it may be because /dev/shm is mounted noexec.
The fix is to remove noexec from /etc/fstab.
This should be both documented in the FAQs and checked by check_configuration.sh
.
Even though I have configured the environment variables, I get this error. Where is it coming from? I don't really understand what it means. I am running Ubuntu 16.04 LTS
./check_configuration.sh
> Checking path correctness... passed.
> Checking environment... passed.
> Checking for availability of man pages... passed.
> Checking for proper directories in the PATH... passed.
> Checking for availability of auxiliary tools:
awk : ok
basename : ok
date : ok
dirname : ok
find : ok
getopt : ok
grep : ok
head : ok
id : ok
kill : ok
ls : ok
lsof : ok
ps : ok
readlink : ok
wc : ok
port-helper : ok
tunctl : ok
uml_mconsole : ok
uml_switch : ok
passed.
> Checking for availability of terminal emulator applications:
xterm : found
konsole : not found
gnome-terminal : found
passed.
> Checking filesystem type... passed.
> Checking whether executables can run... failed!
*** Error: Your system appears not to be able to run the linux kernel.
[ ERROR ] Your system is not configured properly. Please correct the
above errors before starting to use Netkit.
At the present time, netkit-core is 32 bits only, due to the fact that uml tools are kept in the repository in binary format. Thus it can be problematic with users without root rights on 64 bits machines without 32 compatiblity libs.
Thus it could be great to have a 32 and 64 bits version of netkit-core. It is not very difficult: compile uml-tools with 32 or 64 bits flags, and change the check configuration script to detect 32 bits library.
Sorry if this isn't the right place to raise this issue. Please direct me elsewhere if is is.
I am having trouble enabling 32-bit applications. The output of ./check-configuration.sh
on my system includes the following error:
*** Error: Your system appears not to be able to run 32 bit applications.
If you are running a 64-bit Linux distribution, this can be fixed by installing
the following packages: ia32-libs, libc6-i386. Otherwise, please check that
you have installed all the Netkit packages correctly and try again.
When I try to install ia32-libs, using sudo apt-get install ia32-libs
, I get this output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1
E: Package 'ia32-libs' has no installation candidate
I am able to install lib32z1 and libc6-i386, as well as many other packages that other people claim are necessary to support running 32-bit applications on 64-bit systems (eg. lib32ncurses6, libreadline). I have also added the i386 architecture to my system. I think the problem is that running netkit requires more 32-bit libraries than just ia32-libs and libc6-i386 but I have so far been unable to find out which ones.
Any help or clarification would be greatly appreciated. Thank you
The last release includes this change:
uml-utilities have been recompiled with dynamic linking and with Ubuntu
patches applied. This makes them work also under Ubuntu 10.10. Moreover,
uml_mconsole now also looks inside $HOME/.uml for management console sockets.
Is that possible to have this patch, as I need to compile uml_tools again for uml_dump support ?
If I run lhalt or vhalt it tries to halt the lab or vm don't work and display this message:
vhalt: could not shut down virtual machine "pc1".
So I need to run shutdown -h now for each vm. If is a lab then is obtrusive.
In case to be needed:
=> uname -a gives Linux myhost 2.6.38-ARCH #1 SMP PREEMPT Mon May 23 22:02:08 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T5550 @ 1.83GHz GenuineIntel GNU/Linux
=> I installed lib32-glibc (2.13-15) from multilib to exec 32 bits apps.
Thanks.
uml_tools
are now compiled dynamically (because of compatibility issues with Ubuntu distributions).
uml_mconsole
is the only tool that, besides standard libraries, also requires libreadline.so.6
to be installed on the host. This should be at least checked by check_configuration.sh
.
Hi,
Have you tried tried to install the new versions of quagga (eg. quagga-0.99.21) on the a VM (with kernel netkit-kernel-i386-K2.8).
Actually, after the installation no matter what module I enable in daemon I get the following error, for example for zebra:
Starting Quagga daemons (prio:10): zebra/sbin/zebra: symbol lookup error: /sbin/zebra: undefined symbol: smux_init
Sorry if the question is irrelevant, honestly I have not tried it on my local machine and I am not sure if it was related to quagga.
If it is a know issue and no solution, I was wondering if you could suggest the latest compatible version of quagga for Netkit (because the already installed one is quite old)
Cheers
Mehdi
At present, it takes a while to stop a running lab by using lcrash
. Indeed, the script makes vcrash
wait to check that every virtual machine has properly shutdown, consuming typically more than 1 second per virtual machine.
This shutdown time could be improved, for example by immediately attempting to kill the machines or by just skipping this check (even if I would be happier to avoid the latter solution).
The same shutdown time improvement may be applied to single virtual machines: provided that the process is stable enough, kill commands may be removed from vcrash
and be retained in vclean
only.
Emulation of physical links is already possible by using netem inside the virtual machines.
It could be improved by exposing some configuration settings (e.g., delay, packet loss) through the lscripts (hence, the lab.conf file).
Implementing this improvement may likely affect the filesystem image as well.
This is due to the fact that uml_mconsole
is not provided with the full path to the mconsole file and is unable to find it by itself.
The bug does not affect other commands using uml_mconsole
(e.g., vhalt
) because the full path to the mconsole is used in those commands instead.
Hi,
In order to get the console access to a machine via port number (reverse telnet) I modified the netkit.conf like this:
VM_CON0=xterm
VM_CON1=port:3000
TERM_TYPE=xterm
or
VM_CON0=none
VM_CON1=port:3000
TERM_TYPE=none
(I have also swapped CON0 and CON1's values)
and also have tried command based as well:
vstart ... con0=null con1=port:3000
but when telneting to the corresponding port (telnet localhost 3000) I got this error:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
I was wondering if you'd mind letting me know if I am following the right thing, or what I can do if don't want to have my VMs' console opened when I start my scenario ? actually I have lots of quagga routers on a remote machine and I need to only work on a couple of them no all, while all others are running.
Many thanks,
Mehdi
Window titles are still not set correctly for the secondary console when konsole is used as terminal emulator.
Also, the konsole launched for con1
does not close automatically when using vcrash
.
There may also be some problems with window titles not being updated in the Gnome app switcher applet (whereas their tooltips are).
The check_configuration.sh
script may incorrectly report the Netkit setup as faulty.
This is due to the fact that the output of some of the commands used for the check may be misinterpreted when it is translated according to the system language.
Most notably, the problem affects 08-check_filesystem.sh
, where the output of stat -f .
may be translated.
A possible solution is to use stat -f -c %T .
instead.
Hi,
Sorry if my question is too simple, I just want to add some common debian packages and perl modules (Net::BGP and its requirements). I followed all instructions and tries both ways of installing directly from the Internet (tap if) and mounting the file system on host.
But none was successful, the disaster happens after 'apt-get update' and even for some simple packages like gcc and make it needs 100 dependencies to be installed and while installing them gets stuck and gives error, in fact I was not able even to install one package.
Your help is highly appreciated.
Cheers,
Medi
i've noticed that if the netkit fs is loaded from an encrypted host fs, the startup of each machine can be very long (several minutes). Could be great to add a check in check-configuration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.