Quagga vtysh shell (END) problem

Previously, we installed the CORE Network Emulator from source code and installed the network services used by CORE. Now, we want to run a simulated networking scenario and modify the configuration of the quagga routing daemon on one or more virtual routers.

To do this, we open a shell to the node and start the vtysh shell so we can use the quagga command-line interface. But, the quagga vtysh shell starts with a mostly blank screen displaying the text “(END)”.

vtysh shows blank screen with (END) text
vtysh shows blank screen with (END) text

We have to enter the “q” key to get back to the vtysh command prompt so we can enter the required configuration command. Every time we enter a vtysh configuration command we see the blank screen with “(END)” again.

Read on to learn how to fix this annoying problem.

Start a vtysh shell

To configure quagga, we access the vtysh shell on the virtual route. We do this one of two ways:

  1. Open a bash shell and then enter the vtysh command on the node by either:
    • Double-clicking on the node on the CORE canvas, which starts the bash shell in a new terminal window, and then enter the vtysh command at the prompt. Or…
    • Right-clicking on the node to bring up the contextual menu, then selecting the menu command Shell window → bash, and then enter the vtysh command at the prompt
  2. Open a vtysh shell directly, by right-clicking on the node to bring up the contextual menu, then select the menu command Shell window → vtysh

Once the vtysh shell starts, we see the blank screen with “(END)” in the corner. Quit the shell. Now that we have seen the problem, we will fix it.

Quagga VTYSH_PAGER configuation

We can fix the problem by configuring the VTYSH_PAGER environment variable so it has the value “more”. ((More information about this issue is available at the following URL: http://sourceforge.net/apps/mediawiki/quagga/index.php?title=TipsNTricks)) The instructions below show how to set the VTYSH_PAGER environment variable in the two relevant configuration files so that both shells, bash or vtysh, will use the variable when they start up.

To fix the vtysh (END) problem, follow these two steps:

  1. Add the text “export VTYSH_PAGER=more” in the /etc/bash.bashrc file
  2. Add the text “VTYSH_PAGER=more” in the /etc/environment file

Add “export VTYSH_PAGER=more” in /etc/bash.bashrc

To solve the problem in the case where we see the blank screen with (END) after opening a bash shell (by double-clicking on the node on the canvas or by using the Open Shell menu command) and then entering the vtysh command, we need to update the /etc/bash.bashrc file.

$ sudo vi /etc/bash.bashrc

Then, add the following line at the end of the file:

export VTYSH_PAGER=more

Save the file and quit the editor.

Add “VTYSH_PAGER=more” in /etc/environment

To solve the problem in the case where we see the blank screen with (END) after opening the vtysh shell by using the Open Shell menu command, we need to update /etc/environment file.

$ sudo vi /etc/environment

Then, add the following line at the end of the file:

VTYSH_PAGER=more

Save the file and quit the editor.

Verify the fix

Stop the CORE Network Emulator scenario and then start it again. When the virtual nodes are created again, they will pick up the environment variables from the host system and the quagga vtysh shell running on the virtual node should now show the command or configuration prompts, without paging to a blank screen.

vtysh works better, now.
vtysh works better, now.

9 thoughts on “Quagga vtysh shell (END) problem”

  1. Sadly this didn’t fix it for me (using Ubuntu 14.04 LTS as a base).

    Good that it works for zet and Mariano though 🙂

      1. Thanks Andrey – nearly 2 years since I last commented here and I see you have provided a working solution for me 🙂

  2. Try starting vtysh with doing sudo su first. This solved it for me. When I start vtysh by filling in “sudo vtysh”. The END error is still there.

  3. Pingback: Saving a Cloonix network topology | Open-Source Routing and Network Simulation

Comments are closed.

Scroll to Top