Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

Adding and modifying configuration

Add new configuration by creating a configuration node with the set command in configuration mode. Modify existing configuration also by using the set command in configuration mode.

Add configuration

In configuration mode, set the IP address of the dp0p1p1 Ethernet interface by using the set command.


vyatta@vyatta# set interfaces dataplane dp0p1p1 address 192.0.2.21/24
[edit]
vyatta@vyatta# 

            
            

Note that the configuration node for the dp0dp1p1 interface already exists, assuming that your system has at least one Ethernet interface. It exists because the system automatically discovers physical interfaces on startup and creates configuration nodes for them. For the same reason, the hardware ID (MAC address) of the dp0dp1dp1 interface is also known to the system.

Now use the show command to see the addition.


vyatta@vyatta# show interfaces dataplane dp0p1p1
+address 192.0.2.21/24
 hw-id 00:13:46:e6:f6:87
[edit]
vyatta@vyatta#

            
            

Notice the plus sign (+) in front of the new statement. This + shows that this statement has been added to the configuration, but the change is not yet committed. The change does not take effect until configuration is committed by using the commit command.

Another option is to use the compare command to see the change.


vyatta@vyatta# compare
[edit interfaces dataplane dp0p1p1]
+address 192.0.2.21/24
[edit]
vyatta@vyatta#

            
            

The configuration tree is nearly empty when you first start up, except for a few automatically configured nodes. You must create a node for any functionality you want to configure on the system. When a node is created, any default values that exist for its attributes are applied to the node.

Modify configuration

For the most part, modifying configuration is the same as adding configuration by using the set command. This modification works for identifiers of nodes containing a single instance. To change the identifier of a node for which there can be multiple instances (a “multinode”), such as a DNS server or an IP address for an interface, you must delete the node and recreate it with the correct identifier.

You can modify configuration from the root of the configuration tree or use the edit command to navigate to the part of the tree where you want to make a change or an addition. Edit mode allows you to abbreviate a series of similar configuration commands.