ZTP over Layer 2

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

ZTP over Layer 2 on Cisco NCS 540 variants

Release 7.7.1

ZTP over Layer 2 is now supported on the following NCS 540 router variants:

  • N540-ACC-SYS

  • N540X-ACC-SYS

  • N540-24Z8Q2C-SYS

  • N540-28Z4C-SYS-A/D

  • N540X-16Z4G8Q2C-A/D

  • N540-12Z20G-SYS-A/D

  • N540X-12Z16G-SYS-A/D

  • N540X-6Z18G-SYS-A/D

  • N540X-8Z16G-SYS-A/D

  • N540X-4Z14G2Q-A/D

  • N540-FH-CSR-SYS

  • N540-FH-AGG-SYS

  • N540-24Q8L2DD-SYS

  • N540-6Z14S-SYS-D

ZTP over Layer 2 on Cisco N540X-16Z4G8Q2C-A/D routers

Release 7.3.2

Previously available over Layer 3, this feature is now available to auto-provision your routers and DHCP devices on Layer 2 networks.

This functionality is essential because many network topologies have services configured for various Layer 2 VLAN tags, requiring cost-effective and reliable provisioning.

In this release this feature is supported on the Cisco N540X-16Z4G8Q2C-A/D routers.

When a device boots up without any configuration, it is not possible to configure the VLAN to tag the DHCP request packets. Because ZTP is the first active process that runs before any router configuration is present or before any manual intervention, ZTP can either:

  • Monitor a set of control packets to receive the VLAN IDs, or

  • Be preconfigured with a set of VLAN IDs

Consider the following sample network:

This figure shows a sample network

ZTP obtains VLAN details in one of the following ways:

  1. Statically, by reading the options mentioned in ztp.ini file

    Figure 1. Getting VLAN Details From ztp.ini File
    This figure shows how ZTP gets the VLAN details from the ztp.ini file.
  2. Dynamically, by snooping the packets in the netwok

    Figure 2. Getting VLAN Details by Packet Snooping
    This figure shows how ZTP gets the VLAN details by packet snooping

    Note


    Dynamic VLAN workflow with snooping is supported only on a fresh boot or reload of the router.


Prerequisites

  1. Only the following Layer 2 encapsulation protocols are supported:

    1. DOT1Q

      1. Either inner VLAN ID

      2. Or only an outer VLAN ID

  2. ZTP processes packets only from the following protocols to detect the VLAN IDs:

    1. OSPF

    2. ISIS

    3. VRRP

Customizing the ztp.ini File

The ZTP configuration file is called the ztp.ini. This file defines a default sequential flow for ZTP.

To modify the ZTP configurable options, create a copy of the ztp.ini file in any location, for example, /disk0:/ztp/ directory.


Note


To reset to the default options, delete the ztp.ini file in the /disk0:/ztp/ directory.


To include VLAN in the ztp.ini file, customize the Fetcher Priority attribute.

Fetcher Priority defines which port ZTP should use to get the provisioning details. By default, each port has a fetcher priority defined in the ztp.ini file. You can modify the default priority of the fetcher. Allowed range is from 0 to 9.


Note


The lower the number, the higher the priority. The value 0 has the highest priority and 9 has the lowest priority.

By default, the USB port has the higher priority.


In this example, ZTP first sends IPv4 DHCP request on all the management ports. If there is a failure, then ZTP sends IPv6 DHCP request on all the management ports. Similarly, the same order is followed on all the data ports as well as for VLAN ports.

# Copyright (c) 2018-2020 by cisco Systems, Inc.
# All rights reserved.

[Startup]
start:         True
retry_forever: False

[Fetcher Priority]
usb:    0
Mgmt4:  1
Mgmt6:  2
DPort4: 3
DPort6: 4
Vlan4: 6
Vlan6: 7

[Vlan Options]          <--Vlan options can be set only if the vlan fetcher priority is set.
snoop_packets: False    <-- a 'False' value sets up static VLAN; a 'True' value sets up dynamic OSPF, ISIS, or VRRP packet snooping in the network.
vlan_type: dot1q
vlan_ids: 650 

The other configurable options are:

  • ZTP: Enable or disable ZTP at boot using CLI or by editing the ztp.ini file.

  • Retry: Set the ZTP DHCP retry mechanism: The available values are infinite and once.

  • progress_bar: Enable progress bar on the console. By default, the progress bar is disabled. To enable the progress bar, add the following entry in the ztp.ini file.

    [Options]
    progress_bar: True

Prerequisites

  1. Only the following Layer 2 encapsulation protocols are supported:

    1. DOT1Q

      1. Either inner VLAN ID

      2. Or only an outer VLAN ID

  2. ZTP processes packets only from the following protocols to detect the VLAN IDs:

    1. OSPF

    2. ISIS

    3. VRRP

Customizing the ztp.ini File

The ZTP configuration file is called the ztp.ini. This file defines a default sequential flow for ZTP.

To modify the ZTP configurable options, create a copy of the ztp.ini file in any location, for example, /disk0:/ztp/ directory.


Note


To reset to the default options, delete the ztp.ini file in the /disk0:/ztp/ directory.


To include VLAN in the ztp.ini file, customize the Fetcher Priority attribute.

Fetcher Priority defines which port ZTP should use to get the provisioning details. By default, each port has a fetcher priority defined in the ztp.ini file. You can modify the default priority of the fetcher. Allowed range is from 0 to 9.


Note


The lower the number, the higher the priority. The value 0 has the highest priority and 9 has the lowest priority.

By default, the USB port has the higher priority.


In this example, ZTP first sends IPv4 DHCP request on all the management ports. If there is a failure, then ZTP sends IPv6 DHCP request on all the management ports. Similarly, the same order is followed on all the data ports as well as for VLAN ports.

# Copyright (c) 2018-2020 by cisco Systems, Inc.
# All rights reserved.

[Startup]
start:         True
retry_forever: False

[Fetcher Priority]
usb:    0
Mgmt4:  1
Mgmt6:  2
DPort4: 3
DPort6: 4
Vlan4: 6
Vlan6: 7

[Vlan Options]          <--Vlan options can be set only if the vlan fetcher priority is set.
snoop_packets: False    <-- a 'False' value sets up static VLAN; a 'True' value sets up dynamic OSPF, ISIS, or VRRP packet snooping in the network.
vlan_type: dot1q
vlan_ids: 650 

The other configurable options are:

  • ZTP: Enable or disable ZTP at boot using CLI or by editing the ztp.ini file.

  • Retry: Set the ZTP DHCP retry mechanism: The available values are infinite and once.

  • progress_bar: Enable progress bar on the console. By default, the progress bar is disabled. To enable the progress bar, add the following entry in the ztp.ini file.

    [Options]
    progress_bar: True