Run Automated Ping with Python Napalm

Опубликовано: 05 Октябрь 2024
на канале: Mohammad Hamdy El-Sayed
617
like

A python script with the support of Napalm library and ping API is built on Linux ubuntu desktop to connect to Huawei NE40E router, and ping remote ip then get the result of the ping request printed with pprint.
///
Huawei Network Automation Playlist:    • Huawei Network Automation (Python 3 a...  
///
Links used in the video:
Napalm: https://napalm.readthedocs.io/en/latest/
Napalm community for Huawei on Github: https://github.com/napalm-automation-...
///
Lab setup videos:
Enable SSH on NE40E router:    • Network Login to Huawei router (Telne...  
Networking Ubuntu Linux with Huawei Routers:    • Networking Ubuntu Linux with Huawei R...  
Install Python 3.6, Netmiko, and Paramiko:    • Install Python 3.6 and Netmiko for Ub...  
///
My website: https://www.mohammadhamdy.com
mohammadhamdy.com is an on-demand IT and Datacom Networks learning platform where you can choose your course matching your requirements, start, and end it any time at your own pace with lifetime access.
See list of courses from here: https://www.mohammadhamdy.com/courses...
///
Connect with me on Social Media:
Linkedin:   / mohammadhamdy  
YouTube channel:    / mohammadhamdyelsayed  
Facebook:   / labsontrack  
///
Know more about my profile and my courses on Udemy on this link:
https://www.udemy.com/user/mohammad-h...
///
Know more about me on this link: https://www.mohammadhamdy.com/about.html
///
Python script code:
#!/usr/bin/env python

from napalm import get_network_driver
import pprint

driver = get_network_driver('huawei_vrp')
device = driver(hostname='10.1.1.2', username='huawei', password = 'Hamdy@123')
device.open()

ping_remote_ip = device.ping('10.1.1.9')

pprint.pprint(ping_remote_ip)
///
Huawei NE40E
Python 3
Napalm
Automated Ping
ICMP
Ubuntu Linux
Huawei IP Networks
Huawei Datacom
///
#networkautomation #python #ubuntulinux #hcie #hcip #huawei #ip #network #networks #router #routers #datacom #ping #icmp