How can we help?

How to configure Ubuntu 18.04 for the Auvik collector

Follow

The Ubuntu 18.04 version of the Auvik collector includes a new command-line network configuration utility called Netplan. Netplan easily configures networking on a Linux system by creating a description of the required network interfaces, and what each one should be configured to do, in a /etc/netplan/*.yaml file.

In this article, we’ll walk you through how to:

Access the collector bash shell

  1. From the virtual machine window for the collector, click onto the console.
  2. Select option 6 and enter y to enter the bash shell from the collector menu.
  3. Enter sudo -u

List all network interfaces  

Identify which network interfaces you’ll be configuring by executing the following command: ifconfig

Configure the network  

A *.yaml file will be used to configure the network. There can be the odd case where a *.yaml file isn’t automatically created by the Ubuntu installer. To confirm if you have the necessary file, run the following command from the collector console: cd /etc/netplan

If a *.yaml file doesn’t exist, run the following command to generate one: netplan generate

Execute the following command: vi /etc/netplan/01-netcfg.yaml

Now, edit the file with your favorite editor (vi, for example) following the example below.

NOTE: This file is case-sensitive. Any details entered should be entered as shown below. Be sure to update the IP Address in CIDR notation, interface name (enp0s8), Gateway4 (192.168.1.0), and Addresses (8.8.8.8, 8.8.4.4) to best match your configuration needs.

network:
  	version: 2
  	renderer: networkd
  	Ethernets:
             nameOfInterface:
			Dhcp4: no 
			Dhcp6: no
			Addresses: [IPaddress/netmask, ]
			Gateway4:  192.168.1.0
			Nameservers:
				Addresses: [8.8.8.8, 8.8.4.4] 

Once you’re sure the details are set as expected, exit configuration mode and save your changes.

Apply your changes by executing the following command: netplan apply

Configure custom routes

Configure for a directly connected gateway

Configuring for a directly connected gateway is the most common configuration. It allows you to set a default route, or any route, using the “on-link” keyword. You can set up a route on an IP address that’s directly connected to the network, even if the address doesn’t match the subnet configured on the interface.

network:
 version: 2
 renderer: networkd
 Ethernets:
 	enp0s8:
  		addresses: [ "10.10.10.1/24" ]
  		routes:
      		 - to: 0.0.0.0/0
        		   via: 9.9.9.9
        		   on-link: true 

Verify the configuration

Run the following to confirm the configuration : ifconfig

You should see the details you configured above. If you don’t, go back and work through the configuration steps again.

Reference: https://netplan.io/reference

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk