Configure ZTP Server With CVP Collection¶
Configure management network¶
Because we want to be generic, let’s configure a DHCP server on the NAT gateway to provide a fixed DHCP address to your devices. Thus you will be able to get access to them easily. To support that, we can leverage
arista.cvp.dhcp_configuration to install and configure a DHCP server.
This role requires a set of information related to your own setup:
For your out of band management network:
- Subnet you are using to allocate your device’s IP.
- Name server to send to your DHCP client.
- Default scope for unknown devices.
For every device:
- EOS device hostname you want to configure.
- Mac address to use to identify a request from your device.
- IP address to allocate.
- An optional URI for ZTP registration.
Create an inventory file¶
Inventory contains information related to your NAT-gateway:
Create host variables¶
Host variables for your NAT-gateway should be defined like this:
--- ztp: default: registration: '< Optional ZTP registration URL >' gateway: < OOB DEFAULT GATEWAY > nameservers: - < DNS > general: subnets: - network: < OOB SUBNET > netmask: < OOB NETMASK > gateway: < OOB DEFAULT GATEWAY > nameservers: - < DNS > start: < FIRST LEASE IP > end: < LAST LEASE IP > lease_time: 300 clients: # AVD/CVP Integration - name: DC1-SPINE1 mac: 0c:1d:c0:1d:62:01 ip4: 10.73.1.11 - name: DC1-SPINE2 mac: 0c:1d:c0:1d:62:02 ip4: 10.73.1.12
Playbook to configure DHCP¶
Playbook is fairly simple: