Skip to content

E05 Configuring DHCP and Static Routing

Back to the Course Schedule

Back to the Material: DHCP and Static Routing


Update your topology, by cloning virtual machines and adjusting adapters accordinly,


Danger: Be sure to use an original cable (read: Internal Network/<name>) for the connection between Lubuntu3 and Vyos2

Video: Instructions for E05

Example Video: E05 step-by-step, Exercise done in teaching by the teacher during summer 2021

I explain long and in detail, thus long video but, you can't go wrong with this one. Hopefully. Same video description has time tags for E01 - E05.

This exercise follows E04, thus uses its working configuration.

Static Routing

Calculating subnets and adding a Router R2

  1. Use the third 50 host subnet (from E03 Calculating Subnets, Exercise 2) between R2 and Lubuntu3.
  2. Use a 2 host subnet (from E03 Calculating Subnets, Exercise 4) between the routers R1 and R2

Addressing Routers - always manually

Configure R1 & R2 with correct IP addresses.

Addressing Devices - Dynamically

DHCP on the Router(s)

  1. Add and document a DHCP server on R1 for subnets behind the switches (except network_devices).
  2. Do the same for R2 (for its subnets)
    • Note! No switch VM's required behind R2, VM and Adapter on R2 can be on the same Internal Network in VirtualBox

Danger: Many students configure the address on R2 between Lubuntu3-R2 on a vif interface

There are no switches doing tagged/untagged between the devices. Thus the address has to be directly under the ethernet interface.

Bug: If you configure dhcp and realize that you have to move the address from vif to -> ethX, the DHCP server gets tangled

Success: This is a clear bug in Vyos... reboot of the vyos fixes the issue


Document the show dhcp server leases -command from R1 & R2 once DHCP is working.

Creating a static route(s) for the Router(s)

Perform symmetric routing between R1 and R2.

Danger: Many have faced this problem

Do not use next-hop (e.g.) as your next hop. The octets between the dots are represented as decimal numbers. Thus 05 -> 5 resulting in (e.g.)!

Danger: Vyos accepts the as input even though it fails

Shame on the programmers of Vyos... This is still a good example of a topic in basics of programming.

Verifying connectivity

Verify connectivity between end hosts on different subnets (the Lubuntu(s)) by using ping and traceroute

What to document of the exercise?

Document in the repository & /documentation/E05/ -folder:

  • Screenshots, analysis & text while doing
  • Proof of working connectivity tests
  • DHCP server leases
  • Configuration of all the network devices
  • Your topology drawings (physical, logical, etc)
SSH into Vyos from Lubuntu?

To enable SSH server in vyos.ova:

vyos$vyos# set service ssh port 22
vyos$vyos# commit
vyos$vyos# save

You can now similarly ssh vyos@ into Vyos from the Lubuntu virtual machine.

Back to the Schedule?

Back to the Course Schedule


This course and its materials are written by Karo Saharinen and licenced by Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) license.

Creative Commons -licence