Home Lab: Lab Isolated Networks

Routed trough vyOS-labrouter-01.

Diagram #

Description

DvSwitch01 Portgroups #

PortgroupVLANIP Range
201-LAB201-10.0.1.020110.0.1.0/24
202-LAB202-10.0.2.020210.0.2.0/24
203-LAB203-10.0.3.020310.0.3.0/24
204-LAB204-10.0.4.020410.0.4.0/24

VyOS Router VM #

IPs #

InterfaceVLANIP Assignment
eth0n/a192.168.5.99/24
eth120110.0.1.1/24
eth220210.0.2.1/24
eth320310.0.3.1/24
eth420410.0.4.1/24

VyOS Set interfaces #

set interfaces ethernet eth0 address 192.168.5.99/24  
set interfaces ethernet eth1 address 10.0.1.1/24  
set interfaces ethernet eth2 address 10.0.2.1/24  
set interfaces ethernet eth3 address 10.0.3.1/24
set interfaces ethernet eth3 address 10.0.4.1/24

VyOS set NAT #

set nat source rule 10 outbound-interface eth0  
set nat source rule 10 translation address masquerade

VyOS Static Routes #

set protocols static route 0.0.0.0/0 next-hop 192.168.5.2 (router)

VyOS Enable SSH #

VyOS DHCP Servers #

DHCP ETH1 #

set service dhcp-server shared-network-name DHCP_ETH1 subnet 10.0.1.0/24
set service dhcp-server shared-network-name DHCP_ETH1 authoritative
set service dhcp-server shared-network-name DHCP_ETH1 subnet 10.0.1.0/24 range 2 start 10.0.1.100
set service dhcp-server shared-network-name DHCP_ETH1 subnet 10.0.1.0/24 range 2 stop 10.0.1.200
set service dhcp-server shared-network-name DHCP_ETH1 subnet 10.0.1.0/24 default-router 10.0.2.1

DHCP ETH2 #

set service dhcp-server shared-network-name DHCP_ETH2 subnet 10.0.2.0/24
set service dhcp-server shared-network-name DHCP_ETH2 authoritative
set service dhcp-server shared-network-name DHCP_ETH2 subnet 10.0.2.0/24 range 2 start 10.0.2.100
set service dhcp-server shared-network-name DHCP_ETH2 subnet 10.0.2.0/24 range 2 stop 10.0.2.200
set service dhcp-server shared-network-name DHCP_ETH2 subnet 10.0.2.0/24 default-router 10.0.2.1

DHCP ETH3 #

set service dhcp-server shared-network-name DHCP_ETH3 subnet 10.0.3.0/24
set service dhcp-server shared-network-name DHCP_ETH3 authoritative
set service dhcp-server shared-network-name DHCP_ETH3 subnet 10.0.3.0/24 range 3 start 10.0.3.100
set service dhcp-server shared-network-name DHCP_ETH3 subnet 10.0.3.0/24 range 3 stop 10.0.3.200
set service dhcp-server shared-network-name DHCP_ETH3 subnet 10.0.3.0/24 default-router 10.0.3.1

DHCP ETH4 #

set service dhcp-server shared-network-name DHCP_ETH4 subnet 10.0.4.0/24
set service dhcp-server shared-network-name DHCP_ETH4 subnet 10.0.4.0/24 range 4 start 10.0.4.100
set service dhcp-server shared-network-name DHCP_ETH4 subnet 10.0.4.0/24 range 4 stop 10.0.4.200
set service dhcp-server shared-network-name DHCP_ETH4 subnet 10.0.4.0/24 default-router 10.0.4.1

Note: DNS is not set. #

VyOS configure DNS #

set system name-server <ip>
commit
save

Updating VyOS #

add system image {URL}

MacOS Static Route (non-persistent) #

sudo route -n add -net 10.0.1.0/24 192.168.5.99 add net 10.0.1.0: gateway 192.168.5.99
sudo route -n add -net 10.0.1.0/24 192.168.5.99
sudo route -n add -net 10.0.2.0/24 192.168.5.99
sudo route -n add -net 10.0.3.0/24 192.168.5.99
sudo route -n add -net 10.0.4.0/24 192.168.5.99

This is a post in the Home Lab series. Posts in this series:


    Post last updated on October 10, 2024: Update labnetwork.md

    About

    vNinja.net is the online hub of Christian Mohn and Stine Elise Larsen.

    The site primarily focuses on IT architecture and data center technologies, with a strong emphasis on virtualization and related topics.
    While the main content revolves around these areas, you'll also find a range of other subjects covered from time to time, reflecting the interests of authors.

    Sponsors