Configuració de la passarel·la de xarxa
Aquest és el procediment que vaig utilitzar per crear la passarel·la. Ho he dividit en 2 apartats diferents que són els que vam modificar, ja que tenen molt a veure amb l’edició de la passarel·la.
Aquesta és la configuració en l'apartat de /etc/network/interfaces
Aquest apartat té part amb la configuració de les VLAN.
root@debian:/home/major# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface (illa) - VLAN subinterfaces
auto enp1s0
iface enp1s0 inet static
address 172.25.212.12
netmask 255.255.0.0
gateway 172.25.130.254
####################################
#Interfaz de VLANs
###################################
auto enp2s0
iface enp2s0 inet manual
####################################
# VLAN 10
auto enp2s0.10
iface enp2s0.10 inet static
vlan-raw-device enp1s0
address 192.168.50.1
netmask 255.255.255.128
# VLAN 20
auto enp2s0.20
iface enp2s0.20 inet static
vlan-raw-device enp1s0
address 192.168.50.129
netmask 255.255.255.192
# VLAN 30
auto enp2s0.30
iface enp2s0.30 inet static
vlan-raw-device enp1s0
address 192.168.50.193
netmask 255.255.255.224
# VLAN 40
auto enp2s0.40
iface enp2s0.40 inet static
vlan-raw-device enp1s0
address 192.168.50.225
netmask 255.255.255.240
####################################
# The secondary network interface (clase)
Aquesta és la configuració en l'apartat de /etc/default/isc-dhcp-server
Aquest apartat es basa a configurar en quines interfícies el “server” del “DHCP” ha de sol·licitar.
root@debian:/home/major# cat /etc/default/isc-dhcp-server
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid
# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="enp2s0.10 enp2s0.20 enp2s0.30 enp2s0.40"
INTERFACESv6=""