Juanjillo wrote:
> Hello,
Hello
> I need to put some static routes in Ubuntu Server 9.10.
>
> Mi default GW is 172.16.4.240 and my network mask is 255.255.252.0
>
> I want to all the trafic for a subnet 172.16.20.0 goes for other gateway
> (172.26.4.20), but for only one ip the trafic goes for the default gateway.
>
> I add this in /etc/network/interfaces
>
> #Static Routes
> up route add -net 172.16.20.0/22 gw 172.16.4.20 dev eth0
> up route add -host 172.16.20.240 gw 172.16.4.240 dev eth0
Probably this is not the cause of the error you get, but you must change
the order of the two "up" commands.
Routing works like "first match wins" and 172.16.20.240 will always
match 172.16.20.0/22.
Do you really need the "dev eth0" part?
If not, leave it away. It may only cause you headache if you insert
another NIC into the server.
> I restart the network and give some errors and doesn´t work.
Please post the error message, so we all may see what you are speaking
about.
> Is this the correct way to do it?
> Any advice?
>
> Thanks.
> Kind regards.
Klaus
--
Klaus Zerwes
http://www.zero-sys.net