Skip to content

Lab 05 - Investigating Devices

Lab Overview

In this lab we are going to explore how Devices are modeled in Nautobot along with some Device prerequisites such as Device Types and Manufacturers. We will also use the Welcome Wizard to help import large amounts of data quickly.

Table of Contents

Lab 05 - Investigating Devices

Task 1 - Prepare to add Devices

Step 1-1 - Login via the web browser to Nautobot

If you have not already, use a web browser to navigate to your instance of Nautobot at https://{{ your pod }}. We will be using the Nautobot GUI for the remainder of this lab so there won't be a need for a terminal. Log into Nautobot by using the login option in the upper right of the Nautobot homepage. You can log in as the superuser you created in a previous lab or the superuser account included with your lab environment, the credentials for this account will be provided by the instructor.

Devices are one of the most complex models in Nautobot, and as such they require a number of other objects to be created in advance. Click on the Devices menu drop down at the top of the Nautobot homepage and take a look at the subcategories. The categories listed are:

  • Devices
  • Device Types
  • Connections
  • Device Components

image01-1

There are a lot of models in this list! So what do I need to create a Device? Click the green button next to Devices to open the Add a new device form. Interestingly the minium requirements for a Device (in bold) are all related objects:

  • Device Role
  • Device Type
  • Site
  • Status

We covered Site objects extensively in the previous lab so no need to go over that one. We used Status also, but I didn't talk much about it. It's a simple model that has a name, color and content types that can use it. That's it. They are required for many Nautobot objects and a few come with Nautobot, but you can add as many more custom Status objects as you like from the Organization menu.

That covers half the requirements, but what about Device role and Device Type? Let's talk about Device Role first since it is almost as simple as a Status and then we will get into Device Types.

image01-2

Step 1-3 - Create a Device Role

Click on the Devices drop down menu and select Device Roles. There are already a few common device roles available. These were loaded along with the sample data for this lab. Once again a csv file has been included for completeness 06_nautobot_device_roles.csv, but these roles are already available in your lab instance of Nautobot, so there is no need to try and upload the CSV file.

Click on the blue Add button in the upper right to create a new role. Create a Device Role using the following attributes:

  • Name: core switches
  • Slug: core-switches
  • Color: Fuchsia

That's all there is to it. Devices Roles help organize your devices by functional roles that are fully customizable.

To complete a small set of switch roles, create two more Device Roles:

  • Name: Distribution Switches
  • Slug: distribution-switches
  • Color: Purple

  • Name: Access Switches

  • Slug: access-switches
  • Color: Dark Purple

image01-3

Step 1-4 - Prepare to import Device Types

A device type represents a particular make and model of hardware that exists in the real world. Device types define the physical attributes of a device (rack height and depth) and its individual components (console, power, network interfaces, and so on).

Click on the Devices drop down menu and select the green button next to the Device Types to open the Add a new device type form. At first glance it doesn't look like there too much to fill out, but this form doesn't show the whole picture. Device Types actually hold a great deal more data, but you can't add it until after the Device Type is created.

image01-4

To see an example of a complete Device Type, click on the Devices drop down menu and select Device Types. From the list of Device Types, click on DCS-7048-T to open the detail page for that device type. At the bottom of, you can see this Device Type has 53 interfaces, 1 console port and 2 power ports.

image01-5

The various components of a Device Type can be added by clicking on the blueAdd Components button in the upper right of the Device Type detail page. From here the following components can be added to a Device Type:

  • Console Ports
  • Console Server Ports
  • Power Ports
  • Power Outlets
  • Interfaces
  • Front Ports
  • Rear Ports
  • Device Bays

There has to be an easier way to enter all this information right? Yes, there is. The Welcome Wizard! We installed this plugin in a previous lab, and now we're going to use it to handle this Device Type import task.

image01-6

Step 1-5 - Import Device Types using the Welcome Wizard

Click on the Plugins drop down menu from the top of the page, and select Welcome Wizard, this will open the Welcome Wizard dashboard. From the dashboard you can quickly navigate to the list views and add forms for common Nautobot objects. Just click on a name to go to the list view, or the green button to go to the form. The part we are interested in is the blue wizard hat button on the Device Types row. Click it!

image01-7

You may encounter a message saying the data is being updated and to refresh. This process should only take a few minutes, just refresh periodically until its updated. The data is being provided by a public GitHub repository at https://github.com/netbox-community/devicetype-library.git. Nautobot pulls this data using an extensibility feature. To see this, click on the Extensibility drop down menu and select Git Repositories. There should only be one item in the list, the Devicetype-library. To manually force a sync, you can click on the blue sync button all the way to the right, but that probably isn't necessary as the data in the Device type library should have updated automatically.

Return to Import Device Types dashboard by clicking on the Plugins drop down menu and selecting Welcome Wizard and the clicking the wizard hat on the Device Types row. From here you can import a single Device Type or multiple Device Types at once. Device Types require a Manufacturer, but the wizard handles this for you, so all you have to do is click the blue import button for the type of device to be imported.

Type ASR1001-X in the search box at the top of the list. Click on the blue import button to import the Device Type for a Cisco ASR1001-X. There will be a confirmation screen and that's it, the Device Type will be imported.

image01-8

Navigate to the detail page for the new Device Type by clicking on the Devices drop down, select Device Types and the click on the name of the new Device Type. The Device Type has been created with the correct model name, part number, height, interfaces, console ports and power ports! Nice.

image01-9

Can we create some devices now? Well we could but let's look at Platforms first.

Step 1-6 - Create a Platform

A platform defines the type of software running on a device or virtual machine. This can be helpful to model when it is necessary to distinguish between different versions or feature sets.

Click on the Devices drop down menu from the top of the page, and select the green button next to Platforms. Create a Platform with the attributes:

  • Name: PAN-OS
  • Slug: pan-os
  • Manufacturer: Palo Alto

The other fields, NAPALM driver and NAPALM arguments are out of the scope of this course, but you can read more about them here https://docs.nautobot.com/projects/core/en/stable/models/dcim/platform/?h=platform

You may notice the Computed Fields box under the Platform box. It looks a little strange because the template that is used to compute the value isn't working with the new Platform. We'll fix this later when we talk about extensibility features. For now, let's finally import some Devices!

image01-10

Task 2 - Import Devices

Step 2-1 - Import Devices from a CSV file

Click on the Devices drop down menu from the top of the page, and select the blue import button next to Devices. Either upload 07_nautobot_devices.csv or copy/paste the data into the import form to import the Devices. If the import is successful, you should see a list of the imported Devices and a banner confirming that 47 Devices were imported.

image01-10

Task 3 - Create Devices using a form

While a new stadium will certainly have numerous network devices, adding one of each Role - Distribution, Leaf, and Edge - should be enough to prove the point in demonstrations and labs. When creating the new Devices, it is important to use attributes that are consistent with the other Device names (as much as possible) to avoid unique snowflakes, which can be difficult to troubleshoot.

Step 3-1 - Examine the column titles

Return to the Devices list by clicking on the Devices menu drop down and selecting Devices. The list column headers are also links, by clicking on them you can sort by the data in that column. Try clicking Role. The list of Devices is sorted by role starting with Backbone. Click role again, and the order is reversed.

Step 3-2 - Detect patterns in existing Devices

Sorting this way may let you see data patterns of the organization. For example, Distribution role devices in our sample data appear to follow this pattern:

  • Name - {{ site slug }}-dist-01
  • Status - Active
  • Tenant - Nautobot Football Stadiums
  • Role - distribution
  • Type - Cisco Catalyst 6509-E
  • Site - {{ site name }}
  • Rack - {{ site slug }}-101

Step 3-3 - Add distribution-role device for your stadium

Click on blue Add button in the top right-hand side of the Devices web page. Substitute your stadium's information here. As an example, fields and values could be:

  • Name - hou01-dist-01
  • Device role - distribution
  • Manufacturer - Cisco
  • Device type - Cisco Catalyst 6509-E
  • Region - Texas
  • Site - HOU01
  • Rack - hou01-101
  • Status - Active
  • Tenant - Nautobot Football Stadiums

image03-1

Click Create.

image03-2

Step 3-4 - Choose additional details for your new device

You will notice there is some data missing from the Device detail. For example, there is a yellow Not racked value in the Position field. Also, it would be nice to have a Platform assigned to this Device.

Return to the Device list and click the Filter button in the upper right. Filter the list by the Nautobot Football Stadiums Tenant and the distribution To apply the filter scroll to the bottom of the form and click the Apply button.

image03-3

The filtered list should look like the image below. Right away you can see the distribution Devices are racked at position 26. If you click through to the detail pages for a few of the Devices, you can also see they are facing the front.

Click on the name of your device and then click the Edit button in the upper right of the Device details page. Change these attributes:

Position: U26 Rack Face: Front Platform: Cisco IOS

Please note! The Platform options are dependent on the Manufacturer. If you do not have a Manufacturer selected, no options will appear in Platform.

Step 3-5 - Add a new edge-role device for your stadium

Add another Device with these attributes (or substitute with yours):

  • Name - hou01-edge-01
  • Device role - edge
  • Manufacturer - Arista
  • Device type - Arista DCS-7280CR2-60
  • Region - Texas
  • Site - HOU01
  • Rack - hou01-101
  • Rack face - Front
  • Position - U40
  • Status - Active
  • Platform - Arista EOS
  • Tenant - Nautobot Football Stadiums

image03-4

Step 3-6 - Add a new Leaf-role device for your stadium

Add another Device with these attributes (or substitute with yours):

  • Name - hou01-leaf-01
  • Device role - leaf
  • Device type - Arista DCS-7150S-24
  • Region - Texas
  • Site - HOU01
  • Rack - hou01-101
  • Rack face - Front
  • Position - U44
  • Status - Active
  • Platform - Arista EOS
  • Tenant - Nautobot Football Stadiums

image03-5

Task 4 - Update Device Type Components

The Device Type data for the Catalyst 6509-E is incomplete, so we will update some of the components manually.

Step 4-1 - Add a Console Port

Return to the Device Types list by clicking on the Devices drop down menu and selecting Device Types. From here, select the Cisco Catlyst 6509-E. As we discussed previously, components can be added by clicking on the blue Add Components button in the upper right of a Device Type detail page. Click on this now and select Console Ports. This will open the form to create a new Console Port.

Create a console port with the following attributes:

  • Manufacturer: Cisco
  • Device type: Catalyst 6509-E
  • Name: con0
  • type: rj-45

image04-1

If the Console Port was created successfully, you will be re-directed back to the Device Type detail page. At the bottom of the page, the components are listed under a series of tabs. Click on the Console Ports tab to see thed details of the new Console Port.

Step 4-2 - Add an Interface

Next, lets add a management interface. Click on the blue Add Componenets button at the top of the Device Type detail page and select Interfaces. The component template forms have the ability to add ranges of components. For example, if you were to enter ge-0/0/[0-9] into the Name field, then the following interfaces would be created:

ge-0/0/0/0
ge-0/0/0/1
ge-0/0/0/2
ge-0/0/0/3
ge-0/0/0/4
ge-0/0/0/5
ge-0/0/0/6
ge-0/0/0/7
ge-0/0/0/8
ge-0/0/0/9

Feel free to try this feature out for yourself by creating a range of interfaces (or other component). When you're ready to move on, add a new Interface with the following attributes:

  • Manufacturer: Cisco
  • Device type: Catalyst 6509-E
  • Name: 00base-tx
  • Type: 100BASE-TX(10/100ME)
  • Management only: True

image04-2

Step 4-3 - Check for updates to Device instances

Return to the Devices list by clicking on the Devices drop down menu and selecting Devices. Click on the Filter button in the upper right and in the Default tab of the filter modal and select Nautobot Football Stadiums.

image04-3

Before applying the filter, click on the Advanced tab at the top. The advanced filter allows for more granular control. Enter the following and click Apply:

  • Field: Device type (ID)
  • Lookup type: exact
  • Value: Cisco Catalyst 6509-E

image04-4

The filtered list should look like the image below. Click on the name of any Device instance to go to the detail page for that Device.

image04-4

On the detail page for the Device, you will notice there has been no update to the Console Ports or Interfaces. In fact, there is no mention of those components at all! Updates to Device Types do not update the Device instances created from those Device Types. This is by design as it would cause significant problems if all Device instances were updated.

Task 5 - Update Device Components

Step 5-1 - Add Virtual Interfaces

Navigate to the detail page for your stadium's distribution Device, in my case it is hou01-dist-01. From here click on the blue Add Components button in the upper right and select Interfaces.

Right away you should notice that this form is quite a bit larger than the Interface form for Device Types. Name, Type and Status must be assigned. Optionally, an interface can have a Parent interface, Bridge, link Aggregation Group, MTU, MAC Address, Description and Mode. There may also be a custom field present, but that is not a default Device field, it is something being added by an extensibility feature, which we will cover later.

To create several vlan interfaces at once, use the alphanumeric range feature of the Name field. Use the following attributes:

  • Name: vlan[0-3]
  • Status: Active
  • Type: Virtual
  • Enabled: True

image05-1

If the Interfaces are created successfully, you should see the confirmation page:

image05-1

Task 6 - Review the imported and manually-entered results

Step 6-1 - Find the tenant

Return to the Tenants list by clicking on the Organization drop down menu and selecting Tenants. From this list click on Nautobot Football Stadiums to view the detail page for that Tenant.

Step 6-2 - Review the Tenant stats

The total Devices in the stats panel should be 50. We still have quite a bit more data to populate, but so far so good!

image06-1