Basic setup

From VyOS Wiki
Jump to: navigation, search
Warning sign.png This page is migrated to Readthedocs .
Information found on this page is migrated to readthedocs and information found here could be outdated or misleading.

After following the Installation guide, you then need to assign your first IP address to your VyOS device.

Determining correct Interface

If your VyOS machine has more than one interface, you may be unsure which interface to use. Plug the network cable into the interface you want to use, and run the command 'show interfaces'. This will show you the link state of every interface detected on the machine.$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 u/u  <-- Note that this has the link UP
eth1             -                                 u/D
eth2             -                                 u/D
eth3             -                                 u/D
lo                            u/u

In this case, eth0 is the interface we want to use. This will be our 'internal' interface.

Assigning an IP to an Interface

To change anything on your VyOS machine, you need to enter configure mode. This is done by typing 'configure' and pushing enter. When you do that, your prompt will change to signify this.$ configure

As part of our examples, the 'internal' network will be So we are going to assign to this interface. set interfaces ethernet eth2 address

Note that changes are not applied or saved automatically! You can build your changes up in a batch, and apply them all at once. To apply changes, type 'commit'. commit

Running 'commit' validates your changes are correct, and then applies them to the system. It does not save them! If you make a mistake, or a typo, this allows you to reboot the device to return to the previously working configuration.

To save your changes so they are applied the next time the machine reboots, run 'save'. save
Saving configuration to '/config/config.boot'...

At this point you should then enable ssh access to your VyOS device to configure with configuration.