更新:(根据以下要求)
serveradmin@FILESERVER:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 FILESERVER
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Ubuntu 服务器 12.04.1 x64
主要角色是 NFS 文件服务器,适用于 Mac OSX 客户端。
硬件:
Eth0:00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 04)
Eth1:07:00.0 Ethernet controller: MYRICOM Inc. Myri-10G Dual-Protocol NIC
配置:
ifconfig
eth0 Link encap:Ethernet HWaddr <MACADDRESS>
inet addr:192.168.0.150 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:460042020 errors:0 dropped:148 overruns:0 frame:0
TX packets:231906707 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:581431978417 (581.4 GB) TX bytes:259057368617 (259.0 GB)
Interrupt:20 Memory:f7d00000-f7d20000
eth1 Link encap:Ethernet HWaddr <MACADDRESS>
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6832208 errors:0 dropped:2 overruns:0 frame:0
TX packets:376 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:513826442 (513.8 MB) TX bytes:33688 (33.6 KB)
Interrupt:59
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:507 errors:0 dropped:0 overruns:0 frame:0
TX packets:507 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:45057 (45.0 KB) TX bytes:45057 (45.0 KB)
纳米/等/网络/接口
#The loopback network interface
auto lo
iface lo inet loopback
#The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.150
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8
#second network interface
auto eth1
iface eth1 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8
目前我在 OSX 客户端上使用:nfs://192.168.0.100/Volumes/Storage
挂载 NFS 共享。
我的问题是为什么所有数据(我已经使用各种监控工具 bmon、iftop、glances 等进行检查)都会通过较慢的连接传输??
此外,在使用上述设置配置 /etc/network/interfaces 后,我总是在启动时收到一条错误消息waiting for network configuration
。这些连接了吗?
答案1
您可以通过以下步骤限制接口仅响应接口本身上配置的地址(而不是系统上的任何地址)的 ARP 广播:
sysctl net.ipv4.conf.eth[num].arp_filter=1
例如,在这种情况下:
sysctl net.ipv4.conf.eth0.arp_filter=1
sysctl net.ipv4.conf.eth1.arp_filter=1
将以下行(不包括 sysctl 命令)添加到/etc/sysctl.conf
答案2
您正在直接访问 192.168.0.100,因此所有流量都将通过该 IP 路由。
如果这是更快的接口并且它通过 xxx150 路由,请发布 /etc/hosts;它可能包含一些有价值的信息。