Paris | 9 March 2016
Daniel Karrenberg Massimo Candela
Science Division RIPE NCC
RIPE Atlas Workshop
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 2
Goals• Learn how to:
- Benefit from using RIPE Atlas measurements for network monitoring and troubleshooting
- Use API calls and Command line tool to create and inspect measurements
- Write code to manipulate Atlas data
- Receive measurement results in real-time
• Get your questions answered by a developer
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 3
Prerequisites
• Do you have a RIPE NCC Access account? • If not - quickly create one: ripe.net/register
• Do you have credits to spend? • Redeem this voucher “cisco-paris-atlas” on https://
atlas.ripe.net/user/credits/
Introduction to RIPE Atlas
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 5
• RIPE Atlas is a global active measurements platform
• Probes hosted by volunteers
• Data publicly available
• "RIPE Atlas: A Global Internet Measurement Network" (PDF). Internet Protocol Journal 18. September 2015. ISSN 1944-1134.
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 6
RIPE Atlas numbers
•9,300+ probes connected (170+ Anchors)
•3,700+ results collected per second
•35,000+ user-defined measurements weekly - Five types of user-defined measurements available to probe
hosts and RIPE NCC members: ping, traceroute, DNS, SSL, NTP
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 7
RIPE Atlas coverage
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 8
RIPE Atlas results
• Ongoing global measurements towards root nameservers - Visualised as Internet traffic maps
• Ongoing regional measurements towards “anchors”
• Users can run customised measurements - ping, traceroute, DNS, SSL/TLS, NTP and HTTP
Measurement Results
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 10
Looking up measurements results• Go to “Measurements, Maps and Tools” >
“Measurements”
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 11
RIPE Atlas REST APIs• List of scheduled measurements
- https://atlas.ripe.net/api/v2/measurements/
- https://atlas.ripe.net/api/v2/measurements/{TYPE}/
• Information about a specific measurement - https://atlas.ripe.net/api/v2/measurements/{ID}/
• Results of a specific measurement - https://atlas.ripe.net/api/v2/measurements/{ID}/results
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 12
RIPE Atlas REST APIs• List of probes
- https://atlas.ripe.net/api/v2/probes/
• Information about a specific probe - https://atlas.ripe.net/api/v2/probes/{ID}
• List of anchors - https://atlas.ripe.net/api/v2/anchors/
• Information about a specific anchor - https://atlas.ripe.net/api/v2/anchors/{ID}
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 13
RIPE Atlas REST APIs• List of measurements targeted to an anchor
- https://atlas.ripe.net/api/v2/anchor-measurements/
• Info about a specific anchor measurement - https://atlas.ripe.net/api/v2/anchor-measurements/{ID}
V2 has been not released yet The format may change
Documentation: https://atlas.ripe.net/docs/rest/
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 14
Available visualisations• List of probes:
sortable by RTT
• Map: colour-coded by RTT
• LatencyMON: compare multiple latency trends
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 15
LatencyMON
Creating a Measurement
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 17
Benefits of your own measurements• A customer reports a problem: he cannot
reach one of your servers - You can schedule measurements (e.g. pings or
traceroutes) from up to 500 RIPE Atlas probes worldwide to check where the problem might be
• Measuring packet loss on a suspected “bad” link
• Testing anycast deployment
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 18
Credits system• Running your own measurements cost credits
- ping = 10 credits, traceroute = 20, etc.
• Why? Fairness and to avoid overload
• Daily spending limit & max measurements user can create
• Hosting a RIPE Atlas probe earns credits
• Earn extra credits by:
- Being a RIPE NCC member
- Hosting an anchor
- Sponsoring probes
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 19
Credits overview
My Atlas > Credits
Give credits to someone
DEMOCreate a Measurement (GUI) Explore advanced parameters
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 21
Using API to schedule a measurement • Using command-line & scripting:
- https://atlas.ripe.net/docs/measurement-creation-api/
- https://atlas.ripe.net/keys/
• You will need API keys - To create measurements without logging in
- To securely share your measurement data
DEMOCreate an API key
Create a Measurement (API)
ExerciseCreate a Measurement
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 24
Tasks• Create a TCP traceroute measurement:
- Involving 10 probes
- The closest five at the workshop location (Issy-les-Moulineaux)
- Another random five from another country of your choice
- To a target of your choice
- Duration of two days
- Repeated every 60 seconds
1. Model a measurement using the GUI
2. Create API key
3. Schedule a measurement using the API
Code with RIPE Atlas
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 26
RIPE Atlas Sagan• A translation layer for RIPE Atlas
measurement results - https://github.com/RIPE-NCC/ripe.atlas.sagan
- pip install ripe.atlas.sagan
• Transforms JSON results in Python objects
• The output is firmware version transparent
• Pre-computes useful attributes (e.g. Does a traceroute reach the target host?)
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 27
RIPE Atlas Cousteau• A python wrapper around RIPE Atlas API
- https://github.com/RIPE-NCC/ripe-atlas-cousteau
- pip install ripe.atlas.cousteau
• Fetches results from API and streaming, and probe and measurement information
• You can manage measurements: - Create a measurement
- Stop a measurement
- Change probes involved
DEMOFetching and Creating a Measurement with
RIPE Atlas Cousteau
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 29
RIPE Atlas Cousteau Demo• Fetch results
- https://github.com/RIPE-NCC/ripe-atlas-cousteau#fetch-results
• Fetch real-time results - https://github.com/RIPE-NCC/ripe-atlas-cousteau#fetch-real-time-
results
• Create a measurement - https://github.com/RIPE-NCC/ripe-atlas-cousteau#creating-a-
measurement
• More - https://github.com/RIPE-NCC/ripe-atlas-cousteau
ExerciseCreate a Measurement by Using RIPE
Atlas Cousteau
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 31
Tasks• Create a ping measurement:
- Involving 10 probes worldwide
- Targeting www.google.fr
- One-off
• Annotate the measurement ID returned
• Fetch the results after a few minutes (no real-time)
Real-time performance monitoring
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 33
RIPE Atlas streaming• RIPE Atlas streaming is an architecture that
allows users to receive the measurement results as soon as they are sent by the probes - in real time - Publish/subscribe through web sockets
• There are three types of data: - Measurement results
- Probe connection status events
- Measurements metadata
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 34
RIPE Atlas streaming• Visualising network outages
-http://sg-pub.ripe.net/demo-area/atlas-stream/conn/
• Real-time server and performance monitoring
• Filtering and reusing measurement results
• Documentation: - https://atlas.ripe.net/docs/result-streaming/
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 35
How it Works (Client)1.Create a socket
2.Create a callback (function) - for each event type
- to be executed for each message received
3.Start listening the channel
4.Declare what you want to receive for that event type
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 36
How it Works (Client)
ExerciseUsing streaming API
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 38
EX1: Monitoring server reachability • Scenario: customers are complaining that it
occasionally takes a long time to reach your service or server
• Action: ping your server from 500 probes - Decide what is acceptable latency threshold to apply
- Notice and react when you start receiving samples
• Task: Use the ping measurement ID 2340408 - Choose which threshold (e.g. greater than 30ms)
- Imposes the threshold on “min” (the minimum result of the three ping attempts)
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 39
Steps
1.Go to http://atlas.ripe.net/webinar/streaming01.html
2.Open the development console
3.Wait for results to arrive
4.Save the HTML file locally and edit the code
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 40
Page Source
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 41
Example of results
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 42
EX2: Monitoring server reachability • Imagine you are in the situation described in
the exercise before, but you didn’t schedule a measurement in advance - You don’t have a measurement ID
• You want to get all the measurements reaching 193.0.10.197
• Now restrict the results to just include ping measurements
Command-line Interface (CLI) Toolset
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 44
RIPE Atlas CLI• Network troubleshooting for command line
pros
• Familiar output (ping, dig, traceroute)
• Linux/OSX - http://ripe-atlas-tools.readthedocs.org/en/latest/
installation.html#requirements-and-installation
• Windows [experimental] - https://github.com/chrisamin/ripe-atlas-tools-win32
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 45
RIPE Atlas CLI• Open source
- RIPE NCC led community contribution
• Documentation - https://ripe-atlas-tools.readthedocs.org/
• Source: - https://github.com/RIPE-NCC/ripe-atlas-tools/
• How to contribute: - https://github.com/RIPE-NCC/ripe-atlas-tools/blob/master/
CONTRIBUTING.rst
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 46
Configure RIPE Atlas CLI• Reuse the API key of the previous exercise
- Or create a new one at https://atlas.ripe.net/keys/
• Configure your CLI - ripe-atlas configure --set authorisation.create=MY_API_KEY
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 47
Fetch an existing measurement• Fetch the ping measurement 2340408
- ripe-atlas report 2340408
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 48
Search probes• Search all probes in AS 3333
- ripe-atlas probes --asn 3333
• Show specific fields - ripe-atlas probes --asn 3333 --field asn_v6 --field country
--field is_public --field description --field status
• Search for probes in and around Paris - ripe-atlas probes --location "Paris, France" --radius 15
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 49
Create a measurement• Create a ping measurement to wikipedia.org
- One-off, default parameters
- ripe-atlas measure ping --target wikipedia.org
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 50
Other examples of ping• Geo-specific from 20 probes from Canada:
- ripe-atlas measure ping --target example.com --probes 20 --from-country ca
• 20 Canadian probes that definitely support IPv6: - ripe-atlas measure ping --target example.com --probes 20
--from-country ca --include-tag system-ipv6-works
• Create a recurring measurement: - ripe-atlas measure ping --target example.com --interval
3600
ExerciseUsing RIPE Atlas CLI
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 52
Search probes• Use the traceroute command to test the
reachability of wikipedia.org on TCP port 443 from 20 probes in France
• Render the results collected in the previous exercise in json format
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 53
Search probes• Use the traceroute command to test the
reachability of wikipedia.org on TCP port 443 from 20 probes in France - ripe-atlas measure traceroute --protocol TCP --target
wikipedia.org --port 443 --probes 20 --from-country fr
• Render the results collected in the previous exercise in json format - ripe-atlas report {MSM_ID} --renderer raw
Take part in the RIPE Atlas community
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 55
RIPE Atlas community (part 1)• Individual volunteers host probes in homes or
offices
• Organisations host RIPE Atlas Anchors
• Sponsor organisations give financial support or host multiple probes in their own networks
Daniel Karrenberg | Massimo Candela | RIPE Atlas workshop | 9 March 2016 56
Contact us• https://atlas.ripe.net & http://roadmap.ripe.net/
ripe-atlas/
• Users’ mailing list: [email protected]
• Articles and updates: https://labs.ripe.net/atlas
• Questions and bugs: [email protected]
• Twitter: @RIPE_Atlas and #RIPEAtlas
Top Related