hinetworking 发表于 2013-12-26 02:19

双网卡双网关配置

该如何配置:
我系统是ubuntu12.04 配置文件/etc/network/interfaces如下:
auto lo

iface lo inet loopback

auto eth2
iface eth2 inet static
      address 10.201.11.142
      netmask 255.255.255.0
      gateway 10.201.11.1
      dns-nameservers 10.10.0.21

auto eth0
iface eth0 inet static
       address 10.201.11.143
       netmask 255.255.255.0
       gateway 10.201.11.1
       dns-nameservers 10.10.0.21

经实践,这2个ip只有一个能起作用。。。。求指导
但是如果我将其中一个ip配置去掉gateway和dns-nameservers参数后,就两个都起作用了。

ssffzz1 发表于 2013-12-26 08:33

肯定了。正常的配置。

hinetworking 发表于 2013-12-26 12:08

正常的配置?我这么配置应该正确的?
回复 2# ssffzz1


   

联合中 发表于 2014-01-02 16:41

kinsourage 发表于 2014-01-02 17:54

同一个主机上的两个网卡,你是如何知道他俩同时工作的?

tangye 发表于 2014-01-03 13:19

default gateway只能一个生效

shaka1943 发表于 2014-01-03 13:46

楼主,你的两个IP处于同一网络, 因此只需要设置一个网关和DNS即可。换句话说,只设置一个网关才是正确的配置。

gacad 发表于 2014-01-05 18:03

在同一网卡上绑定二个或多个IP
Eth0:1
Eth0:2

侬丽都 发表于 2014-01-10 13:39

路过了~~~~~~~~~~····
页: [1]
查看完整版本: 双网卡双网关配置