Wie können die BGP Zustände an einem SRX Router gemonitort werden?
Anleitung Juniper (enthält auch die Beschreibung der BGP Zustände)
https://www.juniper.net/documentation/en_US/junos14.2/topics/task/configuration/bgp-transition-events-logging.html
Auszug:
Border Gateway Protocol (BGP) state transitions indicate a network problem and need to be logged and investigated.
To log BGP state transition events to the system log, follow these steps:
- In configuration mode, go to the following hierarchy level:
[edit]user@host# edit protocol bgp
- Configure the system log:
user@host# set log-updown
- Verify the configuration:
user@host# show
- Commit the configuration:
user@host# commit
So sieht es dann im Logile aus:
protocols { bgp { traceoptions { file WAN-bgp size 3m files 10; flag open; flag update; flag general; } log-updown;
Anzeige des Logfiles
Für jede Funktion wurde ein eigenes Logfile festgelegt:
XXX@SRX2> configure
Entering configuration mode
[edit]
rkrakovic@SRX2# run show log
total 25420
-rw-r----- 1 root wheel 1944057 Dec 15 07:49 WAN-bgp
-rw-r----- 1 root wheel 257371 Dec 13 19:10 WAN-bgp.0.gz
-rw-r----- 1 root wheel 257326 Dec 11 07:42 WAN-bgp.1.gz
-rw-r----- 1 root wheel 257299 Dec 8 20:13 WAN-bgp.2.gz
-rw-r----- 1 root wheel 257602 Dec 6 08:50 WAN-bgp.3.gz
-rw-r----- 1 root wheel 257562 Dec 3 21:28 WAN-bgp.4.gz
-rw-r----- 1 root wheel 257243 Dec 1 10:06 WAN-bgp.5.gz
-rw-r----- 1 root wheel 257726 Nov 28 22:37 WAN-bgp.6.gz
-rw-r----- 1 root wheel 257415 Nov 26 11:14 WAN-bgp.7.gz
-rw-r----- 1 root wheel 257280 Nov 23 23:50 WAN-bgp.8.gz
-rw-r----- 1 root wheel 2842594 Apr 25 2015 WAN-ospf
-rw-r----- 1 root wheel 309882 Apr 15 2015 WAN-ospf.0.gz
-rw-r----- 1 root wheel 308652 Apr 9 2015 WAN-ospf.1.gz
-rw-r----- 1 root wheel 309999 Apr 3 2015 WAN-ospf.2.gz
-rw-r----- 1 root wheel 309819 Mar 28 2015 WAN-ospf.3.gz
-rw-r----- 1 root wheel 310229 Mar 22 2015 WAN-ospf.4.gz
-rw-r----- 1 root wheel 308466 Mar 17 2015 WAN-ospf.5.gz
-rw-r----- 1 root wheel 308293 Mar 12 2015 WAN-ospf.6.gz
-rw-r----- 1 root wheel 307960 Mar 6 2015 WAN-ospf.7.gz
-rw-r----- 1 root wheel 307667 Feb 28 2015 WAN-ospf.8.gz
-rw-r--r-- 1 root wheel 52 Jun 13 2016 __jsrpd_commit_check__
-rw-r----- 1 root wheel 0 Feb 4 2014 appidd
.....
drwxrwxrwt 3 root wheel 512 Sep 12 2013 flowc
-rw-r--r-- 1 root wheel 298 Jun 13 2016 fwauthd_chk_only
drwxrwxrwt 3 root wheel 512 Sep 12 2013 ggsn
-rw-r--r-- 1 root wheel 10726 Oct 9 09:13 gres-tp
-rw-r--r-- 1 root wheel 0 Feb 14 2014 group_db.log
-rw-r--r-- 1 root wheel 12950 Feb 27 2014 httpd.log
.....
.....
-rw-r--r-- 1 root wheel 22197 Jun 13 2016 nsd_chk_only
-rw-r--r-- 1 root wheel 369 Jun 13 2016 nstraced_chk_only
-rw-r--r-- 1 root wheel 0 Feb 14 2014 pcre_db.log
-rw-r--r-- 1 root wheel 576 Jun 13 2016 pf
-rw-r--r-- 1 root wheel 2907 Feb 12 2014 pfed
-rw-r--r-- 1 root wheel 432 Jun 13 2016 pgmd
-rw-r--r-- 1 root wheel 0 Feb 14 2014 rexp_db.log
[edit]
XXXX@SRX2#
BDP Logging informationen sind in WAN-bgp.log zu finden.
Bestimmte Logzeilen anzeigen
configure
run show log WAN-bgp | find "Dec 14 17:01"
Was sagen diese Zeiten?
Dec 14 17:14:05.176915 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 76 last recv'd 16 last sent 25 last keepalive 25 Dec 14 17:14:18.672131 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:14:18.672630 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:14:18.831122 bgp_hold_timeout: peer 31.3.80.101 (External AS 196714) last checked 90 last recv'd 0 last sent 14 last keepalive 14 Dec 14 17:14:32.110992 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 13 last recv'd 13 last sent 27 last keepalive 27 Dec 14 17:14:48.332076 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:14:48.332575 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:15:01.001560 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 42 last recv'd 13 last sent 29 last keepalive 29 Dec 14 17:15:18.132931 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:15:18.133432 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:15:26.247462 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 67 last recv'd 8 last sent 25 last keepalive 25 Dec 14 17:15:47.442717 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:15:47.443213 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:15:48.840540 bgp_hold_timeout: peer 31.3.80.101 (External AS 196714) last checked 90 last recv'd 1 last sent 23 last keepalive 23 Dec 14 17:15:52.141420 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 3 last recv'd 4 last sent 26 last keepalive 26 Dec 14 17:16:17.062526 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:16:17.063022 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:16:20.618440 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 32 last recv'd 4 last sent 29 last keepalive 29 Dec 14 17:16:46.782525 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:16:46.783027 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:16:50.610322 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 62 last recv'd 4 last sent 30 last keepalive 30 Dec 14 17:17:15.337981 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 86 last recv'd 28 last sent 24 last keepalive 24 Dec 14 17:17:17.034049 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:17:17.034540 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:17:17.848383 bgp_hold_timeout: peer 31.3.80.101 (External AS 196714) last checked 89 last recv'd 1 last sent 3 last keepalive 3 Dec 14 17:17:44.740848 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 27 last recv'd 28 last sent 30 last keepalive 30 Dec 14 17:17:47.823465 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:17:47.823965 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:18:12.090822 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 54 last recv'd 24 last sent 27 last keepalive 27 Dec 14 17:18:17.719819 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:18:17.720324 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes Dec 14 17:18:37.435165 bgp_keepalive_timeout: peer 31.3.80.101 (External AS 196714) last checked 80 last recv'd 20 last sent 26 last keepalive 26 Dec 14 17:18:46.853066 bgp_hold_timeout: peer 31.3.80.101 (External AS 196714) last checked 89 last recv'd 29 last sent 9 last keepalive 9 Dec 14 17:18:46.923151 bgp_read_v4_message: receiving packet(s) from 31.3.80.101 (External AS 196714) Dec 14 17:18:46.923317 bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes
Der SRX2 Router hat von der „Gegenseite“ 31.3.80.101AS Thüringer Netkom Daten erhalten
bgp_read_v4_message: done with 31.3.80.101 (External AS 196714) received 19 octets 0 updates 0 routes