- Write and execute a Python script that displays the routers uptime information and load averages on the screen. First, create a code skeleton based on the one provided on the slides and make sure that you:
- access the correct networking device
- import the necessary libraries,
- use the try/except/finally blocks as shown on the slides and handle exceptions occurred during the NETCONF session.
- Connect to the device and make sure that the connection is successful.
- Add code that calls the correct RPC (hint: the corresponding CLI command is: show system uptime), and dump the RPC response on the screen to see if the RPC call was successful.
- Add code that extracts the following information from the RPC response, and displays it on the screen:
- the system boot time (the date and the time the device was last booted), the number of days, hours and minutes the device has been up and running, the 1-minute, 5-minute and 15-minute load average values.
Part II
- Write and execute a Python script that displays the following information about all 16 physical interfaces in your router:
- the interface name (e.g. ge-0/0/5)
- the administrative status (up or down)
- the operational status (up or down)
- if the operational status is up it should also display the IPv4 address configured on that interface (this is called the local interface address)
- its MAC address (it is called the hardware physical address)
Make sure that you catch and handle all exceptions that may occur during the NETCONF session. Hint: the corresponding CLI command is: show interfaces ge*, where the interface name pattern ge* will become an RPC parameter.
1

![[Solved] ENTS749E Lab 4-Pull Operational Data](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] ENTS749E Lab 7-Ansible OSPF](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.