材料は以下。gccとか何か他にもインストールするべきものがあるかもしれない。。。
・bgpdump(バイナリMRTデータをテキスト形式に変換する)
・gns3(BGPスピーカ1)
1.
telnetクライアントとサーバをインストール
2.
ユーザ権限ユーザ作成
adduser user
passwd user
3.
アクセスリストを編集
vi /etc/hosts.allow
in.telnetd : 192.168.0. 127.0.0.1
vi /etc/hosts.deny
in.telnetd : ALL
4.
iptablesを編集
vi /etc/sysconfig/iptables
5.
iptables再起動
service iptables restart
ってなんだか面倒くさくなったのでiptables無効化しよう
/etc/rc.d/init.d/iptables stop
chkconfig iptables off
chkconfig --list iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
6.
tcpラッパー設定を変更
vi /etc/xinetd.d/telnet
#---VVV---------------------------VVV---#
service telnet
{
flags = REUSE-
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.log_on_failure += USERID
disable = no # ここをyesからnoに変更
}
#---AAA---------------------------AAA---#
7.
xinetdを再起動
/etc/init.d/xinetd restart
8.
OS-update(結構時間がかかるのでお茶の用意)
yum update
9.
libbzip2のインストール
yum -y install bzip2-devel
10.
bgpdumpのインストール
tar xvfz libbgpdump-1.4.99.13.tgz
cd libbgpdump-1.4.99.13
./configure
make
cp bgpdump /usr/local/bin
11.
bgpsimpleの入手
mkdir bgp_simple; cd bgp_simple
tar xvfz bgpsimple.tgz
12.
経路データを準備
/root/libbgpdump-1.4.99.13/bgpdump -m /root/bgp_simple/rib.20140401.0000.bz2 > /root/bgp_simple/myroutes
13.
起動スクリプト作成
vi bgp_simple.sh
#!/bin/sh
MYAS=64577
MYIP=192.168.0.10
PEERIP=192.168.0.100
PEERAS=64588
HOLDTIME=1800
KEEPALIVE=600
ROUTEFILE="./myroutes"
LOGFILE="./bgp_simple.log"
./bgp_simple.pl -myas $MYAS -myip=$MYIP -peerip=$PEERIP ?
-peeras=$PEERAS -holdtime=$HOLDTIME -keepalive=$KEEPALIVE ?
-v -p=$ROUTEFILE -o=$LOGFILE.`date +%Y%m%d%H%M`
14.
bgpsimple起動
cd /root/bgp_simple/
. bgp_simple.sh
以上、50万近くの経路情報が広告される。
初回だけタイマー値をもっと長めにしたほうがいいかも。