Part 2: Getting Vyatta Core Router up and running

To create a datacenter environment, i decided to use Vyatta as a router between my home network and the vCloud “datacenter”.

To do this, first thing we need to do is to download the Vyatta software which can be done here.

Because I’ll be using Vyatta within a VMware workstation environment, I downloaded the ESX 4.1 virtual appliance. To get that up and running within workstation you must do the following steps:

  • Download VMware’s OVF tool here and install it on your PC.
  • Open a Command Prompt as an administrator (Start –> All Programs –> Accessoires –> Right click CMD and open as Administrator)
  • Go to the folder in which you’ve installed the OVF tool
  • Check the path to where the downloaded Vyatta appliance can be found (D:\vCloud installation\Vyatta in my case)
  • In the CMD promt type the following: ovftool.exe “D:\vCloud installation\Vyatta\vyatta-vmware-esx4_VC6.2-2011.02.09_i386.ovf” “D:\vCloud installation\Vyatta\” and press enter.
  • It should look like this:Vyatta
  • When this is done go to the folder in which you’ve just saved the new files and doubleclick the *.vmx file.
  • VMware workstation will start and show the following:
  • Vyatta1
  • Click on edit virtual machine settings and in the next screen select the Network adapter 2.
  • Vyatta2
  • Make sure this will use it’s own physical NIC. and click OK. You’ll be back in the workstation startscreen, click in Power in this virtual machine
  • Vyatta3
  • After booting the following screen will display:
  • Vyatta4
  • Login with the default name: vyatta and password: vyatta
  • Vyatta5
  • We will now get the router up and running for our homelab:
  • To do this we’ll need to be in the configure mode. So type configure and press enter.
  • Vyatta6
  • Notice how the command prompt changes to mark the move from operational mode
    (“:~$”) and configuration mode (“#”).
  • We’ll change the sytem host name for a more “vCloud” name….
  • At the command prompt type the following: set system host-name <your hostname> and press enter
  • After this type commit and press enter. Then type exit and press enter and log back in to vyatta it should look something like this:
  • Vyatta7
  • After this we must specify the system’s domain name. In my case this will be vdicloud.local
  • To set the domain name we must use the set system domain-name command. Enter set system domain-name <DOMAINNAME> and press enter and do a commit.
  • Vyatta8
  • After this we should set the IP address for the external network (192.168.0.x in my case) by using the set interfaces ethernet eth0 address 192.168.0.31/24 command
  • followed by commit again. You can see what you’ve done using show interfaces ethernet eth0
  • Vyatta9
  • We’ll repeat this for our inside address (in my case 172.24.0.1/16)
  • After this is done, do a show interfaces, and the outcome should look like this:
  • Vyatta10
  • To make sure the internal network can use the internet we’ll have to setup NAT. This can be achieved like this:
  • First we need to make sure the default gateway is set with the set system gateway-address command, and a commit:
  • Vyatta11
  • After this we have to make sure all trafic from the internal LAN will be routed through the eth0 interface.
  • We’ll do this by making a NAT rule. The command for this is set service nat rule 1 source address 172.24.0.1/16
  • the second command is set service nat rule 1 outbound-interface eth0
  • and the last set service nat rule 1 type masquerade and a commit
  • Vyatta12
  • A quick check (with a CentOS liveCD and a static IP address) shows the routing is going perfect:
  • Vyatta13
  • This should do for the next face of installing a vCloud homelab.

See you in part 3 ;-)

Arjan

Author: Arjan

I’m a 38-year old virtualisation Consultant working for ITQ (http://www.itq.nl). I’m a VCAP-DCA 4, VCP 4/5, MCSA2008, MCTS, MCP, CCA, CCNA . Working for large government agencies in the Netherlands with a strong focus on designing there VMware infrastructures. Started blogging a couple of years back about VDI and cloud solutions, my focus shifted towards storage and virtualization in general. This blog is all about virtualisation, cloud, storage and IT technology. Writing things on this blog is all about giving to the community. I’m married to the most beautiful woman in the world. We are blessed with two princesses (5 and 8 years old) and one inbound in July ;-P.

Share This Post On

1 Comment

  1. Arjant

    Didn’t try it, but I think so. Just follow the steps provided in the post to make it accesible to workstation, and it should work (I think ;-))

    Post a Reply

Trackbacks/Pingbacks

  1. Setting up a VMware vCloud home lab | VDICLOUD.NL - [...] Part 2: Getting Vyatta Core Router up and running [...]

Submit a Comment

Jouw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

De volgende HTML tags en attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>