Vyatta6.4 Config

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Vyatta 6.4 Quick Setup http://www.sohoadvisers.com/tutorials/vyatta-router/vyatta-router-quic...

The Advisers Group


Information Technology Made Easy

Home Information Tutorials Links Base64 Encoder


Ads by Google My IP Address IP Network Setup Router Setup
Our Sponsors

Vyatta 6.4 Quick Setup


Monday, 08 October 2012 00:00 | Written by Tony | | |

This is a quick guide setup guide for the Vyatta 6.4 open source router in VMware ESXi
Server. Please Note: Some of the Vyatta 6.3 commands are different from the Vyatta 6.4
commands. All articles on this site that do not state Vyatta 6.4 are written for Vyatta 6.3

Vyatta can be downloaded from http://www.vyatta.org

Version 6.4 utilizes the same LiveCD installer as version 6.3.

I used the VI Client to create a new VM. Select File, then New Virtual Machine.

Choose the following Settings:

Configuration: Custom
Name: "MyVyatta" Note: This name is whatever you want it to be.
Datastore: Choose the datastore you wish Vyatta to install on.
Virtual Machine Version: 7
Guest OS: Linux/Other 2.6x Linux
CPU: "1"
Memory: "512"
Network: "2" / vmxnet3
SCSI Controller: keep the defaults
Select a Disk: keep the default
Create a Disk: "4"GB then select thin provisioning

Select the box to customize the configuration prior to completing the VM creation and do the
following:

Click CD/DVD Drive 1


Select "Connect at power on"
Select Device Type: "Datastore ISO File"
Click "Browse..." and choose the LiveCD ISO file that you got from Vyatta.org

Start the new VM.


When it boots to the login prompt, login with a user and a password of "vyatta"
Login Form Now its time to install. To install from the LiveCD to the new Virtual Machine you just created
type

Username #install image

Password You may be prompted to create a new administrator password. Make sure to change it when
prompted.
Choose all of the defaults and when the install is complete type
Remember Me
Login #poweroff

Forgot your password? Once it's shutdown, go back to the VI Client and select the Vyatta VM. Go to Edit Setting and
Forgot your username? do the following.

Click CD/DVD Drive 1


Unselect "Connect at power on"
Select Device Type: "Client Device"

Start the Vyatta VM and once it powers up, log back in.

Once you are logged into the Vyatta console you need to enter configuration mode, this is
done by typing “configure” in the console.

#configure

Next use the show interfaces command to see the network configuration of your Vyatta
router.

1 of 4 17-10-2012 05:46 PM
Vyatta 6.4 Quick Setup http://www.sohoadvisers.com/tutorials/vyatta-router/vyatta-router-quic...

By using the MAC address of your network card you should be able to match your network
card to the correct Vyatta ethernet interface.

You must set the IP address range for the Private Network in Vyatta. Because my private
network is on eth1 I will use the following command to give it a static IP address.

#set interfaces ethernet eth1 address 192.168.1.1/24

Then commit the IP address by using the commit command

#commit

If you have a PC with a statically assigned IP address on the private network, you can test if
the IP address took by pinging the IP address of your router inside of a virtual machine on the
private network, if not, just continue.

Give the router a hostname and domain name by entering the following commands

#set system host-name <your-router-name>


#set system domain-name <your.domain.name>

Set up the Timzone by typing

#set system time-zone <your-time-zone>

Hit the tab key for timezone options.

#commit

Now we setup external interface to gets its address from a DHCP server. Please note, if you
need PPPOE for your internet provider you will need to take other steps. My internet provider
uses DHCP so I don't have the ability to test any other configuration

#set interfaces ethernet eth0 address dhcp

Now that the hostname, domain name, and IP information is set, its time to configure the
private network to have a DHCP server.
The process below enables the DHCP server for the 192.168.1.0/24 network. It will distribute
IP addresses at 50 and stop at 100. I also setup the outside DNS server and the default router
for the DHCP server to give to clients.

This command names the network PRIVATE and sets the DHCP address range to start at
192.168.1.50 and stop handing out addresses at 100

#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24


start 192.168.1.50 stop 192.168.1.100

Now setup the DNS and Default gateway. I use OpenDNS for my all of my DNS needs, it's free
and allows for content filtering.

#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24


dns-server 208.67.222.222
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24
dns-server 208.67.222.222
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24
default-router 192.168.1.1

The last step to setup connectivity for the private network is to setup NAT. NAT will allow you
to connect to the internet from any device on the private network.

#Set nat source rule 10


#Set nat source rule 10 source address 192.168.1.0/24
#Set nat source rule 10 outbound-interface eth0
#Set nat source rule 10 translation address masquerade
#commit
#save
#exit

Once you have added NAT, check to see if your private network PC can access the internet. At
this point, there should be full access from the private network to anywhere on your network.

< Prev Next >

Last Updated (Monday, 08 October 2012 20:58)

Comments

2 of 4 17-10-2012 05:46 PM
Vyatta 6.4 Quick Setup http://www.sohoadvisers.com/tutorials/vyatta-router/vyatta-router-quic...

# Akber 2012-10-09 23:31 0


Hi, I need your help,
I have two NIC one connected to LAN with LAN ip 192.168.9.1/24, another NIC is
connected to the cable comming from Leaseline modem. My question is what IP do I
assigned to these devices and what type of interfaces I should create, secondly do I
create the bridge in VMWARE. I forgot to mentioned that both these NICs are Bridge in
VM. when I create the interface on eth0 (connected to WAN) the BGP is coming, but on
interface eth1 (I unable to ping to my local LAN). What type of setup it would be. Your
help will be appricated. my email is akberalwani at gmail.com
I despartely need your help.
Reply | Reply with quote | Quote

# Tony 2012-10-10 20:58 0


Make sure you know which interface is associted with the modem versus the lan in
VMware.
In Vyatta run /sbin/ifconfig. this should return something like "eth0 Link
encap:Ethernet HWaddr 00:0a:29:7e:a5:az"
In VMware edit the virtual machine and look at the Network adapter properties,
specifically the MAC address field. Make sure your have the VM_Network assigned to
the correct NIC in Vyatta. If not, swap the NIC in VMware to the correct one.
Reply | Reply with quote | Quote

# Akber 2012-10-11 02:11 0


Hi Tony,
Thanks I have already done swap. Here what I did
1. On Physical Machine with 2 NIC
2. NIC1 connected WAN cable coming from SP Modem/Device to machine, I
configure the local IP (is it correct?)
3 NIC2 the LAN cable connected to Switch with IP 192.168.9.1/255.255.255.0
4. Vmware installed with both NIC configure as bridge mode (is this correct
config?)
5. Installed Vyatta & configure interfaces as below:
#set interfaces ethernet eth0 address 172.31.145.146/30
#set interfaces ethernet eth1 address 192.168.9.2/24 (confuse here, was my
above configuraiton for LAN and WAN good?, should my LAN be configure
192.168.9.1 but IP conflict come)
6. configure BGP
7. What should I configure on physical LAN IP, subnet, and gateway and what
should be on NIC2
Problem:
When I try to ping the LAN IP from vyatta nothing ping, also from outside
command prompt of vmware it is same situation it is not recognizing the
192.168.9.2
Reply | Reply with quote | Quote

Refresh comments list


RSS feed for comments to this post

Add comment

Name (required)

E-mail (required, but will not display)

Website

1000 symbols left

Notify me of follow-up comments

Refresh

Send

JComments

search...

3 of 4 17-10-2012 05:46 PM
Vyatta 6.4 Quick Setup http://www.sohoadvisers.com/tutorials/vyatta-router/vyatta-router-quic...

Home | Contact Us | Search | Site Map | About Us


Copyright © 2009 ---.
All Rights Reserved.

Designed by sohowebhosts.

4 of 4 17-10-2012 05:46 PM

You might also like