2.17 LAB: Network Automation (modules) In network administration, many admins will use a VLAN (Virtual Local Area Network) to create logical subnetworks. The advantages of this type of a setup is better confinement of broadcast domains, reduced broadcast traffic and more efficient maintenance of the network. The admin can group network nodes that are physically dispersed into similar broadcast domains for improved network traffic management. Configuration of VLANS on multiple switches can be very time consuming. Python scripts can help automate tasks reducing the need to physically go from switch to switch. Minimal configuration variables may include VLAN name, VLAN number, and Network device. The main.py template provides a list of 5 network switch names. The script will simulate the configuration of those 5 devices. Define the VLANSetup class in VLANSetup.py with a constructor to initialize a VLAN's information. The constructor should by default initialize the VLAN's name to "None" and the VLAN number to 0. Define the NetManage class in NetManage.py with a constructor to initialize a device's hostname. The constructor should by default initialize the Network device to "None" and add a VLANSetup object. Add an import statement to import the VLANSetup class. Add import statements to main.py to import the VLANSetup and NetManage classes. Ex: If the input is: Voice 10 the output is: Configuring VLAN: 10 Connecting to: Switch1 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch2 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch3 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch4 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch5 Sending Config vlan: 10 Sending Config name: Voice If the input is: Data 20 the output is: Configuring VLAN: 20 Connecting to: Switch1 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch2 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch3 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch4 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch5 Sending Config vlan: 20 Sending Config name: Data
2.17 LAB: Network Automation (modules)
In network administration, many admins will use a VLAN (Virtual Local Area Network) to create logical subnetworks. The advantages of this type of a setup is better confinement of broadcast domains, reduced broadcast traffic and more efficient maintenance of the network. The admin can group network nodes that are physically dispersed into similar broadcast domains for improved network traffic management.
Configuration of VLANS on multiple switches can be very time consuming. Python scripts can help automate tasks reducing the need to physically go from switch to switch. Minimal configuration variables may include VLAN name, VLAN number, and Network device.
The main.py template provides a list of 5 network switch names. The script will simulate the configuration of those 5 devices.
Define the VLANSetup class in VLANSetup.py with a constructor to initialize a VLAN's information. The constructor should by default initialize the VLAN's name to "None" and the VLAN number to 0.
Define the NetManage class in NetManage.py with a constructor to initialize a device's hostname. The constructor should by default initialize the Network device to "None" and add a VLANSetup object. Add an import statement to import the VLANSetup class.
Add import statements to main.py to import the VLANSetup and NetManage classes.
Ex: If the input is:
Voice 10the output is:
Configuring VLAN: 10 Connecting to: Switch1 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch2 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch3 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch4 Sending Config vlan: 10 Sending Config name: Voice Configuring VLAN: 10 Connecting to: Switch5 Sending Config vlan: 10 Sending Config name: VoiceIf the input is:
Data 20the output is:
Configuring VLAN: 20 Connecting to: Switch1 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch2 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch3 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch4 Sending Config vlan: 20 Sending Config name: Data Configuring VLAN: 20 Connecting to: Switch5 Sending Config vlan: 20 Sending Config name: Data![entry level cyber
* Home
Content
zy Section 2.17 - CYE X
O ITS128 Fall 2020
[Solved] Your out x
b My Questions | b
[Solved] In netwo X
+
i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/17
Q
= zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.17: LAB: Network Automation (modules)
B zyBooks catalog
? Help/FAQ
Kenneth Schultz -
ACTIVIIT
Current file: main.py
Load default template...
1 # TODO: Import VLANSetup from VLANSetup.py and NetManage from NetManage.py
2
3
4 if
name
== "
main ":
devicelist = ['Switch1', 'Switch2', 'Switch3', 'Switch4', 'Switch5']
user_VLAN_name = input ()
user_VLAN_number = int(input ()) #10 -> 200
5
7
8
for d in devicelist:
user_device = VLANSetup(user_VLAN_name, user_VLAN_number)
new_config = NetManage (d, user_device)
new_config.print_info()|
10
11
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
Develop mode
Submit mode
second box.
Enter program input (optional)
Voice
10
main.py
Run program
Input (from above)
Output (shown below)
(Your program)
Program output displayed here
Configuring VLAN: 10
Connecting to: Switch1
Sending Config vlan: 10
2:15 AM
O Type here to search
口
77°F Cloudy
9/17/2021](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7ef9d07b-5934-4723-aca6-faf08a622511%2F9bb279c3-11e0-40cc-8bf5-ef2e636e3ee3%2Fshf870m_processed.png&w=3840&q=75)
![entry level cyber
* Home
Content
zy Section 2.17 - CYE X
O ITS128 Fall 2020
[Solved] Your out x
b My Questions | b
[Solved] In netwo X
+
i learn.zybooks.com/zybook/CYB_135_54915392/chapter/2/section/17
= zyBooks My library > CYB/135: Object-Oriented Security Scripting home > 2.17: LAB: Network Automation (modules)
E zyBooks catalog
? Help/FAQ
Kenneth Schultz -
2.17 LAB: Network Automation (modules)
In network administration, many admins will use a VLAN (Virtual Local Area Network) to create logical subnetworks. The advantages of this
type of a setup is better confinement of broadcast domains, reduced broadcast traffic and more efficient maintenance of the network. The
admin can group network nodes that are physically dispersed into similar broadcast domains for improved network traffic management.
Configuration of VLANS on multiple switches can be very time consuming. Python scripts can help automate tasks reducing the need to
physically go from switch to switch. Minimal configuration variables may include VLAN name, VLAN number, and Network device.
The main.py template provides a list of 5 network switch names. The script will simulate the configuration of those 5 devices.
Define the VLANSetup class in VLANSetup.py with a constructor to initialize a VLAN's information. The constructor should by default
initialize the VLAN's name to "None" and the VLAN number to 0.
Define the NetManage class in NetManage.py with a constructor to initialize a device's hostname. The constructor should by default
initialize the Network device to "None" and add a VLANSetup object. Add an import statement to import the VLANSetup class.
Add import statements to main.py to import the VLANSetup and NetManage classes.
Ex: If the input is:
Voice
10
the output is:
Configuring VLAN: 10
Connecting to: Switchl
Sending Config vlan: 10
Sending Config name: Voice
Configuring VLAN: 10
Connecting to: Switch2
Sending Config vlan: 10
Sending Config name: Voice
2:15 AM
O Type here to search
77°F Cloudy
9/17/2021](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7ef9d07b-5934-4723-aca6-faf08a622511%2F9bb279c3-11e0-40cc-8bf5-ef2e636e3ee3%2F3g8llmf_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)