




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
要求:网络中一共4个VLAN 10,20,30,40要求实现VLAN10,20 主机通信走S1VLAN30,40 主机通信走S2在S1 S2 做HSRPS1S2S3S4交换机一配置Router(config)#host S1S1(config)#no logging console配置禁止终端显示同步S1(config)#no ip domain lookup配置禁止域名解析S1(config)#line console 0S1(config-line)#exec-timeout 0 0配置永不超时S1(config-line)#exitS1(config)#in range f0/0 - 3S1(config-if-range)#switchport mode trunk同时将多个接口启用中继S1(config-if-range)#switchport trunk encapsulation dot1q将Trunk封装为dot1q模式S1(config-if-range)#endS1#vlan database进入VLAN数据库模式S1(vlan)#vlan 10S1(vlan)#vlan 20S1(vlan)#vlan 30S1(vlan)#vlan 40S1(vlan)#vtp domain test配置VTP域名S1(vlan)#exitS1#show vtp status查看VTP状态信息VTP Version : 2设备支持最大版本号Configuration Revision : 1目前的修改编号值Maximum VLANs supported locally : 256设备支持的最大VLAN数Number of existing VLANs : 9目前的VALN数VTP Operating Mode : ServerVTP所在模式VTP Domain Name : testVTP域名VTP Pruning Mode : Disabled修剪功能未启用VTP V2 Mode : Disabled版本2未启用VTP Traps Generation : DisabledMD5 digest : 0x13 0x55 0xBA 0x02 0x08 0x98 0x03 0xEAConfiguration last modified by 0.0.0.0 at 3-1-02 00:10:55Local updater ID is 0.0.0.0 (no valid interface found)S1#conf tS1(config)#ip routing开启三层路由功能S1(config)#in range f0/0 - 1S1(config-if-range)#channel-group 1 mode on配置以太网通道Creating a port-channel interface Port-channel1S1(config-if-range)#exitS1(config)#do show etherchannel 1 summary查看以太网通道的配置Flags: D - down P - in port-channel I - stand-alone s - suspended R - Layer3 S - Layer2 U - in useGroup Port-channel Ports-+-+-1 Po1(SU) Fa0/0(P) Fa0/1(P)S1(config)#spanning-tree vlan 10 root primary配置VLAN10为根桥 VLAN 10 bridge priority set to 8192设备支持根桥的默认优先级 VLAN 10 bridge max aging time unchanged at 20默认最大老化时间 VLAN 10 bridge hello time unchanged at 2默认访问时间 VLAN 10 bridge forward delay unchanged at 15默认转发延迟时间S1(config)#spanning-tree vlan 20 root primary VLAN 20 bridge priority set to 8192 VLAN 20 bridge max aging time unchanged at 20 VLAN 20 bridge hello time unchanged at 2 VLAN 20 bridge forward delay unchanged at 15S1(config)#do show mac查看本机MAC地址Destination Address Address Type VLAN Destination Port- - - -cc00.0da8.0000 Self 1 Vlan1S1(config)#do show spanning-tree brief查看生成树配置VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32768 Address cc00.0578.0000 Cost 19 Port 4 (FastEthernet0/3) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0da8.0000 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 19 32768 cc00.0da8.0000 128.3FastEthernet0/3 128.4 128 19 FWD 0 32768 cc00.0578.0000 128.4Port-channel1 129.65 128 12 BLK 19 32768 cc00.0938.0000 129.65VLAN10 Spanning tree enabled protocol ieee Root ID Priority 8192根桥优先级 Address cc00.0da8.0001根桥MAC地址 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 8192本VLAN优先级 Address cc00.0da8.0001本VLAN MAC地址 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD接口为转发状态 0 8192 cc00.0da8.0001 128.3FastEthernet0/3 128.4 128接口默认优先级 19 FWD 0 8192 cc00.0da8.0001 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0da8.0001 129.65VLAN20 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0da8.0002 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 8192 Address cc00.0da8.0002 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 0 8192 cc00.0da8.0002 128.3FastEthernet0/3 128.4 128 19 FWD 0 8192 cc00.0da8.0002 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0da8.0002 129.65VLAN30 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0938.0003 Cost 12 Port 321 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0da8.0003 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 12 32768 cc00.0da8.0003 128.3FastEthernet0/3 128.4 128 19 FWD 12 32768 cc00.0da8.0003 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0938.0003 129.65VLAN40 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0938.0004 Cost 12 Port 321 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0da8.0004 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 12 32768 cc00.0da8.0004 128.3FastEthernet0/3 128.4 128 19 FWD 12 32768 cc00.0da8.0004 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0938.0004 129.65S1(config)#in vlan 10S1(config-if)#ip add 192.168.1.1 255.255.255.0S1(config-if)#no shut配置VALN IPS1(config-if)#standby 10 ip 192.168.1.254将接口加入备份组并设置虚拟IPS1(config-if)#standby 10 priority 160配置HSRP的优先级S1(config-if)#standby 10 preempt配置HSRP的占先权S1(config-if)#in vlan 20S1(config-if)#ip add 192.168.2.1 255.255.255.0S1(config-if)#no shutS1(config-if)#standby 20 ip 192.168.2.254S1(config-if)#standby 20 priority 170S1(config-if)#standby 20 preemptS1(config-if)#in vlan 30S1(config-if)#ip add 192.168.3.1 255.255.255.0S1(config-if)#no shutS1(config-if)#standby 30 ip 192.168.3.254S1(config-if)#standby 30 priority 140S1(config-if)#standby 30 preemptS1(config-if)#in vlan 40S1(config-if)#ip add 192.168.4.1 255.255.255.0S1(config-if)#no shutS1(config-if)#standby 40 ip 192.168.4.254S1(config-if)#standby 40 priority 150S1(config-if)#standby 40 preemptS1(config-if)#do show standby brief查看HSRP路由器的状态信息 P indicates configured to preempt. |Interface Grp Prio P State Active Standby Virtual IPVl10 10组号 160 P Active local 192.168.1.2备份路由器IP 192.168.1.254Vl20 20 170指定组优先级 P Active local本地路由器为活跃状态 192.168.2.2 192.168.2.254Vl30 30 140 P占先权已配置 Standby 192.168.3.2 local 192.168.3.254Vl40 40 150 P Standby本地路由器为备份状态 192.168.4.2活跃路由器IP local 192.168.4.254虚拟IP交换机二配置Router(config)#host S2S2(config)#no logging consoleS2(config)#no ip domain lookupS2(config)#line console 0S2(config-line)#exec-timeout 0 0S2(config-line)#exitS2(config)#in range f0/0 - 3S2(config-if-range)#switchport mode trunk启用中继S2(config-if-range)#switchport trunk encapsulation dot1q将Trunk封装为 dot1q模式S2(config-if-range)#do show vtp status查看VTP状态信息VTP Version : 2Configuration Revision : 1Maximum VLANs supported locally : 256Number of existing VLANs : 9VTP Operating Mode : ServerVTP Domain Name : testVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x13 0x55 0xBA 0x02 0x08 0x98 0x03 0xEAConfiguration last modified by 0.0.0.0 at 3-1-02 00:10:55Local updater ID is 0.0.0.0 (no valid interface found)交换机学习VTP信息,交换机默认为服务器模式S2#conf tS2(config)#ip routing开启三层路由功能 S2(config)#in range f0/0 - 1S2(config-if-range)#channel-group 1 mode on配置以太网通道Creating a port-channel interface Port-channel1S2(config-if-range)#exitS2(config)#do show etherchannel 1 summary查看以太网通道配置信息Flags: D - down P - in port-channel I - stand-alone s - suspended R - Layer3 S - Layer2 U - in useGroup Port-channel Ports-+-+-1 Po1(SU) Fa0/0(P) Fa0/1(P)注:配置以太网通道的一组交换机的端口必须是同一种介质,必属于相同的VLAN,物理参数设置必须相同,如启用中继,必须是相同的中继模式S2(config)#spanning-tree vlan 30 root primary配置VLAN30为根桥 VLAN 30 bridge priority set to 8192 VLAN 30 bridge max aging time unchanged at 20 VLAN 30 bridge hello time unchanged at 2 VLAN 30 bridge forward delay unchanged at 15S2(config)#spanning-tree vlan 40 root primary配置VLAN40为根桥 VLAN 40 bridge priority set to 8192 VLAN 40 bridge max aging time unchanged at 20 VLAN 40 bridge hello time unchanged at 2 VLAN 40 bridge forward delay unchanged at 15S2(config)#do show mac查看本机MAC地址Destination Address Address Type VLAN Destination Port- - - -cc00.0938.0000 Self 1 Vlan1S2(config)#do show spanning-tree brief查看生成树配置信息VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32768 Address cc00.0578.0000 Cost 19 Port 3 (FastEthernet0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0938.0000 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 0 32768 cc00.0578.0000 128.3FastEthernet0/3 128.4 128 19 FWD 19 32768 cc00.0938.0000 128.4Port-channel1 129.65 128 12 FWD 19 32768 cc00.0938.0000 129.65VLAN10 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0da8.0001 Cost 12 Port 321 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0938.0001 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 12 32768 cc00.0938.0001 128.3FastEthernet0/3 128.4 128 19 FWD 12 32768 cc00.0938.0001 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0da8.0001 129.65VLAN20 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0da8.0002 Cost 12 Port 321 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0938.0002 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 12 32768 cc00.0938.0002 128.3FastEthernet0/3 128.4 128 19 FWD 12 32768 cc00.0938.0002 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0da8.0002 129.65VLAN30 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0938.0003 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 8192 Address cc00.0938.0003 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 0 8192 cc00.0938.0003 128.3FastEthernet0/3 128.4 128 19 FWD 0 8192 cc00.0938.0003 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0938.0003 129.65VLAN40 Spanning tree enabled protocol ieee Root ID Priority 8192 Address cc00.0938.0004 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 8192 Address cc00.0938.0004 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/2 128.3 128 19 FWD 0 8192 cc00.0938.0004 128.3FastEthernet0/3 128.4 128 19 FWD 0 8192 cc00.0938.0004 128.4Port-channel1 129.65 128 12 FWD 0 8192 cc00.0938.0004 129.65S2(config)#in vlan 10S2(config-if)#ip add 192.168.1.2 255.255.255.0S2(config-if)#no shutS2(config-if)#standby 10 ip 192.168.1.254S2(config-if)#standby 10 priority 150S2(config-if)#standby 10 preemptS2(config-if)#in vlan 20S2(config-if)#ip add 192.168.2.2 255.255.255.0S2(config-if)#no shutS2(config-if)#standby 20 ip 192.168.2.254S2(config-if)#standby 20 priority 140S2(config-if)#standby 20 preemptS2(config-if)#in vlan 30S2(config-if)#ip add 192.168.3.2 255.255.255.0S2(config-if)#no shutS2(config-if)#standby 30 ip 192.168.3.254S2(config-if)#standby 30 priority 160S2(config-if)#standby 30 preemptS2(config-if)#in vlan 40S2(config-if)#ip add 192.168.4.2 255.255.255.0S2(config-if)#no shutS2(config-if)#standby 40 ip 192.168.4.254S2(config-if)#standby 40 priority 170S2(config-if)#standby 40 preemptS2(config-if)#do show standby brief查看HSRP路由器的状态信息 P indicates configured to preempt. |Interface Grp Prio P State Active Standby Virtual IPVl10 10 150 P Standby 192.168.1.1 local 192.168.1.254Vl20 20 140 P Standby 192.168.2.1 local 192.168.2.254Vl30 30 160 P Active local 192.168.3.1 192.168.3.254Vl40 40 170 P Active local 192.168.4.1 192.168.4.254注:配置HSRP路由器必须有IP,其IP必须在同一网段,路由器要配置的接口必须连接的是交换机,虚拟IP必须一样,组号也必须一样,如没写组号则默认为0交换机三配置Router(config)#host S3S3(config)#no logging consoleS3(config)#no ip domain lookupS3(config)#line console 0S3(config-line)#exec-timeout 0 0S3(config-line)#exitS3(config)#in range f0/2 - 3S3(config-if-range)#switchport mode trunk启用中继S3(config-if-range)#switchport trunk encapsulation dot1q将Trunk 封装为dot1q模式S3(config-if-range)#endS3#show vtp statusVTP Version : 2Configuration Revision : 1Maximum VLANs supported locally : 256Number of existing VLANs : 9VTP Operating Mode : ServerVTP Domain Name : testVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x13 0x55 0xBA 0x02 0x08 0x98 0x03 0xEAConfiguration last modified by 0.0.0.0 at 3-1-02 00:10:55Local updater ID is 0.0.0.0 (no valid interface found
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 早教知识培训心得家长篇课件
- 2025年日语能力测试N2级试卷:日语能力测试备考体会
- 2025年美甲师(职业技能)考试试卷(美甲实操与理论综合)
- 去年郑州会考数学试卷
- 曲靖一中的数学试卷
- 2024年绥化市绥棱县招聘专业人员笔试真题
- 吉林长春市消防救援支队特勤大队招录政府专职消防员考试真题2024
- 2024年宜黄县机关事业单位招聘笔试真题
- 南通丘成桐数学试卷
- 去年中考福建省数学试卷
- 小学教师量化考核表
- 房建监理平行检查记录表格模板(参考版)
- 计算机操作系统(第四版)-汤小丹-课后习题答案
- 《财务管理》课程教学实施方案
- 露天采矿设计技术规定
- 检验科生物安全风险评估报告
- 12生物分子网络ppt课件
- 手术室护士长工作手册-精品完整版
- 数独比赛六宫练习题96道练习
- 大学体育四——啦啦操的教学设计
- (高清正版)T_CAGHP 006—2018泥石流灾害防治工程勘查规范(试行)
评论
0/150
提交评论