AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 18963
In Process
Alexar
Alexar
Asked: 2010-12-27 20:15:30 +0800 CST2010-12-27 20:15:30 +0800 CST 2010-12-27 20:15:30 +0800 CST

网络访问:我无法从 192.168.1.102 访问 192.168.1.101

  • 772

我在 IP 为 192.168.1.101 的 PC 上运行 Ubuntu 10.04。一切正常,例如我的 Web 服务器正在运行,我可以正常看到http://localhost/或http://192.168.1.101。

但问题是我无法在 192.168.1.102 的笔记本电脑上看到我的电脑,例如在我的笔记本电脑http://192.168.1.101上,浏览器中的连接超时。或尝试在任何端口上远程登录会导致:

telnet: Unable to connect to remote host: Connection timed out

笔记本电脑也在运行全新安装的 Ubuntu,并且两台计算机中都没有设置防火墙内容。

PS:

  • 两台电脑可以ping互相很好。

  • 路由器是一个 cicso linksys 无线 ADSL 调制解调器。

  • 目前,我可以毫无问题地从 192.168.1.101 连接到在 192.168.1.102 上运行的 Windows 上的 FTP 服务器。

  • 我用朋友的笔记本电脑(他们使用 Windows 7 和 XP)测试了地址http://192.168.1.101 。都收到“连接已重置”。它与我的笔记本电脑的响应不同。

  • 这些是在我的 PC 192.168.1.101 上运行的命令:

ifconfig:

adp@adp-desktop:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:18:e1:8e:cf  
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe70::226:18ff:fee1:8ecf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1831935 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1493786 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1996855925 (1.9 GB)  TX bytes:215288238 (215.2 MB)
          Interrupt:27 Base address:0xa000 

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:16436  Metric:1
          RX packets:951742 errors:0 dropped:0 overruns:0 frame:0
          TX packets:951742 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:494351095 (494.3 MB)  TX bytes:494351095 (494.3 MB)

vmnet1    Link encap:Ethernet  HWaddr 00:50:46:c0:00:01  
          inet addr:192.168.91.1  Bcast:192.168.91.255  Mask:255.255.255.0
          inet6 addr: fe70::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vmnet8    Link encap:Ethernet  HWaddr 00:50:46:c0:00:08  
          inet addr:192.168.156.1  Bcast:192.168.156.255  Mask:255.255.255.0
          inet6 addr: fe70::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

端口 80 设置为 0.0.0.0 好:

adp@adp-desktop:~$ netstat -ln | grep 'LISTEN '
tcp        0      0 127.0.0.1:52815         0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:4559            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:7634          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.1.1:7777          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:33601           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp6       0      0 :::139                  :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::445                  :::*                    LISTEN     

/etc/hosts.deny是空的:

adp@adp-desktop:~$ cat /etc/hosts.deny 
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
#                  See the manual pages hosts_access(5) and hosts_options(5).
#
# Example:    ALL: some.host.name, .some.domain
#             ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.
#
# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID

netstat -l:

adp@adp-desktop:~$ netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 localhost:52815         *:*                     LISTEN     
tcp        0      0 *:hylafax               *:*                     LISTEN     
tcp        0      0 *:www                   *:*                     LISTEN     
tcp        0      0 *:4369                  *:*                     LISTEN     
tcp        0      0 localhost:7634          *:*                     LISTEN     
tcp        0      0 *:ftp                   *:*                     LISTEN     
tcp        0      0 *:xmpp-server           *:*                     LISTEN     
tcp        0      0 localhost:ipp           *:*                     LISTEN     
tcp        0      0 *:smtp                  *:*                     LISTEN     
tcp        0      0 *:5280                  *:*                     LISTEN     
tcp        0      0 adp-desktop:7777        *:*                     LISTEN     
tcp        0      0 *:33601                 *:*                     LISTEN     
tcp        0      0 *:xmpp-client           *:*                     LISTEN     
tcp        0      0 localhost:mysql         *:*                     LISTEN     
tcp6       0      0 [::]:netbios-ssn        [::]:*                  LISTEN     
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN     
tcp6       0      0 [::]:microsoft-ds       [::]:*                  LISTEN     
udp        0      0 *:bootpc                *:*                                
udp        0      0 *:mdns                  *:*                                
udp        0      0 *:47467                 *:*                                
udp        0      0 192.168.1.10:netbios-ns *:*                                
udp        0      0 192.168.91.1:netbios-ns *:*                                
udp        0      0 192.168.156.:netbios-ns *:*                                
udp        0      0 *:netbios-ns            *:*                                
udp        0      0 192.168.1.1:netbios-dgm *:*                                
udp        0      0 192.168.91.:netbios-dgm *:*                                
udp        0      0 192.168.156:netbios-dgm *:*                                
udp        0      0 *:netbios-dgm           *:*                                
raw        0      0 *:icmp                  *:*                     7          

netstat -rn:

adp@adp-desktop:~$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.91.0    0.0.0.0         255.255.255.0   U         0 0          0 vmnet1
192.168.156.0   0.0.0.0         255.255.255.0   U         0 0          0 vmnet8
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

笔记本电脑上的命令,192.168.1.102:

如果配置:

root@fakeuser-laptop:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1c:33:a2:31:15 
          UP BROADCAST RUNNING 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:21

eth1      Link encap:Ethernet  HWaddr 00:2d:d9:3e:1f:6c 
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe70::21d:d9ff:fe3e:1f6c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5681 errors:0 dropped:0 overruns:0 frame:10313
          TX packets:6717 errors:6 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4055251 (4.0 MB)  TX bytes:779308 (779.3 KB)
          Interrupt:18

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:16436  Metric:1
          RX packets:206 errors:0 dropped:0 overruns:0 frame:0
          TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:15172 (15.1 KB)  TX bytes:15172 (15.1 KB)

netstat -rn:

root@fakeuser-laptop:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth1

telnet:

fakeuser@fakeuser-laptop:~$ telnet 192.168.1.101 25
Trying 192.168.1.101...
telnet: Unable to connect to remote host: Connection timed out
fakeuser@fakeuser-laptop:~$ telnet 192.168.1.101 22
Trying 192.168.1.101...
telnet: Unable to connect to remote host: Connection timed out
fakeuser@fakeuser-laptop:~$ telnet 192.168.1.101 80
Trying 192.168.1.101...
telnet: Unable to connect to remote host: Connection timed out
networking remote-access
  • 1 1 个回答
  • 38318 Views

1 个回答

  • Voted
  1. Scaine
    2010-12-28T03:18:39+08:002010-12-28T03:18:39+08:00

    您在问题中提供的其他信息表明您的笔记本电脑的以太网连接存在问题。在您的 ifconfig 输出中报告了超过一万个帧错误。

    • 帧错误:接收到不正确的 CRC 和非整数字节数。这通常是冲突或以太网设备损坏的结果。

    当您的卡配置为自动/自动时,这有时是由交换机端口设置为 100/全双工引起的。要确认在您的笔记本电脑上执行此操作:

    sudo apt-get install ethtool
    sudo ethtool eth1
    
    • 3

相关问题

  • 如何设置 VLAN 转发?

  • 如何将主机 Ubuntu 上的 VPN (tun0) 网络适配器映射到 VirtualBox 来宾 Windows?

  • 如何限制下载/上传带宽?

  • 如何通过 Windows 网络共享文件?

  • 面板小程序以文本形式显示当前网络流量?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何安装 .run 文件?

    • 7 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    如何获得 CPU 温度?

    • 21 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Marko Smith

    如何使用命令行将用户添加为新的 sudoer?

    • 7 个回答
  • Marko Smith

    更改文件夹权限和所有权

    • 9 个回答
  • Marko Smith

    你如何重新启动Apache?

    • 13 个回答
  • Marko Smith

    如何卸载软件?

    • 11 个回答
  • Marko Smith

    如何删除 PPA?

    • 26 个回答
  • Martin Hope
    NES 如何启用或禁用服务? 2010-12-30 13:03:32 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    Olivier Lalonde 如何在结束 ssh 会话后保持进程运行? 2010-10-22 04:09:13 +0800 CST
  • Martin Hope
    David B 如何使用命令行将用户添加为新的 sudoer? 2010-10-16 04:02:45 +0800 CST
  • Martin Hope
    Hans 如何删除旧内核版本以清理启动菜单? 2010-08-21 19:37:01 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve