Chapter 3 How to Automate the Network?

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 43

Chapter 3 How to Automate the Network? “Change can be frightening, and the temptation is often to resist it. But change almost always provides opportunities - to learn new things, to rethink tired processes, and to improve the way we work.”

- Klaus Schwab How to Prepare the Network? Network connectivity is obviously a key element of the solution. Network engineers, server administrators, the IT security team, and network operations need to collaborate and determine the architecture for the network automation ecosystem. Communication dependencies between the network devices, the Linux environment hosting Ansible, VS Code, and TFS exist. This guide is designed to help prepare any possible firewall rules or traffic flows that are required depending how the network is zoned. Often servers or workstations that can reach network device management consoles are in a different or highly restricted zone on the network, separated from the operational zone devices like servers or workstations. If using a jump box methodology (connecting from operational zone workstations to management workstations where administrative toolkits are hosted) create standardized all-in-one Windows or Linux hosts with VS Code and Ansible installed. These hosts require communication to TFS and the management console of the network fleet.

It is recommended using device hostnames in the Ansible hosts.ini file which allows Domain Name System (DNS) resolution from the Linux environment to lookup the IP address of the network device it is trying to reach. Use hostnames where possible instead of IP addresses in the hosts.ini file. Either populate the DNS server the Ansible host is using with the DNS records of the network devices, or statically update the local hosts file in the Linux box itself. Again, DNS is recommended over a static Linux hosts file or using IP addresses in the Ansible hosts.ini file.

Here are the communication flows required for network automation:

Source Port Destination Ansible SSH (22) Network Devices Git WebDev / SWebDev (8080 / 8443) TFS The network devices do not need to communicate with TFS and Git does not need to communicate to the network devices. Place tools into the appropriate zones or open the appropriate firewall rules to permit these communications.

What Tools are Required?

Microsoft TFS The Windows administration team needs to setup a TFS environment if one does not already exist. They will establish the architecture for TFS and follow the installation instructions:

https://docs.microsoft.com/en-us/tfs/server/install/get-started/