In the previous video, we have done looping to do configuration on multiple router at once. 2
Next in this video, we are going to learn about write configuration. 3
Remember that in cisco, the configuration is not saved automatically. 4
Let’s check here, 5
do show ip interface brief exclude unassign. 6
Here we can see that we have loopback0 until 2, but we don’t save this configuration yet. 7
If the router is suddenly restart or shutdown, the configuration will be gone. Let’s try, 8
stop the router, and then start again. 9
Let’s see the interface again, do show ip interface brief exclude unassign. 10
Here we can see that loopback0 until 3 is gone. But fa0/0 is not gone, 11
why? This is because we already save the configuration after configuring fa0/0, 12
so the last time we save the configuration is after configuring fa0/0 and ssh. 13
After configuring loopback0 until 3, we don’t save the configuration yet. 14
This is why loopback0 until 3 is gone. But configuration on fa0/0 and ssh is not gone. 15
Let’s check it, ssh cisco@10.10.10.5, this is the ip address of router 5, 16
Okay this is success, so the configuration on fa0/0 and ssh is still exists. 17
But the configuraiton of loopback0 until 2 is gone. 18
Okay, so now, let’s add the script to save the configuration. So here after configuring the 19
loopback, let’s save the configuration Here let’s add the command, do write. 20
Change the interface, let’s configure loopback3, the ip address is 10.4.1.x, save. 21
Let’s execute the script again. 22
Just enter enter here. 23
Okay here we can see that we in router 1, we success to save the configuration, 24
but in router 2, we are not success to save the configuration, 25
router 3 success, router 4 success, router 5 is also not success. 26
This is because we forget to use time sleep after do write. 27
Let’s put time sleep here, let’s say we will stop the program for 2 second. 28
Save, execute the script again, enter enter here. 29
Router 1 is success, so here configuring loopback, 30
do write is success, and we can see the result of show interface. 31
router 2 is still failed to save the configuration. Router 3 is also failed, router 4 is 32
success, router 5 is also failed. And also the show is not success. so the time sleep is not enough. 33
Let’s edit the script again, let’s change this become 3, and then in the show interface, 34
let’s change this to 1, save, execute the script again, enter enter here. 35
Router 1 is success, router 2 is success, router 3 is success, 36
router4 is success, 37
and router 5 is also success. 38
Okay so now we are success to save the configuration. 39
Let’s check it, let’s say router 5, show ip interface brief exclude unassign. 40
Here we can see that we have loopback3, 41
Shutdown the router, and then start again. 42
Now let’s check the interface again, do show ip interface brief exclude unassign. 43
Here we can see that the loopback3 is still exist. 44
Okay I think enough for this video. 45
Thank you for watching and see you on the next video.