Wednesday, May 26, 2010

disconnected GUI

The notion of Sessions were added to the CORE services, so you can launch a new session using the GUI, exit the GUI while leaving the emulation running, and reconnect at some later time. You can also run multiple sessions simultaneously.



(This only works for Linux network namespaces for now, until FreeBSD and OpenVZ have been ported to using the cored.py Python daemon.)

more images than GIF supported


Use of the Tk::Img library was added to CORE. This allows you to use various image types besides just the GIFs that were supported before -- such as JPG, PNG, TIF, etc. Now the custom node icon and canvas wallpaper dialogs accept various image types.




The Img library is a new dependency for the CORE GUI. You can install it with:

# for RedHat/Fedora
yum install tkimg
or

# for Debian/Ubuntu
sudo apt-get install libtk-img

Friday, May 21, 2010

CORE is now a Python package

The CORE Python code has been reorganized into a Python package. New example scripts are included in the source under core/python/examples/netns/. Here is a snippet from one of the samples, how you would make N nodes connected to a switch:

from core import pycore
from core.misc import ipaddr

def main:
...
# IP subnet
prefix = ipaddr.IPv4Prefix("10.83.0.0/16")
session = pycore.Session()
# emulated ethernet switch
switch = session.addobj(cls = pycore.nodes.SwitchNode)
print "creating %d nodes with addresses from %s" % \
(options.numnodes, prefix)
for i in xrange(1, options.numnodes + 1):
tmp = session.addobj(cls = pycore.nodes.LxcNode, name = "n%d" % i)
tmp.newnetif(switch, ["%s/%s" % (prefix.addr(i), prefix.prefixlen)])
tmp.cmd(["sysctl", "net.ipv4.icmp_echo_ignore_broadcasts=0"])
n.append(tmp)

# start a shell on node 1
n[1].term("bash")

Monday, April 5, 2010

nodes find their place in this world

The Canvas resize dialog was updated to Canvas Size and Scale. This allows you to set a geographic reference point and scale in meters for the canvas, so the traditional X,Y node coordinates can now be translated to lat/long geo coordinates. This support was added so CORE now generates EMANE location events when a node is moved on the canvas.

Thursday, March 25, 2010

user-editable Observer Widgets

You can now edit the list of Observer Widgets. Insert your own commands that are run on the node with a mouse over. Changes are saved to a /usr/local/etc/core/widgets.conf file.

grid topology generator

More topology generators were added, the Grid and Connected Grid. Quickly build an NxM wired network with the Connected Grid, or use the Grid to fill the canvas with evenly-spaced disconnected nodes.

Wednesday, October 28, 2009

ebtables and 64-bit OpenVZ Linux kernel

CentOS 5.4 doesn't have its own ebtables package, so we use the ebtables package found in the EPEL repository. Unfortunately, when you install the x86_64 OpenVZ kernel onto your 64-bit CentOS 5.4, this ebtables (ebtables-2.0.8-1.el5.x86_64) package doesn't work:

# ebtables -N test -P DROP
The kernel doesn't support a certain ebtables extension, consider
recompiling your kernel or insmod the extension.
#

And the kernel gives us this message:

# dmesg | tail
Ebtables v2.0 registered
kernel msg: ebtables bug: please report to author: entries_size too small

If you download the latest ebtables source (ebtables-v2.0.9.tar.gz) and do a make && make install you experience the same problem. When you build with make static things appear to work somewhat, but some commands still fail.

The solution is to fall back to the year 2003 and get ebtables-v2.0.6.tar.gz. You'll need the three patches found here: 2.6.20.patch, gcc4.patch, and iets.patch.

Here is how to make it work:

> tar xzf ebtables-v2.0.6.tar.gz
> cd ebtables-v2.0.6.tar.gz
> patch -p1 < ~/2.6.20.patch
patching file include/linux/netfilter_bridge.h
> patch -p1 < ~/gcc4.patch
patching file extensions/ebt_ip.c
patching file extensions/ebt_limit.c
patching file extensions/ebt_vlan.c
> patch -p1 < ~/iets.patch
patching file ebtables.c
> make
> sudo make install

Now you'll have a working ebtables, but with 2003 syntax. This means some commands won't work, such as:
ebtables -N test -P DROP
now must be written as:
ebtables -N test; ebtables -P test DROP
or
ebtables -I FORWARD -j ACCEPT
now requires a rule number:
ebtables -I FORWARD 1 -j ACCEPT

Maybe there is a better solution out there?