sábado, 23 de maio de 2015

C-BGP - Emulador de BGP

Instalando C-BGP

Para instalar o C-BGP siga os passos:

1 - Download do pacotes:

Pacote libGDS:

http://libgds.sourceforge.net/downloads.php

A versão atual é (em 23/05/15): libgds-1.2.1.tar.gz

Pacote PCRE

http://sourceforge.net/projects/pcre/

A versão atual é (em 23/05/15): pcre-8.37.tar.gz

Pacote C-BGP:

http://sourceforge.net/projects/c-bgp

A versão atual é (em 23/05/15): cbgp-2.3.2.tar.gz

2 - Instale os pacotes necessários:

sudo apt-get install build-essential
sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
sudo apt-get install libreadline-dev 
sudo apt-get install libbz2-1.0 libbz2-dev libbz2-ocaml libbz2-ocaml-dev

3 - Descompacte os pacotes:

tar -xvzf pcre-8.37.tar.gz
tar -xvzf libgds-2.2.2.tar.gz
tar -xvzf cbgp-2.3.2.tar.gz

4 - Instalando o libGDS

cd libgds-2.2.2
./configure; make; sudo make install
./configure --prefix=$HOME/myproj;  make; sudo make install

5 - Instalando o PCRE (Perl Compatible Regular Expressions)

cd pcre-8.37/
./configure --prefix=$HOME/myproj;  make; sudo make install

6 - Instalando o C-BGP:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/myproj/lib/pkgconfig
./configure LIBGDS_CFLAGS="-I$HOME/myproj/include" LIBGDS_LIBS="-L$HOME/myproj/lib -lgds" --prefix=$HOME/myproj --with-pcre=$HOME/myproj; make; sudo make install
export PATH=$HOME/myproj/bin:$PATH
export DYLD_LIBRARY_PATH=$HOME/myproj/lib:$DYLD_LIBRARY_PATH

7 - Testando o c-BGP:

root@ubuntu:~/myproj# cbgp
C-BGP Routing Solver version 2.3.2

  Copyright (C) 2002-2012 Bruno Quoitin
  Networking Lab
  Computer Science Institute
  University of Mons (UMONS)
  Mons, Belgium
  
  This software is free for personal and educational uses.
  See file COPYING for details.

help is bound to '?' key
cbgp> init.
cbgp> show version 
cbgp version: 2.3.2 [zlib]
libgds version: 2.2.2
cbgp> quit
cbgp> done.
root@ubuntu:~/myproj# 


Fontes de ajuda:

http://www.linuxfromscratch.org/blfs/view/7.6/general/pcre.html

http://ubuntuforums.org/showthread.php?t=1921721

http://c-bgp.sourceforge.net/tutorial.php

http://stackoverflow.com/questions/23085076/readline-readline-h-file-not-found

http://ubuntuforums.org/showthread.php?t=1528204

http://iamzjm.blogspot.com.br/2011/01/c-bgp-bgp-routing-solver-installation.html

Nenhum comentário:

Postar um comentário