Professional Documents
Culture Documents
This chapter will guide you on how to get up to speed quickly using your new VyOS system. It
will show you a very basic configuration example that will provide a NAT gateway for a device
with two network interfaces (eth0 and eth1).
Configuration Mode
By default, VyOS is in operational mode, and the command prompt displays a $. To configure
VyOS, you will need to enter configuration mode, resulting in the command prompt displaying a
#, as demonstrated below:
vyos@vyos$ configure
vyos@vyos#
commit
Once your configuration works as expected, you can save it permanently by using the following
command:
save
Interface Configuration
• Your outside/WAN interface will be eth0. It will receive its interface address via DHCP.
• Your internal/LAN interface will be eth1. It will use a static IP address of 192.168.0.1/24.
Static
Static routes are manually configured routes, which, in general, cannot be updated dynamically
from information VyOS learns about the network topology from other routing protocols.
However, if a link fails, the router will remove routes, including static routes, from the RIPB that
used this interface to reach the next hop. In general, static routes should only be used for very
simple network topologies, or to override the behavior of a dynamic routing protocol for a small
number of routes. The collection of all routes the router has learned from its configuration or
from its dynamic routing protocols is stored in the RIB. Unicast routes are directly used to
determine the forwarding table used for unicast packet forwarding.
Static Routes
set protocols static route <subnet> next-hop <address>
Configure next-hop <address> for an IPv4 static route. Multiple static routes can be created.
Defines next-hop distance for this route, routes with smaller administrative distance are elected
prior to those with a higher distance.