免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2787 | 回复: 3
打印 上一主题 下一主题

关于网络故障的全面分析排除实战 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-14 23:04 |只看该作者 |倒序浏览
出处:思科培训网\r\n\r\n我们曾经介绍过一篇关于如何选择网络故障排除方法的文章,介绍了三种网络故障排除方法。这里我们又重拾话题,通过具体实例助您排除网络故障。\r\n\r\n    开始以前,先来简要回顾一下介绍过的三种方法。 \r\n\r\n    从下至上的方法:从OSI模型底端开始,顺序向上。\r\n\r\n    从上至下的方法:从OSI模型顶端开始,顺序往下。\r\n\r\n    分而治之的方法:从OSI模型特定层开始,确定问题是在该层、还是上层或下层。\r\n\r\n    从理论上来理解这些方法是容易的,但是如何在实际应用中运用来解决实际问题呢?来看几个利用从下至上的以及分而治之方法的实例。(因为从上至下的方法实际就是从下至上方法的逆向方法,所以不做介绍。)\r\n\r\n    从下至上\r\n\r\n    适用情况:当用户从远程地址打来电话说电脑不能工作,他所使用的应用需要网络访问。\r\n\r\n    开始:首先查看用户1层的连通性(如物理层)。例如,可以让用户看网线是否与墙上端口和设备相连。对于大部分用户来说,让他们去查看交换机端口的指示灯状态要比向他们解释什么是网线要容易得多。\r\n\r\n    在理想情况下,交换机管理良好,有完备的网络记录文档。因此,可知道这位用户使用的墙上插座端口号为12,而且知道12号口与交换机接线柜里11号口相连。 (注意,如果管理员不掌握这些信息,就需要询问用户获得这些信息)\r\n\r\n    方法1:然后,远程登陆Cisco交换机,使用show ip interface brief命令。可得到列表A的信息。\r\n\r\n    列表A\r\n\r\nSwitch# show ip interface brief\r\nInterface           IP-Address      OK? Method Status       Protocol\r\nVlan1               10.1.1.1        YES NVRAM  up           up\r\nFastEthernet0/1     unassigned      YES unset  up           up\r\nFastEthernet0/2     unassigned      YES unset  down         down\r\nFastEthernet0/3     unassigned      YES unset  down         down\r\nFastEthernet0/4     unassigned      YES unset  down         down\r\nFastEthernet0/5     unassigned      YES unset  down         down\r\nFastEthernet0/6     unassigned      YES unset  down         down\r\nFastEthernet0/7     unassigned      YES unset  down         down\r\nFastEthernet0/8     unassigned      YES unset  down         down\r\nFastEthernet0/9     unassigned      YES unset  up           up\r\nFastEthernet0/10    unassigned      YES unset  up           up\r\nFastEthernet0/11    unassigned      YES unset  down         down\r\nFastEthernet0/12    unassigned      YES unset  up           up\r\nFastEthernet0/13    unassigned      YES unset  up           up\r\nFastEthernet0/14    unassigned      YES unset  up           up\r\nFastEthernet0/15    unassigned      YES unset  down         down\r\nFastEthernet0/16    unassigned      YES unset  down         down\r\nFastEthernet0/17    unassigned      YES unset  down         down\r\nFastEthernet0/18    unassigned      YES unset  down         down\r\nFastEthernet0/19    unassigned      YES unset  down         down\r\nFastEthernet0/20    unassigned      YES unset  down         down\r\nFastEthernet0/21    unassigned      YES unset  down         down\r\nFastEthernet0/22    unassigned      YES unset  down         down\r\nFastEthernet0/23    unassigned      YES unset  up           up\r\nFastEthernet0/24    unassigned      YES unset  up           up\r\nSwitch#\r\n\r\n    通过查看这个输出,我们可以发现FastEthernet0/11端口没有工作。由于这属于第一层故障,所以让用户顺着PC的网卡上的网线找到交换机端口。

论坛徽章:
0
2 [报告]
发表于 2006-06-14 23:05 |只看该作者
方法2:如果不是这个问题怎么办?如果用户使用的是14号端口又该怎么办?既然有连接,说明网是通的。下一步应该怎么办?在交换机上使用show interface fastethernet 0/14 命令。显示如表B所列。\r\n\r\n    列表B\r\n\r\nSwitch# show interface fa0/14FastEthernet0/14 \r\nis up, line protocol is up (connected)\r\nHardware is Fast Ethernet, address is 0014.1c40.b08e (bia 0014.1c40.b08e)\r\nMTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,\r\nreliability 255/255, txload 1/255, rxload 1/255\r\nEncapsulation ARPA, loopback not set\r\nKeepalive set (10 sec)\r\nHalf-duplex, 100Mb/s, media type is 100BaseTX\r\ninput flow-control is unsupported output flow-control is unsupported\r\nARP type: ARPA, ARP Timeout 04:00:00\r\nLast input never, output 00:00:00, output hang never\r\nLast clearing of \"show interface\" counters never\r\nInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0\r\nQueueing strategy: fifo\r\nOutput queue: 0/40 (size/max)\r\n5 minute input rate 0 bits/sec, 0 packets/sec\r\n5 minute output rate 2000 bits/sec, 3 packets/sec\r\n96848 packets input, 8083322 bytes, 0 no buffer\r\nReceived 9293 broadcasts (0 multicast)\r\n0 runts, 0 giants, 0 throttles\r\n323210 input errors, 123123 CRC, 0 frame, 0 overrun, 0 ignored\r\n0 watchdog, 133 multicast, 0 pause input\r\n0 input packets with dribble condition detected\r\n10061627 packets output, 866400040 bytes, 0 underruns0 output errors, 0 collisions, 2 interface resets\r\n0 babbles, 0 late collision, 2 deferred\r\n132 lost carrier, 20 no carrier, 0 PAUSE output\r\n0 output buffer failures, 0 output buffers swapped out\r\nSwitch#  \r\n\r\n    通过表B,我们可以发现尽管网络可以连接,但存在一些第一层的问题。

论坛徽章:
0
3 [报告]
发表于 2006-06-14 23:05 |只看该作者
方法3:如果这个端口有网络连接而且没有问题该怎么办呢?接下来就应该查看第二层。请看例子\r\n\r\n    Switch#show mac address-table interface fastEthernet 0/14\r\n\r\n    硬件地址表\r\n\r\n    Vlan 硬件地址 类型 端口号\r\n\r\n    1 00c0.b768.5409 DYNAMIC Fa0/14\r\n\r\n    Total Mac Addresses for this criterion: 1\r\n\r\n    Switch#\r\n\r\n    如果这一信息符合PC上的MAC地址,接下来就要确定交换机端口上没有不相关的配置。例如:\r\n\r\nSwitch# show run interface fa0/14\r\nBuilding configuration...\r\nCurrent configuration : 82 bytes\r\ninterface FastEthernet0/14\r\nswitchport mode access\r\nspanning-tree portfastend\r\nSwitch#\r\n\r\n    尽管可能还有第二层别的问题存在,至少在这一层看起来情况还不错。接下来,查看第三层。在PC上使用IPCONFIG /ALL命令进行检查,如列表C列所示。\r\n\r\n    列表C\r\n\r\nC:> ipconfig /all\r\nWindows IP Configuration\r\nHost Name . . . . . . . . . . . . : PC100\r\nPrimary Dns Suffix  . . . . . . . : abcdef.com\r\nNode Type . . . . . . . . . . . . : Peer-Peer\r\nIP Routing Enabled. . . . . . . . : No\r\nWINS Proxy Enabled. . . . . . . . : No\r\nDNS Suffix Search List. . . . . . : abcdef.com\r\nEthernet adapter Local Area Connection:\r\nConnection-specific DNS Suffix  . : abcdef.com\r\nDescription . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection\r\nPhysical Address. . . . . . . . . : 00-C0-B7-68-54-09\r\nDhcp Enabled. . . . . . . . . . . : Yes\r\nAutoconfiguration Enabled . . . . : Yes\r\nIP Address. . . . . . . . . . . . : 10.80.2.2\r\nSubnet Mask . . . . . . . . . . . : 255.255.0.0\r\nDefault Gateway . . . . . . . . . : 10.80.2.1\r\nDHCP Server . . . . . . . . . . . : 10.2.1.26\r\nDNS Servers . . . . . . . . . . . : 10.2.1.26\r\nPrimary WINS Server . . . . . . . : 10.2.1.26\r\nSecondary WINS Server . . . . . . : 10.2.1.21\r\nLease Obtained. . . . . . . . . . : Wednesday, November 02, 2005 5:43:55 AM\r\nLease Expires . . . . . . . . . . : Thursday, November 10, 2005 5:43:55 AM\r\n\r\n    这里,我们可以看到PC有IP地址,但是这地址对么?这台PC通过DHCP获得10.80.x.x范围内的地址,但是现在地址却是10.1.x.x。\r\n\r\n    所以,我们终于发现了问题。DHCP服务器分发的IP地址不属于子网。这种问题多出现在PC从某个子网挪到另一个子网时,PC依然请求旧的IP地址就产生了问题。\r\n\r\n    可以尝试这样解决问题,让所有接口的租用IP地址重新交付给DHCP服务器(即归还IP地址)。使用IPCONFIG /RELEASE,然后使用IPCONFIG /RENEW命令,然后PC就会获得正确的IP地址,所有的网络应用就都可以使用了。

论坛徽章:
0
4 [报告]
发表于 2006-06-14 23:06 |只看该作者
分而治之\r\n\r\n    假设情况:某个用户说所有的应用除了IE浏览器都可以使用。当尝试浏览网页时,出现“找不到主机或DNS错误,网页无法显示”的提示。\r\n\r\n    如何开始:由于是跟应用相关的问题,可能会想采用从上到下的方法从OSI模型的应用层查起。但是,其实有多种原因可能造成这种错误。\r\n\r\n    采用分而治之的方法,先从我们了解的情况入手。用户说除IE外其他应用都可以工作。问题可能就出现在本地网和外网。\r\n\r\n    方法1: 既然错误报告提到了DNS, 可以将它看做DNS问题。既然其他应用依然工作,也许存在有一台本地DNS服务器给局域网应用提供服务。\r\n\r\n    为了检测这一理论,我们可以使用nslookup命令来确定DNS是否在工作。例子如下:\r\n\r\nC:> nslookup www.abcdef.com\r\nServer: dns.abcdef.com\r\nAddress: 10.2.1.26\r\nNon-authoritative answer:\r\nName: c10-sha-redirect-lb.cnet.com\r\nAddress: 216.239.115.148\r\nAliases: www.abcdef.com\r\n\r\n    这表示DNS确实在工作,所以还要继续查看。\r\n\r\n    方法2:用户所要访问的网站是否存在于本地或者远程的子网?就象互联网网站一样,我们称它为外部子网。\r\n\r\n    既然有些连接以及其它应用还可以使用,我们可以查看第三层,网络层。我们使用ipconfig命令来查看默然网关是否是10.80.2.1。现在需要ping默认网关。如下面的例子。\r\n\r\nC:> ping 10.80.2.1\r\nPinging 10.80.2.1 with 32 bytes of data:\r\nRequest timed out.\r\nRequest timed out.\r\nRequest timed out.\r\nRequest timed out.\r\nPing statistics for 10.80.2.1:\r\nPackets: Sent = 4, Received = 0, Lost = 4 (100% loss),\r\n\r\n    从这里,我们可以确定第三层存在问题。默然网关停用或者不可达。\r\n\r\n    如果所处位置是中央数据中心,远程登陆用户默认网关。登陆以后,使用show ip interface brief命令,如列表D所示。\r\n\r\n    列表D\r\n\r\nRouter# show ip interface brief\r\nInterface              IP-Address      OK? Method Status      Protocol\r\nSerial3/0              unassigned      YES NVRAM  up           up\r\nSerial3/0.1            10.80.100.2     YES NVRAM  up           up\r\nSerial3/0.2            10.80.100.6     YES NVRAM  up           up\r\nBRI3/0                 unassigned      YES NVRAM  up           up\r\nBRI3/0:1               unassigned      YES unset  down         down\r\nBRI3/0:2               unassigned      YES unset  down         down\r\nDialer1                10.80.100.10    YES NVRAM  up           up\r\nLoopback1              unassigned      YES NVRAM  up           up\r\nEthernet3/0            10.80.2.1       YES NVRAM  down         down\r\nRouter#\r\n\r\n    通过这一输出结果,我们可以确定连接路由器和本地交换机的网线没有连接。我们曾经以为是第三层出了问题,但是实际上问题出在第一层。\r\n\r\n    在我看来,分而治之的方法需要更多网络和故障排除的知识。但是,这种发法也是发现问题最快的方法。使用故障排除方法类似于使用访问列表,一旦发现相符合的情况,就没有必要继续追查。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP