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

Re: configurar rota padrao - qual arquivo?



Bruno Schneider escreveu:
> Eu configurei uma máquina com ip fixo editando o arquivo
> /etc/network/interfaces. Coloquei as opções address, netmask, search,
> nameserver e gateway lá nesse arquivo. Porém não estou achando qual o
> lugar onde eu indico a rota padrão.

<http://www.debian.org/doc/manuals/reference/ch-gateway.en.html>

Leia o tópico 10.6.1.1, que incluive tem um exemplo lá:

"...You can configure other aspects of the interface or perform other
actions after the interface is brought up or before it is brought down
by specifying appropriate commands on "up" and "down" lines..."

=========
iface eth0 inet static
address 192.168.0.111
netmask 255.255.255.0
gateway 192.168.0.1
up route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.2 dev $IFACE
down route del -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.2 dev $IFACE
up echo Interface $IFACE going up | /usr/bin/logger -t ifup
down echo Interface $IFACE Going down | /usr/bin/logger -t ifdown
=========

Att,
Renato


Reply to: