Re: two local networks
Jochen Schulz on 25/01/10 16:28, wrote:
Jochen Schulz on 25/01/10 14:46, wrote:
# route add -host 192.168.2.253 eth0
OK grand, with that route cmd, I can access the printer server.
One more question - where should I put this in the gateway's networking
setup to make it permanent?
AFAICT, there's no special mechanism for static routes. But you can add
them to /etc/network/interfaces like this:
iface eth0 inet dhcp
up route add -host 192.168.2.253 eth0
down route del -host 192.168.2.253 eth0
If I said:
route add -net 192.168.2.0 netmask 255.255.255.0 eth0
then all IP addresses from 1 to 255 would be routed, according to man.
I saw that using the -host option causes the routing table to set up a route
with the netmask 255.255.255.255 - not quite sure of the significance of that
though. Is that sensible though?