This post will describe the exercises and solutions for week three of Kirk Byers Python for Network Engineers.
Exercise two of week three we already completed in a previous post where we used a For loop to loop through the BGP output.
Let’s move on to exercise three instead:
III. You have the following 'show ip int brief' output. show_ip_int_brief = ''' Interface IP-Address OK? Method Status Protocol FastEthernet0 unassigned YES unset up up FastEthernet1 unassigned YES unset up up FastEthernet2 unassigned YES unset down down FastEthernet3 unassigned YES unset up up FastEthernet4 6.9.4.10 YES NVRAM up up NVI0 6.9.4.10 YES unset up up Tunnel1 16.25.253.2 YES NVRAM up down Tunnel2 16.25.253.6 YES NVRAM up down Vlan1 unassigned YES NVRAM down down Vlan10 10.220.88.1 YES NVRAM up up Vlan20 192.168.0.1 YES NVRAM down down Vlan100 10.220.84.1 YES NVRAM up up ''' From this output, create a list where each element in the list is a tuple consisting of (interface_name, ip_address, status, protocol). Only include interfaces that are in the up/up state. Print this list to standard output.
In this Continue reading
This post will describe the exercises and solutions for week three of Kirk Byers Python for Network Engineers.
The first exercise of the week is the following:
I. Create an IP address converter (dotted decimal to binary). This will be similar to what we did in class2 except: A. Make the IP address a command-line argument instead of prompting the user for it. ./binary_converter.py 10.88.17.23 B. Simplify the script logic by using the flow-control statements that we learned in this class. C. Zero-pad the digits such that the binary output is always 8-binary digits long. Strip off the leading '0b' characters. For example, OLD: 0b1010 NEW: 00001010 D. Print to standard output using a dotted binary format. For example, IP address Binary 10.88.17.23 00001010.01011000.00010001.00010111 Note, you might need to use a 'while' loop and a 'break' statement for part C. while True: ... break # on some condition (exit the while loop) Python will execute this loop again and again until the 'break' is encountered.
The first thing we want to do is to import the module sys because we are going to be working with command line arguments.
import sys
The Open Network Install Environment (ONIE) is an open source install environment that gives a switch user a choice to download ONIE compliant Network Operation System (NOS) to bare metal network switches. The OpenSwitch is community based, open source NOS that runs on hardware based on ONIE.
The goal of this article is to show how to build OpenSwitch Virtual Machine appliance, describe its capabilities and to introduce three methods for managing OpenSwitch. The OpenSwitch VM appliance was created by OpenSwitch project for training and testing purpose. It uses software data plane to forward the packets but it is not intended to be used as a virtual switch for connecting virtual machines. OpenSwitch supports many L2, L3 protocols such as STP, LACP, LLDP, OSPF, BGP, DHCP, TFTP, NTP, SSH, SNMP and others. These protocols run as separate daemons and they were integrated from another open-source projects.
For instance Quagga project provides L3 functionality to Openswitch. Quagga modules ops-ospf and ops-bgp update active routes in OpenvSwitch database (OVSDB). The module ops-zebra reads routes from OVSDB and install them to the kernel. Static routes are also stored in OVSDB, read by ops-zebra module and installed to the kernel. In order to use Continue reading
Ran into an issue today where audio was working normally in Final Cut Pro X 10.3.2, but the exported video had no sound. The video and sound were originally recorded using a Canon G7X Mark II.
The fix was to delete Final Cut Pro X preferences, as detailed by Apple here. In short…
That will definitely result in some interface trauma for you, as FCPX won’t remember where your libraries are. I’m not sure what other settings you’d invested in that might also be forgotten — probably a lot of things. I’m still relatively new to FCPX, so the hit wasn’t too hard to handle. But still. Yuck.
Yuck or not, that worked. Once I pointed FCPX at my libraries and built a new project for my simple video, exporting rendered not just video, but audio too. And all was right with the world.