Check out the new V6 release
3 minute read
End to end path simulation with IP Fabric's API
Updated: November 8, 2022

End to end path simulation with IP Fabric's API

The ability to perform end to end path simulation quickly across complex network environments means fast response to any issues or current design process requirements. The main reason that computer networks are built is to enable communication between two or more endpoints and the whole ecosystem is created for sharing information as efficiently as possible.

The IP Fabric platform is a unique tool that is capable of extremely fast end to end path simulation only by presenting the source IP (and VRF) and destination IP with port and protocol. Any application path can be technically verified from an operational perspective within seconds and without any extensive command-line knowledge just with read-only access to the platform.

End to End path simulation in IP Fabric's GUI

In companies and organizations using IP Fabric, an End-to-End path simulation is often a go-to tool for technical teams that tend to use the network in any way. It can be a server, application, or helpdesk team.

The API request for E2E path

Our previous articles are covering authentication and changing the settings via API. I strongly recommend reading them prior to testing the End to End over API. It will help with a basic understanding of workflows related to IP Fabric's API.

Now it's a good time to discover the endpoint with all its parameters.

# API Endpoint: 
apiEndpoint = 'https://ipfServerUrl/api/v1/graph/end-to-end-path'

# API Parameters:
e2eParams = {
     'e2eEndpoint' :  apiEndpoint,
     'sourceIP' : '?source=',
     'destinationIP' : '&destination=',
     'sourcePort' : '&sourcePort=10000',
     'destinationPort' : '&destinationPort=22',
     'asymetricOption' : '&asymmetric=false',
     'rpfOption' : '&rpf=true',
     'protocolType' : '&protocol=tcp',
     'snapshotID' : '&snapshot=696aee04-7370-47cf-bbcc-ef86d1bc5244',

In the previous Python3 snippet, we prepared the e2eParams object consisting of many keys and associated values. The API endpoint is a combination of the base and additional parameters, such as source and destination IP address, destination port, protocol type, and the snapshot ID.

The snapshot ID has to be defined and can be collected with GET request from 'https://ipfServerUrl/api/v1/snapshots'

As a next step, we can build the query to which we point the GET request towards:

e2eQuery = ''
for val in e2eParams.values(): e2eQuery += val

When the endpoint string is complete, we will simply send a GET type request. As a response, we get a full and detailed E2E path with each and every hop. For that purpose we can reuse the function from previous articles related to API webinar:

def e2ePath(e2e, e2eHeaders):
    e2eGet = requests.get(e2e, headers=e2eHeaders, verify=False)
    if e2eGet.ok: print(' The E2E path simulation is ready.')
    else: print(' UNABLE to simulate E2E: ' + e2eGet.text)
    return e2eGet

path = e2ePath(e2eQuery, authHeaders)

API response for E2E request

In the response we 3 main dictionary keys provided:

  • graph - simulation details
  • ad - list of Sites that the simulation traverses
  • error - in case of any path errors
>>> e = e2ePath(e2eQuerry, headers)
The E2E path simulation is ready.

>>> e.json().keys()
dict_keys(['graph', 'ad'])

>>> e.json()['ad']

>>> e.json()['graph'].keys()
dict_keys(['nodes', 'lookup', 'edges', 'type'])

>>> for node in e.json()['graph']['nodes']: print(node['hostname'])
L66ACC23  <<< HOST

In the Python3 console outputs above we requested the path from IP Fabric. Then we quickly observed available keys, and as a last step printed list of network devices that the path is using.

Advantages of path simulation over API

The End to End application path simulation in IP Fabric's GUI is a powerful and fast troubleshooting tool. It's interactive and each routing or switching hop can be investigated individually as well.

End to End path simulation in diagrams

But still, there are advantages for API simulation over GUI one. At first, the output in JSON format is ready for non-standard applications. Verifications like what are the IP hops and interfaces used on the path can be easily obtained. Secondly, the API call for path testing can be faster for testing across more than one snapshot.

Another great advantage can be integration plans with other tools. The end to end testing engine is ready to provide answers at a speed of light fashion.

Thank you for reading!

If you have found this article helpful, please follow our company’s LinkedIn or Blog, where there will be more content emerging. Furthermore, if you would like to test our platform to evaluate how it can assist you in managing your network more effectively, please let us know through


Try out the platform

Test out IP Fabric’s automated network assurance platform yourself and be inspired by the endless possibilities.

What would this change for your network teams?
Start live demo
We're Hiring!
Join the Team and be part of the Future of Network Automation
Available Positions
IP Fabric, Inc.
115 BROADWAY, 5th Floor
NEW YORK NY, 10006
United States
This is a block of text. Double-click this text to edit it.
Phone : +1 (914) 752-2991
Email : [email protected]
IP Fabric s.r.o.
Kateřinská 466/40
Praha 2 - Nové Město, 120 00
Czech Republic
This is a block of text. Double-click this text to edit it.
Phone : +420 720 022 997
Email : [email protected]
IP Fabric UK Limited
Gateley Legal, 1 Paternoster Square, London,
England EC4M 7DX
This is a block of text. Double-click this text to edit it.
Phone : +420 720 022 997
Email : [email protected]
IP Fabric, Inc. © 2023 All Rights Reserved