Chapter 7 Tactical Playbooks

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 119

After building the network we discover this “bug” or “flaw” where the default was used, and the network is using OSPF type broadcast instead of type P2P on all building uplinks.

It may be quick and safe enough to perform changes manually over two sites but that is missing the point of network automation. Even with only two sites to change it still requires the manual configuration of three devices (core plus all distribution layer devices). The correct order of operation, along with the commands on the correct interfaces, must be followed during the implementation. At scale the risk is compounded per site. This change is fully documented and included in the master branch history of reference for what the state of the network was pre and post-change.

The approach is as follows:  Capture current state:

show ip ospf neighbors  Change OSPF type to P2P on all links between the core and distribution layers:

o The port-channel on the core that connects to a specific distribution switch:

ip ospf network point-to-point o Port-channel 1 on the distribution switch that connects to specific port-channel on the core:

ip ospf network point-to-point  Capture new state:

show ip ospf neighbors

The OSPF neighbors' playbook is already written and can be reused. This can be called as part of this playbook to gather OSPF neighbors before and after the change to compare and validate.

Follow the NDLC which by now should be second nature. Make the new working branch, ospf_p2p, in TFS. Refresh the local repository and change to the working branch. Update hosts.ini to have a new group of devices for this playbook. This group can be removed from hosts.ini after the play has been completed.

[OSPFP2P:children] CORE LAB-DISTRIBUTION Create a new YAML file in the tactical playbook folder called point_to_point.yml. The playbook needs to configure port-channel 1 of the distribution switches to be OSPF type point-to-point and then the matching core port-channel interface to also be OSPF type point-to-point. The networks will take two seconds each to converge.

Write a new playbook to capture pre and post-OSPF neighbors state. This is slightly different from the existing playbook ios_command_show_ospf_neighbors.yml that executes the show ip ospf neighbor command and dumps the output to a file.