Simple setup here. I have a machine with multiple network interfaces, two for example - eth0 and eth1.
eth0 has a static address and has a default gateway assigned.
eth1 has a static address and will not have a gateway on that interface's network address range.
The Question
Do I need an entry in network configuration file (/etc/network/interfaces) for the gateway option on the interface that does not have a gateway on its network, eth1 in the above example?
Additional Questions
If I do something like:
gateway 127.0.0.1
Will this have adverse effects? Will this interface now have a way to reach a gateway or will using the loopback interface as a gateway have no effect (i.e. same as leaving the gateway option off entirely)?
Example config for discussion
/etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# Interface 1
allow-hotplug eth0
iface eth0 inet static
address 10.1.10.200
netmask 255.255.255.0
gateway 10.1.10.1
# Interface 2
allow-hotplug eth1
iface eth1 inet static
address 192.168.100.1
netmask 255.255.0.0
gateway 127.0.0.1 # This is the line in question