marko [Sat, 10 Nov 2007 01:47:52 +0000 (01:47 +0000)]
Use a shorter name for the top-level vimage container holding all
virtual nodes in an experiment, so that a string in form of
ifname@eid.nodeid could fit into 15 characters or less for all node
ids smaller than n1000. The 15 chatacter string length limitation
is derived from the IF_NAMESIZE constant which applies when specifying
interface names. Longer eids were previously causing trouble when
attempting to open a bpf tap in child nodes.
This change fixes bugzilla bug #2:
http://imunes.tel.fer.hr/bugzilla/show_bug.cgi?id=2
Bug found by: miljenko at tel.fer.hr
Submitted by:
Reviewed by:
Approved by:
Obtained from:
marko [Thu, 1 Nov 2007 21:51:48 +0000 (21:51 +0000)]
Use the new "vimage -lr" form to traverse the entire vimage
hierarchy bellow the current position, given that from now on
"vimage -l" will list only direct children of current vimage.
marko [Thu, 1 Nov 2007 17:37:20 +0000 (17:37 +0000)]
Nuke a now redundant check whether we are running in a default
vimage. Regardless whether we are at the top of the vimage tree
or not, the current vimage will have an address of ".". More
importantly, we can now _really_ start new experiments from within
non-default vimages, i.e. run IMUNES inside IMUNES!
While here, bump our "version" date.
Bug found by:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
marko [Thu, 1 Nov 2007 10:42:27 +0000 (10:42 +0000)]
Allow for multiple independent experiments to run in parallel.
Each experiment is dynamically assigned an experiment id (eid) which
it then uses throughout its lifetime. By default the eid is
constructed by appending the process id of the tcl interpreter to
the prefix "imunes_". All vimages and netgraph nodes corresponding
to virtual nodes in an experiment are created as child nodes of
a "controlling" vimage which has the same name as eid. All virtual
node specific temporary directories / files are created as
subdirectories in /tmp/$eid directory.
vimageCleanup function is modified to destroy / cleanup only those
vimages / netgraph nodes bellow and including the controlling
vimage for the given experiment. Temporary files in /tmp/$eid are
no longer automatically deleted.
marko [Mon, 29 Oct 2007 16:25:23 +0000 (16:25 +0000)]
First in a series of changes to leverage on recently introduced
hierarchical vimage naming model in the kernel.
The main thrust of this change is to decouple experiment id ($eid)
from vimage / netgraph node names. Instead, a top-level vimage
named $eid is created first, in which all vimages / netgraph nodes
are created as child nodes. This relieves the default vimage
context of any netgraph space pollution, and paves a way for
adding support for parallel execution of independent experiments.
This change does NOT include a revamp of experiment cleanup
routines, so be warned that until further notice neither "imunes -b"
nor attempts to stop an experiment from the GUI will work.
marko [Tue, 9 Oct 2007 11:22:51 +0000 (11:22 +0000)]
Eliminate the guesswork when attempting to determine the id of a
newly created ng_eiface or ng_iface node. The replacement
approach at "ngctl mkpeer" invocation yields deterministic
results, and reduces the spawned process pipeline at the same time,
thus reducing the time / CPU cycles wasted on ng node creation.
marko [Mon, 8 Oct 2007 23:28:13 +0000 (23:28 +0000)]
When cleaning up a running experiment, always attempt to kill
all processes in all vimages first.
It seems that quagga has a bug which sets all zebra processes in an
infinite loop if a network interface disappears while the suite is
running. Before this change, we were "unplugging" the ng_eifaces
while zebra & co. were still running, resulting in each vimage
attempting to hog the CPU. This would leave very little CPU time
for IMUNES scripts, and for any user interaction with the system
for that matter, so cleaning up a more complex topology could
last for quite a while.
In short, the cleanup should be now roughly as fast as it used to be
in 4.11 days.
marko [Thu, 30 Aug 2007 23:57:50 +0000 (23:57 +0000)]
Lift the prohibition from configuring link emulation parameters
on links terminating in rj45 nodes, given that exec.tcl already
inserts a ng_pipe instance between rj45 and whatever is on the
other side of the link. This change also revealed a bug in
ng_pipe that will be fixed soon in p4 after a little bit more of
testing.
marko [Thu, 30 Aug 2007 23:19:21 +0000 (23:19 +0000)]
Change default link bandwith to 0. The reasoning behind this decision
is that as we will target bigger / more complex topologies, the
overhead of emulating link effects might become more pronounced.
ng_pipe nodes when configured for zero bandwith, delay, packet
duplication and loss will bypass the complex queuing and state
keeping / locking code, hence forward the packets with minimal
overhead.
While here, once again change the default settings for which
parameters will be displayed in the editor. Displaying link labels,
ifnames and IPv4 addresses is now on by default, while displaying
of IPv6 addresses is not.
marko [Thu, 30 Aug 2007 22:56:09 +0000 (22:56 +0000)]
When instantiatinga an interface in a L3 node which is directly
connected to an rj45 outlet, use the MAC address of the physical
interface on the virtual interface as well. This allows for
virtual nodes to gain access to the outside world via 802.11
physical cards.
marko [Thu, 30 Aug 2007 18:54:35 +0000 (18:54 +0000)]
ngnodemap must be set for rj45 type nodes as well, otherwise
deployCfg would break when attempting to connect an rj45 node to
whatever is on the other side of the link.
With this change plus a kernel-level fix to be submitted to p4
shortly communication to external world via "rj45" nodes should
work properly.
marko [Tue, 21 Aug 2007 07:54:15 +0000 (07:54 +0000)]
Bring back to life ng_pipe insertion on our links. For this to work
you'll need to fetch the latest kernel sources from my home dir
at imunes.tel.fer.hr or from p4. Note that the scheduler for ng_pipe
in -CURRENT at this point in time cannot provide resolution better than
kernel tick intervals, so you'll probably wish to configure your kernels
with high HZ setting - default in -CURRENT is 1000 HZ which should be
fine for proof-of-concept experiments.
Note that ng_pipe in -CURRENT is stripped off of XCP and [GA]RED
functions, but we never used those directly in IMUNES anyway so noone
should be hurt...
marko [Tue, 14 Aug 2007 20:54:03 +0000 (20:54 +0000)]
A hack to allow multicast to work (to some extent) on FreeBSD -CURRENT:
add a route to 224.0.0.0/4 over our loopback interface. This seems
necessary to allow any multicast traffic to be transmitted out of the
machine / virtual nodes, and in particular allows RIP to work with
XORP. OTOH, for reasons beyond my willingless for further investigation,
quagga does not even properly open multicast sockets for RIP, regardless
whether using quagga built from the ports collection, or using a
package built for 6.2-RELEASE in compatibility mode :(
marko [Tue, 14 Aug 2007 20:46:47 +0000 (20:46 +0000)]
Remove comments embedded in switch construct in popupConfigApply in
an attempt to unbreak it -> man n switch says comments may not be
embedded in between switch tokens / sections, it seems that my copy
of tclsh8.4 becomes really nervous about that (the older versions
did not complain as far as I can recall).
marko [Mon, 13 Aug 2007 07:16:11 +0000 (07:16 +0000)]
Turn on resolving of "@" character to vimage name on per-vimage
basis via vfs.morphing_symlinks sysctl. This finally allows
IMUNES to be run on top of FreeBSD -CURRENT.
NB as of now multicast sending without having default route set still
seems to be broken in FreeBSD -CURRENT (as it is in FreeBSD 5 and 6
as well), so until this is resolved in the kernel or we introduce some
other hack, routing protocols / implementations relying on multicast
transmission won't work inside IMUNES.
marko [Mon, 13 Aug 2007 07:12:06 +0000 (07:12 +0000)]
Do not hardcode path to quaggaboot.sh. This allows IMUNES to be run
from the development directory without having to install
quaggaboot.sh to /usr/local/bin first.
marko [Mon, 13 Aug 2007 07:10:01 +0000 (07:10 +0000)]
Prevent zebra and related daemons from accepting control connections
on their designated TCP ports, given that we strive to control the
suite exclusively through vtysh.
marko [Fri, 20 Jul 2007 09:22:26 +0000 (09:22 +0000)]
Keep all annotation objects in a single list (annotation_list),
instead of having three separate lists for text, rectangle and
oval objects.
In configuration file, deprecate text, rectangle, and oval object
classes, and replace them with a single annotation class. The
type of annotation objects can be determined via proc nodeType.
Add an "xxx xxx xxx" asert in textConfigApply in a suspicious branch.
Remove the request for "raising" canvas objects tagged as "menuBubble"
in proc raiseAll, since it seems to be never used.
marko [Mon, 7 May 2007 23:09:07 +0000 (23:09 +0000)]
Refactor node instatiation procedures for hub and lanswitch nodes
to reflect recent changes in exec.tcl, as well as kernel-level
differences between 4.11 and 7.0 netgraph virtualization model.
marko [Mon, 7 May 2007 23:06:06 +0000 (23:06 +0000)]
Refactor the mechanism for creating netgraph-based pseudo
interfaces (ng_iface and ng_eiface) so that:
a) we don't need a specialized version of ngctl userland utility;
b) that in FreeBSD 7.0 netgraph nodes are not renamed when
interfaces are assigned to other vimages;
Introduce a helper array "ngnodemap" which provides name mapping
between kernel view of netgraph space, and IMUNES view of node
naming.
When creating links, do not insert a ng_pipe node between the
endpoints, given that ng_pipe is not yet ported to FreeBSD 7.0.
Instead, endpoint nodes are connected back to back, which means
that currently we will be able to construct topologies, but not
emulate link properties and impairments.
Use vimageCleanup instead of cleanupCfg, since it seems that the
later is defunct, at least on FreeBSD 7.0
marko [Wed, 2 May 2007 11:36:50 +0000 (11:36 +0000)]
Wipe out mbuf / cluster usage monitoring routines. Accounting and
imposing limits on mbuf usage is quite different on FreeBSD -CURRENT
from what it was on 4.11, so don't mess with those details at the
moment.
Do not show odd grid lines when zooming is set to or lower than 50%.
Refactor TopoGen procedures so that they can operate on already
existing nodes.
Implement utilities for connecting selected nodes in a chain, star,
cycle or clique topology. The functions are accessible when
holding the right button over a selected node.
After moving a ng_iface interface to another vimage, "touch" it by
doing a no-op ifconfig on it. This was an old hack that allowed
the kernel to rename the corresponding netgraph node, so we need this
for running IMUNES with kernels older then Nov 23 2006, when the
renaming problem was fixed in the kernel.
In effect this and previous commit by Miljenko back out revision
1.36 of exec.tcl.
- Implement a procedure and GUI hooks for selecting adjacent nodes;
- Display a grid in the canvas;
- Change the cursor to a "watch" icon during undo / redo / delete
operations;
- Link color and "thickness" can now be configured on individual
link basis;
- Extensive (yet not complete) indentation cleanup - we should use
modulo 4 tab stops exclusively;
- Enclose "expr" expressions in braces, per suggestion from manual
pages for performance improvement (though it seems that no
no improvements can be observed);
- Remove the "Configure remote hosts" menu, given that we are
considering different approaches for executing remote experiments.
The "nexec" and related procedures are left untouched for now;
- Adjust default window size to cover the entire default canvas
surface, while is should still fit into 1024x768 displays.
ana [Wed, 17 Jan 2007 20:28:32 +0000 (20:28 +0000)]
Added support for more (more than one) custom configurations for each node.
Configuration reading is backwards compatible with old configurations (.imn).
marko [Thu, 23 Nov 2006 11:52:24 +0000 (11:52 +0000)]
Given that now the kernel automatically renames netgraph interfaces
when moved from one vimage to another, remove unneeded ifconfig calls
that previously preformed this job.
Bug found by: Ivan Babic
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:
marko [Mon, 6 Nov 2006 11:13:43 +0000 (11:13 +0000)]
Implement a peer-to-peer membership daemon to be used for certain state
synchronization in future distributed / decentralized IMUNES operation.
The daemon will try to connect to remote peer(s) specified as command-line
arguments at invocation time, and form an ad-hoc peer-to-peer overlay
network with all nodes reachable via its peers.
Each node in the peer-to-peer structure is uniquely identified by its
IPv4 address. The daemon will try to maintan a small number of direct
peerings (between two and four) between random nodes in the overlay, thus
forming a well-connected mesh over time. Each node maintans full routing
information to all other nodes, basically in the same way as BGP does,
Implement a peer-to-peer membership daemon to be used for certain state
synchronization in future distributed / decentralized IMUNES operation.
The daemon will try to connect to remote peer(s) specified as command-line
arguments at invocation time, and form an ad-hoc peer-to-peer overlay
network with all nodes reachable via its peers.
Each node in the peer-to-peer structure is uniquely identified by its
IPv4 address. The daemon will try to maintan a small number of direct
peerings (between two and four) between random nodes in the overlay, thus
forming a well-connected mesh over time. Each node maintans full routing
information to all other nodes, basically in the same way as BGP does,
except that instead of AS numbers we use node ID-s (IP addresses) to
construct path vectors. Once the routing state converges, no topology
information needs to be exchanged, except periodic keepalives used to
verify that direct peerings are active. Hence, in steady state the
protocol is unlikely to consume any measurable network bandwidth nor
CPU time.
Besides maintaining the topology / reachability state, the daemon provides
a simple facility for nodes to announce arbitrary attributes associated
with their IDs. The attributes will be distributed by flooding the
overlay network with new state. Only the attribute set with the version
number greater then the currently stored one will be propagated through
the overlay, thus preventing endless loopings. Hence, the originating
node is responsible to bump its attribs version number each time it
attempts to broadcats a new set of attributes. In the future this part
of the protocol might need to be enhanced so that only incremental /
partial updates would need to be sent.
An application can directly interface with this "daemon" by observing
global variables "active_hosts" and "dead_hosts" which will be updated
dynamically. For each active host the host_attrib_tbl($host_id) should
store most recent attributes, if any. If the need arises, notification
hooks can / should be placed in ProcessAnnounce, ProcessWithraw and
ProcessAttributes procedures.
The framework was tested on our ad-hoc cluster with 1032 virtual nodes
mapped to 8 physical Pentium-4 machines. After a relatively long initial
synchronization period (around 20 minutes, mostly CPU-bound) joins
and leaves to the overlay are processed and propagated to all members
virtually instantenously. However, in sporadic cases topology changes
can lead to shorter periods of oscillations lasting up to 10 - 20
seconds, but those oscilations are typically observable only on a
limited set of nodes.
My initial impression is that the protocol should work fine for overlays
of up to several hundreds of nodes in size, at which point we should
investigate alternative options for maintaing the overlay coherence.
miljenko [Tue, 17 Jan 2006 12:08:12 +0000 (12:08 +0000)]
Returned back "animateCursor" proc. Needed in exec.tcl/statline.
In VMware, without animateCursor call in statline proc status line is blank
during experiment startup/shutdown.
In ActiveState Active Tcl animateCursor is call is not needed ?!