Skip to content

VyOS

VyOS is an open-source network operating system (NOS) based on Debian GNU/Linux. It provides powerful networking features, including routing, firewalling, and VPN, and is used in various network deployment scenarios. With its CLI and GUI for configuration, VyOS is user-friendly for all skill levels. Trusted by enterprises, service providers, and network administrators, VyOS is known for its security, protocol support, and routing capabilities.

For a more extensive list of commands used for configuration, please follow this link: VyOS Command Reference

Command Explanation
configure Enter configuration mode
set Use this command to set the value of a parameter or to create a new element (e.g., interfaces)
delete Deletes a configuration entry, including all sub-levels under the specified level
commit Apply and commit changes to the router configuration
save Save the configuration to persistent storage
exit Exit the current configuration layer
end Exit all configuration layers

VyOS Setup

The username and passwords for the VyOS routers are both "vyos".

When you first set up the vyos routers they need to be installed such that they can retain their configuration after a reboot. To d this is simple you just need to run the "install image" command, and respond like shown below:

vyos@vyos:~$ install image

Would you like to continue? (Yes/No) [Yes]: yes

Partition (Auto/Parted/Skip) [Auto]: auto

Install the image on? [sda]: sda

This will destroy all data on /dev/sda.

Continue? (Yes/No) [No]: yes

How big of a root partition should I create? (2000Mb - 8589MB) [8589]MB: 2000

What would you like to name this image? [1.2.9-S1]: 1.2.9-S1

Which one should I copy to sda? [/opt/vyatta/etc/config/config.boot]: /opt/vyatta/etc/config/config.boot

Enter password for user 'vyos': vyos

Retype password for user 'vyos': vyos

Which drive should GRUB modify the boot partition on? [SDA]: sda

Unmount ISO

When installation of the Operating System is complete, it is beneficial to unmount the installation ISO from the Router VM. To do this, right-click the router, click configure, find the ISO in the tabs and remove it.

BGP in VyOS

VyOS Command Explanation
set protocols bgp neighbor $address remote-as '$as-number' Specify a BGP neighbor
set protocols bgp address-family ipv4-unicast network '$address' Specify a network to redistribute
set protocols bgp address-family ipv4-unicast redistribute [source] Redistribute the selected routing source into BGP
set protocols bgp parameters router-id X.X.X.X Specifies the BGP router-ID of the router
set protocols bgp system-as [number] Specify system as number