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

Re: /etc/network/interfaces



<maik_kroko@web.de> writes:
> It could be an other file to insert the different
> gateways/destination/netmask but I am not sure.  Lot of the routing
> address have the same interface (eth0) but different
> gateways/destination/netmask.

That sounds like you want to use "IP aliasing":

iface eth0 inet static
        address 10.0.1.47
        netmask 255.255.240.0
        broadcast 10.0.15.255
        gateway 10.0.0.1

iface eth0:1 inet static
        address 192.168.17.17
        netmask 255.255.255.0
        broadcast 192.168.17.255

This setup will have packets to both local networks (10.0.0.0/20 and
192.168.17.0/24) go out over the wire attached to eth0; packets going
further in the world go via 10.0.0.1.

Any setup more complicated than this involves setting up real routing
tables, and/or having multiple physical interfaces.  You can use an
'up' command to add an extra route:

        up route add -net 192.168.18.0 netmask 255.255.255.0 gw 192.168.17.18

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: