SlideShare a Scribd company logo
Bgpdump2:  A  Tool  for  Full  
BGP  Route  Comparison
Yasuhiro  Ohara
yasu@nttv6.jp
NTT  Communications  
Corporation
Motivation
•  Handle  BGP  RIB  as  File
–  save  it,  move  it,  compare  it
–  handy  for  research  input
–  health  check,  past  analysis,  future  model
–  As  an  ISP,  how  are  we  doing  ?
•  Need  for  modification  to  add  new  features  
–  peer  statistics
–  per  peer  route  table
–  longest  match  using  routing  table
–  diff  of  two  peer  route  table
AS
AS
AS
route  collector,  route  
monitor,  peers
route  
collector
route  
monitor
route  
monitor
route  
monitor
eBGP
Peer  Table
    peer  1
    peer  2
    peer  3
Routes
1.0.0.0/24
    peer  1's  entry
    peer  3's  entry
Save
The  RIB  dump  file
Existing  tools
•  libbgpdump
–  written  in  C.  <https://bitbucket.org/ripencc/bgpdump/wiki/Home>
•  zebra-‐‑‒dump-‐‑‒parser
–  written  in  Perl.  <https://github.com/rfc1036/zebra-‐‑‒dump-‐‑‒parser>
•  java-‐‑‒mrt  library
–  written  in  Java.  <https://github.com/paaguti/java-‐‑‒mrt>
•  UCLA  bgpparser
–  written  in  C++.  <http://irl.cs.ucla.edu/software/bgpparser.html>
•  mrtparse
–  written  in  Python.  <https://github.com/YoshiyukiYamauchi/mrtparse>
•  openbgpd  bgpctl
–  written  in  C.  <http://cvsweb.openbsd.org/cgi-‐‑‒bin/cvsweb/src/usr.sbin/
bgpctl/>
•  pybgpdump
–  writen  in  Python.  <https://jon.oberheide.org/pybgpdump/>
bgpdump2  summary
•  Full  scratch  in  C  (4000-‐‑‒  lines)
•  Open-‐‑‒source  software
–  <https://github.com/yasuhiro-‐‑‒ohara-‐‑‒ntt/bgpdump2>
•  Capability:
–  supported:  bz2  and  gzip,  MRT  TABLE_̲DUMP_̲V2  format,  
ipv4  /  ipv6
–  show  statistics  per  peers  (e.g.,  #routes,  #nexthops)
–  routing  table  construction,  longest-‐‑‒match  table  lookup
•  Good  for  detailed  investigation  of  a  RIB  file
•  Good  for  full-‐‑‒route  comparison
simple  display
%  ./src/bgpdump2    ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  |  
head  -‐‑‒10
0.0.0.0/0  203.189.128.233  origin_̲as:  9902  as-‐‑‒path[2]:  23673  9902
1.0.0.0/24  213.144.128.203  origin_̲as:  15169  as-‐‑‒path[2]:  13030  
15169
1.0.0.0/24  198.129.33.85  origin_̲as:  15169  as-‐‑‒path[2]:  293  15169
1.0.0.0/24  5.101.110.2  origin_̲as:  15169  as-‐‑‒path[3]:  202018  1299  
15169
1.0.0.0/24  162.243.188.2  origin_̲as:  15169  as-‐‑‒path[2]:  393406  15169
1.0.0.0/24  95.85.0.2  origin_̲as:  15169  as-‐‑‒path[2]:  200130  15169
1.0.0.0/24  192.241.164.4  origin_̲as:  15169  as-‐‑‒path[2]:  62567  15169
1.0.0.0/24  129.250.0.11  origin_̲as:  15169  as-‐‑‒path[2]:  2914  15169
1.0.0.0/24  66.185.128.1  origin_̲as:  15169  as-‐‑‒path[2]:  1668  15169
1.0.0.0/24  173.205.57.234  origin_̲as:  15169  as-‐‑‒path[3]:  53364  3257  
15169
libbgpdump  compatible  mode
•  not  finished:  e.g.,  support  for  community,  localpref,  etc.,  are  not  yet  
completed.
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒
m  |  head  -‐‑‒3
TABLE_̲DUMP2|1426723200|B|203.189.128.233|23673|0.0.0.0/0|
23673  9902|INCOMPLETE|203.189.128.233|0|0|0|NAG||
TABLE_̲DUMP2|1426723200|B|213.144.128.203|13030|1.0.0.0/24|
13030  15169|INCOMPLETE|213.144.128.203|0|1|0|NAG||
TABLE_̲DUMP2|1426723200|B|198.129.33.85|293|1.0.0.0/24|293  
15169|INCOMPLETE|198.129.33.85|0|0|0|NAG||
display  peer  table
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒
P  |  head  -‐‑‒12
Collector  BGP  ID:  128.223.51.102
View  Name  Length:  0
View  Name:  
Peer  Count:  58
#  peer_̲table[0]  changed:  0.0.0.0  asn:0  [129.250.0.11|::]
#  peer_̲table[1]  changed:  10.10.10.252  asn:53364  
[173.205.57.234|::]
#  peer_̲table[2]  changed:  0.0.0.0  asn:0  [192.241.164.4|::]
#  peer_̲table[3]  changed:  4.69.184.193  asn:3356  [4.69.184.193|::]
#  peer_̲table[4]  changed:  5.101.110.2  asn:202018  [5.101.110.2|::]
#  peer_̲table[5]  changed:  12.0.1.63  asn:7018  [12.0.1.63|::]
#  peer_̲table[6]  changed:  64.57.28.241  asn:11537  [64.57.28.241|::]
#  peer_̲table[7]  changed:  66.185.128.1  asn:1668  [66.185.128.1|::]
display  per  peer
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒
p  19  |  head  -‐‑‒8
1.0.0.0/24  129.250.0.11  origin_̲as:  15169  as-‐‑‒path[2]:  2914  15169
1.0.4.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[4]:  2914  3257  
4826  56203
1.0.5.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[4]:  2914  3257  
4826  56203
1.0.6.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[4]:  2914  3257  
4826  56203
1.0.7.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[6]:  2914  3257  
4826  56203  56203  56203
1.0.38.0/24  129.250.0.11  origin_̲as:  24155  as-‐‑‒path[2]:  2914  24155
1.0.43.0/24  129.250.0.11  origin_̲as:  24155  as-‐‑‒path[4]:  2914  1299  
10026  24155
1.0.44.0/24  129.250.0.11  origin_̲as:  24155  as-‐‑‒path[4]:  2914  1299  
10026  24155
per  peer  statistics
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒k  |  less
:
peer[19]:
Number  of  routes:  524728
Number  of  routes  per  plen:
        /0  :            0        /1  :            0        /2  :            0        /3  :            0        /4  :            0
        /5  :            0        /6  :            0        /7  :            0        /8  :          16        /9  :          12
        /10:          33        /11:          92        /12:        263        /13:        501        /14:        991
        /15:      1701        /16:    12887        /17:      7047        /18:    11927        /19:    24655
        /20:    35315        /21:    37702        /22:    57644        /23:    49291        /24:  284473
        /25:          52        /26:          51        /27:          20        /28:          20        /29:          16
        /30:            6        /31:            0        /32:          13
Number  of  nexthops:  1
Number  of  origin_̲as:  49440
Number  of  unique  as  paths:  75351
Number  of  as  path  len:  39
:
Speed
74M      routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2
%  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  'bzcat  routeviews/oregon-‐‑‒ix2/rib.
20150319.0000.bz2  >  /dev/null  2>&1  '
real                28.98 user                28.80  sys                    0.10
%  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  'bzcat  routeviews/oregon-‐‑‒ix2/rib.
20150319.0000.bz2  |  ./zebra-‐‑‒dump-‐‑‒parser/zebra-‐‑‒dump-‐‑‒parser.pl  >  /
dev/null  2>&1  '
real              428.29 user              467.67  sys                    1.07
%  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  './libbgpdump-‐‑‒1.4.99.11/bgpdump  
routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  >  /dev/null  2>&1  '
real              148.71 user              148.38  sys                    0.24
%  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  './bgpdump2/src/bgpdump2  routeviews/
oregon-‐‑‒ix2/rib.20150319.0000.bz2  >  /dev/null  2>&1  '
real                89.09 user                88.74  sys                    0.19
diff  between  peers
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.
20150319.0000.bz2  -‐‑‒u  -‐‑‒p  1  -‐‑‒p  3
                :
-‐‑‒204.245.63.0/24  173.205.57.234  origin_̲as:  3549  as-‐‑‒path[3]:  
53364  3257  3549
-‐‑‒205.106.84.0/22  173.205.57.234  origin_̲as:  27066  as-‐‑‒path[6]:  
53364  40191  174  209
  721  27066
+205.232.128.0/21  4.69.184.193  origin_̲as:  20208  as-‐‑‒path[4]:  
3356  7843  12271  2020
8
+205.251.194.0/23  4.69.184.193  origin_̲as:  16509  as-‐‑‒path[2]:  
3356  16509
                :
routing  table  lookup
(longest-‐‑‒match)
•  Routing  Table  (PATRICIA)  can  be  created.
•  one  address  lookup.
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒p  
19  -‐‑‒l  8.8.8.8
looking  up  an  address:  8.8.8.8
8.8.8.0/24  129.250.0.11  origin_̲as:  15169  as-‐‑‒path[2]:  2914  15169
•  a  list  of  address  lookup  contained  in  a  file.
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒p  
19  -‐‑‒L  ../test-‐‑‒lookup.txt  
50.0.0.0/16  129.250.0.11  origin_̲as:  7065  as-‐‑‒path[3]:  2914  8121  7065
100.0.0.0/16  129.250.0.11  origin_̲as:  701  as-‐‑‒path[2]:  2914  701
150.0.0.0:  no  route  found.
200.0.0.0:  no  route  found.
Diffs  a  peer  against  others
•  script/compare-‐‑‒peer-‐‑‒with-‐‑‒others.sh
•  marks
udiff:
<:  the  prefix  is  in  left  and  unreachable  in  right  (maybe  
partially).
+:  the  prefix  is  only  in  right  (but  it  is  reachable  in  left).
):  the  prefix  is  in  right,  and  is  covered  by  a  shorter  prefix  in  left
      that  is  unreachable  in  right.  (i.e.,  the  shorter  is  '<')
>:  the  prefix  is  in  right  and  unreachable  in  left  (maybe  
partially).
-‐‑‒:  the  prefix  is  only  in  left  (but  it  is  reachable  in  right).
(:  the  prefix  is  in  left,  and  is  covered  by  a  shorter  prefix  in  right
      that  is  unreachable  in  left.  (i.e.,  the  shorter  is  '>')
Comparison  among  peers
•  diff  routes  between  2914  and  3356:
>70.61.0.0/20  4.69.184.193  origin_̲as:  10796  as-‐‑‒path[3]:  3356  7843  10796
>70.61.1.0/24  4.69.184.193  origin_̲as:  10796  as-‐‑‒path[3]:  3356  7843  10796
>70.61.2.0/24  4.69.184.193  origin_̲as:  30628  as-‐‑‒path[4]:  3356  7843  10796  30628
(70.61.4.0/24  129.250.0.11  origin_̲as:  10796  as-‐‑‒path[4]:  2914  2828  7843  10796
(70.61.5.0/24  129.250.0.11  origin_̲as:  10796  as-‐‑‒path[4]:  2914  2828  7843  10796
(70.61.6.0/24  129.250.0.11  origin_̲as:  33363  as-‐‑‒path[5]:  2914  2828  7843  33363  
33363
+71.29.112.0/21  4.69.184.193  origin_̲as:  7029  as-‐‑‒path[3]:  3356  2828  7029
>71.44.17.0/24  4.69.184.193  origin_̲as:  33363  as-‐‑‒path[2]:  3356  33363
>71.44.53.0/24  4.69.184.193  origin_̲as:  33363  as-‐‑‒path[2]:  3356  33363
>71.44.62.0/24  4.69.184.193  origin_̲as:  33363  as-‐‑‒path[2]:  3356  33363
-‐‑‒71.252.67.0/24  129.250.0.11  origin_̲as:  64512  as-‐‑‒path[3]:  2914  701  64512
+72.0.224.0/23  4.69.184.193  origin_̲as:  19940  as-‐‑‒path[2]:  3356  19940
+72.0.227.0/24  4.69.184.193  origin_̲as:  19940  as-‐‑‒path[2]:  3356  19940
missing  prefix  ranking
in  AS  2914  in  Oregon  IX
•  cat  data/oregon-‐‑‒ix2-‐‑‒rib.20150319.0000.bz2-‐‑‒p19/
route-‐‑‒diff-‐‑‒rib.20150319.0000.bz2-‐‑‒p19-‐‑‒*-‐‑‒diff.txt  |  
grep  '^>'  |  awk  '{print  $1;}'  |  sort  -‐‑‒n  |  uniq  -‐‑‒c  |  
sort  -‐‑‒n  –r
38  >94.176.2.0/24 94.176.2.0 ASTIMP-‐‑‒ASAstimpConsultingSRL,RO
38  >94.176.131.0/24 94.176.131.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO
38  >94.156.77.0/24 94.156.77.0 NETERRA-‐‑‒ASNeterraLtd.,BG
38  >94.156.185.0/24 94.156.185.0 NETERRA-‐‑‒ASNeterraLtd.,BG
38  >94.156.184.0/24 94.156.184.0 NETERRA-‐‑‒ASNeterraLtd.,BG
38  >93.123.18.0/24 93.123.18.0 NETERRA-‐‑‒ASNeterraLtd.,BG
38  >93.120.36.0/22 93.120.36.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO
38  >93.120.35.0/24 93.120.35.0 ASTIMP-‐‑‒
ASAstimpConsultingSRL,RO
38  >93.115.92.0/22 93.115.92.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO
38  >93.115.88.0/22 93.115.88.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO
ranking  in  appearance  count  of  
whois  descr
  180  
    88  TFN-‐‑‒TWTaiwanFixedNetwork,TelcoandNetworkServiceProvider.,TW
    60  VOXILITY-‐‑‒ASVoxilityS.R.L.,RO
    60  FPT-‐‑‒AS-‐‑‒APTheCorporationforFinancing&PromotingTechnology,VN
    42  SCRR-‐‑‒10796-‐‑‒TimeWarnerCableInternetLLC,US
    37  TAIWANMOBILE-‐‑‒ASTaiwanMobileCo.,Ltd.,TW
    33  XTGLOBALXTGLOBALNETWORKSLTD.,RO
    32  DATAFRAMELO-‐‑‒DataframeLogistics,Inc.,US
    28  ONE-‐‑‒NET-‐‑‒HKINTERNET-‐‑‒SOLUTION-‐‑‒HK,CN
    24  VNPT-‐‑‒AS-‐‑‒VNVNPTCorp,VN
Apparently  2914:4429  community  tag:  do  not  advertise  in  Asia.
http://www.us.ntt.net/support/policy/routing.cfm
route  count  on  multiple  files
%  ./bgpdump2  –c  rib.20150101.bz2  rib.20150102.bz2  rib.
20150103.bz2  rib.20150104.bz2  ......
#timestamp,peer1,peer2,...
1407758405,0,499472,503874,502451,502850,500615,499234
,500185,0
#timestamp,peer1,peer2,...
1407762003,0,499591,503978,502564,502961,500720,499354
,500311,0
#timestamp,peer1,peer2,...
1407765605,0,499535,503932,502515,502920,500673,499296
,500264,0
so  you  can  produce  a  figure  like  next  slides.
full  route  number
•  peer[13]  was  empty.
•  The  R  script  is  also  
provided.
460000470000480000490000
NumberofRoutes
●●●●●●●●●●●●●●●●●●●●●●●
●
●
●●●
●●●●●●●●●●●●●●●●●●●●
●●●●●●●
●●●●●●●
●●
●●●●
●●●●
●●●●●
●●●
●●●
●●●
●●●●
Number of Full Routes
●0 1 2 3 5 7 11
2014−01−0109:00:19
2014−01−0509:00:19
2014−01−0909:00:19
2014−01−1309:00:19
2014−01−1709:00:18
2014−01−2109:00:18
2014−01−2509:00:19
2014−01−2909:00:19
2014−02−0209:00:20
2014−02−0609:00:20
2014−02−1009:00:19
2014−02−1409:00:20
2014−02−1809:00:20
2014−02−2209:00:21
2014−02−2609:00:21
2014−03−0209:00:20
2014−03−0609:00:20
2014−03−1009:00:21
2014−03−1409:00:22
2014−03−1809:00:21
2014−03−2209:00:21
2014−03−2609:00:22
2014−03−3009:00:21
%  sh  full-‐‑‒route-‐‑‒number.sh  -‐‑‒p  0  -‐‑‒p  1  -‐‑‒p  2  -‐‑‒p  3  -‐‑‒p  5  -‐‑‒p  7  -‐‑‒p  11  –p  13
        ../../../routeviews/oregon2-‐‑‒summary/rib.20140{1,2,3}*.bz2
−40−200204060
Prefix Length
NumberofRoutes
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●−1 −1
−47
−6
−13−15
−28
5
−11
66
49
−1 −1
Distribution by Prefix Length
● 2014−08−12 00:00:04 2014−08−13 00:00:04
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
Increase  in  the  number  of  route.
Disbribution  per  prefix  length.
2014-‐‑‒08-‐‑‒12  00:00  –  2014-‐‑‒08-‐‑‒13  00:00
0100200300400500
Prefix Length
NumberofRoutes
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●1 1 2
49
3
−23
142
40
−33
11
549
−1 −1
Distribution by Prefix Length
● 2014−08−13 00:00:04 2014−08−14 00:00:06
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
0200400600
Prefix Length
NumberofRoutes
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●1 1 6 6 21
−9−8
124
−9
141
727
−1 −1 −1 −6
Distribution by Prefix Length
● 2014−08−10 23:00:05 2014−08−17 23:00:05
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
peer  table  is  changing
%  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150*.bz2  -‐‑‒P  |  grep  
2914
#  peer_̲table[20]  changed:  129.250.0.12  asn:2914  [129.250.0.11|::]
#  peer_̲table[21]  changed:  0.0.0.0  asn:2914  [129.250.0.171|::]
#  peer_̲table[21]  changed:  129.250.0.12  asn:2914  [129.250.0.11|::]
#  peer_̲table[22]  changed:  0.0.0.0  asn:2914  [129.250.0.171|::]
#  peer_̲table[19]  changed:  129.250.0.12  asn:2914  [129.250.0.11|::]
#  peer_̲table[20]  changed:  0.0.0.0  asn:2914  [129.250.0.171|::]
Discussion
•  Issue:  peer  table  is  changing  in  the  RIB  files.
•  Philosophical  Question:  what  is  the  thing  BGP  full  
route  routing  table  ?
–  They  change  over  time.
–  They  change  depending  on  the  observation  point
•    Even  2914's  in  Oregon  and  Tokyo  are  different.
–  Will  the  common  set  among  BGP  Full-‐‑‒Routes  be  of  help  in  
any  way  ?
•  Can  we  evaluate  ISP's  quality  based  on  the  BGP  
routes  it  has  ?  (I  guess  we  can  but  don't  know  how  
yet)
•  Does  this  tool  contribute  to  debugging  the  BGP  
routes  ?  (Yes,  it  seems,  at  least  as  a  trigger)
Features  to  be  added
•  REGEXP  in  AS_̲PATH
•  match  (REGEXP?)  on  NEXT_̲HOP
– by  John  Kemp
•  REGEXP  in  AS_̲PATH  AND  Match  
(REGEXP)  in  COMMUNITY  tags.
•  Name  resolution  using  Team-‐‑‒Cymru
Wrap  up
•  An  open-‐‑‒source  tool  is  newly  developed  to  analyze  
BGP  dump:  bgpdump2.
–  currently  support  only  RIB  dump  and  only  bz2
•  New  features
–  per  peer  statistics,  per  peer  display  of  routes
–  diffs
–  PATRICIA-‐‑‒based  routing  lookup  (longest-‐‑‒match)
•  Open  for  feature  requests.
•  Possibly  helps
–  BGP  route  debugging  incl.  route  leaks
–  ISP  comparison
–  analysis,  and/or  research
Thanks

More Related Content

Similar to Ietf92 ohara-full-route-compare-tool-2015-03-25-grow

Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF Abyss
Sasha Goldshtein
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
Mark Wong
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
Command Prompt., Inc
 
LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)
Ryo ONODERA
 
و کشف بد افزار OSSEC
 و کشف بد افزار OSSEC و کشف بد افزار OSSEC
و کشف بد افزار OSSEC
milad saber
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
Brendan Gregg
 
MeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisMeetBSD2014 Performance Analysis
MeetBSD2014 Performance Analysis
Brendan Gregg
 
Piwik elasticsearch kibana at OSC Tokyo 2016 Spring
Piwik elasticsearch kibana at OSC Tokyo 2016 SpringPiwik elasticsearch kibana at OSC Tokyo 2016 Spring
Piwik elasticsearch kibana at OSC Tokyo 2016 Spring
Takashi Yamamoto
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
Brendan Gregg
 
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFOSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
Brendan Gregg
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Brendan Gregg
 
Bgp
BgpBgp
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
維泰 蔡
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
Brendan Gregg
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
Sysdig
 
test
testtest
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
Brendan Gregg
 
Building Scalable Data Center Networks
Building Scalable Data Center NetworksBuilding Scalable Data Center Networks
Building Scalable Data Center Networks
Cumulus Networks
 
200.1,2-Capacity Planning
200.1,2-Capacity Planning200.1,2-Capacity Planning
200.1,2-Capacity Planning
behrad eslamifar
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
Sasha Goldshtein
 

Similar to Ietf92 ohara-full-route-compare-tool-2015-03-25-grow (20)

Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF Abyss
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)LibreOffice 4 under NetBSD with pkgsrc (en)
LibreOffice 4 under NetBSD with pkgsrc (en)
 
و کشف بد افزار OSSEC
 و کشف بد افزار OSSEC و کشف بد افزار OSSEC
و کشف بد افزار OSSEC
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
MeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisMeetBSD2014 Performance Analysis
MeetBSD2014 Performance Analysis
 
Piwik elasticsearch kibana at OSC Tokyo 2016 Spring
Piwik elasticsearch kibana at OSC Tokyo 2016 SpringPiwik elasticsearch kibana at OSC Tokyo 2016 Spring
Piwik elasticsearch kibana at OSC Tokyo 2016 Spring
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFOSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
 
Bgp
BgpBgp
Bgp
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
test
testtest
test
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 
Building Scalable Data Center Networks
Building Scalable Data Center NetworksBuilding Scalable Data Center Networks
Building Scalable Data Center Networks
 
200.1,2-Capacity Planning
200.1,2-Capacity Planning200.1,2-Capacity Planning
200.1,2-Capacity Planning
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 

Recently uploaded

怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
KubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial IntelligentKubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial Intelligent
Emre Gündoğdu
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
GNAMBIKARAO
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
dtagbe
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
Infosec train
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 

Recently uploaded (12)

怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
KubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial IntelligentKubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial Intelligent
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 

Ietf92 ohara-full-route-compare-tool-2015-03-25-grow

  • 1. Bgpdump2:  A  Tool  for  Full   BGP  Route  Comparison Yasuhiro  Ohara yasu@nttv6.jp NTT  Communications   Corporation
  • 2. Motivation •  Handle  BGP  RIB  as  File –  save  it,  move  it,  compare  it –  handy  for  research  input –  health  check,  past  analysis,  future  model –  As  an  ISP,  how  are  we  doing  ? •  Need  for  modification  to  add  new  features   –  peer  statistics –  per  peer  route  table –  longest  match  using  routing  table –  diff  of  two  peer  route  table
  • 3. AS AS AS route  collector,  route   monitor,  peers route   collector route   monitor route   monitor route   monitor eBGP Peer  Table    peer  1    peer  2    peer  3 Routes 1.0.0.0/24    peer  1's  entry    peer  3's  entry Save The  RIB  dump  file
  • 4. Existing  tools •  libbgpdump –  written  in  C.  <https://bitbucket.org/ripencc/bgpdump/wiki/Home> •  zebra-‐‑‒dump-‐‑‒parser –  written  in  Perl.  <https://github.com/rfc1036/zebra-‐‑‒dump-‐‑‒parser> •  java-‐‑‒mrt  library –  written  in  Java.  <https://github.com/paaguti/java-‐‑‒mrt> •  UCLA  bgpparser –  written  in  C++.  <http://irl.cs.ucla.edu/software/bgpparser.html> •  mrtparse –  written  in  Python.  <https://github.com/YoshiyukiYamauchi/mrtparse> •  openbgpd  bgpctl –  written  in  C.  <http://cvsweb.openbsd.org/cgi-‐‑‒bin/cvsweb/src/usr.sbin/ bgpctl/> •  pybgpdump –  writen  in  Python.  <https://jon.oberheide.org/pybgpdump/>
  • 5. bgpdump2  summary •  Full  scratch  in  C  (4000-‐‑‒  lines) •  Open-‐‑‒source  software –  <https://github.com/yasuhiro-‐‑‒ohara-‐‑‒ntt/bgpdump2> •  Capability: –  supported:  bz2  and  gzip,  MRT  TABLE_̲DUMP_̲V2  format,   ipv4  /  ipv6 –  show  statistics  per  peers  (e.g.,  #routes,  #nexthops) –  routing  table  construction,  longest-‐‑‒match  table  lookup •  Good  for  detailed  investigation  of  a  RIB  file •  Good  for  full-‐‑‒route  comparison
  • 6. simple  display %  ./src/bgpdump2    ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  |   head  -‐‑‒10 0.0.0.0/0  203.189.128.233  origin_̲as:  9902  as-‐‑‒path[2]:  23673  9902 1.0.0.0/24  213.144.128.203  origin_̲as:  15169  as-‐‑‒path[2]:  13030   15169 1.0.0.0/24  198.129.33.85  origin_̲as:  15169  as-‐‑‒path[2]:  293  15169 1.0.0.0/24  5.101.110.2  origin_̲as:  15169  as-‐‑‒path[3]:  202018  1299   15169 1.0.0.0/24  162.243.188.2  origin_̲as:  15169  as-‐‑‒path[2]:  393406  15169 1.0.0.0/24  95.85.0.2  origin_̲as:  15169  as-‐‑‒path[2]:  200130  15169 1.0.0.0/24  192.241.164.4  origin_̲as:  15169  as-‐‑‒path[2]:  62567  15169 1.0.0.0/24  129.250.0.11  origin_̲as:  15169  as-‐‑‒path[2]:  2914  15169 1.0.0.0/24  66.185.128.1  origin_̲as:  15169  as-‐‑‒path[2]:  1668  15169 1.0.0.0/24  173.205.57.234  origin_̲as:  15169  as-‐‑‒path[3]:  53364  3257   15169
  • 7. libbgpdump  compatible  mode •  not  finished:  e.g.,  support  for  community,  localpref,  etc.,  are  not  yet   completed. %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒ m  |  head  -‐‑‒3 TABLE_̲DUMP2|1426723200|B|203.189.128.233|23673|0.0.0.0/0| 23673  9902|INCOMPLETE|203.189.128.233|0|0|0|NAG|| TABLE_̲DUMP2|1426723200|B|213.144.128.203|13030|1.0.0.0/24| 13030  15169|INCOMPLETE|213.144.128.203|0|1|0|NAG|| TABLE_̲DUMP2|1426723200|B|198.129.33.85|293|1.0.0.0/24|293   15169|INCOMPLETE|198.129.33.85|0|0|0|NAG||
  • 8. display  peer  table %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒ P  |  head  -‐‑‒12 Collector  BGP  ID:  128.223.51.102 View  Name  Length:  0 View  Name:   Peer  Count:  58 #  peer_̲table[0]  changed:  0.0.0.0  asn:0  [129.250.0.11|::] #  peer_̲table[1]  changed:  10.10.10.252  asn:53364   [173.205.57.234|::] #  peer_̲table[2]  changed:  0.0.0.0  asn:0  [192.241.164.4|::] #  peer_̲table[3]  changed:  4.69.184.193  asn:3356  [4.69.184.193|::] #  peer_̲table[4]  changed:  5.101.110.2  asn:202018  [5.101.110.2|::] #  peer_̲table[5]  changed:  12.0.1.63  asn:7018  [12.0.1.63|::] #  peer_̲table[6]  changed:  64.57.28.241  asn:11537  [64.57.28.241|::] #  peer_̲table[7]  changed:  66.185.128.1  asn:1668  [66.185.128.1|::]
  • 9. display  per  peer %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒ p  19  |  head  -‐‑‒8 1.0.0.0/24  129.250.0.11  origin_̲as:  15169  as-‐‑‒path[2]:  2914  15169 1.0.4.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[4]:  2914  3257   4826  56203 1.0.5.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[4]:  2914  3257   4826  56203 1.0.6.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[4]:  2914  3257   4826  56203 1.0.7.0/24  129.250.0.11  origin_̲as:  56203  as-‐‑‒path[6]:  2914  3257   4826  56203  56203  56203 1.0.38.0/24  129.250.0.11  origin_̲as:  24155  as-‐‑‒path[2]:  2914  24155 1.0.43.0/24  129.250.0.11  origin_̲as:  24155  as-‐‑‒path[4]:  2914  1299   10026  24155 1.0.44.0/24  129.250.0.11  origin_̲as:  24155  as-‐‑‒path[4]:  2914  1299   10026  24155
  • 10. per  peer  statistics %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒k  |  less : peer[19]: Number  of  routes:  524728 Number  of  routes  per  plen:        /0  :            0        /1  :            0        /2  :            0        /3  :            0        /4  :            0        /5  :            0        /6  :            0        /7  :            0        /8  :          16        /9  :          12        /10:          33        /11:          92        /12:        263        /13:        501        /14:        991        /15:      1701        /16:    12887        /17:      7047        /18:    11927        /19:    24655        /20:    35315        /21:    37702        /22:    57644        /23:    49291        /24:  284473        /25:          52        /26:          51        /27:          20        /28:          20        /29:          16        /30:            6        /31:            0        /32:          13 Number  of  nexthops:  1 Number  of  origin_̲as:  49440 Number  of  unique  as  paths:  75351 Number  of  as  path  len:  39 :
  • 11. Speed 74M      routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2 %  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  'bzcat  routeviews/oregon-‐‑‒ix2/rib. 20150319.0000.bz2  >  /dev/null  2>&1  ' real                28.98 user                28.80  sys                    0.10 %  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  'bzcat  routeviews/oregon-‐‑‒ix2/rib. 20150319.0000.bz2  |  ./zebra-‐‑‒dump-‐‑‒parser/zebra-‐‑‒dump-‐‑‒parser.pl  >  / dev/null  2>&1  ' real              428.29 user              467.67  sys                    1.07 %  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  './libbgpdump-‐‑‒1.4.99.11/bgpdump   routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  >  /dev/null  2>&1  ' real              148.71 user              148.38  sys                    0.24 %  /usr/bin/time  -‐‑‒p  bash  -‐‑‒c  './bgpdump2/src/bgpdump2  routeviews/ oregon-‐‑‒ix2/rib.20150319.0000.bz2  >  /dev/null  2>&1  ' real                89.09 user                88.74  sys                    0.19
  • 12. diff  between  peers %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib. 20150319.0000.bz2  -‐‑‒u  -‐‑‒p  1  -‐‑‒p  3                : -‐‑‒204.245.63.0/24  173.205.57.234  origin_̲as:  3549  as-‐‑‒path[3]:   53364  3257  3549 -‐‑‒205.106.84.0/22  173.205.57.234  origin_̲as:  27066  as-‐‑‒path[6]:   53364  40191  174  209  721  27066 +205.232.128.0/21  4.69.184.193  origin_̲as:  20208  as-‐‑‒path[4]:   3356  7843  12271  2020 8 +205.251.194.0/23  4.69.184.193  origin_̲as:  16509  as-‐‑‒path[2]:   3356  16509                :
  • 13. routing  table  lookup (longest-‐‑‒match) •  Routing  Table  (PATRICIA)  can  be  created. •  one  address  lookup. %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒p   19  -‐‑‒l  8.8.8.8 looking  up  an  address:  8.8.8.8 8.8.8.0/24  129.250.0.11  origin_̲as:  15169  as-‐‑‒path[2]:  2914  15169 •  a  list  of  address  lookup  contained  in  a  file. %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150319.0000.bz2  -‐‑‒p   19  -‐‑‒L  ../test-‐‑‒lookup.txt   50.0.0.0/16  129.250.0.11  origin_̲as:  7065  as-‐‑‒path[3]:  2914  8121  7065 100.0.0.0/16  129.250.0.11  origin_̲as:  701  as-‐‑‒path[2]:  2914  701 150.0.0.0:  no  route  found. 200.0.0.0:  no  route  found.
  • 14. Diffs  a  peer  against  others •  script/compare-‐‑‒peer-‐‑‒with-‐‑‒others.sh •  marks udiff: <:  the  prefix  is  in  left  and  unreachable  in  right  (maybe   partially). +:  the  prefix  is  only  in  right  (but  it  is  reachable  in  left). ):  the  prefix  is  in  right,  and  is  covered  by  a  shorter  prefix  in  left      that  is  unreachable  in  right.  (i.e.,  the  shorter  is  '<') >:  the  prefix  is  in  right  and  unreachable  in  left  (maybe   partially). -‐‑‒:  the  prefix  is  only  in  left  (but  it  is  reachable  in  right). (:  the  prefix  is  in  left,  and  is  covered  by  a  shorter  prefix  in  right      that  is  unreachable  in  left.  (i.e.,  the  shorter  is  '>')
  • 15. Comparison  among  peers •  diff  routes  between  2914  and  3356: >70.61.0.0/20  4.69.184.193  origin_̲as:  10796  as-‐‑‒path[3]:  3356  7843  10796 >70.61.1.0/24  4.69.184.193  origin_̲as:  10796  as-‐‑‒path[3]:  3356  7843  10796 >70.61.2.0/24  4.69.184.193  origin_̲as:  30628  as-‐‑‒path[4]:  3356  7843  10796  30628 (70.61.4.0/24  129.250.0.11  origin_̲as:  10796  as-‐‑‒path[4]:  2914  2828  7843  10796 (70.61.5.0/24  129.250.0.11  origin_̲as:  10796  as-‐‑‒path[4]:  2914  2828  7843  10796 (70.61.6.0/24  129.250.0.11  origin_̲as:  33363  as-‐‑‒path[5]:  2914  2828  7843  33363   33363 +71.29.112.0/21  4.69.184.193  origin_̲as:  7029  as-‐‑‒path[3]:  3356  2828  7029 >71.44.17.0/24  4.69.184.193  origin_̲as:  33363  as-‐‑‒path[2]:  3356  33363 >71.44.53.0/24  4.69.184.193  origin_̲as:  33363  as-‐‑‒path[2]:  3356  33363 >71.44.62.0/24  4.69.184.193  origin_̲as:  33363  as-‐‑‒path[2]:  3356  33363 -‐‑‒71.252.67.0/24  129.250.0.11  origin_̲as:  64512  as-‐‑‒path[3]:  2914  701  64512 +72.0.224.0/23  4.69.184.193  origin_̲as:  19940  as-‐‑‒path[2]:  3356  19940 +72.0.227.0/24  4.69.184.193  origin_̲as:  19940  as-‐‑‒path[2]:  3356  19940
  • 16. missing  prefix  ranking in  AS  2914  in  Oregon  IX •  cat  data/oregon-‐‑‒ix2-‐‑‒rib.20150319.0000.bz2-‐‑‒p19/ route-‐‑‒diff-‐‑‒rib.20150319.0000.bz2-‐‑‒p19-‐‑‒*-‐‑‒diff.txt  |   grep  '^>'  |  awk  '{print  $1;}'  |  sort  -‐‑‒n  |  uniq  -‐‑‒c  |   sort  -‐‑‒n  –r 38  >94.176.2.0/24 94.176.2.0 ASTIMP-‐‑‒ASAstimpConsultingSRL,RO 38  >94.176.131.0/24 94.176.131.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO 38  >94.156.77.0/24 94.156.77.0 NETERRA-‐‑‒ASNeterraLtd.,BG 38  >94.156.185.0/24 94.156.185.0 NETERRA-‐‑‒ASNeterraLtd.,BG 38  >94.156.184.0/24 94.156.184.0 NETERRA-‐‑‒ASNeterraLtd.,BG 38  >93.123.18.0/24 93.123.18.0 NETERRA-‐‑‒ASNeterraLtd.,BG 38  >93.120.36.0/22 93.120.36.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO 38  >93.120.35.0/24 93.120.35.0 ASTIMP-‐‑‒ ASAstimpConsultingSRL,RO 38  >93.115.92.0/22 93.115.92.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO 38  >93.115.88.0/22 93.115.88.0 VOXILITY-‐‑‒ASVoxilityS.R.L.,RO
  • 17. ranking  in  appearance  count  of   whois  descr  180      88  TFN-‐‑‒TWTaiwanFixedNetwork,TelcoandNetworkServiceProvider.,TW    60  VOXILITY-‐‑‒ASVoxilityS.R.L.,RO    60  FPT-‐‑‒AS-‐‑‒APTheCorporationforFinancing&PromotingTechnology,VN    42  SCRR-‐‑‒10796-‐‑‒TimeWarnerCableInternetLLC,US    37  TAIWANMOBILE-‐‑‒ASTaiwanMobileCo.,Ltd.,TW    33  XTGLOBALXTGLOBALNETWORKSLTD.,RO    32  DATAFRAMELO-‐‑‒DataframeLogistics,Inc.,US    28  ONE-‐‑‒NET-‐‑‒HKINTERNET-‐‑‒SOLUTION-‐‑‒HK,CN    24  VNPT-‐‑‒AS-‐‑‒VNVNPTCorp,VN Apparently  2914:4429  community  tag:  do  not  advertise  in  Asia. http://www.us.ntt.net/support/policy/routing.cfm
  • 18. route  count  on  multiple  files %  ./bgpdump2  –c  rib.20150101.bz2  rib.20150102.bz2  rib. 20150103.bz2  rib.20150104.bz2  ...... #timestamp,peer1,peer2,... 1407758405,0,499472,503874,502451,502850,500615,499234 ,500185,0 #timestamp,peer1,peer2,... 1407762003,0,499591,503978,502564,502961,500720,499354 ,500311,0 #timestamp,peer1,peer2,... 1407765605,0,499535,503932,502515,502920,500673,499296 ,500264,0 so  you  can  produce  a  figure  like  next  slides.
  • 19. full  route  number •  peer[13]  was  empty. •  The  R  script  is  also   provided. 460000470000480000490000 NumberofRoutes ●●●●●●●●●●●●●●●●●●●●●●● ● ● ●●● ●●●●●●●●●●●●●●●●●●●● ●●●●●●● ●●●●●●● ●● ●●●● ●●●● ●●●●● ●●● ●●● ●●● ●●●● Number of Full Routes ●0 1 2 3 5 7 11 2014−01−0109:00:19 2014−01−0509:00:19 2014−01−0909:00:19 2014−01−1309:00:19 2014−01−1709:00:18 2014−01−2109:00:18 2014−01−2509:00:19 2014−01−2909:00:19 2014−02−0209:00:20 2014−02−0609:00:20 2014−02−1009:00:19 2014−02−1409:00:20 2014−02−1809:00:20 2014−02−2209:00:21 2014−02−2609:00:21 2014−03−0209:00:20 2014−03−0609:00:20 2014−03−1009:00:21 2014−03−1409:00:22 2014−03−1809:00:21 2014−03−2209:00:21 2014−03−2609:00:22 2014−03−3009:00:21 %  sh  full-‐‑‒route-‐‑‒number.sh  -‐‑‒p  0  -‐‑‒p  1  -‐‑‒p  2  -‐‑‒p  3  -‐‑‒p  5  -‐‑‒p  7  -‐‑‒p  11  –p  13        ../../../routeviews/oregon2-‐‑‒summary/rib.20140{1,2,3}*.bz2
  • 20. −40−200204060 Prefix Length NumberofRoutes ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●−1 −1 −47 −6 −13−15 −28 5 −11 66 49 −1 −1 Distribution by Prefix Length ● 2014−08−12 00:00:04 2014−08−13 00:00:04 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 Increase  in  the  number  of  route. Disbribution  per  prefix  length. 2014-‐‑‒08-‐‑‒12  00:00  –  2014-‐‑‒08-‐‑‒13  00:00
  • 21. 0100200300400500 Prefix Length NumberofRoutes ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●1 1 2 49 3 −23 142 40 −33 11 549 −1 −1 Distribution by Prefix Length ● 2014−08−13 00:00:04 2014−08−14 00:00:06 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
  • 22. 0200400600 Prefix Length NumberofRoutes ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●1 1 6 6 21 −9−8 124 −9 141 727 −1 −1 −1 −6 Distribution by Prefix Length ● 2014−08−10 23:00:05 2014−08−17 23:00:05 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
  • 23. peer  table  is  changing %  ./src/bgpdump2  ../routeviews/oregon-‐‑‒ix2/rib.20150*.bz2  -‐‑‒P  |  grep   2914 #  peer_̲table[20]  changed:  129.250.0.12  asn:2914  [129.250.0.11|::] #  peer_̲table[21]  changed:  0.0.0.0  asn:2914  [129.250.0.171|::] #  peer_̲table[21]  changed:  129.250.0.12  asn:2914  [129.250.0.11|::] #  peer_̲table[22]  changed:  0.0.0.0  asn:2914  [129.250.0.171|::] #  peer_̲table[19]  changed:  129.250.0.12  asn:2914  [129.250.0.11|::] #  peer_̲table[20]  changed:  0.0.0.0  asn:2914  [129.250.0.171|::]
  • 24. Discussion •  Issue:  peer  table  is  changing  in  the  RIB  files. •  Philosophical  Question:  what  is  the  thing  BGP  full   route  routing  table  ? –  They  change  over  time. –  They  change  depending  on  the  observation  point •   Even  2914's  in  Oregon  and  Tokyo  are  different. –  Will  the  common  set  among  BGP  Full-‐‑‒Routes  be  of  help  in   any  way  ? •  Can  we  evaluate  ISP's  quality  based  on  the  BGP   routes  it  has  ?  (I  guess  we  can  but  don't  know  how   yet) •  Does  this  tool  contribute  to  debugging  the  BGP   routes  ?  (Yes,  it  seems,  at  least  as  a  trigger)
  • 25. Features  to  be  added •  REGEXP  in  AS_̲PATH •  match  (REGEXP?)  on  NEXT_̲HOP – by  John  Kemp •  REGEXP  in  AS_̲PATH  AND  Match   (REGEXP)  in  COMMUNITY  tags. •  Name  resolution  using  Team-‐‑‒Cymru
  • 26. Wrap  up •  An  open-‐‑‒source  tool  is  newly  developed  to  analyze   BGP  dump:  bgpdump2. –  currently  support  only  RIB  dump  and  only  bz2 •  New  features –  per  peer  statistics,  per  peer  display  of  routes –  diffs –  PATRICIA-‐‑‒based  routing  lookup  (longest-‐‑‒match) •  Open  for  feature  requests. •  Possibly  helps –  BGP  route  debugging  incl.  route  leaks –  ISP  comparison –  analysis,  and/or  research