Vyatta Network OS Documentation

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

Set up the TFTP environment

How to step up the TFTP environment.

A TFTP server is required to host the PXE boot configuration files. The specific configuration instructions vary according to the type of TFTP server.

The following instructions are for SysLinux, a third-party Linux TFTP server.

Modify the instructions as needed if you are using a different server.

  1. Install the SysLinux package according to the vendor instructions.
    ~$ sudo apt-get update 
    ~$ sudo apt-get install syslinux
  2. Create the directory /var/lib/tftpboot
    ~$ sudo mkdir /var/lib/tftpboot
  3. Copy the files gpxelinux.0 and menu.c32 from the SysLinux package (located in /usr/lib/syslinux or /usr/share/syslinux directory) to the /var/lib/tftpboot directory.
    ~$ sudo cp /usr/lib/syslinux/gpxelinux.0 /var/lib/tftpboot/
    ~$ sudo cp /usr/lib/syslinux/menu.c32 /var/lib/tftpboot/
  4. Create the directory /var/lib/tftpboot/pxelinux.cfg.
    ~$ sudo mkdir /var/lib/tftpboot/pxelinux.cfg
  5. Create the file /var/lib/tftpboot/pxelinux.cfg/default with contents shown in this step.
    Use the correct release number for your release and the correct URL of the ISO image (including IP address). The contents of this file are important because they determine the type of boot (standard or custom).
    1. Boot file for standard PXE boot process - in the following example, the first line of the file is DEFAULT memdisk, so only the section that begins with LABEL memdisk will be executed. Vyatta NOS will boot with the specified ISO image and nothing else, because using memdisk does not allow passing of additional parameters to the kernel command line.
      ~$ sudo vi /var/lib/tftpboot/pxelinux.cfg/default 
      DEFAULT memdisk 
      PROMPT 1 
      TIMEOUT 50 
      
      LABEL local 
      MENU LABEL local 
      LOCALBOOT 0 
      
      LABEL custom_command_line 
      MENU LABEL custom_command_line 
      KERNEL http://192.168.100.10/vmlinuz 
      INITRD http://192.168.100.10/initrd.img 
      APPEND console=tty0 console=ttyS0 boot=live nopersistent nonetworking noeject 
      fetch=http:// 192.168.100.10/iso/livecd-VR5600_4.2R1_amd64.iso 
      vyatta-config=http://192.168.100.10/iso/config.boot 
      IPAPPEND 0x2 
      
      LABEL memdisk 
      MENU LABEL memdisk LINUX memdisk 
      INITRD http://192.168.100.10/iso/livecd-VR5600_4.2R1_amd64.iso 
      APPEND iso raw
    2. Boot file for custom PXE boot process - in the following example, the first line is DEFAULT custom, so only the section that begins will LABEL custom will be executed. Vyatta NOS will boot with the specified ISO image. This method allows passing of additional parameters (such as vyatta-autoinstall and/or vyatta-config) to the kernel command line. The vyatta-config option is used to pass the location and name of the config.boot file that contains the initial router configuration shown below. The vyatta-autoinstall option is used to ensure that the image is installed to the hard drive. Installing the image on the hard drive obviates the need to use the PXE boot process for subsequent reboots. This procedure requires extraction of the Linux virtual machine vmlinuz and initrd.img from the ISO images. Using this method, Vyatta NOS boots twice, the first time when it is configured with the sample config, and a second time after it installs the image into the disk. Subsequent reboots do not require PXE boot. See the following section for a list of parameters supported for PXE boot.
      ~$ sudo vi /var/lib/tftpboot/pxelinux.cfg/default 
      DEFAULT custom 
      PROMPT 1 
      TIMEOUT 50 
      
      LABEL local 
      MENU LABEL local 
      LOCALBOOT 0 
      
      LABEL custom 
      MENU LABEL custom 
      KERNEL http://192.168.100.10/vmlinuz 
      INITRD http://192.168.100.10/initrd.img 
      APPEND console=tty0 console=ttyS0 boot=live nopersistent nonetworking noeject 
      fetch=http:// 192.168.100.10/iso/livecd-VR5600_4.2R1_amd64.iso 
      vyatta-autoinstall=http://192.168.100.10/iso/my_autoinstall_file.vii 
      vyatta-config=http://192.168.100.10/iso/config.boot 
      IPAPPEND 0x2
    3. In the example, the /var/www/html/iso/my_autoinstall_file.vii file contains the following contents.
      VII_DISK_LABEL=gpt 
      VII_AUTO_ADJUST_SIZES=yes 
      VII_IMAGE_SAVE_CONFIG=no
    4. The /var/www/html/iso/config.boot file contains the following contents.
      interfaces
      { loopback lo {
      description "This is a sample auto-config file for testing with PXE boot"
      }
      }
      protocols {
      static {
      route 10.0.0.0/8 {
      next-hop 10.25.148.1
      }
      route 172.16.0.0/12 {
      next-hop 10.25.148.1
      October 24, 2017
      
      Page 7
      Ciena Vyatta 5600 vRouter PXE Boot Installation Guide, 17.2.0
      }
      route 192.168.0.0/16 {
      next-hop 10.25.148.1
      }
      }
      }
      service {
      netconf
      ssh
      }
      system {
      config-management {
      commit-revisions 20
      }
      console {
      device ttyS0
      }
      host-name vCPE
      login {
      user vyatta {
      authentication {
      plaintext-password vyatta
      }
      }
      }
      syslog {
      global {
      facility all {
      level warning
      }
      }
      }
      time-zone America/Los_Angeles
      }
  6. Verify that TFTP server is working properly before proceeding further by connecting another test VM to the same network as the TFTP server and perform the following test.
    1. Create an empty test file on the TFTP server
      ~$ cd /var/lib/tftpboot 
      ~$ touch test_file.txt 
      ~$ chmod 777 test_file.txt
    2. On the text VM, perform a sample TFTP transfer.
      ~$ tftp 192.168.100.10 
      tftp> get test_file.txt 
      tftp> q 
      ~$
Once verified, the TFTP server is configured.

Auto installation parameters

The auto installation parameters and their descriptions.

The following parameters are available if you use auto installation.

Table 1. Auto installation parameters
Parameter Possible Values Description
VII_DISK_LABEL gpt or msdos Disk label.
VII_ADMIN_USERNAME string Default is admin username.
VII_ADMIN_PASSWORD string Default is admin password.
VII_CONSOLE string Default is console device.
VII_CONSOLE_SPEED string Default is console device speed.
VII_IMAGE_SAVE_CONFIG yes or no Save the image configuration.
VII_BOOT_PART_MIN decimal Minimum boot partition size. Default is 32.
VII_BOOT_PART_SIZE decimal Preferred boot partition size. Default is 256.
VII_ESP_PART_MIN decimal Minimum ESP partition size. Default is 45.
VII_ESP_PART_SIZE decimal Preferred ESP partition size. Default is 512.
VII_LOG_PART_SIZE decimal Preferred logging partition size. Default is 0 (means do not create the partition).
VII_VIRT_PART_SIZE decimal Preferred libvirt partition size. Default is 1024 (vnf).
VII_VYOS_PART_MIN decimal Minimum router partition size. Default is 4096.
VII_VYOS_PART_SIZE decimal Preferred router partition size. Default is 0 (means use all remaining space after other partitions are created.
VII_IMAGE_REPLACE yes or no Replace existing image with image of the same name. Default is no. Applies only to upgrades.
VII_IMAGE_NAME string Image name.
VII_IMAGE_CONFIG_BOOT path Location of the configuration file to copy.