Python For Network Engineer 3
Python For Network Engineers 3
(1) Backup switch configurations
Ubuntu-1
- Create and modify “getconfigs.py” script (Figure 1)
- Add comments
- Use “strip()” to removes any leading (spaces at the beginning) and trailing (spaces at the end) characters (space is the default leading character to remove)
- Use “read_all” to get all the written output
- Use “w” to enable read write
- > open(“switch” + HOST, “w”)
- > “write” and “close”
- Run the script (Figure 2)
- Use “ls” to see the just now created files
- Read the running config files (Figure 3)
- Use “less” for easy navigation
(2) Jupyter Python Clients (3.0 and 2.7)
Lab Overview
- Jupyter: an open-source web application that allows you to create and shares codes, and etc.
- Jupyter 2.7 (Figure 1)
- Jupyter 3.0 (Figure 2)
- Network Topology (Figure 3)
- Initialize the Router and Jupyter clients (IP addressing, and Router telnet access)
Jupyter Client
0 Comments