直接连接NAS服务器

直接连接NAS服务器

我有一个色卡司NAS服务器,我正在尝试将其直接连接到 Linux 机器。本机有两块网卡:

sudo ifconfig -a
eth0      Link encap:Ethernet  HWaddr bc:30:5b:b9:38:bd  
          inet addr:12.97.33.70  Bcast:12.97.255.255  Mask:255.255.0.0
          inet6 addr: fe80::be30:5bff:feb9:38bd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6454 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4019 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2702341 (2.7 MB)  TX bytes:689534 (689.5 KB)
          Interrupt:17 

eth1      Link encap:Ethernet  HWaddr 00:10:18:8a:b8:c0  
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:56 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1060 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1060 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:126169 (126.1 KB)  TX bytes:126169 (126.1 KB)

我已经通过执行以下操作设置了第二个网卡(eth1)的 IP 地址、网络掩码和网关:

sudo ifconfig eth1 192.168.1.101 netmask 255.255.255.0
sudo route add default gw 192.168.1.1 eth1

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

现在我应该能够通过以下方式访问 NAS 服务器

http://192.168.1.100

但我不能,浏览器说网页不可用,更糟糕的是,执行这些命令后我立即失去了 eth0 上的互联网连接。

的结果ip link

ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether bc:30:5b:b9:38:bd brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:10:18:8a:b8:c0 brd ff:ff:ff:ff:ff:ff

有什么想法如何解决这个问题吗?

相关内容