i'm doing some tests for my class, i have a Ubuntu Server 16.04, totally stock.
This server has 3 Ethernet NICs, one of them is connected to my gateway, 192.168.1.1, and the other two are connected to one host each.
Is it possible to have these hosts in separate networks, and still be able to connect to my main gateway, and have internet?
This is my interfaces file:
# 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
allow-hotplug enp2s3
iface enp2s3 inet static
address 192.168.1.200
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
allow-hotplug enp2s2
iface enp2s2 inet static
address 192.168.100.1
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
gateway 192.168.1.200
dns-nameservers 192.168.1.200
allow-hotplug enp2s1
iface enp2s1 inet static
address 192.168.101.1
netmask 255.255.255.0
network 192.168.101.0
broadcast 192.168.101.255
gateway 192.168.1.200
dns-nameservers 192.168.1.200