The Vyatta CLI - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

The Vyatta CLI

Description:

Single nodes (just one instance can be created; for example, the RIP protocol node) ... Hard drives can be a flash device, a USB stick, or a physical hard disk ... – PowerPoint PPT presentation

Number of Views:518
Avg rating:3.0/5.0
Slides: 23
Provided by: Micha430
Category:
Tags: cli | rip | stick | vyatta

less

Transcript and Presenter's Notes

Title: The Vyatta CLI


1
The Vyatta CLI
2
Module Objectives
  • After completing this module, you should be able
    to
  • Login into the OFR using either the root or
    vyatta default user
  • Access Operational Mode
  • Access Configuration Mode
  • View command output that longer than 1 page
  • Invoke the Vyatta CLI help function
  • Describe configuration nodes
  • List the three main configuration commands
  • Navigate the configuration node hierarchy
  • Create Users and passwords
  • Recover from lost passwords
  • Save the configuration file to a floppy drive or
    a hard drive
  • Log out of the router shell

3
Logging In to the CLI
  • Login prompt displayed following boot sequence
  • vyatta login
  • Root User
  • Username root Password vyatta
  • Provides access to the Linux shell
  • Can start router shell (xorpsh) from the Linux
    shell
  • Vyatta User
  • Username vyatta Password vyatta
  • Provides access to the router shell (xorpsh)

4
Operational Mode
  • Initial mode when you first log into the router
    shell
  • Allows you to perform general node functions such
    as
  • Setting node date time
  • Deleting system files
  • Formatting floppy disks
  • Rebooting the node
  • Displaying various system information
  • Operation Mode prompt is
  • show version displays the router software
    version
  • quit or exitexits the router shell and puts
    you back into the Linux shell

5
Configuration Mode
  • Typing configure in Operational mode invokes
    Configuration mode
  • Configuration Mode allows to add, delete, and
    modify system configuration information
  • Configuration Mode prompt is
  • show displays system configuration information
  • quit or exit exits Configuration mode and
    puts you back in Operational mode
  • If uncommitted changes have been made to the node
    configuration you must save or discard (exit
    discard) them prior to exiting Configuration
    mode.

6
CLI Help
  • ? (help)
  • Type a ? at the command prompt to see a list of
    available commands
  • Type a ? after the name of a command to see a
    list of the command parameters

7
Command Completion
  • Using the TAB key or SPACEBAR when typing a
    command name will complete the command.
  • Must type enough characters to uniquely identify
    the command desired

8
Working with Long Command Output
  • If command output cannot be displayed on one
    screen the MORE indication will be displayed
    (--MORE--)
  • When the MORE indication is displayed, type
  • Enter Key - will display the next line of the
    output
  • Space Key - will display the next page forward of
    the output
  • b will display the previous one page of the
    output
  • k allows you to scroll up through the entire
    output
  • j allows you to scroll down through the
    entire output
  • When the END flag (END) appears next to the MORE
    indication it indicates that the output is
    complete
  • q will exit from the MORE display

9
Configuration File
  • Configuration file is plain text file
  • There are three kinds of statements
  • Configuration nodes. These can be either
  • Single nodes (just one instance can be created
    for example, the RIP protocol node)
  • Multi-nodes (more than one instance can be
    created for example, address nodes)
  • Attribute statements. These set the values or
    characteristics for parameters within a node.

10
Default Configuration File
  • When the OFR is first booted
  • A Default configuration file is created
  • All node interfaces are recognized and the
    configuration file is populated with these
    interfaces
  • The Default configuration file contains other
    default values such as the default user
    definitions for the root and vyatta users.
  • Restoring the OFR to a Default configuration
  • Save the config.boot file under another name
  • Delete the config.boot file
  • Reboot the OFR
  • Upon reboot the OFR will rebuild a default
    configuration file

11
Configuration Nodes
  • Configuration nodes have braces associated
    with them
  • Attribute statements would be enclosed in the
    braces
  • Configuration node examplessh port
    165534 protocol-version v1v2all
  • Empty configuration braces signify that the
    configuration node has no configurable
    attributeswins-server ipv4

Configuration node
Attribute Statements
Braces
12
Configuration Commands
  • Configuration of the system is accomplished
    using
  • Set
  • Used to create or modify configuration nodes and
    attributes
  • Cannot be used to change the identifier of a
    multi node
  • Delete
  • Used to delete a configuration node
  • Deleting a configuration node will also delete
    all sub nodes
  • Edit
  • Used to navigate to a specific configuration node
    in the tree

13
Navigating the Nodal Hierarchy
  • root_at_vyatta configureEntering configuration
    mode.There are no other users in configuration
    mode.root_at_vyatta edit interfaces ethernet
    eth0edit interfaces ethernet eth0root_at_vyatta
    set description my interface 1edit interfaces
    ethernet eth0root_at_R1 upedit interfaces
    ethernetroot_at_R1 exitedit interfacesroot_at_R1
    topeditroot_at_R1quitroot_at_R1

14
Creating User Accounts/Passwords
  • System Login
  • User Username of the new login account
  • 32 character max, alphanumeric and hyphens
    allowed
  • Full Name Complete name of the user
  • Alphanumeric, hyphens, and spaces allowed
  • Names containing spaces must be enclosed in
    double quotes
  • Plaintext Password Login password for the user
  • Password is encrypted and stored on router
    internally
  • Encrypted using Message Digest 5
  • Encrypted password displayed with show command
  • Radius Server IP address of remote Radius
    Authentication Server
  • Port IP Port of the remote Radius
    Authentication Server
  • Secret Password for Radius Authentication
    Server
  • Alphanumeric, spaces, and special characters
    allowed
  • Passwords containing spaces must be enclosed in
    double quotes

15
Recovering Lost/Forgotten Passwords
  • One or more Users have lost/forgotten their
    password
  • Any user password, including the root user
    password, can be changed by any user who has
    access to the OFR CLI
  • Root user password CAN be changedset system
    login user root authentication plaintext-password
    vyatta
  • Commit the change and save the configuration file

16
Recovering form Lost/Forgotten Passwords
  • No users are able to login into the OFR
  • Reboot the OFR from a LiveCD
  • Login as root with the default password of
    vyatta
  • Enter the router shell by typing xorpsh
  • show system boot-message on main OFR drive
  • Exit to Linux Shell and type fdisk /dev/sda
  • Find the largest partition
  • Create a directory to mount the device mkdir
    /mnt/hd
  • Mount the largest partition mount /dev/sda1
    /mnt/hd
  • Enter the OFR Router Shell and type load
    /mnt/hd/opt/vyatta/etc/config/config.boot
  • Type show to confirm the loading of the
    configuration
  • Reset the root user password set system login
    user root authentication plaintext-password
    vyatta
  • Commit the changes and save the configuration
    file
  • Reboot the OFR

17
2 Stage Configuration Process
  • Configuration statements simply change
    configuration values
  • Configuration changes do not take effect until
    they are committed
  • Use commit to make changes active
  • show will display the contents of the
    configuration file
  • Items with - in front of them are deletions
    that have not been committed
  • Items with in front of them are
    additions/modifications that have not been
    committed
  • If you try to exit the configuration with
    uncommitted changes you must
  • Use commit to activate the changes in the
    configuration
  • Use exit discard to exit the configuration
    without committing the changes

18
Save Configuration Floppy Drive
  • If running software from LiveCD, the only way to
    save the configuration file is to a floppy drive
  • Initialize floppy disk from router shell
  • Floppy drive is /dev/fd0
  • Floppy drive is mounted in /mnt/floppy
  • init-floppy (Operational mode) initializes
    floppy disk for configuration storage
  • Formats the floppy disk, causing all previous
    data on the disk to be lost
  • Enters /mnt/floppy/config as the config-directory
    attribute in the rtrmgr configuration node
  • Mounts the floppy
  • Saves copy of current configuration to
    /mnt/floppy/config/config.boot
  • save (Configuration mode) is used to save the
    configuration
  • save /mnt/floppy/config/config.boot saves
    configuration on the floppy as a bootable file
  • save /mnt/floppy/config/my_config1 saves
    configuration file on the floppy, the file is not
    bootable

19
Save Configuration Hard Drive
  • Software must be loaded onto a partition on the
    hard drive in order to save the configuration to
    the hard drive.
  • Hard drives can be a flash device, a USB stick,
    or a physical hard disk
  • Default directory - /opt/vyatta/etc/config
  • save saves the configuration in a bootable form
    as /opt/vyatta/etc/config/config.boot
  • save my_config1 saves the configuration in a
    non-bootable file as /opt/vyatta/etc/config/my_c
    onfig1

20
Logging Out of the Router Shell
  • Exit or Quit
  • Both commands allow you to exit one level of the
    configuration tree and move to the next higher
    level.
  • Using either command at the top level of the
    configuration tree will log you out of the
    configuration mode and put you in operational
    mode
  • Using either command in operational mode will log
    you out of the router shell and put you in the
    Linux shell

21
Module Summary
  • Having completed this module, you should be able
    to
  • Login into the OFR using either the root or
    vyatta default user
  • Access Operational Mode
  • Access Configuration Mode
  • View command output that longer than 1 page
  • Invoke the Vyatta CLI help function
  • Describe configuration nodes
  • List the three main configuration commands
  • Navigate the configuration node hierarchy
  • Create Users and passwords
  • Recover from lost passwords
  • Save the configuration file to a floppy drive or
    a hard drive
  • Log out of the router shell

22
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com