MY GNS3 NETWORK PROGRAMMABILITY SETUP

Quick introduction to network programmability with python’s telnet and ssh libraries using GNS3 network emulator.

oluyede Segun (jr)

--

INTRODUCTION

This project shows a practical way to get started with network programmability in python using GNS3 network emulator.

GOAL: using python telnet and ssh scripts to configure loopback interfaces and Routing protocol (eigrp) on router, and configure switch vlans and interface loopback. Also shows a simple setup on GNS3.

NB: To better understand the GNS3 installation and lab setup used in this project, read:

https://juniorboyboy2.medium.com/setting-up-gns3-and-gns-vm-network-emulator-1e78c8ccec0c

What is Network programmabilty?

Network programmability means abstracting a computer network such that it appears as a single device that can be manipulated with specialized software, APIs or programming languages, or within existing software.

NB: The Python telnet library/package is called: telnetlib, while the Python ssh libraries are: paramiko and netmiko, but netmiko was used in this project, because it is more simpler and flexible than paramiko.

OUTLINE:

1. SETUP AND CONFIGURATION OF UBUNTU DOCKER LAPTOP, ROUTER AND CISCO-SWITCH.

2. PYTHON SCRIPTS TO CONFIGURE ROUTER AND SWITCH.

1. SETUP AND CONFIGURATION OF UBUNTU DOCKER LAPTOP, ROUTER AND CISCO SWITCH:

1.1 Connect devices in GNS3.

Connect devices in GNS3 as shown above

1.2 Configure the laptop running the ubuntu docker container, update and install , and run python telnet and ssh scripts to configure router and switch

edit laptop config
run commands to update and install ubuntu packages
python telnet scripts for router configuration with nano
python telnet scripts for switch configuration with nano
python ssh scripts for switch configuration with nano
directory containing configuration scripts
run python script to configure router

1.3. on the cisco switch

configure vlan1
configure switch username and password and allow external connections
save config

1.4 on the router

configure router interface ip address
view router interface ip address
configure router username and password and allow external connections
save router configuration

2. Python Scripts to configure router and switch

2.1 Python telnet script to configure interface loopback and eigrp on router

python telnet script to configure interface loopback and eigrp on router

2.2 Python telnet script to configure vlan on switch

python telnet script to configure vlan on switch

2.3 Python ssh script to configure vlan and loopback interface on switch

python ssh script to configure vlan on switch

3.CONCLUSION

I demonstrated Network programmabilty for automation and configuration of network devices with python telnet and ssh libraries using GNS3. This concept makes network administration more efficient.

WRITER: OLUYEDE SEGUN . A(jnr)

LINK TO GNS3 FILE: https://projectsss.s3.us-east-2.amazonaws.com/networkpythonprog.gns3

LINK TO PYTHON SCRIPTS: https://github.com/juniorboycoder/GNS3_NETWORK_PROGRAMMABILTY

REFERENCES:

https://www.youtube.com/watch?v=IhroIrV9_7w&list=PLhfrWIlLOoKPn7T9FtvbOWX8GxgsFFNwn&index=2

https://codingnetworks.blog/network-programmability-and-automation-introduction/

linkedin profile:

https://www.linkedin.com/in/oluyede-segun-adedeji-jr-a5550b167/

twitter profile: https://twitter.com/oluyedejun1

TAGS: #NETWORKING #CISCO #ROUTER #SWITCH #GNS3 #NETWORKPROGRAMMABILITY #PYTHON

--

--

oluyede Segun (jr)

Certified I.T specialist | Computer Network Admin | Cloud | Artificial intelligence ( Machine Learning & Data Science),& webdev. python/JavaScript language