Automated construction and configuration of white Box switches that even beginners can do ~ZTP x OcNOS~

Introduction

This is the 4th article on Open Networking, which has been posted regularly. In this article, Zero Touch Provisioning (ZTP) is explained using a network OS (NOS) called OcNOS as an example.

There are other articles related to Open Networking, so please see the articles that interest you from the "List of articles" below.

What is OcNOS?

OcNOS is a commercial version of NOS exclusively for white Box switches provided by IP Infusion. It was developed based on ZebOS, an embedded software provided by the company to network equipment vendors such as switches and routers.

While maintaining the rich functionality, quality, and reliability, it supports the command system that network engineers are accustomed to, so you can enjoy cost benefits (reducing CAPEX and OPEX) and the freedom of open networking without changing the traditional network configuration or operation. Achieving superiority and superiority.

In addition to the basic L2/L3 functionality of ZebOS, OcNOS supports a wide range of protocols such as VXLAN and MPLS functionality. We offer multiple software packages for various network applications, from enterprises to service providers, allowing users to select the optimal package according to their needs.

What is ZTP?

First, I will explain the overview of ZTP.

ZTP refers to a mechanism that allows devices such as Switch to be automatically configured and ready for use simply by connecting them to the desired network and turning on the power.

Previously, when using devices such as Switch, administrators had to update the OS to the latest version and perform initial settings and settings to suit the operating environment.
In the case of ZTP, the administrator prepares the OS and configuration data in advance, and when the device is connected to the operating environment, the settings are automatically downloaded by referring to the prepared OS and configuration data. This reduces the amount of configuration work that administrators have to do on each device, which can lead to savings in time and cost.

Flow of ZTP processing

Next, we will explain the process flow until the setup work is completed using ZTP.
This time, we will use the following simple network configuration as an example to explain the flow until the Switch settings are completed.

Simple network diagram

Simple network diagram

First, connect the LAN cable with Network = 192.168.0.0/24 to the management port of the Switch and start it up.

When started, the Switch makes a DHCP Request (① in the configuration diagram).
The DHCP Server responds with an Ack to the DHCP Request from the Switch (② in the configuration diagram).
At this time, we will respond with not only the IP address but also the storage location of the NOS image file, License, and Config file.
In this case, since the Web (HTTP) Server is the storage location, the URL of the NOS image file, License, etc. located on the Web Server is returned.

Next, Switch accesses the Web Server (③ in the configuration diagram).
Then, download the NOS image file, License, and Config file from the Web Server (④ in the configuration diagram).
The various files downloaded last will be applied to the Switch, and the configuration work will be completed.

Configuring ZTP with OcNOS

Now, let's finally explain the ZTP settings using OcNOS as an example.

The current network configuration diagram is shown below. Unify and operate DHCP and Web Server on Ubuntu Server (version 16.04). The Web Server this time will operate as HTTP. The Switch uses Edgecore's Whitebox Switch AS7726-32X, and uses ZTP to perform tasks from downloading to initializing OcNOS (version 1.3.9).

Network configuration diagram using ZTP

Network configuration diagram using ZTP

DHCP Server settings

First, we will explain the DHCP Server settings.

DHCP Server needs to set the storage location (URL) of OcNOS's NOS image file, License, and Config file.

Download the DHCP package

First, to set up a DHCP Server, download the DHCP package to the Server using the ``sudo apt install isc-dhcp-server'' command.

Edit dhcpd.conf (IP address range to distribute)

Next, edit /etc/dhcp/dhcpd.conf included in the downloaded package.

This time, the network to which Ubuntu Server belongs is 192.168.0.0/24. If you want to set the range of IP addresses that you want to distribute using DHCP to be 192.168.0.41 – 192.168.0.49, edit as shown below.

subnet 192.168.0.0 netmask 255.255.255.0 { range       192.168.0.41 192.168.0.49; #割り当てるIPアドレスの範囲 default-lease-time 21600;          #クライアントが期限を求めない場合の割り当て期間(秒) max-lease-time   43200;          #クライアントが期限を求めた場合の割り当て期間(秒) }

Editing dhcpd.conf (description of file storage location)

Edit the storage locations of various files as shown below.

Use the DHCP option to enter the URL under /var/www/html/ on the HTTP Server.

default-url is NOS image file, ocnos-license-url is License, and ocnos-provision-url is Config file URL.

The host name can be freely set by the user, and the MAC address of Eth0 of AS7726-32X is written in hardware ethernet, and the IP address that you want to set for Eth0 of AS7726-32X is written in fixed-address.

option ocnos-license-url code 251 = text;                 #DHCPオプション option ocnos-provision-url code 250 = text;                #DHCPオプション host AS7726-A {                           #ホスト名 hardware ethernet 04:f8:f8:XX:XX:XX;                 #Eth0のMACアドレス fixed-address 192.168.0.70;                     #Eth0に設定したいIPアドレス option default-url = "http://192.168.0.80/ocnos/OcNOS-installer";     #NOS image fileの保存場所 option ocnos-license-url = "http://192.168.0.80/ocnos/license.tar";     #Licenseの保存場所 option ocnos-provision-url = "http://192.168.0.80/ocnos/AS7726-A.conf"; #Config fileの保存場所 }

Restart DHCP Server

Finally, restart isc-dhcp-server with the following command to complete DHCP Server settings.

sudo systemctl enable isc-dhcp-server sudo systemctl restart isc-dhcp-server

HTTP Server settings

Next, I will explain the HTTP Server settings.

Download the Apache2 package

First, download the Apache2 package with the “sudo apt install apache2” command.

Firewall settings

Next, it is necessary to allow access to the web port from the outside, so configure the firewall with the ``sudo ufw allow 'apach''' command.

Restart HTTP Server

And restart Apache2 with the following command as well as DHCP.

sudo systemctl enable apache2.service sudo systemctl restart apache2.service

Check access to HTTP Server

Check if you can access the HTTP Server (http://192.168.0.80) that was last restarted. At this time, please note that the device used for access confirmation (PC, server, etc.) must be connected to the same network as the HTTP Server.

If it is accessible, an Apache2 image like the one below will be displayed.

Apache2 displayed as running as HTTP Server

Apache2 displayed as running as HTTP Server

After confirming that the HTTP Server is working successfully, create the ocnos directory under /var/www/html.
Then, by storing the NOS image file, License, and Config file in the ocnos directory, the HTTP Server configuration is complete.

Switch settings

Lastly, let's talk about the AS7726-32X settings.
AS7726-32X has a Bootloader and NOS Install mechanism called ONIE. When you start AS7726-32X, a display like the image below appears and ONIE starts up.

ONIE stands up

ONIE stands up

This ONIE starts searching for the DHCP Server and starts executing ZTP when sending a request to the DHCP Server, so the user can complete the setup by simply connecting the management port of the AS7726-32X and starting it.

The figure below shows the log where ONIE obtains the License and Config file from the DHCP Server.

How ONIE obtains from DHCP Server

How ONIE obtains from DHCP Server

Therefore, once you connect the AS7726-32X's management port (Eth0) to the 192.168.0.0/24 network and start the AS7726-32X, all you have to do is download and initialize OcNOS (version 1.3.9) using ZTP. is completed.

It can also be combined with Ansible, which was introduced in Parts 2 and 3.

If you want to change the AS7726-32X settings using only ZTP, you need to edit the Config on the HTTP Server, download the edited Config to the AS7726-32X, and then reboot. Combining ZTP and Ansible eliminates the need for downloads and reboots, allowing real-time configuration changes.

There is a detailed explanation of this in Part 7, so please refer to it if you wish.

The above is how to set up ZTP. Next time, I will explain ecSONiC, which is a type of NOS that I mentioned in this article.

At the end

Macnica provides a service that remotely provides an environment where you can experience open networking and conduct tests and verifications.
This service allows us to verify the operability of network OSes and perform tests that combine network OSes from various manufacturers, white Box switches, and optical transceivers.

Remote verification service image diagram

Remote verification service image diagram

It is a service that allows you to easily verify open networking, and the basic configuration is free of charge.

You can check the downloadable materials for available network OS and white Box switches, specific use cases, and how to apply. The materials can be downloaded from the URL listed in the information email by answering the questionnaire from the "Macnica Network OS Remote Verification Service" below.

These people are using the remote verification service.

Here are some testimonials from people who have actually used the service.

 

Furukawa Network Solution Co., Ltd.

“Recently, the number of remote service environments is increasing, but I was impressed with the ease of access to the evaluation equipment.

The materials you provided were easy to understand, and we were able to proceed smoothly with the intended verification. ”


Click here for list of materials

Document list

In addition to introducing products handled by Macnica,
We publish materials related to open networking, such as BGP cross network automatic construction files and network operation test evaluation reports.

Click here for details

Product Page Top

Edgecore Networks

We continue to be a pioneer in open networking by developing and selling products related to OpenNetworking/white Box switches.

DELTA ELECTRONICS

We have many achievements in supporting the business of major OEM customers in Japan and overseas, and provide high-quality/high-reliability network products.

CGS Tower Networks

We provide a network packet broker (NPB) that utilizes state-of-the-art general-purpose hardware.

Inquiry

If you have any questions about this article, such as the combination of ZTP and Ansible, or all the logs until ZTP completion, please contact us from the following.

Macnica
In charge of OpenNetwork

Contact us by phone:
045-470-9831