Wednesday, May 13, 2015

VyOS Configure DHCP Server

Before configuring DHCP server, you should have IP address. Verify by typing show interfaces and press Enter.




Type show configuration and press Enter to check if dhcp server is already configured.



Type configure and press Enter to enter configuration mode.



type set service dhcp-server shared-network-name MyDHCP subnet 192.168.1.0/24 default-router 192.168.1.1 and press Enter. This will set the default router which should be the IP address of the interface eth0.



type set service dhcp-server shared-network-name MyDHCP subnet 192.168.1.0/24 start 192.168.1.1 stop 192.168.1.254 and press Enter.This will set the range of the IP address will less to DHCP clients.



type set service dhcp-server shared-network-name MyDHCP subnet 192.168.1.0/24 exclude 192.168.1.1 and press Enter. This will exclude 192.168.1.1 to lease because it is our router IP address.



type set service dhcp-server shared-network-name MyDHCP subnet 192.168.1.0/24 lease 86400 and press Enter. This will set how long the IP address will lease to DHCP clients.



type show configuration and press Enter to show the dhcp server configuration.


Watch this video for reference.


VyOS Configure Interface Address Manually

After you enter the configuration mode:

Type set interface ethernet eth0 address 192.168.1.1/24 and press Enter. The IP address will depend on you.



In operation mode, type show interfaces and press Enter. You will see the IP Address 192.168.1.1/24 on eth0.


Watch this video for reference:


VyOS Configure Interface As DHCP Client

Turn on your VyOS:



Enter your login name and password:

After you logged in:


Type show interfaces and press Enter.


You will see the the eth0 has no IP address:



Type show configuration and press Enter.



You will see the current configuration which the interface eth0 has not yet configured its address.



Type configure and press Enter.


# will appear which means your are now ready to configure.



Type set interface ethernet eth0 address dhcp and press Enter.



Type commit and press Enter.


Starting DHCP client on eth0 will appear.


To save the configuration, type save and press Enter.



Type exit and press Enter.


If $ will appear it means you are in operation.


Type again show interfaces and press Enter.  Now the eth0 has an IP address.


Note: Please make sure that you have running DHCP sever for your VyOS can lease IP address.


Watch this video for reference:


Sunday, May 10, 2015

VyOS Configure IP Address

Login to your VyOs.

Type configure and press enter.

Type set interface ethernet eth0 address dhcp and press enter

This will acquire IP address from DHCP server.

Type set interface ethernet eth0 address x.x.x.x and press enter

This will assign IP address manually to the interface eth0.

Friday, May 8, 2015

Install Router Virtually

Need to test or practice a router, DHCP server, firewall, webporxy and port forwarding but you don't have any router or extra PC. This guide will you to solve your problem.

Using your own PC, we can install a router virtually. There are lot of PC-based routers available to use. One of them is the VyOS.

You need first to install a virtual player, like VMware Workstation and VM Virtual Box.

If you installed VMware Workstation, open the application.







Click New Virtual Machine



Click Next



If your installer is on the CD, select the Installer disc and choose the right drive number. If  the installer is on your hard drive in ISO format, select the Installer disc image file and browse the location of the installer. Click Next to proceed.








Choose Linux from the Guest operating system and select the Debian 5.



Enter the Virtual machine name you want.




Click Next




 Select the Maximum disk size in Gb.



Click Customize Hardware if you want to change the some of the hardware settings. Click Finish if you want to continue.



Enter vyos as login name and password



Type install image to permanently write the system on the hard disk.



Press Enter



Type Yes or just press Enter



Press Enter



Press Enter



Type Yes and press Enter



Select how big the root partition you want to create. Press Enter to select the maximum size.


Type the name you want for the image:



Enter your new password.



After the installation, type reboot and press Enter.



Type Yes and press Enter



After the restart, your VyOS is now booting from your hard disk.



Watch this video for your reference.