Re: [mpls-linux-devel] quagga-ldp successful build
Status: Beta
Brought to you by:
jleu
From: James L. <jl...@mi...> - 2010-01-20 02:00:49
|
Hello Renato, I did apply Vasu's patches. but for some reason they never made it to the public repo. I will try to get that fixed. On Tue, Jan 19, 2010 at 11:46:55PM -0200, Renato Westphal wrote: > Many people here have reported problems with quagga compilation with > mpld/ldp support. AFAIK the developer Vasu Dasari submitted a patch for both > the quagga-tree and ldp-portable tree, but only the ldp-portable patch were > added to the git repo. This may be what breaked the build-system. > So applying Vasu's path (link below) manually to the mpls-quagga tree and > following the traditional steps did it. > > Vasu's patch for quagga: > http://sourceforge.net/mailarchive/attachment.php?list_name=mpls-linux-devel&message_id=65d0eee90906110946q36579ee7l1b9b1e15ef255ba6%40mail.gmail.com&counter=2 > > Compilation how-to (debian approach): > > 1) > //download and extract the quagga-mpls and quagga-ldp-portable trees: > $ git clone git://repo.or.cz/mpls-quagga.git > $ git clone git://repo.or.cz/mpls-ldp-portable.git > //applying "git archive master | bzip2 > ./mpls-xxx.tar.bz2" is not strictly > necessary > > //apply the Vasu's patch for quagga: > $ cd mpls-quagga > $ patch -p1 < ../0001-Quagga-MPLS-fixes-and-improvements.patch > > 2) > //compilations requirements > # apt-get install gawk > # apt-get install libreadline-dev > # apt-get install build-essential autoconf libtool > //to convert .dia doc files to .png > # apt-get install dia texinfo > > 3) > //another point now is that the build-system will look at "/usr/include" by > default > //to search for the mpls-linux headers, but our mpls-kernel includes should > be at > //something like "/usr/src/linux-2.6.27.24/include" > //I dont know how to fix it but there is a workaround: > > First, open the configure.ac script and add "-I > /usr/src/kernel-2.6.27.24/include" (or whatever is your dir) to the gcc > cflags (line 123). > Now gcc will correctly include the mpls headers, but the configure script > will continue to look on /usr/include, so we have to edit the configure.ac: > > Change... > <i>dnl ---------- > dnl MPLS check > dnl ---------- > MPLS_METHOD="" > AC_MSG_CHECKING(whether this OS has MPLS stack) > AM_CONDITIONAL(MPLS_ENABLED, test "x${enable_mpls}" != "xno") > if test "${enable_mpls}" = "no"; then > enable_ldpd="no" > enable_rsvpd="no" > AC_MSG_RESULT(disabled) > else > if test "x${enable_mpls}" = "xnull"; then > AC_DEFINE(HAVE_MPLS,1,Enable MPLS) > MPLS_METHOD="mpls_null.o" > AC_MSG_RESULT(MPLS Null) > else > AC_EGREP_CPP(yes, [ > #include <linux/mpls.h> > #if MPLS_LINUX_VERSION > yes > #endif], > [AC_DEFINE(HAVE_MPLS,1,Enable MPLS) > AC_DEFINE(LINUX_MPLS,1,Linux MPLS) > MPLS_METHOD="mpls_netlink.o" > AC_MSG_RESULT(MPLS Linux)], > [enable_ldpd="no" > enable_rsvpd="no" > AC_MSG_RESULT(no)] > ) > fi > fi > AC_SUBST(MPLS_METHOD)</i> > > to... > <i> > dnl ---------- > dnl MPLS check > dnl ---------- > MPLS_METHOD="" > AC_MSG_CHECKING(whether this OS has MPLS stack) > AM_CONDITIONAL(MPLS_ENABLED, test "x${enable_mpls}" != "xno") > if test "${enable_mpls}" = "no"; then > enable_ldpd="no" > enable_rsvpd="no" > AC_MSG_RESULT(disabled) > else > if test "x${enable_mpls}" = "xnull"; then > AC_DEFINE(HAVE_MPLS,1,Enable MPLS) > MPLS_METHOD="mpls_null.o" > AC_MSG_RESULT(MPLS Null) > else > # AC_EGREP_CPP(yes, [ > # #include <linux/mpls.h> > # #if MPLS_LINUX_VERSION > # yes > # #endif], > # [ > AC_DEFINE(HAVE_MPLS,1,Enable MPLS) > AC_DEFINE(LINUX_MPLS,1,Linux MPLS) > MPLS_METHOD="mpls_netlink.o" > AC_MSG_RESULT(MPLS Linux) > # ], > # [enable_ldpd="no" > # enable_rsvpd="no" > # AC_MSG_RESULT(no)] > # ) > fi > fi > AC_SUBST(MPLS_METHOD) > </i> > > > 4) > $ cd mpls-quagga/ldpd > $ nano ./create-links > //now modify 'create-links' to point DEFSRC to the ldp-portable folder > $ ./create-links > $ cd .. > $ autoreconf -i > $ ./configure --sysconfdir=/usr/local/quagga > --localstatedir=/usr/local/quagga --enable-vtysh --enable-netlink > --enable-mpls --enable-ldpd --disable-rsvpd > > //memtypes.h and route_types.h are defined as targets on the makefiles but > for > //some reason they are not been processed by awk, so we have to make it > manually > //this have been corrected on the quagga 0.99.13 release > $ gawk -f ./lib/memtypes.awk ./lib/memtypes.c > ./lib/memtypes.h > $ gawk -f ./lib/route_types.awk ./lib/route_types.txt > ./lib/route_types.h > > 5) > $ make > # mkdir /usr/local/quagga > # make install > > 6) > # adduser quagga > # chown quagga:quagga /usr/local/quagga > $ cd /usr/local/quagga/ > # cp zebra.conf.sample zebra.conf > # touch ldpd.conf > > 7) > //sometimes we have the dev files but not the lib itself > # apt-get install libcap2-bin > > //type "ldd /usr/local/sbin/zebra" > //if appears "libzebra.so.0 => not found", then: > # cp /usr/local/lib/libzebra.* /lib/ > > 8) > //now... > $ zebra -d -A 127.0.0.1 > $ ldpd -d -A 127.0.0.1 > $ vtysh > > //inside vtysh you can play a little > lsr#mpls show forwarding > lsr#conf t > lsr(config)#mpls static 0 > lsr(config)#label-map ... > > -----x-------- > > Despite the successful compilation, i had some problems. MPLS/LDP commands > were available on the quagga CLI but some of them dont work as expected. I > will list some issues i've faced: > > 1 - It's not possible to build the quagga with mpls support if the > '--disable-ipv6' flag is given to the configure script. Actually the > build-system isn't very good at all, if we enable mpls and disable ldp, for > example, the ldp commands are still available on the zebra daemon. This > should be fixed. > > 2 - Mpls "show" commands are ok but sometimes when I try to change some > configuration the following error comes up: > Warning: closing connection to zebra because of an I/O error! (btw this > should be a error not a warning!) > Using strace its possible to see that this happens at a 'read' system call > which should return one file descriptor but returns 0. The fix of this error > is hard and requires a good knowledge of the quagga/zebra framewok. > > 3 - After enabling LDP, I can't see any "LDP Hello Messages" on wireshark. > > 4 - After typing the following: > lsr(config)# mpls static 0 > lsr(config-ls)# label-map gen 16 swap gen 17 nexthop eth1 192.168.3.1 > > The 'mpls ilm/nhlfe/xc show' still empty, maybe I'm missing something? > > 5 - Changing any configuration on zebra causes the daemon to starts > consuming about 99% of the CPU! > > 6 - The software is very unstable, vtysh freezes frequently and I need to > "killall -9 zebra; killall vtysh" to come back. > > I'm working to port the mpls+ldp code to the quagga 0.99.15, many bug fixes > were made on the quagga tree and maybe this may help to we have more luck > next time! Any help would be appreciated. > > (sorry for my english) > > Regards, > Renato Westphal > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > mpls-linux-devel mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-devel -- James R. Leu jl...@mi... |