Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
vyatta@R1# show interfaces
 interfaces {
        dataplane dp0p1s1 {
                address 10.10.1.1/24
                mac 00:13:46:e6:f6:87
        }
        dataplane dp0s2 {
                address dhcp
        }
        loopback lo
 }

...

Code Block
languagetext
vyatta@R1# show interfaces dataplane dp0p1s1
 dataplane dp0p1s1 {
        address 10.10.1.1/24
        mac 00:13:46:e6:f6:87
 }


When the display is too large for one screen, the display stops after one screen is shown. In this case, press one of the following keys to perform the indicated action.

...

Code Block
languagetext
vyatta@R1:~$ show configuration
interfaces {                                                                                                  [0/3747]
        dataplane dp0p1s1 {
                address 10.10.1.1/24
                hw-id 00:13:46:e6:f6:87
        }
        dataplane dp0s2 {
                address dhcp
        }
        loopback lo
}
service {
        netconf
        ssh {
                port 22
                port 830
        }
        telnet
}

Changing configuration information

Adding or modifying the configuration

Add new configuration by creating a configuration node by using the set command in configuration mode. Modify existing configuration by using the set command in configuration mode, as in the following example.

Code Block
vyatta@R1# set interfaces dataplane dp0p1s1 address 192.168.1.100/24
vyatta@R1#

Then use the show command to see the change.

Code Block
vyatta@R1# show interfaces dataplane dp0p1s1
+address 192.168.1.100/24
mac 00:13:46:e6:f6:87
vyatta@R1#

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 the configuration is committed by using the commit command.


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

Code Block
vyatta@R1# compare
[edit interfaces dataplane dp0p1s1]
+address 192.168.1.100/24
vyatta@R1#

You can change the 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 modify or add a configuration.

The configuration tree is nearly empty when you first startup, 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.

Deleting configuration

Use the delete command to delete a configuration statement or a complete configuration node, as in the following example.

vyatta@R1# delete interfaces dataplane dp0p1s1address 192.168.1.100/24
Then use the show command to see the change.

Code Block
vyatta@R1# show interfaces dataplane dp0p1s1
-address 192.168.1.100/24
 mac 00:13:46:e6:f6:87
vyatta@R1#


Notice the minus sign (-) in front of the deleted statement. This - shows that this statement has been deleted from 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.

Code Block
vyatta@R1# compare
[edit interfaces dataplane dp0p1s1]
-address 192.168.1.100/24
vyatta@R1#

Some configuration nodes are mandatory; these nodes cannot be deleted. Some configuration nodes are mandatory but have default values; if you delete one of these nodes, the default value is restored.

Committing configuration changes

In a DANOS vRouter, configuration changes do not take effect until you commit them by using the commit command.

vyatta@R1# commit
A line that contains uncommitted changes is flagged as follows:

  • > to indicate the line has been modified

  • + to indicate the line has been added

  • - to indicate the line has been deleted

After you commit the changes, the flag disappears, as in the following example.

Code Block
languagetext
vyatta@R1# show interfaces dataplane dp0p1s1
-address 192.168.1.100/24
 mac 00:13:46:e6:f6:87
vyatta@R1# commit
vyatta@R1# show interfaces dataplane dp0p1s1
 mac 00:13:46:e6:f6:87
vyatta@R1#
Info

When you commit changes in the configuration mode, the changes are saved to the startup configuration. As a result, the changes are preserved even after a reboot.

Note

If your login username is not a member of the "secrets" login user group and you either save a configuration through the REST API or use the save command, the encrypted passwords in the configuration file are replaced with the ******** placeholder. If you load this configuration, the replaced password fields trigger validation errors because the placeholder does not match the format for an encrypted password. Do not commit this configuration. If you ignore the error message
and perform a commit with this invalid configuration, the passwords are deleted.

Discarding configuration changes

You cannot exit from configuration mode with uncommitted configuration changes; you must either commit the changes or discard them. If you do not want to commit the changes, you can discard them by using the exit discard command.

Code Block
languagetext
vyatta@R1# exit
Cannot exit: configuration modified.
Use 'exit discard' to discard the changes and exit.
vyatta@R1# exit discard
vyatta@R1:~$

Managing system configuration

...