Vyatta : Configuring a Virtual Router

Note When Vyatta Core got discontinued, a group of its users who wanted to keep using it forked the last available source code to start VyOS. See more here:

Vyatta is a router that can be used in a Hyper-V or ESX Virtual machine and is available for download Vyatta Download. I’ve used this to connect host-only networks in order to create valid test environments, an example configuration is illustarted and detailed below.

In order to implement the above configuration on the Vyatta virtual router follow the configuarion steps outlined below. For reference the default username / password is vyatta / vyatta.

Ensure that VM has 2 vCPU’s – with a single vCPU the interfaces can become unresponsive as per;

Under Hyper-V I can confirm this stable with 2 vCPU, 256MB RAM – your mileage may vary.

Deploy image to local drive:
install system

Once rebooted, login and enter configuration mode:

Configure ethernet interfaces:
set interfaces ethernet eth0 address
set interfaces ethernet eth0 description “Network1”
set interfaces ethernet eth1 address
set interfaces ethernet eth1 description “Network2”
set interfaces ethernet eth2 address
set interfaces ethernet eth2 description “Internet”

Configure default gateway:
set system gateway-address

Configure DNS server:
set system name-server

Configure NAT Rule to masquaerade all traffic as the Vyatta device on the ‘external’ interface:
set nat source rule 20 source address
set nat source rule 20 outbound‐interface eth1
set nat source rule 20 translation address masquerade


Exit Configuration mode:

show interfaces ethernet
show system default-gateway
show nat rules
show nat statistics

Now run some basic connectivity tests to ensure:

  1. You can connect to the different subnets
  2. You can connect to the internet

Leave a Reply

Your email address will not be published. Required fields are marked *