Initial Setup


#1

Hello,

I would like to setup site-to-site VPN with Vyatta.
I installed Vyatta inside an ESXi VM 2 NICs:
-eth0: Private Network
-eth1: Public Network

I have a /27 for the public network, however I would only like to assign the Vyatta router one IP out of the /27. If I do however set the IP of the the eth1 interface to /32 the netmask is set in a wrong way and I get this error message:
network unavailable

Does anybody has some suggestion on how to fix this?
It’s the first time I work with VyOS/Vyatta.

Regards,
Alec


#2

When assigning a single IP in the /27 subnet, you need to specify the /27 for the netmask:

  set interfaces ethernet eth1 a.b.c.d/27

With the correct netmask configured, your VyOS router will be able to successfully communicate to other nodes in the same segment (/27), and with a gateway address configured, you’ll be able to route to the internet/other networks.

HTH

Chris


#3

Hello,

Thanks for your input Chris, that worked perfectly for me.
I ran into another issue now at our secondary location:
In my linux network configuration I would have to insert this:

auto eth1
iface eth1 inet static
 address 1.1.1.1
 netmask 255.255.255.255
 broadcast 1.1.1.1
 post-up route add 2.2.2.2 dev eth1
 post-up route add default gw 2.2.2.2 
 post-down route del 2.2.2.2 dev eth1
 post-down route del default gw 2.2.2.2 

While 1.1.1.1 is the IP of the router and 2.2.2.2 is the gateway IP.

I set the router’s IP this way:

And added the system gateway with this command:

This did however not worked, since I didn’t added the last part.
I have 2 NICs on the router 1 NIC goes into a private network (eth0) and one into the public network/internet (eth1).
The above configuration is required for the public network/internet.
Does anybody knows how and with which commands I have to add this part in VyOS?

Regards,
Alec