在debian中添加一条路由,
修改/etc/network/interfaces
############################################################
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.12.12
netmask 255.255.255.0
network 192.168.12.0
broadcast 192.168.12.255
gateway 192.168.12.3
# dns-* options are implemented by the resolvconf package, if installed
# DNS Server还需要更改另外一个文件 /etc/resolv.conf
dns-nameservers 192.168.15.2
up route add -net 192.168.15.0 netmask 255.255.255.0 gw 192.168.12.34 metric 1
down route del -net 192.168.15.0 netmask 255.255.255.0 gw 192.168.12.34 metric 1
############################################################