Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VyOS 1.3 #169

Open
felbinger opened this issue Nov 19, 2022 · 1 comment
Open

VyOS 1.3 #169

felbinger opened this issue Nov 19, 2022 · 1 comment

Comments

@felbinger
Copy link

On VyOS 1.3, with type=vyatta, the show route ... commands does not work.

I investigated a bit and found out that the vyatta module is supposed to run commands in operator mode. Due to the fact that Vyatta inherits from Quagga the wrong commands are being used:

  • Command: vtysh -c " show ipv6 bgp regexp ^17990_ "
  • Command: vtysh -c " show ipv4 bgp unicast 1.1.1.1 "
  • Command: vtysh -c " show ipv6 bgp unicast 2600:: "

I fixed the problem by setting type=frr, this way I'm using the vtysh instead of the vyatta operator mode commands.

Maybe it would be a good idea to adjust the documentation regarding how to setup looking-glass for vyos.

@isnuryusuf
Copy link

i use type=vyos and change quangga.php as follow:

Before:

protected function build_bgp($parameter) {
    $cmd = new CommandBuilder();
    // vytsh commands need to be quoted
    $cmd->add(self::$wrapper, '"', 'show');

    if (match_ipv6($parameter, false)) {
      $cmd->add('ipv6');
    }
    if (match_ipv4($parameter, false)) {
      $cmd->add('ipv4');
    }
    $cmd->add('bgp unicast', $parameter, '"');

    return array($cmd);
  }

Change to:

protected function build_bgp($parameter) {
  $cmd = new CommandBuilder();
  // vytsh commands need to be quoted
  $cmd->add(self::$wrapper, '"', 'show');
  $cmd->add('ip bgp', $parameter, '"');

  if (match_ipv6($parameter, false)) {
    $cmd->add('ipv6 unicast');
  }
  if (match_ipv4($parameter, false)) {
    $cmd->add('ipv4 unicast');
  }
//    $cmd->add('bgp unicast', $parameter, '"');

  return array($cmd);
}

the old code will generate following command:
Unknown command: show ip ipv4 bgp unicast 1.1.1.1

The valid command should be:
show ip bgp 1.1.1.1
or
show ip bgp ipv4 unicast 1.1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants