#1 DEST via NEXTHOP #2 ADDRESS0=ip NETMASK0=netmask GATEWAY0=gateway
Debian
网络配置文件
网卡的所有配置都在/etc/network/interfaces
主机名配置
/etc/hostname/etc/hosts #### 路由配置
多网卡静态路由配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# The primary network interface auto eth0 #网卡开机启动 iface eth0 inet static #定义为静态 IP mtu 1492 #定义 MTU address 192.168.100.113 #定义 IP 地址 netmask 255.255.255.0 #定义子网掩码 dns-nameservers 192.168.100.253 #定义 DNS up route add -net 192.168.0.0/16 gateway 192.168.100.1 dev eth0 #eth0 连接增加静态路由 down route del -net 192.168.0.0/16 gateway 192.168.100.1 dev eth0 #eth0 断开删除指定路由 # The second network interface auto eth1 iface eth1 inet static mtu 1492 address x.x.x.x netmask y.y.y.y gateway z.z.z.z dns-nameservers 223.6.6.6