思科三層交換配置清單與案例

網絡拓撲結構爲:中心交換機採用Cisco Catalyst 4006-S3,Supervisor Engine III G引擎位於第1插槽,用於實現三層交換;1塊24口1000Base-T模塊位於第2插槽,用於連接網絡服務器;1塊6端口1000Base-X模塊位於第3插槽,用於連接6臺骨幹交換機。一臺交換機採用Cisco Catalyst 3550-24-EMI,並安裝1塊1000Base-X GBIC千兆模塊。一臺交換機採用Cisco Catalyst 3550-24-SMI,也安裝1塊1000Base-X GBIC千兆模塊。另外四臺交換機採用Cisco Catalyst 2950G-24-SMI,安裝1塊1000Base-T GBIC千兆模塊。所有服務器劃分爲一個VLAN,即VLAN 50。四臺Catalyst 2950G-24-SMI交換機也只劃分爲一個VLAN,分別爲VLAN 60、VLAN 70、VLAN 80和VLAN 90。
Catalyst 3550-24-EMI劃分爲4個VLAN,分別爲VLAN 10、VLAN 20、VLAN 30和VLAN 40。Catalyst 3550-24-SMI劃分2個VLAN,分別爲VLAN 60和VLAN 80,與另外兩臺Catalyst 2950G-24-SMI交換機分別位於同一VLAN。
實例分析
由於所有Catalyst 2950G交換機都是一個獨立的VLAN,因此,必須先在這些交換機上創建VLAN(VLAN 60~VLAN 90),並將所有端口都指定至該VLAN。然後,再在Catalyst 4006交換機相應端口上分別創建VLAN。Catalyst 4006的1000Base-X端口分別與各Catalyst 2950G的1000Base-X端口連接。其中,
GigabitEthernet3/2端口連接至1號Catalyst 2950交換機(VLAN 60),GigabitEthernet3/3端口連接至2號Catalyst 2950交換機(VLAN 70),GigabitEthernet3/4端口連接至3號Catalyst 2950交換機(VLAN 80),GigabitEthernet3/5端口連接至4號Catalyst 2950交換機(VLAN 90),GigabitEthernet3/6端口連接至6號樓交換機(VLAN 80)。由於在Catalyst 3550-24-EMI上劃分有4個VLAN(VLAN 10~VLAN 40),而4個VLAN都需藉助於一條1000Base-X鏈路實現與Catalyst 4006的GigabitEthernet3/1端口連接,因此,必須在Catalyst 4006與Catalyst 3550-24- EMI之間創建一個Trunk。
同樣,在Catalyst 3550-24-SMI上劃分有2個VLAN(VLAN 60和VLAN 80),而4個VLAN都需藉助於一條1000Base-X鏈路實現與Catalyst 4006的GigabitEthernet3/6端口連接,因此,必須在Catalyst 4006與Catalyst 3550-24- EMI之間創建一個Trunk。
另外,所有服務器均連接至Catalyst 4006的1000Base-T模塊,並單獨成爲一個VLAN(VLAN 90),因此,也必須爲這些交換機創建一個VLAN,並將所有端口指定至該VLAN。需要注意的是,考慮到網絡管理的需要,也可以剩餘幾個RJ-45端口 (如21至24端口)不指定至任何VLAN,從而便於連接網絡管理設備。默認狀態下,所有端口都屬於VLAN1,而且也只有在VLAN1中才能實現對網絡中所有設備的管理。
配置清單
●Cisco Catalyst 4006交換機配置清單

Current configuration : 5594 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service compress-config
!
hostname hsnc
!
boot system bootflash:cat4000-is-mz.121-8a.EW1.bin
no logging console
enable secret level 1 5 $1$rkQW$1HKyKdN5f.Ri5zxeoF8Yv/
!
ip subnet-zero
!
!
!
interface GigabitEthernet1/1
no snmp trap link-status
!--不爲Supervisor Engine III G引擎中的1000Base-X插槽指定VLAN
interface GigabitEthernet1/2
no snmp trap link-status
!
!
interface GigabitEthernet2/1
switchport access vlan 50
no snmp trap link-status
!--將端口GigabitEthernet2/1指定至VLAN 50
!
interface GigabitEthernet2/2
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/3
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/4
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/5
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/6
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/7
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/8
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/9
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/10
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/11
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/12
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/13
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/14
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/15
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/16
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/17
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/18
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/19
switchport access vlan 50
no snmp trap link-status
!
interface GigabitEthernet2/20
switchport access vlan 50
no snmp trap link-status
!--不將GigabitEthernet2/20~24指定至任何VLAN
!interface GigabitEthernet3/1
switchport trunk encapsulation dot1q
!--啓用802.1Q Trunk封裝協議,即在該端口創建Trunk
switchport trunk allowed vlan 1-80
!--允許vlan 1-90在該中繼線通訊
!--可以拒絕或允許某個VLAN訪問該Trunk
!--確保未被授權的VLAN通過該Trunk,實現VLAN的訪問安全
switchport mode trunk
!--將該端口設置爲Trunk
description netcenter
no snmp trap link-status
!
interface GigabitEthernet3/2
switchport access vlan 60
no snmp trap link-status
!--將端口GigabitEthernet3/2指定至VLAN 60
!
interface GigabitEthernet3/3
switchport access vlan 70
no snmp trap link-status
!--將端口GigabitEthernet3/3指定至VLAN 70
!
interface GigabitEthernet3/4
switchport access vlan 80
no snmp trap link-status
!--將端口GigabitEthernet3/4指定至VLAN 80
!
interface GigabitEthernet3/5
switchport access vlan 90
no snmp trap link-status
!--將端口GigabitEthernet3/5指定至VLAN 90
!
interface GigabitEthernet3/6
switchport trunk encapsulation dot1q
!--啓用802.1Q Trunk封裝協議,即在該端口創建Trunk
switchport trunk allowed vlan 1-80
!--允許vlan 1-90在該中繼線通訊
!--可以拒絕或允許某個VLAN訪問該Trunk
!--從而確保未被授權的VLAN通過該Trunk,實現VLAN訪問安全
switchport mode trunk
!--將該端口設置爲Trunk
description netcenter
no snmp trap link-status
!
interface Vlan1
description netmanger
no ip address
!
!--對VLAN1進行描述
interface Vlan10
description network center
no ip address
!--對VLAN2進行描述
!
interface Vlan20
description computer center
no ip address
!
interface Vlan30
description network lab
no ip address
!
interface Vlan40
description huaxuelou
no ip address
!
interface Vlan50
description wulilou
no ip address
!
interface Vlan60
description shengwulou
no ip address
!interface Vlan70
description zhongwenxi
no ip address
!
interface Vlan80
description tushuguan
no ip address
!
!
line con 0
stopbits 1
line vty 0 4
password aaa
login
!
      end
Cisco Catalyst 3550-EMI配置清單

Building configuration...
Current configuration : 4055 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname office
!
enable secret 5 $1$p0fU$JeyPOM0RuL.Fqfe71efHF1
!
ip subnet-zero
!
!
spanning-tree extend system-id
!
!
!
interface FastEthernet0/1
switchport access vlan 10
!--將端口FastEthernet0/1指定至VLAN 10
no ip address
!
interface FastEthernet0/2
switchport access vlan 10
no ip address
!
interface FastEthernet0/3
switchport access vlan 10
no ip address
!
interface FastEthernet0/4
switchport access vlan 10
no ip address
!
interface FastEthernet0/5
switchport access vlan 10
no ip address
!
interface FastEthernet0/6
switchport access vlan 20
no ip address
!--將端口FastEthernet0/6指定至VLAN 20
!interface FastEthernet0/7
switchport access vlan 20
no ip address
!
interface FastEthernet0/8
switchport access vlan 20
no ip address
!
interface FastEthernet0/9
switchport access vlan 20
no ip address
!
interface FastEthernet0/10
switchport access vlan 20
no ip address
!
interface FastEthernet0/11
switchport access vlan 30
no ip address
!--將端口FastEthernet0/6指定至VLAN 30
!
interface FastEthernet0/12
switchport access vlan 30
no ip address
!
interface FastEthernet0/13
switchport access vlan 30
no ip address
!
interface FastEthernet0/14
switchport access vlan 30
no ip address
!
nterface FastEthernet0/15
switchport access vlan 30
no ip address
!
interface FastEthernet0/16
switchport access vlan 30
no ip address
!
interface FastEthernet0/17
switchport access vlan 30
no ip address
!
interface FastEthernet0/18
switchport access vlan 30
no ip address
!
interface FastEthernet0/19
switchport access vlan 40
ip address
!--將端口FastEthernet0/6指定至VLAN 40
!interface FastEthernet0/20
witchport access vlan 40
no ip address
!
interface FastEthernet0/21
switchport access vlan 40
no ip address
!
interface FastEthernet0/22
switchport access vlan 30
no ip address
!
interface FastEthernet0/23
switchport access vlan 40
no ip address
!
interface FastEthernet0/24
switchport access vlan 40
no ip address
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
!--啓用802.1Q Trunk封裝協議,即在該端口創建Trunk
switchport trunk allowed vlan 1-80
!--允許vlan 1-80在該中繼線通訊
itchport mode trunk
!--將該端口設置爲Trunk
no ip address
!
interface GigabitEthernet0/2
no ip address
!
interface Vlan1
ip address 172.16.100.12 255.255.255.0
!--LAN1指定IP地址
no ip route-cache
no ip mroute-cache
!
ip classless
ip http server
!
!
!
!
line con 0
line vty 0 4
password aaa
login
line vty 5 15
login
!
      end
Cisco Catalyst 3550-SMI配置清單

Building configuration...
Current configuration : 4055 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname office
!
enable secret 5 $1$p0fU$JeyPOM0RuL.Fqfe71efHF1
!
ip subnet-zero
!
!
spanning-tree extend system-id
!
!
!
interface FastEthernet0/1
switchport access vlan 60
!--將端口FastEthernet0/1指定至VLAN 60
no ip address
!
interface FastEthernet0/2
switchport access vlan 60
no ip address
!
interface FastEthernet0/3
switchport access vlan 60
no ip address
!
interface FastEthernet0/4
switchport access vlan 60
no ip address
!
interface FastEthernet0/5
switchport access vlan 60
no ip address
!
interface FastEthernet0/6
switchport access vlan 20
no ip address
!--將端口FastEthernet0/6指定至VLAN 20
!interface FastEthernet0/7
switchport access vlan 20
no ip address
!
interface FastEthernet0/8
switchport access vlan 20
no ip address
!
interface FastEthernet0/9
switchport access vlan 20
no ip address
!
interface FastEthernet0/10
switchport access vlan 20
no ip address
!
interface FastEthernet0/11
switchport access vlan 80
no ip address
!--將端口FastEthernet0/6指定至VLAN 80
!
interface FastEthernet0/12
switchport access vlan 80
no ip address
!
interface FastEthernet0/13
switchport access vlan 80
no ip address
!
interface FastEthernet0/14
switchport access vlan 80
no ip address
!
interface FastEthernet0/15
switchport access vlan 80
no ip address
interface FastEthernet0/16
switchport access vlan 80
no ip address
!
interface FastEthernet0/17
switchport access vlan 80
no ip address
!
interface FastEthernet0/18
switchport access vlan 80
no ip address
!
interface FastEthernet0/19
switchport access vlan 80
no ip address
!--將端口FastEthernet0/6指定至VLAN 80
!interface FastEthernet0/20
switchport access vlan 80
no ip address
!
interface FastEthernet0/21
switchport access vlan 80
no ip address
!
interface FastEthernet0/22
switchport access vlan 80
no ip address
!
interface FastEthernet0/23
switchport access vlan 80
no ip address
!
interface FastEthernet0/24
switchport access vlan 80
no ip address
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
!--啓用802.1Q Trunk封裝協議,即在該端口創建Trunk
switchport trunk allowed vlan 1-80
!--允許vlan 1-80在該中繼線通訊
switchport mode trunk
!--從將該端口設置爲Trunk
no ip address
!
interface GigabitEthernet0/2
no ip address
!
interface Vlan1
ip address 172.16.100.13 255.255.255.0
!--爲LAN1指定IP地址
no ip route-cache
no ip mroute-cache
!
ip classless
ip http server
!
!
!
!
line con 0
line vty 0 4
password aaa
login
line vty 5 15
login
!
      end
Cisco Catalyst 2950G配置清單
四臺Cisco Catalyst 2950G的配置基本相同,下面僅列出VLAN 60的配置情況。


Building configuration...
Current configuration : 2143 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname msl
!
enable password aaa
!
ip subnet-zero
!
!
spanning-tree extend system-id
!
!
interface FastEthernet0/1
switchport access vlan 60
no ip address
!
interface FastEthernet0/2
switchport access vlan 60
no ip address
!
interface FastEthernet0/3
switchport access vlan 60
no ip address
!
interface FastEthernet0/4
switchport access vlan 60
no ip address
!
interface FastEthernet0/5
switchport access vlan 60
no ip address
!
interface FastEthernet0/6
switchport access vlan 60
no ip address
!
interface FastEthernet0/7
switchport access vlan 60
no ip address
!
interface FastEthernet0/8
switchport access vlan 60
no ip address
!
interface FastEthernet0/9
switchport access vlan 60
no ip address
!
interface FastEthernet0/10
switchport access vlan 60
no ip address
!
interface FastEthernet0/11
switchport access vlan 60
no ip address
!interface FastEthernet0/12
switchport access vlan 60
no ip address
!
interface FastEthernet0/13
switchport access vlan 60
no ip address
!
interface FastEthernet0/14
switchport access vlan 60
no ip address
!
interface FastEthernet0/15
switchport access vlan 60
no ip address
!
interface FastEthernet0/16
switchport access vlan 60
no ip address
!
interface FastEthernet0/17
switchport access vlan 60
no ip address
!
interface FastEthernet0/18
switchport access vlan 60
no ip address
!
interface FastEthernet0/19
switchport access vlan 60
no ip address
!
interface FastEthernet0/20
switchport access vlan 60
no ip address
!
interface FastEthernet0/21
switchport access vlan 60
no ip address
!
interface FastEthernet0/22
switchport access vlan 60
no ip address
!
interface FastEthernet0/23
switchport access vlan 60
no ip address
!
interface FastEthernet0/24
switchport access vlan 60
no ip address
!
interface GigabitEthernet0/1
no ip address
!
interface GigabitEthernet0/2
no ip address
!
interface Vlan1
ip address 172.16.100.10 255.255.255.0
!
ip classless
ip http server
!
!
!
!
line con 0
line vty 0 4
password aaa
login
line vty 5 15
login
!
      end
以下內容 ancy 由撰寫
經典的三層網絡案例分析。改進中。。。新加很多先進技術噢!新增路由器的配置。
經典的三層網絡案例分析。
目的:讓不同的vlan 之間可以互相通訊。
IP規劃
vlna ID ip網段 vlan網關


vlan 1 172.16.1.0/24 172.16.1.7-9
vlan 2 172.16.2.0/24 172.16.2.252-254
vlan 3 172.16.3.0/24 172.16.3.252-254
vlan 4 172.16.4.0/24 172.16.4.252-254
vlan 5 172.16.5.0/24 172.16.5.252-254
vlan 6 172.16.6.0/24 172.16.6.252-254
vlan 7 172.16.7.0/24 172.16.7.252-254
vlan 8 172.16.8.0/24 172.16.8.252-254
      vlan 9 172.16.9.0/24 172.16.9.252-254
拓樸圖見最後面
器配置
cisco路由器配置:

Enable
Configure terminal
Service password-encryption
Hostname cisco1721
Enable secret 654321
Enable password 123456
ip subnet-zero
ip name-server 202.96.134.133 202.96.172.218
interface fastethernet 0
ip address 61.142.221.5 255.255.255.240
speed auto
no shutdown
interface serial 0
ip unnumbered fastethernet 0
encapsulation ppp
no fair-queue
bandwidth 2048
no shutdown
exit
ip classless
ip route 0.0.0.0 0.0.0.0 serial 0
no ip http server
line con 0
line aux 0
line vty 0 4
password 12345678
login
no scheduler allocate
      end

請注意NAT等是在防火牆設置的.
交換機配置
一、Catalyst 4006-s3交換機配置:


Enable
Configure terminal
service pad
service password-encryption
hostname c4006-s3
enable password 123456.
Enable secret 654321
Ip subnet-zero
Ip name-server 172.16.8.1 172.16.8.2
ip routing
Exit
Vlan database
Vtp mode server
Vtp domain centervtp
Vlan 2 name vlan2
Vlan 3 name vlan3
Vlan 4 name vlan4
Vlan 5 name vlan5
Vlan 6 name vlan6
Vlan 7 name vlan7
Vlan 8 name vlan8
Vlan 9 name vlan9
Exit
Configure terminal
Interface port-channel 1
Interface gigabitethernet 2/1
channel-group 1
Interface gigabitethernet 2/2
channel-group 1
Interface gigabitethernet 2/1
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigabitethernet 2/3
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigabitethernet 2/4
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigbitethernet 2/5
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigbitethernet 2/6
switchport mode trunk
switchport trunk encapsulation dotlq
switchprot trunk allowed vlan all
interface gigbitethernet 2/7
switchport access vlan 9
no shutdown
interface range gigabitethernet 2/8 – 20
switchport mode access
switchport access vlan 8
no shutdown
spanning-tree portfast
interface gigabitethernet 3/1
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigabitethernet 3/2
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
spanning-tree vlan 1-9 root primary
spanning-tree backbonefast
interface vlan 1
ip address 172.16.1.7 255.255.255.0
no shutdown
standby 1 ip 172.16.1.9
standby 1 priority 110 preempt
interface vlan 2
ip address 172.16.2.252 255.255.255.0
no shutdown
standby 2 ip 172.16.2.254
standby 2 priority 110 preempt
interface vlan 3
ip address 172.16.3.252 255.255.255.0
no shutdown
standby 3 ip 172.16.3.254
standby 3 priority 110 preempt
interface vlan 4
ip address 172.16.4.252 255.255.255.0
no shutdown
standby 4 ip 172.16.4.254
standby 4 priority 110 preempt
interface vlan 5
ip address 172.16.5.252 255.255.255.0
no shutdown
standby 5 ip 172.16.5.254
standby 5 priority 110 preempt
interface vlan 6
ip address 172.16.6.252 255.255.255.0
no shutdown
standby 6 ip 172.16.6.254
standby 6 priority 110 preempt
interface vlan 7
ip address 172.16.7.252 255.255.255.0
no shutdown
standby 7 ip 172.16.7.254
standby 7 priority 110 preempt
interface vlan 8
ip address 172.16.8.252 255.255.255.0
no shutdown
standby 8 ip 172.16.8.254
standby 8 priority 110 preempt
interface vlan 9
ip address 172.16.9.252 255.255.255.0
no shutdown
standby 9 ip 172.16.9.254
standby 9 priority 110 preempt
exit
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.9.250
line con 0
line aux 0
line vty 0 15
password 12345678
login
      end
二、Catalyst 3550-12T交換機配置:


Enable
Configure terminal
service pad
service password-encryption
hostname c3550-12t
enable password 123456
enable secret 654321
ip subnet-zero
ip name-server 172.16.8.1. 172.16.8.2
ip routing
exit
vlan database
vtp mode server
vtp domain centervtp
vlan 2 name vlan2
vlan 3 name vlan3
vlan 4 name vlan4
vlan 5 name vlan5
vlan 6 name vlan6
vlan 7 name vlan7
vlan 8 name vlan8
vlan 9 name vlan9
exit
configure terminal
interface port-channel 1
interface gigabitethernet 0/1
channel-group 1
interface gigabitethernet 0/2
channel-group 1
exit
interface gigabitethernet 0/1
switchport mode trunk
switchport encapsulation dotlq
swithchport trunk allowed vlan all
interface gigabitethernet 0/3
switchport mode trunk
switchport trunk encapsulation dotlq
swithcport trunk allowed vlan all
interface gigabitethernet 0/4
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigabitethernet 0/5
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigabitethernet 0/6
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
interface gigabitethernet 0/7
switchport access vlan 9
no shutdown
interface range gigabitethernet 0/8 – 10
switchport mode access
switchport access vlan 8
no shutdown
spanning-tree portfast
interface gigabitethernet 0/11
switchport mode trunk
switchport trunk encapsulation dotlq
swithcprot trunk allowed vlan all
interface gigabitethernet 0/12
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
spanning-tree vlan 1-9 root secondary
spanning-tree backbonefast
interface vlan 1
ip address 172.16.1.8 255.255.255.0
no shutdown
standby 1 ip 172.16.1.9
standby 1 priority 100 preempt
interface vlan 2
ip address 172.16.2.253 255.255.255.0
no shutdown
standby 2 ip 172.16.2.254
standby 2 priority 100 preempt
interface vlan 3
ip address 172.16.3.253 255.255.255.0
not shutdown
standby 3 ip 172.16.3.254
standby 3 priority 100 preempt
interface vlan 4
ip address 172.16.4.253 255.255.255.0
no shutdown
standby 4 ip 172.16.4.254
standby 4 priority 100 preempt
interface vlan 5
ip addess 172.16.5.253 255.255.255.0
no shutdown
standby 5 ip 172.16.5.253
standby 5 priority 100 preempt
interface vlan 6
ip address 172.16.6.253 255.255.255.0
no shutdown
standby 6 ip 172.16.6.254
standby 6 priority 100 preempt
interface vlan 7
ip address 172.16.7.253 255.255.255.0
no shutdown
standby 7 ip 172.16.7.254
standby 7 priority 100 preempt
interface vlan 8
ip address 172.16.8.253 255.255.255.0
no shutdown
standby 8 ip 172.16.8.254
standby 8 priority 100 preempt
interface vlan 9
ip address 172.16.9.253 255.255.255.0
no shutdown
standby 9 ip 172.16.9.254
standby 9 priority 100 preempt
exit
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.9.250
ip http server
line con 0
line aux 0
line vty 0 15
password 12345678
login
      end
三、Catalyst 2950-24 vlan2 交換機配置:


Enable
Configure terminal
Service pad
Service password-encryption
Hostname c2950-241
Enable password 123456
Enable secret 654321
Ip subnet-zero
Interface vlan 1
Ip address 172.16.1.1 255.255.255.0
management
No shutdown
Ip default-gateway 172.16.1.9
Ip name-server 172.16.8.1 172.16.8.2
exit
Vlan database
Vtp mode client
Vtp domain centervtp
Exit
Configure terminal
Interface range fastethernet 0/1 – 20
Switchport mode access
Switchport accesss vlan 2
No shutdown
Spanning-tree portfast
Spanning-tree uplinkfast
Spanning-tree backbonefast
Interface gigabitethernet 0/1
Switchport mode trunk
Switchport trunk encapculation dotlq
Switchport trunk allowed vlan all
Spanning-tree cost 10
Interface gigabitethernet 0/2
Switchport mode trunk
Switchport trunk encapculation dotlq
Switchport trunk allowed vlan all
Spanning-tree cost 20
Exit
Line con 0
Line aux 0
Line vty 0 15
Password 12345678
Login
      End
四、catalyst 2950-24 vlan 3 交換機配置:


enable
configure terminal
service pad
service password-encryption
hostname c2950-242
enable password 123456
enable secret 654321
ip subnet-zero
interface vlan 1
ip address 172.16.1.2 255.255.255.0
management
no shutdown
ip default-gateway 172.16.1.9
ip name-server 172.16.8.1 172.16.8.2
exit
vlan database
vtp domain centervtp
vtp mode client
exit
configure terminal
interface range fastethernet 0/1 – 20
switchport mode access
switchport access vlan 3
no shutdown
spanning-tree portfast
spanning-tree uplinefast
spanning-tree backbonefast
interface gigabitethernet 0/1
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
spanning-tree cost 10
interface gigabitethernet 0/2
switchport mode trunk
switchport trunk encapsulation dotlq
switchport trunk allowed vlan all
spanning-tree cost 20
exit
line con 0
line aux 0
line vty 0 15
password 12345678
login
end
copy running-config startup-config
      reload
其它交換機配置類似
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章