Published 5月 28, 2018 by with 0 comment

CCNA3 Lab 5-5-1: 基本STP設定練習

CCNA Lab


本次練習是參考Cisco網路學院
CCNA Exploration 4.0 LAN Switching and Wireless
Student Lab Manual
我將它轉成Dynamips的設定檔 並寫下自己的實驗紀錄

Dynamips的設定檔:
##################################################
#
# For CCNA Exploration 4.0 LAN and Switching and Wireless
# Lab 5.5.1
#
##################################################
autostart=false
[localhost:7200]
workingdir = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week03/workingconfig/
[[3640]]
#  Specify 3640 IOS image on Windows here:
#  image = C:\Program Files\Dynamips\images\c3640-jk9o3s-mz.123-14.T7.extracted.bin
#  Specify 3640 IOS image on Linux here:
 image = /opt/dynamips/images/c3640-jk.bin
 ram = 128
 disk0 = 0
 disk1 = 0
 # Choose an idlepc value from the below
 idlepc = 0x605ac7b8
 mmap = true
 ghostios = true
 confreg = 0x2102

###########################
#
# Define router instances 1
#
###########################
  
 [[Router SW1]]
  model = 3640
  console = 2001
  autostart = false
  slot0 = NM-16ESW
  F0/1 = SW2 F0/1
  F0/2 = SW3 F0/1
  F0/3 = PC4 F0/0
 [[Router SW2]]
  model = 3640
  console = 2002
  autostart = false
  slot0 = NM-16ESW
  F0/11 = PC1 F0/0
  F0/12 = PC2 F0/0
  F0/13 = PC3 F0/0
 [[Router SW3]]
  model = 3640
  console = 2003
  autostart = false
  slot0 = NM-16ESW
  F0/2 = SW2 F0/2
 [[Router PC1]]
  model = 3640
  console = 2004
  autostart = false
  slot0 = NM-1FE-TX
 [[Router PC2]]
  model = 3640
  console = 2005
  autostart = false
  slot0 = NM-1FE-TX
 [[Router PC3]]
  model = 3640
  console = 2006
  autostart = false
  slot0 = NM-1FE-TX
 [[Router PC4]]
  model = 3640
  console = 2007
  autostart = false
  slot0 = NM-1FE-TX
這Lab只是基本STP設定練習

我的設定是
1. 先設定PC1-4
hostname PC*
!
no ip domain lookup
!
interface FastEthernet0/0
 ip address 172.17.10.2* 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.10.254
!
line con 0
 logging synchronous
!
end
2. 設定Switch1-3的Trunk Port
Switch1-3:
interface range fastEthernet 0/1 - 2
switchport mode trunk
switchport trunk encapsulation dot1q
3. 設定Switch1-3的Management VLAN
Switch1-3:
interface vlan 1
ip address 172.17.10.* 255.255.255.0
no shutdown
互ping 有通
4. Switch1-3 觀察目前STP的參數
Switch1-3:
show spanning-tree
debug spanning-tree events

5. Switch1手動關閉 Fa0/1
SW1(config)#interface fastEthernet 0/1
SW1(config-if)#shut
然後再觀察SW2-3的Log的變化
SW3#
*Mar  1 00:27:39.451: STP: VLAN1 Fa0/2 -> listening
*Mar  1 00:27:40.419: STP: VLAN1 heard root 32768-cc01.0c93.0000 on Fa0/2
*Mar  1 00:27:40.423: current Root has 32768-cc00.0c93.0000
*Mar  1 00:27:40.431: STP: VLAN1 Topology Change rcvd on Fa0/2
*Mar  1 00:27:40.431: STP: VLAN1 sent Topology Change Notice on Fa0/1
SW3#
*Mar  1 00:27:54.451: STP: VLAN1 Fa0/2 -> learning
SW3#
*Mar  1 00:28:09.455: STP: VLAN1 sent Topology Change Notice on Fa0/1
*Mar  1 00:28:09.455: STP: VLAN1 Fa0/2 -> forwarding
SW3#

8. 驗證指令
show spanning-tree
debug spanning-tree events
最後PC1-4,SW1-3互ping 有通 結束

Switch1設定檔:
hostname SW1
!
no ip domain lookup
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport mode trunk
!
interface Vlan1
 ip address 172.17.10.1 255.255.255.0
!
line con 0
 logging synchronous
!
end
Switch2設定檔:
hostname SW2
!
no ip domain lookup
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport mode trunk
!
interface Vlan1
 ip address 172.17.10.2 255.255.255.0
!
line con 0
 logging synchronous
!
end
Switch3設定檔:
hostname SW3
!
no ip domain lookup
!
interface FastEthernet0/1
 switchport mode trunk
!
interface FastEthernet0/2
 switchport mode trunk
!
interface Vlan1
 ip address 172.17.10.3 255.255.255.0
!
line con 0
 logging synchronous
!
end
PC1設定檔:
hostname PC1
!
no ip domain lookup
!
interface FastEthernet0/0
 ip address 172.17.10.21 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 172.17.10.254
!
line con 0
 logging synchronous
!
end
PC2設定檔:
hostname PC2
!
no ip domain lookup
!
interface FastEthernet0/0
 ip address 172.17.10.22 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 172.17.10.254
!
line con 0
 logging synchronous
!
end
PC3設定檔:
hostname PC3
!
no ip domain lookup
!
interface FastEthernet0/0
 ip address 172.17.10.23 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 172.17.10.254
!
line con 0
 logging synchronous
!
end
PC4設定檔:
hostname PC4
!
no ip domain lookup
!
interface FastEthernet0/0
 ip address 172.17.10.27 255.255.255.0
 duplex auto
 speed auto
!
ip route 0.0.0.0 0.0.0.0 172.17.10.254
!
line con 0
 logging synchronous
!
end

參考資料:
Cisco網路學院 http://www.cisco.com/web/learning/netacad/index.html
CCNA Exploration 4.0 LAN Switching and Wireless
Student Lab Manual

最初發表 / 最後更新: 2008.03.21 / 2018.05.28

0 comments:

張貼留言