“Automater” Tech Tip: Linux Shell Wrapper Example
Using the command line version of the scripts inside of a Linux shell script really steps of the power of Automation Scripting. The example shell wrapper, performs the following:
- Run the check_bgp_nbrs script to confirm all BGP neighbors are up
- Run the check_bgp_routes script to confirm all BGP attributes are what they are supposed to be
- Run the check_eigrp_nbrs script to confirm all EIGRP nbrs are up
- Run the check_eigrp_routes script to confirm all EIGRP routing metrics are what they are supposed to be
- Run the pinger script to confirm full network connectivity
- Run the tracer script to confirm traffic paths
- Introduce first network failure: Shutdown interface Gi 0/0/0 on router ny_rtr1
- Sleep a few seconds to let network converge
- Depending on the failure run the scripts 1 through 6 to confirm the network is doing what you wish.
- Turn interface Gi 0/0/0 on router ny_rtr1 backup
- Sleep a few seconds to let network converge
- Run Scripts 1 through 6 again to make sure network returned to “steady-state”
- Perform a second failure test which shuts down 3 of 4 links of a port channel on an ethernet switch.
Download sample file. Note, don’t forget to change Linux permissions on file to make is executable (chmod 755 filename)
How to run:
Usage:
sample_failure_test.sh <number of iterations to run>
Example:
sample_failure_test.sh