This lesson is part of the Network Configuration with Netmiko Course.
In this lesson, we will cover:
- The different Netmiko methods used for configuring a device.
- How to send a list of configuration commands to a device.
- How to read and send configuration commands from a file.
- How to save/commit the configuration on a device with Netmiko.
Netmiko provides the method
send_config_set(). This method takes a
list() of commands, and then applies them to the device. Like so:
commands = [ "interface FastEthernet0/1", "switchport mode trunk", "switchport trunk allowed vlan 100,200-400", ] ios_connection.send_config_set(commands)
We can then log in to the device and confirm the changes have been made.