Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 为什么我能';t用油灰连接eth0?_Linux_Apache_Centos6_Httpd.conf - Fatal编程技术网

Linux 为什么我能';t用油灰连接eth0?

Linux 为什么我能';t用油灰连接eth0?,linux,apache,centos6,httpd.conf,Linux,Apache,Centos6,Httpd.conf,服务器是一个LAMP环境。我使用DHCP模式添加一个eth1,ifconfig如上图所示。我不能用ip 172.26.26.60连接到eth0,我只能用putty连接到带有172.26.26.37的eth1。已设置但不工作 我想知道为什么我不能连接到172.26.26.60? 编辑: 路线-n 它的输出如下: 内核IP路由表 目标网关Genmask标志度量参考使用Iface 172.26.26.0 0.0.0.0 255.255.192 U 0 0 0 eth0 172.26.26.0 0.0.

服务器是一个LAMP环境。我使用DHCP模式添加一个eth1,ifconfig如上图所示。我不能用ip 172.26.26.60连接到eth0,我只能用putty连接到带有172.26.26.37的eth1。已设置但不工作

我想知道为什么我不能连接到172.26.26.60? 编辑: 路线-n 它的输出如下:

内核IP路由表

目标网关Genmask标志度量参考使用Iface

172.26.26.0 0.0.0.0 255.255.192 U 0 0 0 eth0

172.26.26.0 0.0.0.0 255.255.192 U 0 0 0 eth1


0.0.0.0 172.26.26.1 0.0.0.0 UG 0 0 eth1检查Ssh服务器配置。它可能只监听一个地址
netstat-an | grep 22 | grep LISTEN
应显示您正在侦听的地址。

步骤0-ping,检查电缆等

步骤1-检查sshd是否真的在监听0.0.0.0。否则,它仅在相应的界面上可用

步骤2-检查iptables-nvL


步骤3-检查路由-n

连接到不同LAN的端口是否恰好共享同一个私有子网?路由-n内核IP路由表目标网关Genmask标志度量参考使用Iface 172.26.26.0 0.0.0 255.255.192 U 0 0 0 0 eth0 172.26.26.0 0 0.0.0255.255.255.192 U 0 0 0 eth1 0.0.0.0 172.26.26.1 0.0.0.0 UG 0 0 0 0 eth1我使用route-n,它显示如下。
eth0      Link encap:Ethernet  HWaddr 06:20:08:46:CD:C7
          inet addr:172.26.26.60  Bcast:172.26.26.63  Mask:255.255.255.192
          inet6 addr: fe80::420:8ff:fe46:cdc7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:1577 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1340 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:141738 (138.4 KiB)  TX bytes:215770 (210.7 KiB)
          Interrupt:165

eth1      Link encap:Ethernet  HWaddr 06:81:8C:00:F4:F2
          inet addr:172.26.26.37  Bcast:172.26.26.63  Mask:255.255.255.192
          inet6 addr: fe80::481:8cff:fe00:f4f2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:269 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16216 (15.8 KiB)  TX bytes:8921 (8.7 KiB)
          Interrupt:164