Difference between revisions of "Juniper ZTP/Homer"

From ppwiki
Jump to navigation Jump to search
Line 18: Line 18:
  
 
==Diagram==
 
==Diagram==
 +
 +
==Setup and Configuration==
 +
=== DHCP configuration ===
 +
#######################################################################
 +
# ZTP Sample Config begins here:
 +
#######################################################################
 +
option option-150 code 150 = ip-address;
 +
set vendor-string = option vendor-class-identifier;
 +
option space ZTP;
 +
option ZTP.image-file-name        code 0 = text;
 +
option ZTP.config-file-name        code 1 = text;
 +
option ZTP.image-file-type        code 2 = text;
 +
option ZTP.transfer-mode          code 3 = text;
 +
option ZTP.alt-imagefile-name      code 4 = text;
 +
option ZTP-encapsulation          code 43 = encapsulate ZTP;
 +
# mgmt nework
 +
subnet 10.193.0.0 netmask 255.255.255.0 {
 +
          authoritative;
 +
          option subnet-mask            255.255.255.0;
 +
          option option-150              10.192.16.5;  #TFTP server
 +
          option routers                10.193.0.1;
 +
          option broadcast-address      10.193.0.255;
 +
          option domain-name            "mgmt.dfw.labnet";
 +
          default-lease-time            600;
 +
          max-lease-time                7200;
 +
}
 +
group {
 +
        vendor-option-space ZTP;
 +
        include "/etc/dhcp/juniper_ztp";
 +
}

Revision as of 14:31, 5 February 2023

Goal

In this Tutorial, we are going to setup a ZTP environment to be able to run the basic configuration on a new Juniper switch. Once the basic configuration is done, we will run homer to deploy the switch configuration. If you want to know more about homer please check: https://wikitech.wikimedia.org/wiki/Homer

Prerequisites

For this tutorial I will be using :

- EVE-NG 2.0.3-112

- VQFX model: vqfx-10000 running JUNOS 19.4R1.10

- DHPC/TFTP VM running on Proxmox 7.3.4

- Homer VM

- Python3

- Netbox

Diagram

Setup and Configuration

DHCP configuration

#######################################################################
# ZTP Sample Config begins here:
#######################################################################
option option-150 code 150 = ip-address;
set vendor-string = option vendor-class-identifier;
option space ZTP;
option ZTP.image-file-name         code 0 = text;
option ZTP.config-file-name        code 1 = text;
option ZTP.image-file-type         code 2 = text;
option ZTP.transfer-mode           code 3 = text;
option ZTP.alt-imagefile-name      code 4 = text;
option ZTP-encapsulation           code 43 = encapsulate ZTP;
# mgmt nework
subnet 10.193.0.0 netmask 255.255.255.0 {
         authoritative;
         option subnet-mask             255.255.255.0;
         option option-150              10.192.16.5;  #TFTP server
         option routers                 10.193.0.1;
         option broadcast-address       10.193.0.255;
         option domain-name             "mgmt.dfw.labnet";
         default-lease-time             600;
         max-lease-time                 7200;
}
group {
        vendor-option-space ZTP;
        include "/etc/dhcp/juniper_ztp";
}