Chinaunix首页 | 论坛 | 博客
  • 博客访问: 177207
  • 博文数量: 59
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2015-06-29 10:38
个人简介

我以为我们可以一起走到最后,呵呵。。。 结果才走了两步,你说你要打的

文章分类
文章存档

2015年(59)

我的朋友

分类: 系统运维

2015-06-30 10:27:34

原文地址:CCNP交换环境排错实验 作者:cissdy

实验要求:
如图搭建好拓扑,导进预配,对以下列出错误进行排查。
1、 R1 不 SW1 之间的链路起不来;
2、 SW1 不 SW2 及 SW3 之间的 trunk 链路起不来;
3、 SW2 和 SW3 之间的 etherchannel 存在问题;
4、 SW2 不 SW3 之间的 HSRP 无法实现自动切换;
5、 R1 和 R2 无法从 DHCP 服务器 R3 上动态获取地址;
6、 R1 不 R2 无法访问 ISP R5 上的服务器 5.5.5.5;
7、 当内网访问 ISP 上的多个服务器时,网关 R4 上有太多的 ARP 条目,请解决。
实验拓扑:
clip_image002实验步骤:
1、 R1 与 SW1 之间的链路起不来
分别对 SW1 的 F0/1 和 R1 的 F0/0 进行 show run:
R1:
r1#show run int f0/0
interface FastEthernet0/0
ip address dhcp
no ip route-cache
duplex auto
speed 10
end
SW1:
sw1#show run int f0/1
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
speed 100
end
我们可以发现两个端口的双工速率是不一样的,一个是 100Mb/s 一个是 10Mb/s,从而导致 无法正常建立链路。
解决方法:
将 R1 的 F0/0 口速率改为自动或者 100Mb/s。
r1(config)#int f0/0
r1(config-if)#speed 100  或者 r1(config-if)#speed auto

2、SW1 与 SW2 及 SW3 之间的 trunk 链路起不来
分别对 SW1、SW2 和 SW3 进行 show vtp status 和 show vtp password:
SW1:
sw1#show vtp st
VTP Version         : running VTP1 (VTP2 capable)
Configuration Revision    : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs    : 9
VTP Operating Mode     : Transparent
VTP Domain Name    : cisc0
VTP Pruning Mode    : Disabled
VTP V2 Mode     : Disabled
VTP Traps Generation    : Disabled
MD5 digest     : 0xC1 0x7B 0xBA 0x68 0x93 0xAF 0xB0 0x4D
sw1#show vtp password
VTP Password: cisco
SW2:
sw2#show vtp st
VTP Version    : 2
Configuration Revision    : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs    : 9
VTP Operating Mode     : Transparent
VTP Domain Name        : cisco
VTP Pruning Mode     : Disabled
VTP V2 Mode     : Disabled
VTP Traps Generation    : Disabled
MD5 digest    : 0xA6 0x2C 0x47 0x87 0xB0 0xD5 0x5A 0xAD
Sw2#show vtp password
VTP Password: cisco
SW3:
sw3#show vtp st
VTP Version         : running VTP1 (VTP2 capable) Configuration Revision    : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs    : 9
VTP Operating Mode     : Transparent
 VTP Domain Name        : cisco
VTP Pruning Mode     : Disabled
VTP V2 Mode     : Disabled
VTP Traps Generation    : Disabled
MD5 digest     : 0x7F 0xEF 0x7B 0x66 0x28 0x55 0x41 0xAF
sw3#show vtp password
The VTP password is not configured.
然后分别查看三台交换机的 VTP 域名,以及 VTP 密码。SW1 的 VTP 域名为 cisc0,而 SW2 和SW3 的VTP 域名为 cisco;SW1 和 SW2 的VTP 密码为 cisco,而SW3 没有设置 VTP 密码。
解决方法:
修改 SW1 的 VTP 域名和 SW3 的 VTP 密码与其他交换机一致。
SW1(config)#vtp domain cisco
SW3(config)#vtp password cisco

3、SW2 和 SW3 之间的 etherchannel 存在问题
对 SW3 和 SW2 的 F0/21、F0/22 口进行 show run:
SW2
sw2#show run int f0/22
interface FastEthernet0/22
switchport trunk encapsulation dot1q
switchport trunk native vlan 20
switchport mode trunk
channel-group 2 mode on end
sw2#show run int f0/21
interface FastEthernet0/21
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport mode trunk
channel-group 2 mode on end
SW3
sw3#show run int f0/21
interface FastEthernet0/21
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport mode trunk
channel-group 1 mode on end
sw3#show run int f0/22
interface FastEthernet0/22
switchport trunk encapsulation dot1q switchport trunk native vlan 20 switchport mode trunk
channel-group 1 mode on end
以太网聚合链路如果起了 trunk 的话,要求 native vlan 是一致的。通过 show run 可以发现,聚合链路之间存在两个不同的 native vlan。
解决方法:
Sw2(config)#int f0/22
Sw2(config)#switchport trunk native vlan 10
Sw3(config)#int f0/22
Sw3(config)#switchport trunk native vlan 10

4、SW2 和 SW3 之间的 HSRP 无法实现自动切换
对 SW2 和 SW3 分别进行 show standby 和 show standby vlan 20 brief:
Sw3#show standby
Vlan10 - Group 1
State is Active
2 state changes, last state change 00:33:02
Virtual IP address is 172.16.10.254
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (v1 default) Hello time 3 sec, hold time 10 sec
Next hello sent in 2.820 secs
Preemption disabled
Active router is local
Standby router is 172.16.10.3, priority 100 (expires in 8.048 sec) Priority 105 (configured 105)
IP redundancy name is "hsrp-Vl10-1" (default) Vlan20 - Group 2
State is Active
2 state changes, last state change 00:34:19
Virtual IP address is 172.16.20.254
Active virtual MAC address is 0000.0c07.ac02
Local virtual MAC address is 0000.0c07.ac02 (v1 default) Hello time 3 sec, hold time 10 sec
Next hello sent in 1.708 secs
Preemption disabled
Active router is local
Standby router is 172.16.20.3, priority 105 (expires in 7.536 sec) Priority 100 (default 100)
IP redundancy name is "hsrp-Vl20-2" (default)
sw2#show standby vlan 20 br
P indicates configured to preempt.
|
Interface     Grp Prio P State     Active    Standby     Virtual IP
Vl20    2    100     Active     local    172.16.20.3    172.16.20.254
sw3#show standby vlan 20 br
P indicates configured to preempt.
|
Interface     Grp Prio P State     Active    Standby     Virtual IP
Vl20     2     105     Standby     172.16.20.2     local     172.16.20.254
SW3 的 HSRP 优先级为 105,明显高于 SW2 的优先级 100,为什么却处于 standby 模式呢?通 过 show standby 可以发现,SW3 的抢占是关闭的,所以没有主动去争取 active 模式。
解决方法:
在 SVI 接口中开启抢占。
sw3(config)#int vlan 10
sw3(config-if)#standby 1 preempt
sw3(config-if)#int vlan 20
sw3(config-if)#standby 2 preempt

5、R1 和 R2 无法从 DHCP 服务器获取地址
通过 SW1 和 SW2 的 show vlan,我们发现 DHCP 服务器(R3)属于 VLAN30,而 R1 和 R2 分别 属于 VLAN10 和 VLAN20,三者分别属于不同的广播域内,因此 DHCP 发现报文无法到达 DHCP 服务器。
解决方法:
在网关的 SVI 接口中配置 DHCP 中继。
sw2(config-if)#int vlan 10
sw2(config-if)#ip helper-address 172.16.30.3 sw2(config-if)#int vlan 20
sw2(config-if)#ip helper-address 172.16.30.3
配置完成后,R1 和 R2 获取了地址:
*Mar    1  04:48:33.990: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned  DHCP
address 172.16.10.1, mask 255.255.255.0, hostname r1
*Mar    1  00:56:24.915: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned  DHCP
address 172.16.20.1, mask 255.255.255.0, hostname r2

6、R1 和 R2 无法访问 ISP R5 上的服务器 5.5.5.5
对网关 R4 进行 show run:
R4#show run router ospf 1
log-adjacency-changes
network 172.16.44.44 0.0.0.0 area 0
!
ip classless
ip route 0.0.0.0 0.0.0.0 FastEthernet0/1

access-list 1 permit 172.16.0.0
R4 是通过一条默认路由将子网通告给 ISP 的,R1 和 R2 若想访问 ISP,则必须将这条默认路 由通告给内网,R4 的 OSPF 路由进程中缺少了默认路由的通告。另外访问控制列表缺少反掩 码,应该加上去。
解决方法:
r4(config)#router ospf 1
r4(config-router)#default-information originate r4(config)#no access-list 1
r4(config)#access-list 1 permit 172.16.0.0 0.0.255.255
再进行 show ip rou:
SW4#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.44.44 to network 0.0.0.0
172.16.0.0/24 is subnetted, 6 subnets
C    172.16.44.0 is directly connected, FastEthernet0/4
C     172.16.34.0 is directly connected, FastEthernet0/24
O    172.16.30.0 [110/2] via 172.16.24.2, 00:05:07, FastEthernet0/20
C     172.16.24.0 is directly connected, FastEthernet0/20
O    172.16.20.0 [110/2] via 172.16.34.3, 00:05:07, FastEthernet0/24
[110/2] via 172.16.24.2, 00:05:07, FastEthernet0/20
O    172.16.10.0 [110/2] via 172.16.34.3, 00:05:07, FastEthernet0/24
[110/2] via 172.16.24.2, 00:05:08, FastEthernet0/20
O*E2 0.0.0.0/0 [110/1] via 172.16.44.44, 00:05:08, FastEthernet0/4
OSPF 默认路由已经通告进内网,使用 R1 和 R2 ping 5.5.5.5:
r1#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R2#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

7、网关 R4 上的 ARP 条目过多
使用 R1 去 ping R5 上所有的环回口,然后再在 R4 上 show ip arp:
r4#show ip arp
Protocol     Address     Age (min)     Hardware Addr     Type     Interface
Internet     6.6.6.6    1    0024.14dd.a908    ARPA    FastEthernet0/1
Internet     5.5.5.5    1    0024.14dd.a908    ARPA     FastEthernet0/1
Internet     7.7.7.7    1    0024.14dd.a908    ARPA    FastEthernet0/1
Internet     8.8.8.8    6    0024.14dd.a908    ARPA    FastEthernet0/1
Internet     45.45.45.5    0    0024.14dd.a908    ARPA    FastEthernet0/1
Internet    45.45.45.4    -    0024.14ec.6719    ARPA    FastEthernet0/1
Internet     172.16.44.4    0    0012.8077.3200    ARPA    FastEthernet0/0
Internet     172.16.44.44     -     0024.14ec.6718     ARPA     FastEthernet0/0
ARP 表中的条目过多,原因是默认路由使用了以太网下一跳出口所致,由于没有指定的下一 跳,导致数据每次从接口出去时都要发送一次 ARP 报文,从而增加了 ARP 表中的 ARP 条目。
解决方法:
将以太网一下跳出口改为下一跳地址
r4(config)#no ip route 0.0.0.0 0.0.0.0 FastEthernet0/1
r4(config)#ip route 0.0.0.0 0.0.0.0 45.45.45.5
再次 show ip arp:
r4#show ip arp
Protocol     Address     Age (min)     Hardware Addr     Type     Interface
Internet     45.45.45.5    0    0024.14dd.a908    ARPA    FastEthernet0/1
Internet     45.45.45.4    -    0024.14ec.6719    ARPA    FastEthernet0/1
Internet     172.16.44.4    0    0012.8077.3200    ARPA    FastEthernet0/0
Internet     172.16.44.44     -     0024.14ec.6718     ARPA     FastEthernet0/0
ARP 表中的条目即固定为以上几条。

阅读(1371) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~