Go to content Go to menu

Extending Net-SNMP with Python3

Thursday, September 10, 2020

PyAgentX3 is a pure Python3 implementation of the AgentX protocol (RFC 2741).
It will allow to extend an SNMP agent (e.g Net-SNMP snmpd) by writing AgentX subagents without modifying the original SNMP agent.

RFC 2741: Agent Extensibility (AgentX) Protocol

Code and samples can be found on github.

It features:

  • Open a session with AgentX master, e.g. net-snmpd snmpd, and register a new session.
  • Send Ping request.
  • Register multiple MIB regions.
  • Multiple MIB update classes with custom frequency for each.
  • Support snmpset operations.
  • Reconnect/Retry to master, in case the master restarted.
  • Support for SNMPv2 traps.

Arty-S7-50 MultiNet

Tuesday, June 2, 2020

arty_s7_50_multi_net_pcbs.jpg The prototype of my simple FPGA based SoC with multiple Ethernet interfaces worked so well that I decided to create a PCB for it and increase the number of network interfaces from two to four. It also includes a special PMOD connector for a SD-Card to boot a firmware or Linux from. Also two of the Arty’s four existing PMODs are also still available for extensions. PMOD-C and PMOD-D are no longer available as their pins are used for some of the Ethernet PHY modules.

Due to I/O limitations the Seven Segment Display was removed from the original design.
[Read More…]

fpga_net_1_l.jpg In my day to day business I work with Software Defined Networking (SDN) a lot. Especially with Open-Flow, Open-vSwitch and some commercial products.

Most of the time the projects are not “normal” ones where these techniques are used in larger scenarios like enterprise or data-center networks. Instead I use them on the other side of the scale in embedded environments for example to develop Space based satellite routers.

At the time of this writing we now have almost eight weeks lock-down due to the SARS-CoV-2 pandemic. This means no travel time to my office and instead working from home. So this spare time must be filled with some experiments. Unfortunately at home I don’t have the resources I normally have at my workplace. So no fancy, multi k-euro development boards and tools. Wanting an embedded system with at least two Ethernet interfaces I looked around in my electronic junkyard and found some interesting components which might give a not so bad platform for some networking experiments. Especially low level Ethernet packet handling (filtering, modifying) is on of my interests. Maybe playing with P4, NetCope, or P4FPGA without spending a fortune.

[Read More…]

Recently, for a project, I needed to work with ns2 (1), (2). Adding own protocols to ns2 requires to compile it from the sources instead of just installing it via apt-get.

It has a lot of dependencies (e.g. tcl/tk) which where already installed on my system. According to here there is a all-in-one package of ns2 including ALL its dependencies. As my machine is always near to 100% full and I already have installed its dependencies for other projects I just downloaded ns2 source without dependencies. Downloading the sources and the well known stanza ‘configure / make / make install’ should be enough - I though.

But alas - configure didn’t find required dependencies. OK - so fix some paths to keep configure happy. But now lots of compile time errors occurred. I’m running on Ubuntu Linux 16.04 LTS 64bit and a lot of include files and libraries are not there where ns2’s configure script expects it to find. It also seems that ns2’s dependencies installed via apt-get have been compiled with different compile time options as ns2 expects. Google did not help much and so I decided to fix things so that I can successfully compile ns2 an start hacking new protocols.

This post shows the steps and also provides the patches.

Step 1: Install prerequisites (from package repository)

sudo apt-get install \
   tcl8.6 libtcl8.6 tcl8.6-dev \
   tk8.6 tk8.6-dev \
   libotcl1 libotcl1-dev \
   tclcl libtclcl1 tclcl-dev

Step 2: Get the sources (ns2 without dependencies)

wget \
    https://sourceforge.net/projects/nsnam/files/ns-2/2.35/ns-src-2.35.tar.gz/download \
    -O ./ns-2.35.tgz
tar xvf ./ns-2.35.tgz

Step 3: Apply the patches

The patches can be downloaded here ns-2.35-ubuntu-16.04-64bit.patch.

patch \
    -d ./ns-2.35 \
    -p2 \
    < ./ns-2.35-ubuntu-16.04-64bit.patch

Step 4: configure / make / make install

cd ./ns-2.35
./configure \
    --with-tcl-ver=8.6 \

Now you should have a ns binary in ns2 source folder. To ensure that ns2 compiled correctly, run validate to perform tests (warning: this takes long)

Step 5: Start hacking

For more infos about ns2 and ns2 development see the following links

This steps were tested with Ubuntu 16.04 LTS 64bit and it might be that they wont work with other versions or distributions. But they may help to fix problems there too.

Proxy Mobile IPv6 using Cisco

Wednesday, June 28, 2017

pmipv6-cisco.jpg Proxy Mobile IPv6 (or PMIPv6 for short) allows an ordinary host (PC, Laptop, Smartphone etc.) to use a non changing IP address while roaming between different access points/routers within a PMIP domain. See Wikipedia for more info’s. Cisco offers a powerful implementation in its IOS targeted at large scale installations with regard to ease of deployment and management. For this to work Cisco recommends things like Lightweight Access Points - LAP, Wireless LAN Controllers - WLC and protocols like Control And Provisioning of Wireless Access Points - CAPWAP. Using these components its fairly easy to setup and manage PMIPv6 domains. See this Cisco guide for more infos.

For a project I had to design a very, very low level PMIPv6 lab without almost all the nice things Cisco recommends. And - it works - almost.
[Read More…]