25 novembre 2005

Routes statiques permanentes sous Debian

The correct way to add a static route in a GNU/Linux Debian Sarge is in /etc/network/interfaces as an up command.
auto eth0
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 65.5.53.1
up "/sbin/route add -net 192.168.200.0 netmask 255.255.255.0 gw 192.168.1.5"
down "/sbin/route del -net 192.168.200.0 netmask 255.255.255.0 gw 192.168.1.5"

Aucun commentaire: