[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: two local networks

Jochen Schulz on 25/01/10 16:28, wrote:
Adam Hardy:
Jochen Schulz on 25/01/10 14:46, wrote:
# route add -host 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 eth0
    down route del -host eth0

If I said:

route add -net netmask 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 - not quite sure of the significance of that though. Is that sensible though?

Reply to: