ztpv6

package
Version: v0.0.0-...-cedea85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Zero Touch Provisioning (ZTP) DHCPv6 Parsing for Network Hardware Vendors

Currently Supported Vendors For DHCPv6 ZTP

  • Arista
  • ZPE

Why Do We Need This?

Many network hardware vendors support features that allow network devices to provision themselves with proper supporting automation/tools. Network devices can rely on DHCP and other methods to gather bootfile info, IPs, etc. DHCPv6 Vendor options provides us Vendor Name, Make, Model, and Serial Number data. This data can be used to uniquely identify individual network devices at provisioning time and can be used by tooling to make decisions necessary to correctly and reliably provision a network device.

For more details on a large-scale ZTP deployment, check out how this is done at Facebook, Scaling Backbone Networks Through Zero Touch Provisioning.

Example Data

Vendor specific data is commonly in a delimiter separated format containing Vendor Name, Model, Make, and Serial Number. This of course will vary per vendor and there could be more or less data. Vendor;Model;Version;SerialNumber Arista;DCS-7060;01.011;ZZZ00000000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitID

type CircuitID struct {
	Slot    string
	Module  string
	Port    string
	SubPort string
	Vlan    string
}

CircuitID represents the structure of network vendor interface formats

func ParseRemoteId

func ParseRemoteId(packet dhcpv6.DHCPv6) (*CircuitID, error)

ParseRemoteId will parse the RemoteId Option data for Vendor Specific data

func (*CircuitID) FormatCircuitID

func (c *CircuitID) FormatCircuitID() string

FormatCircuitID is the CircuitID format we send in our Bootfile URL for ZTP devices

type VendorData

type VendorData struct {
	VendorName, Model, Serial string
}

VendorData contains fields extracted from Option 17 data

func ParseVendorData

func ParseVendorData(packet dhcpv6.DHCPv6) (*VendorData, error)

ParseVendorData will try to parse dhcp6 Vendor Specific Information options data looking for more specific vendor data (like model, serial number, etc). If the options are missing we will just return nil

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL