Lab Exercise 7: Basic Device Configuration with Netmiko
Objective: Connect to a Cisco device using Python and Netmiko, enter enable mode, configure a loopback interface, and save the current configuration.
Instructions
1. Set Up Connection:
Define the connection details for the Cisco device using the dictionary below.
The device should use the following details:
```python
connection = {
'host': '192.168.122.100',
'username': 'ul',
'password': 'cisco',
'secret': 'cisco',
'device_type': 'cisco_ios'
}
```
2. Write the Script:
Write a Python script that:
1. Connects to the device using Netmiko.
2. Enters enable mode.
3. Enters global configuration mode.
4. Configures a loopback interface (Loopback0) with an IP address (10.10.10.1 255.255.255.0).
5. Saves the current configuration using save\_config().