工程实例

简介:


工程实例


声明:这里的配置是采用 dynamips 做的,因为本人机器性能有限,所以是分开配置的, SW1 SW2 先一起配置, SW3 SW4 一起配置。(以前曾试过一次开 7 台,除了跑起来有点慢外,其他没什么,自从换了 2.8 版本后,有时候开 3 台就会蓝屏,不知道为什么!!郁闷!)

要求上面已经说得很明确了,现在只把 show run 复制过来。
SW1#show run
Building configuration...
 
Current configuration : 1936 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 1 priority 8192
spanning-tree vlan 3 priority 8192
spanning-tree vlan 5 priority 8192
!
!
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport mode trunk
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!        
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
 switchport mode trunk
 channel-group 1 mode on
!
interface FastEthernet0/15
 switchport mode trunk
 channel-group 1 mode on
!
interface Vlan1
 ip address 172.16.1.254 255.255.255.0
 standby 2 ip 172.16.1.1
 standby 2 priority 200
 standby 2 preempt
 standby 2 track FastEthernet0/1 180
!
interface Vlan2
 ip address 172.16.2.254 255.255.255.0
 standby 1 ip 172.16.2.1
 standby 1 priority 50
 standby 1 preempt
!
interface Vlan3
 ip address 172.16.3.254 255.255.255.0
 standby 3 ip 172.16.3.1
 standby 3 priority 200
 standby 3 preempt
 standby 3 track FastEthernet0/1 180
!
interface Vlan4
 ip address 172.16.4.254 255.255.255.0
 standby 4 ip 172.16.4.1
 standby 4 priority 50
 standby 4 preempt
!
interface Vlan5
 ip address 172.16.5.254 255.255.255.0
 standby 5 ip 172.16.5.1
 standby 5 priority 200
 standby 5 preempt
 standby 5 track FastEthernet0/1 180

!
ip http server
no ip http secure-server
!
!
!
mac-address-table static  0000.0c 07.ac02 interface FastEthernet0/15 vlan 1
mac-address-table static  0000.0c 07.ac03 interface FastEthernet0/15 vlan 3
mac-address-table static  0000.0c 07.ac05 interface FastEthernet0/15 vlan 5
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!        
!
End
 
 
SW2#show run
Building configuration...
 
Current configuration : 1636 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 2 priority 8192
spanning-tree vlan 4 priority 8192
!
!
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport mode trunk
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!        
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
 switchport mode trunk
 channel-group 1 mode on
!
interface FastEthernet0/15
 switchport mode trunk
 channel-group 1 mode on
!
interface Vlan1
 ip address 172.16.1.253 255.255.255.0
 standby 2 ip 172.16.1.1
 standby 2 priority 50
 standby 2 preempt
!         
interface Vlan2
 ip address 172.16.2.253 255.255.255.0
 standby 1 ip 172.16.2.1
 standby 1 priority 200
 standby 1 preempt
 standby 1 track FastEthernet0/1 180
!
interface Vlan3
 ip address 172.16.3.253 255.255.255.0
 standby 3 ip 172.16.3.1
 standby 3 priority 50
 standby 3 preempt
!
interface Vlan4
 ip address 172.16.4.253 255.255.255.0
 standby 4 ip 172.16.4.1
 standby 4 priority 200
 standby 4 preempt
 standby 4 track FastEthernet0/1 180
!
interface Vlan5
 ip address 172.16.5.253 255.255.255.0
 standby 5 ip 172.16.5.1
 standby 5 priority 50
 standby 5 preempt

!
ip http server
no ip http secure-server
!
!
!        
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
End
 
SW3#show run
Building configuration...
 
Current configuration : 1090 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
!
interface FastEthernet0/1
 switchport mode trunk
 spanning-tree vlan 2 cost 20
 spanning-tree vlan 4 cost 20
!
interface FastEthernet0/2
 switchport mode trunk
 spanning-tree vlan 1 cost 20
 spanning-tree vlan 3 cost 20
 spanning-tree vlan 5 cost 20
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
 no ip address
!
ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!        
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
End
 
 
SW4#show run
Building configuration...
 
Current configuration : 1090 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
!
interface FastEthernet0/1
 switchport mode trunk
 spanning-tree vlan 1 cost 20
 spanning-tree vlan 3 cost 20
 spanning-tree vlan 5 cost 20
!
interface FastEthernet0/2
 switchport mode trunk
 spanning-tree vlan 2 cost 20
 spanning-tree vlan 4 cost 20 
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
 no ip address
!
ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!        
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end


 
 
附加的 show 命令验证:
SW1#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP    
Vl1         2   200  P Active   local           172.16.1.253    172.16.1.1    
Vl2         1   50     Standby  172.16.2.253    local           172.16.2.1    
Vl3         3   200  P Active   local           172.16.3.253    172.16.3.1    
Vl4         4   50     Standby  172.16.4.253    local           172.16.4.1    
Vl5         5   200  P Active   local           172.16.5.253    172.16.5.1    
 
 
 
SW1#show spanning-tree root brief
 
                                       Root Hello Max  Fwd
Vlan                   Root ID          Cost   Time    Age   Delay    Root   Port
---------------- -------------------- ----- ---- ---- -----  ----------------
VLAN1             8192 cc00.0890.0000     0    2   20    15  This bridge is root
VLAN2             8192 cc 00.01f 4.0001    12    2   20    15  Port-channel1     
VLAN3             8192 cc00.0890.0002     0    2   20    15  This bridge is root
VLAN4             8192 cc 00.01f 4.0003    12    2   20    15  Port-channel1     
VLAN5             8192 cc00.0890.0004     0    2   20    15  This bridge is root
 
 
SW2#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP    
Vl1         2   50     Standby  172.16.1.254    local           172.16.1.1    
Vl2         1   200  P Active   local           172.16.2.254    172.16.2.1    
Vl3         3   50     Standby  172.16.3.254    local           172.16.3.1    
Vl4         4   200  P Active   local           172.16.4.254    172.16.4.1    
Vl5         5   50     Standby  172.16.5.254    local           172.16.5.1    
 
 
 
 
SW2#show spanning-tree root brief
 
                                       Root Hello Max  Fwd
Vlan                   Root ID          Cost   Time    Age   Delay    Root   Port
---------------- -------------------- ----- ---- ---- -----  ----------------
VLAN1             8192 cc00.0890.0000    12    2   20    15  Port-channel1     
VLAN2             8192 cc 00.01f 4.0001     0    2   20    15  This bridge is root
VLAN3             8192 cc00.0890.0002    12    2   20    15  Port-channel1     
VLAN4             8192 cc 00.01f 4.0003     0    2   20    15  This bridge is root
VLAN5             8192 cc00.0890.0004    12    2   20    15  Port-channel1 

SW3#show spanning-tree root brief
 
                                       Root Hello Max  Fwd
Vlan                   Root ID          Cost   Time    Age   Delay    Root   Port
---------------- -------------------- ----- ---- ---- -----  ----------------
VLAN1             8192 cc 00.0f 44.0000    19    2   20    15  FastEthernet0/1   
VLAN2             8192 cc 00.0a 8c .0001    19    2   20    15  FastEthernet0/2   
VLAN3             8192 cc 00.0f 44.0002    19    2   20    15  FastEthernet0/1   
VLAN4             8192 cc 00.0a 8c .0003    19    2   20    15  FastEthernet0/2   
VLAN5             8192 cc 00.0f 44.0004    19    2   20    15  FastEthernet0/1   
 
 
SW4#show spanning-tree root brief
 
                                       Root Hello Max  Fwd
Vlan                   Root ID          Cost   Time    Age   Delay    Root   Port
---------------- -------------------- ----- ---- ---- -----  ----------------
VLAN1             8192 cc 00.0f 44.0000    19    2   20    15  FastEthernet0/2   
VLAN2             8192 cc 00.0a 8c .0001    19    2   20    15  FastEthernet0/1   
VLAN3             8192 cc 00.0f 44.0002    19    2   20    15  FastEthernet0/2   
VLAN4             8192 cc 00.0a 8c .0003    19    2   20    15  FastEthernet0/1   
VLAN5             8192 cc 00.0f 44.0004    19    2   20    15  FastEthernet0/2   

SW3#show spanning-tree brief 

VLAN1
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0a78.0000
             Cost        19
             Port        2 (FastEthernet0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cd0.0000
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    19 FWD     0  8192 cc00.0a78.0000 128.2  
FastEthernet0/2      128.3    128    20 BLK    12 32768 cc00.0c14.0000 128.3  

          
VLAN2
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0c14.0001
             Cost        19
             Port        3 (FastEthernet0/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cd0.0001
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    20 BLK    12 32768 cc00.0a78.0001 128.2  
FastEthernet0/2      128.3    128    19 FWD     0  8192 cc00.0c14.0001 128.3  

          
VLAN3
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0a78.0002
             Cost        19
             Port        2 (FastEthernet0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cd0.0002
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    19 FWD     0  8192 cc00.0a78.0002 128.2  
FastEthernet0/2      128.3    128    20 BLK    12 32768 cc00.0c14.0002 128.3  

          
VLAN4
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0c14.0003
             Cost        19
             Port        3 (FastEthernet0/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cd0.0003
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    20 BLK    12 32768 cc00.0a78.0003 128.2  
FastEthernet0/2      128.3    128    19 FWD     0  8192 cc00.0c14.0003 128.3  

          
VLAN5
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0a78.0004
             Cost        19
             Port        2 (FastEthernet0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cd0.0004
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    19 FWD     0  8192 cc00.0a78.0004 128.2  
FastEthernet0/2      128.3    128    20 BLK    12 32768 cc00.0c14.0004 128.3

SW4#show spanning-tree brief 

VLAN1
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0a78.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.0cb0.0000
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    20 BLK    12 32768 cc00.0c14.0000 128.2  
FastEthernet0/2      128.3    128    19 FWD     0  8192 cc00.0a78.0000 128.3  

          
VLAN2
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0c14.0001
             Cost        19
             Port        2 (FastEthernet0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cb0.0001
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    19 FWD     0  8192 cc00.0c14.0001 128.2  
FastEthernet0/2      128.3    128    20 BLK    12 32768 cc00.0a78.0001 128.3  

          
VLAN3
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0a78.0002
             Cost        19
             Port        3 (FastEthernet0/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cb0.0002
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    20 BLK    12 32768 cc00.0c14.0002 128.2  
FastEthernet0/2      128.3    128    19 FWD     0  8192 cc00.0a78.0002 128.3  

          
VLAN4
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0c14.0003
             Cost        19
             Port        2 (FastEthernet0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cb0.0003
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    19 FWD     0  8192 cc00.0c14.0003 128.2  
FastEthernet0/2      128.3    128    20 BLK    12 32768 cc00.0a78.0003 128.3  

          
VLAN5
  Spanning tree enabled protocol ieee
  Root ID    Priority    8192
             Address     cc00.0a78.0004
             Cost        19
             Port        3 (FastEthernet0/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     cc00.0cb0.0004
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1      128.2    128    20 BLK    12 32768 cc00.0c14.0004 128.2  
FastEthernet0/2      128.3    128    19 FWD     0  8192 cc00.0a78.0004 128.3  


以上为所有的配置,如果有不明白的地方可以留言告诉我。




















本文转自loveme2351CTO博客,原文链接:http://blog.51cto.com/loveme23/49896 ,如需转载请自行联系原作者

相关文章
|
数据可视化 数据挖掘 UED
Plotly交互式数据可视化
【10月更文挑战第12天】本文介绍了如何使用 Plotly 实现交互式数据可视化,涵盖从安装 Plotly 到数据准备、图表创建、添加交互功能、导出图表及自定义图表样式的全过程。通过具体示例,展示了如何创建和优化交互式折线图,提升数据分析的效率和趣味性。
561 60
|
11月前
|
人工智能 JavaScript 前端开发
通义灵码 2.0 全新升级,阿里云正式推出繁星计划
在上午的通义灵码 2.0 发布会上,阿里云正式推出通义灵码繁星计划。通义灵码繁星计划希望为每位开发者送一个智能编码助手,为职场、校园开发者提供不同维度的产品免费使用、体系化课程学习、人才认证考试等权益,同时长期建设通义灵码MVP、校园大使体系,激活创新潜力,培养创新明星,点亮追梦之旅。
|
传感器 监控 供应链
IoT 和 IIoT 有什么区别
IoT(物联网)是指通过互联网连接各种日常设备,实现数据交换和远程控制的技术。而IIoT(工业物联网)则是专为工业领域设计的IoT,强调在制造业、能源等行业的应用,注重提高生产效率、优化流程和增强安全性。两者主要区别在于应用场景和目标不同。
|
监控 Cloud Native Java
传统应用的“云”端新生——Quarkus迁移全攻略
随着云计算的发展,传统单体应用逐渐显现出扩展性和维护成本等问题,而云原生应用因轻量、高效成为新宠。Quarkus作为一款高性能的云原生Java框架,正吸引越来越多开发者。本文详细介绍将传统应用迁移至Quarkus的步骤,包括全面评估、环境搭建、代码重构、数据库迁移、安全性与监控设置,以及测试和部署。通过这些步骤,您可以顺利实现应用的云原生化,享受其带来的诸多优势。
333 3
|
机器学习/深度学习 算法框架/工具 Python
深度学习中的正则化技术及其应用
【9月更文挑战第12天】在深度学习领域,正则化技术是防止模型过拟合的重要手段。本文将深入探讨L1、L2以及Dropout等常见的正则化方法,并结合代码示例,展示如何在实际应用中有效利用这些技术提升模型的泛化能力。
291 1
|
SQL 监控 数据库
SQL Server如何判断哪些会话/连接是长连接?
【8月更文挑战第14天】在SQL Server中,判断长连接可通过活动监视器查看持续时间和状态;查询`sys.dm_exec_sessions`获取持续时间超阈值的会话;利用性能监视器跟踪“User Connections”计数器变化;审查应用代码中连接池配置;或分析网络流量寻找持久连接。这些方法有助于管理和优化连接。
302 2
|
存储 NoSQL Java
Java中使用redis的bitMap实现签到功能
这个实现示例提供了一种灵活、高效的方式,展示了如何使用Redis来解决现实中的问题。
628 2
|
XML 设计模式 前端开发
如何使用Thymeleaf给web项目中的网页渲染显示动态数据?(一)
如何使用Thymeleaf给web项目中的网页渲染显示动态数据?(一)
|
算法 安全 机器人
复杂环境下多移动机器人路径规划研究(Matlab代码实现)
复杂环境下多移动机器人路径规划研究(Matlab代码实现)
250 0
|
数据采集 数据可视化 数据挖掘
Python数据挖掘实用案例——自动售货机销售数据分析与应用(一)
Python数据挖掘实用案例——自动售货机销售数据分析与应用
904 0