My OpenDiameter Experience, Part I, Build and Installation

My OpenDiameter Experience, Part I, Build and Installation


Diameter is a AAA protocol that is supposed to be the successor to RADIUS, and OpenDiameter is an open source implementation of the Diameter Protocol. I recently started playing around with OpenDiameter and, to my surprise, the online resources and documentations on how to use it are very hard to find, if there is any. I figured out my way to get the basics running, and I am here to share my initial experiences, hoping to help other OpenDiameter beginners. I also hope that the OpenDiameter community could contribute more documentations to help new users and to make the project be more successful.

I will cover it in two posts:

  • Part I is for build and installation
  • Part II is for setting up a simple 3-party EAP-MD5 test

Part I, Build and Installation

You can download the OpenDiameter source package from this link.

The current release is of 1.0.7-i, and that is what I am going to use too. The best resource for this is the main README file that came with the source package, and it is more up to date than the how-to listed in the OpenDiameter website.

We should follow the instructions in the README file and they can be summarized as:

  • Step 1. Install external libraries and tools if not already there
  • Step 2. Set up environment variables ACE_ROOT and BOOST_ROOT to point to the right paths on your system
  • Step 3. Extract OpenDiameter source package and do the usual "./configure; make; make install" routine in the OpenDiameter top directory.

Sounds pretty straightforward. However, there might be some tricky places. The parts that most likely will give you problems are the external libraries. OpenDiameter 1.0.7-i requires: 1. GNU g++ 4.x.x and above 1. ACE library 5.5.x 1. boost library 1.33.x and above 1. OpenSSL 1. Autoconf, Automake, Libtool

Number 1. and 5. are very common build tools on Linux and the like, and you usually wouldn't need to worry too much about them. OpenSSL is also very stable and easy to install if not pre-installed already. It is 2. and 3., i.e. ACE and boost libraries, that could be a little more i tricky.

Boost Library

For boost library, I found that the easiest way to install them is to use existing packaging tools like apt-get or yum. The version available seems just working fine. This is what I did on my ubuntu and FC (Fedora Core) 8 respectively.

ubuntu:

apt-get install libboost-dev

FC8:

yum install boost-devel

Note: you might need to be root or use sudo to install them.

After installing boost like the above, set the BOOST_ROOT environment to /usr/include/. The following is for bash:

export BOOST_ROOT=/usr/include/

ACE Library

ACE library installation could be the most troublesome in the whole process. OpenDiameter heavily relies on ACE library and it is also very picky about the version of it. The README file says 5.5.x, and trust me, not all 5.5.x would work. What I learned from hours of frustration is:

  • 5.5 and low 5.5.x versions fail to build themselves. (at least on both the ubuntu and FC8 I have)
  • 5.6 (the latest available) and high 5.5.x versions (like 5.5.10) will build themselves, but OpenDiameter 1.0.7-i won't build if using them.

After trying both, I chose the lesser of the two evils by using ACE 5.5 base version.

( To get ACE 5.5 itself compile, I only needed to change one small place on either system of mine, even though figuring that one place out took me some time. To get 5.6 compile, I had many more places to fix due to interface changes in ACE lib, but only to find the binaries built don't read the XML configuration files correctly. That was when I got scared and gave up. So my advice here is: stick to the ACE 5.5 base version itself)

Here is what needs to be done to install ACE 5.5:

  • Get the 5.5 source here.

  • Extract the tar file, and the main directory would be called ACE_wrappers. Get in there and create a sub-directory called "build", and that is where the build will happen. (ACE doesn't allow you to do build in the top directory)

tar xvf ACE-5.5.tar.gz
cd ACE_wrappers
mkdir build
cd build
../configure
  • If it passes, congratulations! However, on both my systems it failed at the configure script. Here is what I did to fix those:

On my ubuntu, the gcc option -fvisibility-inlines-hidden used by ACE lib is causing problem and it can be fixed by removing it in the configure script file this way:

$ diff -upN configure.orig configure
--- configure.orig      2008-03-05 11:11:19.000000000 -0800
+++ configure   2008-03-05 11:13:30.000000000 -0800
...
@@ -10329,7 +10329,7 @@ _ACEOF
        *)
         { echo "$as_me:$LINENO: enabling GNU G++ visibility attribute support" >&5
 echo "$as_me: enabling GNU G++ visibility attribute support" >&6;}
-        ACE_GXX_VISIBILITY_FLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
+        ACE_GXX_VISIBILITY_FLAGS="-fvisibility=hidden"
         ACE_CXXFLAGS="$ACE_CXXFLAGS $ACE_GXX_VISIBILITY_FLAGS"
         cat >>confdefs.h <<\_ACEOF

On FC8, it failed because the header file for gettimeofday() on the system is <sys/time.h> not the expected <time.h> by configure script. So the following change in configure file fixed it:

# diff -upN ../configure.orig ../configure
--- ../configure.orig   2008-03-17 15:29:07.000000000 -0700
+++ ../configure        2008-03-17 16:31:00.000000000 -0700
@@ -87878,7 +87878,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */

-#include <time.h>
+#include <sys/time.h>

 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |

Assuming your system already have

With those changes, I could proceed to the next step

  • redo ../configure
  • make and make install

Unfortunately, there is no guarantee the ACE 5.5 build won't have different symptoms on different systems, and I can only wish you good luck there. :)

Suppose your ACE 5.5 does get installed, you need to set the environment variable ACE_ROOT for OpenDiameter build's use. I installed ACE under /usr/local/src and here is what I did in my bash:

export ACE_ROOT=/usr/local/src/ACE_wrappers/

Build and Install OpenDiameter 1.0.7-i itself

Once I got both ACE 5.5 and boost installed, and both environment variables set, installing OpenDiameter itself became simple:

tar xvf opendiameter-1.0.7-i.tar.gz
cd opendiameter-1.0.7-i
./configure
make
make install

After that is done, verify by checkding if /usr/local/bin/aaad and /usr/local/bin/nasd are in place.

Those are two of the main binaries we will use for OpenDiameter. Now OpenDiameter should be ready for tests. In Part II, I will cover how to configure and use the binaries built for a simple EAP-MD5 test.

[ to be continued ]

Category: 

Comments

dani's picture
Submitted by dani on

I’m an Engineering student who had been trying to install OpenDiameter for long. Thanks to your help I was able to do it.

From now on I will try to configure it and understand how it works.

I’m looking forward to reading the second part of your experience, so that I could learn how to set up the EAP-MD5 test.

Thank you for your help.

Regards, Dani.

dimondat's picture
Submitted by dimondat on

I've read your article,and i had the same problem with ACE.You recommend changes to the scrip files(i have ubuntu),but where do i make these changes.I'm quiet new to linux and it's just that you advice is not clear to me.That piece of code presented ,where should it be paste.It would be great if you could explain it in more detail

Author information

Gong Cheng's picture

Biography

I am a software developer in computer networking areas, living in California, United States. I worked on routers, switches and Wi-Fi access-points. I am a father of one baby boy. In the limited spare time I have, I like jogging and reading non-fiction books.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!