TTR Networks

Intermediate · Setting up VyOS with basic BGP · section 2 of 9

VyOS configuration basics

✓ Lab-tested 17 October 2026 on VyOS 2026.10.16-0024-rolling, FRR 10.2.1

VyOS keeps its whole configuration in one tree, edited in configuration mode:

  • configure enters configuration mode. The prompt changes from $ to #.
  • set … and delete … change the candidate configuration. Nothing happens yet.
  • compare shows what you've changed. commit applies all of it at once, and rolls back automatically if any part fails.
  • save writes it to disk so it survives a reboot. (This lab boots straight from the ISO, so it can't save; you'll see a warning after each commit.)
  • show configuration commands prints the running config as set commands, the format used throughout this lesson.

Under the hood, VyOS's BGP is FRR, the same routing suite as the BGP and OSPF lessons. The set protocols bgp … tree is translated into FRR configuration on commit, so BGP concepts and most show output carry over directly.

The first step is plumbing: three interfaces, one per role. Descriptions are worth the typing, because they show up in show interfaces and BGP summaries.

Stage 1: interfaces
set system host-name 'R1'
set interfaces ethernet eth0 address '203.0.113.1/31'
set interfaces ethernet eth0 description 'TRANSIT-UPSTREAM'
set interfaces ethernet eth1 address '192.0.2.25/24'
set interfaces ethernet eth1 description 'IX-PEERING-LAN'
set interfaces ethernet eth2 address '198.51.100.1/25'
set interfaces ethernet eth2 description 'LAN'
  • Line 1: The host name appears in the prompt (vyos@R1) and in BGP descriptions on the other side.
  • Lines 2–3: A /31 to the upstream: two addresses, no network or broadcast address. Most providers use /30 or /31 for transit links.
  • Lines 4–5: Your address on the IX peering LAN, assigned by the IX. Every member shares this /24.
  • Lines 6–7: The LAN uses only the first half of the /24. The rest is spare, which matters for the blackhole route in the next section.
Check the interfaces (real output)
vyos@R1:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address       MAC                VRF        MTU  S/L    Description
-----------  ---------------  -----------------  -------  -----  -----  ----------------
eth0         203.0.113.1/31   52:54:00:00:00:01  default   1500  u/u    TRANSIT-UPSTREAM
eth1         192.0.2.25/24    52:54:00:00:01:01  default   1500  u/u    IX-PEERING-LAN
eth2         198.51.100.1/25  52:54:00:00:02:01  default   1500  u/u    LAN
lo           127.0.0.1/8      00:00:00:00:00:00  default  65536  u/u
             ::1/128
  • Lines 5–7: One line per role, with the descriptions from the config.
  • Lines 5–7: The MAC addresses are fixed by the lab's start script, so eth0/eth1/eth2 always land on the right Docker networks.