Python Netmiko for Huawei Routers (NE40E)

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

A python code with Netmiko library is built on Linux ubuntu desktop to connect to Huawei NE40 router, and get the output of CLI command ‘display ip interface brief printed on the terminal.
///
Huawei Network Automation Playlist:    • Huawei Network Automation (Python 3 a...  
///
Links used in the video:
Netmiko: https://pypi.org/project/netmiko/
Paramiko: https://pypi.org/project/paramiko/
///
Additional Lab 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 netmiko import ConnectHandler

NE40E = {
'device_type': 'huawei',
'ip': '10.1.1.2',
'username': 'huawei',
'password': 'Hamdy@123',
}

net_connect = ConnectHandler(**NE40E)

output = net_connect.send_command('display ip int brief')

print(output)
///
Video key moments:
00:23 The definition of Netmiko and Paramiko
02:39 Writing the python code
08:22 Executing the code and testing the output
///
Huawei NE40E
Python
Python 3
Paramiko
Netmiko
Ubuntu Linux
Huawei IP Networks
Huawei Datacom
///
#networkautomation #python #ubuntulinux #hcie #hcip #huawei #ip #network #networks #router #routers #datacom