In the previous video, we have done create a script to remote multiple router at once 2
using netmiko. 3
But the script is only to show interface on each router. 4
Now in this video, we are going to do configuration on all router at once. 5
Let’s say we will try to create loopback interface on each router. 6
Let’s move this script before show ip interface brief. 7
Uncomment this. 8
Okay so here let’s say we will create 2 loopback interface on each router, loopback0 9
and loopback1, and then let’s just remove do show ip interface brief. 10
Because we already show interface brief using send_command. 11
And then let’s change the ip address of loopback based on n. 12
Let’s say the ip address of loopback 0 will be 10.1.1 and then the last number will be 13
based on n. so here we need to use f string, and then change this to n. 14
Let’s also change the ip address of loopback1, let’s say the ip address is 10.2.2.n, we 15
also need to use f string here. 16
Okay, next we send this config to the router using send_config_set. 17
After configuring the loopback, we send a command to show interface, 18
Here we print the divider, let’s move this divider before print the first output. 19
Let’s also move this script. 20
Let’s just change this to Router and then the ip address of the router. 21
Okay we have done here, save, back to the terminal, and then let’s execute the script. 22
Router 1 success, router 2 success, router 3 success, router 4 success, and router 5 is also succes. 23
Okay so now we are success to configure multiple router at once using netmiko 24
I think enough for this video. 25
Thank you for watching and see you on the next video.