新浪博客

路由交换综合案例分析

2013-11-06 10:29阅读:
案例拓扑:
路由交换综合案例分析
案例要求:
1. 二层交换部分
a) SW1SW2之间的链路保证有200M的带宽;
b)所有交换机使用VTP集中管理vlan数据;SW1SW2vtp Server
c) SW3SW4上都存在vlan2
vlan3的客户端,保证同vlan主机能互相通信;
d)交换网络启用pvstSW1vlan2的主根桥、vlan3的备份根桥;SW2vlan3的主根桥、vlan2的备份根桥 ;
e) SW3SW4保证在根端口(上行链路)出现故障后,以一根上行链路马上成为根端口;
f) SW3SW4Fa0/20口不需要协商,直接成为指定端口并进入Forwarding状态;
g) SW3SW4下的Fa0/20口如果收到BPDU,交换机马上将该口关闭,当Fa0/20口下的局域网恢复正确后,该口在30s内恢复为forwarding状态;
2. 三层交换部分
a) Sw1Sw2开启三层交换,负责vlan2vlan3vlan间通信;
b) Sw1Sw2SVI接口启用HSRP,实现vlan2vlan3的网关冗余; c) Vlan2SW1为首选网关,vlan3SW2为首选网关;
d) R1R2Fa0/1口是同网段;
3. 路由部分
a) R1R2Sw1Sw2启用OSPF,加入区域1;
b) R1R2R3启用OSPF,加入区域0;
c) 区域1内不接收外部区域(核心网络)的路由 ;
d) 区域0需要获得区域1的明确路由 ;
e) 保证区域1到核心网络(区域0)的流量首选通过R1转发,次序通过R2转发
4. 实验最终测试效果:
a) Vlan2vlan3能互相通信
b) Vlan2vlan3能和核心网络测试地址192.168.100.1互相通信
c) 当所有设备正常时:vlan2到核心网络的流量走Sw1---R1---R3
Vlan3到核心网络的流量走Sw2—R1—R3
SW1出现故障时:vlan2到核心网络的流量走SW2—R1—R3
Vlan3到核心网络的流量走SW2—R1—R3
R1出现故障时:vlan2到核心网络的流量走SW1—R2—R3
Vlan3到核心网络的流量走SW2—R2—R3
5. IP地址分配: //实验中端口中的x代表1,Y代表2
a) Vlan2 192.168.2.0/24
b) Vlan3 192.168.3.0/24
c) R1Fa0/1 192.168.10.1/24
d) R1 Fa0/0.X: 192.168.13.1/24
e) R2Fa0/1 192.168.10.2/24
f) R2Fa0/0.Y 192.168.23.2/24
g) R3Fa0/0.X 192.168.13.3/24

h) R3Fa0/0.Y 192.168.23.3/24

案例在实验中需将设备不需要的端口关闭
实验步骤
实验前工作:
清空交换机的配置和vlan数据库
开始实验前清空交换机的配置和vlan数据库并将不必要的端口关掉:
#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK] 回车
Erase of nvram: complete
#delete flash:vlan.dat
Delete filename [vlan.dat]? 回车
Delete flash:vlan.dat? [confirm] 回车
SW1#reload
System configuration has been modified. Save? [yes/no]: n 选择no
Proceed with reload? [confirm] 回车
配置SW1SW2EtherChannel
SW1(config)#interface range fastEthernet 0/1 - 2
SW1(config-if-range)#channel-protocol pagp
SW1(config-if-range)#channel-group 1 mode desirable
Creating a port-channel interface Port-channel 1
SW2(config)#interface range fastEthernet 0/1 - 2
SW2(config-if-range)#channel-protocol pagp
SW2(config-if-range)#channel-group 1 mode auto
Creating a port-channel interface Port-channel 1
SW1#show interfaces port-channel 1
Port-channel1 is up, line protocol is up (connected)
Hardware is EtherChannel, address is 000c.ce01.8f01 (bia 000c.ce01.8f01)
MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec,//在配置Etherchannel时,端口两端的带宽要保持一致
SW2# show interfaces port-channel 1
Port-channel1 is up, line protocol is up (connected)
Hardware is EtherChannel, address is 000c.3164.8b01 (bia 000c.3164.8b01)
MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec, //Etherchannel端口不支持Ethernet口,所以实验需要用FastEthernet速率以上的接口带宽
将交换机之间的链路配置成trunk
SW1(config)#interface range port-channel 1 , fastEthernet 0/14 – 15
//在思科IOU模拟器中,目前暂不支持VLAN HSRP Channel的实验,还不完善,存在BUG.
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW2(config)#interface range port-channel 1 , fastEthernet 0/14 – 15
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW3(config)#interface fastEthernet 0/14
SW3(config-if)#switchport mode trunk
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/15
SW3(config-if)#switchport mode trunk
SW4(config)#interface fastEthernet 0/14
SW4(config-if)#switchport mode trunk
SW4(config-if)#exit
SW4(config)#interface fastEthernet 0/15
SW4(config-if)#switchport mode trunk
余下配置有时间会整理以附件形式附在本篇文章中。










我的更多文章

下载客户端阅读体验更佳

APP专享