Tutorial:
Using RIPEstat
MENOG 14

!
Christian Teuschel
RIPE RIPEstat, MENOG 14
Recap From the RIPEstat Presentation
• Information system for Internet number resources
!
• Data
_...
RIPE RIPEstat, MENOG 14
Three Interfaces of RIPEstat
3
https://stat.ripe.net/data/routing-status/data.json?resource=AS3333...
RIPE RIPEstat, MENOG 14
RIPEstat Web Interface
• Finding Information on RIPEstat

4
Search input
Links to most used
featur...
RIPE RIPEstat, MENOG 14
RIPEstat Web Interface
• Information structure on RIPEstat

5
• FAQ
• Data Sources
• Widget List
•...
RIPE RIPEstat, MENOG 14
1. Querying for a Resource (Web Interface)
6
Search box
Your ASN & network prefix Sample resources
...
RIPE RIPEstat, MENOG 14
1. Querying for a Resource (Web Interface)
!
Result page
7
Search box
Widgets grouped
into themati...
RIPE RIPEstat, MENOG 14
1. Querying for a Resource (Web Interface)
Tasks:
!
_ What network announces 140.78.50.90?
_ Is 19...
RIPE RIPEstat, MENOG 14
2. MyViews
Create custom views:
9
• Click the“MyView” Button

• Drag and drop a widget onto the “M...
RIPE RIPEstat, MENOG 14
2. MyViews
10
Newly created
MyView
MyViews are only visible to you.
An option to share your views
...
RIPE RIPEstat, MENOG 14
2. MyViews
Customise MyViews

11
• Rename
• Re-order
• Control visibility
• Remove
Re-order widget...
RIPE RIPEstat, MENOG 14
2. MyViews
Tasks:
!
_ Create a RIPE Access account (if you don’t already have one!)
_ Create a MyV...
RIPE RIPEstat, MENOG 14
Create SSO Account
Tasks:
!
_ Go to the “Login” page
_ “...click here to create one.”.
13
RIPE RIPEstat, MENOG 14
3. Comparing Resources (Web Interface)
• Compare results in different widgets 

14
Go to “Use Case...
RIPE RIPEstat, MENOG 14
3. Comparing Resources (Web Interface)
• Compare results in different widgets 

15
Enter a resourc...
RIPE RIPEstat, MENOG 14
3. Comparing Resources (Web Interface)
In-widget comparison

16
RIPE RIPEstat, MENOG 14
3. Comparing Resources (Web Interface)
Tasks:
!
_ Compare the number of announced prefixes for two ...
RIPE RIPEstat, MENOG 14
4. Finding Abuse Contacts & Reporting Abuse
Take action in an abuse case with the Abuse Contact Fi...
RIPE RIPEstat, MENOG 14
4. Finding Abuse Contacts & Reporting Abuse
19
Email contact to report
abuse to
Rating of the cont...
RIPE RIPEstat, MENOG 14
4. Finding Abuse Contacts & Reporting Abuse
20
Details about the resource and abuse contact:
RIPE RIPEstat, MENOG 14
4. Finding Abuse Contacts & Reporting Abuse
Tasks:
!
_ What is the abuse contact for 193.0.20.22 o...
RIPE RIPEstat, MENOG 14
5. Let’s BGPlay!
• Use BGPlay to see how your network is routed
- BGPlay is a tool that show routi...
RIPE RIPEstat, MENOG 14
5. Let’s BGPlay!
23
Interactive graph visualisation
Control timeline
BGP event, ASN or
ASN path de...
RIPE RIPEstat, MENOG 14
5. Let’s BGPlay!
24
Examples:
!
- Prefix with announcements & withdrawals:

84.205.64.0/24
- Check ...
RIPE RIPEstat, MENOG 14
5. Let’s BGPlay!
Tasks:
!
_ Find the up-stream provider for AS1205
_ Is AS3333 multi-homed?
_ Chec...
RIPE RIPEstat, MENOG 14
6. Embedding Widgets On Your Own Site
Embedding widgets
!
_ What is the concept?

Widgets are base...
RIPE RIPEstat, MENOG 14
6. Embedding Widgets On Your Own Site
27
Prefix Count widget
AS Path Length
widget
This ISP embedde...
RIPE RIPEstat, MENOG 14
6. Embedding Widgets On Your Own Site (Task)
Tasks:
!
_ Create a simple dashboard page to monitor ...
RIPE RIPEstat, MENOG 14
7. RIPEstat Data API
Using raw data output
!
_ What is the concept?

The RIPEstat Data API provide...
RIPE RIPEstat, MENOG 14
7. RIPEstat Data API (Task)
Tasks:
!
_ Use your browser to retrieve all announced prefixes for the ...
RIPE RIPEstat, MENOG 14
8. RIPE Atlas
Creating a user-defined measurement
!
_ https://atlas.ripe.net



31
RIPE RIPEstat, MENOG 14
9. Create a Nagios check (optional)
_ Create a Nagios check using the RIPEstat Data API
_ Nagios i...
RIPE RIPEstat, MENOG 14
9. Create a Nagios check (optional)
Example of a Python based check:



33
if args.transit:!
trans...
Using RIPEstat
Upcoming SlideShare
Loading in …5
×

Using RIPEstat

746 views

Published on

Presentation given by Christian Teuschel at MENOG 14 in Dubai on 1 April 2014

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Using RIPEstat

  1. 1. Tutorial: Using RIPEstat MENOG 14 ! Christian Teuschel
  2. 2. RIPE RIPEstat, MENOG 14 Recap From the RIPEstat Presentation • Information system for Internet number resources ! • Data _ Routing data - Collected by RIS: http://ris.ripe.net _ Registration data (whois) _ RIPE Database & other RIR databases _ MaxMind’s geolocation data _ Blacklist data _ And many more: https://stat.ripe.net/data-sources
 2
  3. 3. RIPE RIPEstat, MENOG 14 Three Interfaces of RIPEstat 3 https://stat.ripe.net/data/routing-status/data.json?resource=AS3333 RIPEstat Web Interface RIPEstat Widget API RIPEstat Data API / RIPEstat Text
  4. 4. RIPE RIPEstat, MENOG 14 RIPEstat Web Interface • Finding Information on RIPEstat
 4 Search input Links to most used features RIPEstat related articles on RIPE Labs Recent new features
  5. 5. RIPE RIPEstat, MENOG 14 RIPEstat Web Interface • Information structure on RIPEstat
 5 • FAQ • Data Sources • Widget List • Top Queries • Feedback • Interfaces & APIs • Demos • Roadmap • Changelog • Notable Network Events • Compare Results • Looking For Abuse Information • Global Internet Statistics
  6. 6. RIPE RIPEstat, MENOG 14 1. Querying for a Resource (Web Interface) 6 Search box Your ASN & network prefix Sample resources Example: Enter “AS3333” in the search box
  7. 7. RIPE RIPEstat, MENOG 14 1. Querying for a Resource (Web Interface) ! Result page 7 Search box Widgets grouped into thematic tabs Widgets display different types of information
  8. 8. RIPE RIPEstat, MENOG 14 1. Querying for a Resource (Web Interface) Tasks: ! _ What network announces 140.78.50.90? _ Is 192.3.4.2 routed? _ In which country is 91.229.42.0/23 used? _ What is its corresponding INETNUM object? _ What widget provides real-time routing status? _ By what percent did the number of prefixes announced by Kuwait increase over the last two years? _ How would you share interesting network events with a colleague? 8
  9. 9. RIPE RIPEstat, MENOG 14 2. MyViews Create custom views: 9 • Click the“MyView” Button
 • Drag and drop a widget onto the “MyView” button

  10. 10. RIPE RIPEstat, MENOG 14 2. MyViews 10 Newly created MyView MyViews are only visible to you. An option to share your views will be available soon!
  11. 11. RIPE RIPEstat, MENOG 14 2. MyViews Customise MyViews
 11 • Rename • Re-order • Control visibility • Remove Re-order widgets as you like
  12. 12. RIPE RIPEstat, MENOG 14 2. MyViews Tasks: ! _ Create a RIPE Access account (if you don’t already have one!) _ Create a MyView for a prefix containing the following widgets: _ Routing Status _ Looking Glass _ Routing History _ Create another MyView with at least two widgets, and give it a meaningful name 12
  13. 13. RIPE RIPEstat, MENOG 14 Create SSO Account Tasks: ! _ Go to the “Login” page _ “...click here to create one.”. 13
  14. 14. RIPE RIPEstat, MENOG 14 3. Comparing Resources (Web Interface) • Compare results in different widgets 
 14 Go to “Use Cases” > “Compare Results” Select a widget
  15. 15. RIPE RIPEstat, MENOG 14 3. Comparing Resources (Web Interface) • Compare results in different widgets 
 15 Enter a resource • Select the “Prefix Size Distribution” widget • Enter “AS1205”
  16. 16. RIPE RIPEstat, MENOG 14 3. Comparing Resources (Web Interface) In-widget comparison
 16
  17. 17. RIPE RIPEstat, MENOG 14 3. Comparing Resources (Web Interface) Tasks: ! _ Compare the number of announced prefixes for two networks over the past two years using the widget comparison page ! _ How does the Internet in the UAE compare to the UK? Use in-widget comparison! 17
  18. 18. RIPE RIPEstat, MENOG 14 4. Finding Abuse Contacts & Reporting Abuse Take action in an abuse case with the Abuse Contact Finder
 18 Go to “Use Cases” > “Looking For Abuse Information” In-depth information about abuse Enter the IP address
  19. 19. RIPE RIPEstat, MENOG 14 4. Finding Abuse Contacts & Reporting Abuse 19 Email contact to report abuse to Rating of the contact
  20. 20. RIPE RIPEstat, MENOG 14 4. Finding Abuse Contacts & Reporting Abuse 20 Details about the resource and abuse contact:
  21. 21. RIPE RIPEstat, MENOG 14 4. Finding Abuse Contacts & Reporting Abuse Tasks: ! _ What is the abuse contact for 193.0.20.22 or the hotel network? _ Check an IP address from your home network _ Discussion: 
 What can you do in these cases? _ No abuse contact found _ No response on an abuse report 21
  22. 22. RIPE RIPEstat, MENOG 14 5. Let’s BGPlay! • Use BGPlay to see how your network is routed - BGPlay is a tool that show routing history in an animated and highly-interactive manner ! • Go to: https://stat.ripe.net/widget/bgplay 22
  23. 23. RIPE RIPEstat, MENOG 14 5. Let’s BGPlay! 23 Interactive graph visualisation Control timeline BGP event, ASN or ASN path details Selection timeline Control panel: - Covered time period - RRC selection
  24. 24. RIPE RIPEstat, MENOG 14 5. Let’s BGPlay! 24 Examples: ! - Prefix with announcements & withdrawals:
 84.205.64.0/24 - Check IPv6 connectivity:
 2001:67c:2e8::/48 - Multi-homed prefix:
 199.7.80.0/24
  25. 25. RIPE RIPEstat, MENOG 14 5. Let’s BGPlay! Tasks: ! _ Find the up-stream provider for AS1205 _ Is AS3333 multi-homed? _ Check the IPv6 connectivity of your own network 25
  26. 26. RIPE RIPEstat, MENOG 14 6. Embedding Widgets On Your Own Site Embedding widgets ! _ What is the concept?
 Widgets are based purely on web standards and were developed with embeddability in mind. Every widget available via the RIPEstat web interface can be embedded on your own site.
 _ RIPEstat Widget API documentation: https://stat.ripe.net/docs/widget_api
 26
  27. 27. RIPE RIPEstat, MENOG 14 6. Embedding Widgets On Your Own Site 27 Prefix Count widget AS Path Length widget This ISP embedded widgets on its page.
  28. 28. RIPE RIPEstat, MENOG 14 6. Embedding Widgets On Your Own Site (Task) Tasks: ! _ Create a simple dashboard page to monitor your network _ Create a simple HTML page _ download the sample page: 
 https://stat.ripe.net/widgets/menog/widget_home.html _ Embed three widgets of your choice _ Make the widget smaller and remove the RIPEstat logo 28
  29. 29. RIPE RIPEstat, MENOG 14 7. RIPEstat Data API Using raw data output ! _ What is the concept?
 The RIPEstat Data API provides the lowest level of access to data. This data can be fed into custom applications or just used for scripting.
 _ RIPEstat Widget API documentation: https://stat.ripe.net/docs/data_api
 29
  30. 30. RIPE RIPEstat, MENOG 14 7. RIPEstat Data API (Task) Tasks: ! _ Use your browser to retrieve all announced prefixes for the AS6412 _ A simple check on your resource if it is seen on the Internet: _ Create a simple script using resource-overview or routing-status 30
  31. 31. RIPE RIPEstat, MENOG 14 8. RIPE Atlas Creating a user-defined measurement ! _ https://atlas.ripe.net
 
 31
  32. 32. RIPE RIPEstat, MENOG 14 9. Create a Nagios check (optional) _ Create a Nagios check using the RIPEstat Data API _ Nagios is a monitoring tool that supports the development of custom checks (like other similar tools) ! _ Result codes for a check show the state: 
 
 32 State Result Code Ok 0 Warning 1 Error 2
  33. 33. RIPE RIPEstat, MENOG 14 9. Create a Nagios check (optional) Example of a Python based check:
 
 33 if args.transit:! transit = args.transit.split(',')! origin = args.origin.split(',')! nagios_status = 0! origin_errors = 0! transit_errors = 0! nagios_message = ""! url = "https://%s/data/looking-glass/data.json?resource=%s" % (args.statserver, urllib2.quote(args.prefix, ''))! lookingglass_raw = urllib2.urlopen(url)! lookingglass_json = json.load(lookingglass_raw)! if lookingglass_json['data_call_status'] != "supported":! print "WARN: %s is under maintance " % (args.statserver)! sys.exit(1)! for rrc in lookingglass_json['data']['rrcs']:! for peer in lookingglass_json['data']['rrcs'][rrc]['entries']:! aspath = peer['as_path'].split()! details = peer['details'][0].split()! peer_addr = details[0]! nexthop = details[2]! router_id = details[3]! ! if len(aspath) > args.minpath:! if aspath[-1] not in origin :! origin_errors += 1! nagios_message = nagios_message + ( "Origin missmatch %s (%s): %s; " % (rrc, peer_addr, aspath[-1]))! if args.transit:! if aspath[-2] not in transit :! transit_errors += 1! nagios_message = nagios_message + ( "Transit missmatch %s (%s): %s; " % (rrc, peer_addr, aspath[-2]))! ! if origin_errors == 0 and transit_errors == 0:! nagios_message = "OK: %s Origin is %s " % (args.prefix, args.origin)! if args.transit:! nagios_message = "%s and all transits match %s" % (nagios_message, args.transit) ! elif origin_errors >= args.crit or transit_errors >= args.crit:! nagios_status = 2! nagios_message = "ERROR: " + nagios_message! elif origin_errors >= args.warn or transit_errors >= args.warn:! nagios_status = 1! nagios_message = "WARN: " + nagios_message!

×