Question: Objectives:In this assignment, you will write a Python script to automate Telnet connections to devicessimulated in GNS 3 ( Graphical Network Simulator - 3 )

Objectives:In this assignment, you will write a Python script to automate Telnet connections to devicessimulated in GNS3(Graphical Network Simulator-3). GNS3 is a popular network simulationtool used to create and emulate complex network topologies. Your task is to develop aPython script that establishes Telnet connections to multiple devices within a GNS3 networktopology and performs basic operations such as sending commands and retrieving outputfrom the devices. Write a Python script to connect to a GNS3 device via Telnet. Send commands to the device and capture the output. Utilize Telnet libraries to automate network configuration tasks.Assignment Tasks:In your GNS3 topology, you have a Cisco router (RouterA) and want to automate itsconfiguration using a Python script. The script should:1. Connect to RouterA using Telnet.2. Enter the enable mode.3. Configure hostname of the router as your student number.4. Configure an appropriate message of day.5. Configure a static route on the connected interface (e.g.,192.168.12.9 onGigabitEthernet 0/0).6. Display the current routing table.7. Disconnect from the Telnet session.Getting Started:1. Familiarize yourself with Telnet commands for Cisco routers.2. Import the telnetlib library in your Python script.3. Define the IP address, username, and password for RouterA.4. Utilize the telnetlib library to establish the Telnet connection.5. Employ read_until() or similar methods to capture device responses.6. Encode commands as bytes before sending them using write().7. Close the Telnet connection using close().Presentation/Submission Guidelines: Present your Python script as a .py file along with the assignment report (PDF orWord document) that should include well explained screenshots of your scripts. Ensure that your code is well-documented and follows best practices in Pythonprogramming.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!