【问题标题】:Why I can't connect the eth0 with putty?为什么我无法将 eth0 与 putty 连接?
【发布时间】:2015-05-27 07:23:08
【问题描述】:
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

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

我想知道为什么连接不上172.26.26.60?

编辑: 路线-n 它的输出如下:

内核IP路由表

Destination Gateway Genmask Flags Metric Ref Use Iface

172.26.26.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0

172.26.26.0 0.0.0.0 255.255.255.192 U 0 0 0 eth1

0.0.0.0 172.26.26.1 0.0.0.0 UG 0 0 0 eth1

【问题讨论】:

  • 端口是否连接到恰好共享同一个私有子网的不同局域网?

标签: linux apache centos6 httpd.conf


【解决方案1】:

检查您的 SSH 服务器配置。它可能只监听一个地址。 netstat -an | grep 22 | grep LISTEN 应该会显示您正在收听的地址。

【讨论】:

    【解决方案2】:

    第 0 步 - ping、检查电缆等

    第 1 步 - 检查 sshd 是否真的在监听 0.0.0.0。否则只能在对应的界面上使用。

    第 2 步 - 检查 iptables -nvL

    第 3 步 - 检查路线 -n

    【讨论】:

    • route -n 内核 IP 路由表 Destination Gateway Genmask Flags Metric Ref Use Iface 172.26.26.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0 172.26.26.0 0.0.0.0 255.255.255.192 U 0 0 0 eth1 0.0.0.0 172.26.26.1 0.0.0.0 UG 0 0 0 eth1 我用 route -n 它显示如下。
    猜你喜欢
    • 1970-01-01
    • 2017-07-30
    • 1970-01-01
    • 1970-01-01
    • 2017-06-06
    • 2021-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多