如何在 ubuntu 服务器上有两个 NIC 并且不影响 dns?

How to have two NIC in ubuntu server and not affecting dns?

在我的 Ubuntu 服务器 16.04 中,我有这个文件:/etc/network/interfaces

# The primary network interface
auto eth0
iface eth0 inet dhcp

#auto eth1
#iface eth1 inet static
#    address 10.0.0.41
#    netmask 255.255.255.0
#    network 10.0.0.0
#    broadcast 10.0.0.255
#    gateway 10.0.0.1

eth0 链接到 dsl,如果我取消注释 eth1 部分以启用第二个 NIC 卡,我无法像 yahoo.com:

那样 ping 远程服务器
ping yahoo.com
PING yahoo.com (98.138.253.109) 56(84) bytes of data.
From 10.0.0.41 icmp_seq=1 Destination Host Unreachable
From 10.0.0.41 icmp_seq=2 Destination Host Unreachable
From 10.0.0.41 icmp_seq=3 Destination Host Unreachable

找到解决方案:删除网关 10.0.0.1