0% found this document useful (0 votes)
12 views2 pages

Configuring Multiple Routers Using SSH

Uploaded by

thegaangster
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Configuring Multiple Routers Using SSH

Uploaded by

thegaangster
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LAB: Configuring Multiple Routers using SSH

In this lab, we will be using the library Netmiko, developed by Kirk Byers which is an open-source multivendor library
that is used for SSH connections to network devices. Multi-vendor library means Netmiko supports network devices
from different vendors such as Cisco, Juniper, HP, etc.

Step 1: Setting up the network device for configuration.

- Go to your eve-ng and add 3 vIOS Routers, connect the router with Cloud 1 to establish the connectivity
between the router and the Windows machine.
- Boot the router and provide IP to the management interface using DHCP.

enable
configure terminal
interface gig 0/0
ip address dhcp
no shutdown
exit

- Configure SSH on your router with the credentials: admin/cisco.

ip domain-name abc.com
cryptokey generate rsa general-keys modulus 1024
ip ssh ver 2
username admin privilege 15 password cisco
line vty 0 4
login local
transport input all
exit

- Verify the reachability by pinging the IP address of router from local device.

Step 2: Installing the library NETMIKO. (Ignore if already installed)

- Go to the terminal of your device using VS code or using cmd and run the following command to begin the
installation of the library Netmiko:

python -m pip install netmiko

Step 3: Time to begin the script for creating the loopback interface on Router.

- Import the library into your code. Getpass is used to collect the information in hidden manner.

- Collect the information about the username and password.


- Create a list of Routers which contains the IP address of all the routers.

- Create a for loop which can loop through the data of list devices and can connect to the routers of list one by
one like shown below. All of the remaining commands will be a part of this for loop.

- Save the changes permanently on router using save_config().

You might also like