Published 5月 28, 2018 by with 0 comment

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

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 3.5.1-3
#
##################################################

autostart=false
[localhost:7200]
workingdir = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/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/2
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/SW1.txt

 [[Router SW2]]
  model = 3640
  console = 2002
  autostart = false
  slot0 = NM-16ESW
  F0/11 = Host1 F0/1
  F0/12 = Host2 F0/2
  F0/13 = Host3 F0/3
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/SW2.txt

 [[Router SW3]]
  model = 3640
  console = 2003
  autostart = false
  slot0 = NM-16ESW
  F0/11 = Host4 F0/4
  F0/12 = Host5 F0/5
  F0/13 = Host6 F0/6
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/SW3.txt

 [[Router Host1]]
  model = 3640
  console = 2004
  autostart = false
  slot0 = NM-16ESW
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/Host1.txt

 [[Router Host2]]
  model = 3640
  console = 2005
  autostart = false
  slot0 = NM-16ESW
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/Host2.txt

 [[Router Host3]]
  model = 3640
  console = 2006
  autostart = false
  slot0 = NM-16ESW
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/Host3.txt

 [[Router Host4]]
  model = 3640
  console = 2007
  autostart = false
  slot0 = NM-16ESW
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/Host4.txt

 [[Router Host5]]
  model = 3640
  console = 2008
  autostart = false
  slot0 = NM-16ESW
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/Host5.txt

 [[Router Host6]]
  model = 3640
  console = 2009
  autostart = false
  slot0 = NM-16ESW
# cnfg = /opt/dynamips/dynagen-0.10.1/UTS/CCNA3/Week02/initconfig/Host6.txt

這Lab只是基本VLAN設定練習


我的設定是
1. 先設定PC1-6

2. 再設定Switch1-3 VLAN10,20,30,99
vlan database
vlan 10 name Staff
vlan 20 name Students
vlan 30 name Guest
vlan 99 name management
exit

3. Switch2-3 指定VLAN的Port
interface fastEthernet 0/11
 switchport mode access
 switchport access vlan 10
!
interface fastEthernet 0/12
 switchport mode access
 switchport access vlan 20
!
interface fastEthernet 0/13
 switchport mode access
 switchport access vlan 30
!

4. Switch1-3 設定managementVLAN
Switch1:
interface Vlan99
 ip address 172.17.99.11 255.255.255.0
 no shutdown

Switch2:
interface Vlan99
 ip address 172.17.99.12 255.255.255.0
 no shutdown

Switch3:
interface Vlan99
 ip address 172.17.99.13 255.255.255.0
 no shutdown

5. Switch1-3 設定Trunk跟native VLAN 在Trunking port
Switch1:
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/2
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 99
 switchport mode trunk

Switch2:
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 99
 switchport mode trunk

Switch3:
interface FastEthernet0/2
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 99
 switchport mode trunk

6. 驗證指令
show vlan-switch
show interfaces trunk

最後PC1-4,2-5,3-6互ping 有通 結束


Switch1設定檔:
hostname Switch1
!
no ip domain lookup
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
 no shutdown
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
 no shutdown
!
interface Vlan99
 ip address 172.17.99.11 255.255.255.0
!
line con 0
 logging synchronous
!
end

Switch2設定檔:
hostname Switch2
!
no ip domain lookup
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
 no shutdown
!
interface FastEthernet0/11
 switchport access vlan 10
!
interface FastEthernet0/12
 switchport access vlan 20
!
interface FastEthernet0/13
 switchport access vlan 30
!
interface Vlan99
 ip address 172.17.99.12 255.255.255.0
!
line con 0
 logging synchronous
!
end

Switch3設定檔:
hostname Switch3
!
no ip domain lookup
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
 no shutdown
!
interface FastEthernet0/11
 switchport access vlan 10
!
interface FastEthernet0/12
 switchport access vlan 20
!
interface FastEthernet0/13
 switchport access vlan 30
!
interface Vlan99
 ip address 172.17.99.13 255.255.255.0
!
line con 0
 logging synchronous
!
end

PC1設定檔:
hostname PC1
!
no ip domain lookup
!

interface FastEthernet0/1
 no switchport
 ip address 172.17.10.21 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.10.1
!
line con 0
 logging synchronous
!
end

PC2設定檔:
hostname Host2
!
no ip domain lookup
!
interface FastEthernet0/2
 no switchport
 ip address 172.17.20.22 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.20.1
!
line con 0
 logging synchronous
!
end

PC3設定檔:
hostname Host3
!
no ip domain lookup
!
interface FastEthernet0/3
 no switchport
 ip address 172.17.30.23 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.30.1
!
line con 0
 logging synchronous
!
end

PC4設定檔:
hostname Host4
!
no ip domain lookup
!
interface FastEthernet0/4
 no switchport
 ip address 172.17.10.24 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.10.1
!
line con 0
 logging synchronous
!
end

PC5設定檔:
hostname Host5

no ip domain lookup
!
interface FastEthernet0/5
 no switchport
 ip address 172.17.20.25 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.20.1
!
line con 0
 logging synchronous
!
end

PC6設定檔:
hostname Host6
!
no ip domain lookup
!
interface FastEthernet0/6
 no switchport
 ip address 172.17.30.26 255.255.255.0
 no shutdown
!
ip route 0.0.0.0 0.0.0.0 172.17.30.1
!
line con 0
 logging synchronous
!
end

最後互ping 有通 結束


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


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

0 comments:

張貼留言