cisco 6509交换配置
生活随笔
收集整理的這篇文章主要介紹了
cisco 6509交换配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
. 6509介紹??
Cisco Catalyst 6500系列交換機提供3插槽、6插槽、9插槽和13插槽的機箱,以
及多種集成式服務模塊,包括數千兆位網絡安全性、內容交換、語音和網絡分析模塊。?
Catalyst 6500系列中的所有型號都使用了統一的模塊和操作系統軟件,形成了能夠
適應未來發展的體系結構,由于能提供操作一致性,因而能提高IT基礎設施的利用
率,并增加投資回報。從48端口到576端口的10/100/1000以太網布線室到能夠支
持192個1Gbps或32個10Gbps骨干端口,提供每秒數億個數據包處理能力的網絡核
心,Cisco Catalyst 6500系列能夠借助冗余路由與轉發引擎之間的故障切換功能提
高網絡正常運行時間。??
提高網絡正常運行時間,提高網絡彈性。提供數據包丟失保護,能夠從網絡故障中快
速恢復。能夠在冗余控制引擎間實現快速的1~3秒狀態故障切換。??
提供可選的高性能Cisco Catalyst 6500系列Supervisor Engine 720、無源背板、
多引擎的冗余;并可利用Cisco EtherChannel?技術、IEEE 802.3ad鏈路匯聚、IEEE?
802.1s/w和熱備份路由器協議/虛擬路由器冗余協議(HSRP/VRRP)達到高可用性???
不需要部署外部設備,直接在6500機箱內部署集成式的千兆位的網絡服務模塊,以
簡化網絡管理,降低網絡的總體成本。這些網絡服務模塊包括:??
l 千兆位防火墻模塊--提供接入保護??
l 高性能入侵檢測系統(IDS)模塊--提供入侵檢測保護??
l 千兆位網絡分析模塊--提供可管理性更高的基礎設施和全面的遠程超級(RMON)支
持??
l 高性能SSL模塊--提供安全的高性能電子商務流量??
l 千兆位VPN和基于標準的IP Security(IPSec)模塊--降低的互聯網和內部專網的
連接成本。???
集成式內容交換模塊(CSM)能夠為Cisco Catalyst 6500系列提供功能豐富的高性
能的服務器和防火墻網絡負載平衡連接,以提高網絡基礎設施的安全性、可管理性和
強大控制??
基于網絡的應用識別(NBAR)等軟件特性可提供增強網絡管理和QoS控制機制。???
利用分布式Cisco Express Forwarding dCEF720平臺提供400Mpps交換性能。支持
多種Cisco Express Forwarding(CEF)實現方式和交換矩陣速率。??
多協議第3層路由支持滿足了傳統的網絡要求,并能夠為企業網絡提供平滑的過渡機
制。支持IPv6,并提供高性能的IPv6服務。提供MPLS及MPLS/VPN的支持,并具有
豐富的MPLS服務。增強的數據、語音和視頻服務??
提供10/100和10/100/1000接口模塊,借助在接口模塊內增加電源子卡就可讓這些
接口模塊提供在線的電源,提供IEEE 802.3af的支持,保護今天的投資。??
每臺設備可提供576個支持語音的,具有在線電源的10/100/1000M銅線接口。提供
192個GBIC千兆位以太網接口。可提供高密度的OC-3 POS接口的通道化的OC-48接
口。??
2. 連接設備??
2.1. 從console連接??
第一次對6000交換機進行配置,必須從console進入。 ??
首先先將機器上架,按要求接好電源,然后用隨機附帶的Console線和轉接頭將交換
機的console口與PC的串口相聯,如下:??
????
Com口設置如下:??
9600 baud???
8 data bits???
No parity???
1 stop bits??
檢查電源無誤后,開電,可能會出現類似下面的顯示,按黑粗體字回答:???
System Bo otstrap, Version 7.7(1)??
Copyright (c) 19 94-20 03 by cisco Systems, Inc.??
Cat6k-Sup720/SP processor with 524288 Kbytes of main memory??
?
Autoboot executing command: "boot bootflash:"??
?
Self decompressing the image :?
#########################################################################
#########################################################################
#########################################################################
# [OK]??
?
????????????? Restricted Rights Legend??
?
Use, duplication, or disclosure by the Government is??
subject to restrictions as set forth in subparagraph??
(c) of the Commercial Computer Software - Restricted??
Rights clause at FAR sec. 52.227-19 and subparagraph??
(c) (1) (ii) of the Rights in Technical Data and Computer??
Software clause at DFARS sec. 252.227-7013.??
?????????? cisco Systems, Inc.??
?????????? 170 West Tasman Drive??
?????????? San Jose, California 95134-1706??
?
Cisco Internetwork Operating System Software???
IOS (tm) s72033_sp Software (s72033_sp-SP-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
TAC Support:?[url]http://www.cisco.com/tac[/url]??
Copyright (c) 1986-2003 by cisco Systems, Inc.??
Compiled Wed 29-Oct-03 08:20 by cmong??
Image text-base: 0x40020FBC, data-base: 0x40D32000??
?
00:00:03: %PFREDUN-6-ACTIVE: Initializing as ACTIVE processor??
?
00:00:03: %OIR-6-CONSOLE: Changing console ownership to route processor??
?
System Bo otstrap, Version 12.2(14r)S9, RELEASE SOFTWARE (fc1)??
TAC Sup port: ht tp:/ /w w w.cisco.com/tac??
Copyright (c) 20 03 by cisco Systems, Inc.??
Cat6k-Sup720/RP platform with 524288 Kbytes of main memory??
?
Download Start??
?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !??
?
Download Completed! Booting the image.??
?
Self decompressing the image :?
#########################################################################
################################################################### [OK]??
?
?
????????????? Restricted Rights Legend??
?
Use, duplication, or disclosure by the Government is??
subject to restrictions as set forth in subparagraph??
(c) of the Commercial Computer Software - Restricted??
Rights clause at FAR sec. 52.227-19 and subparagraph??
(c) (1) (ii) of the Rights in Technical Data and Computer??
Software clause at DFARS sec. 252.227-7013.??
?
?????????? cisco Systems, Inc.??
?????????? 170 West Tasman Drive??
?????????? San Jose, California 95134-1706??
?
Cisco Internetwork Operating System Software???
IOS (tm) s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
TAC Support:?[url]http://www.cisco.com/tac[/url]??
Copyright (c) 1986-2003 by cisco Systems, Inc.??
Compiled Wed 29-Oct-03 08:16 by cmong??
Image text-base: 0x40008FBC, data-base: 0x41E50000??
?
This product contains cryptographic features and is subject to United??
States and local country laws governing import, export, transfer and??
use. Delivery of Cisco cryptographic products does not imply??
third-party authority to import, export, distribute or use encryption.??
Importers, exporters, distributors and users are responsible for??
compliance with U.S. and local country laws. By using this product you??
agree to comply with applicable laws and regulations. If you are unable??
to comply with U.S. and local laws, return this product immediately.??
?
A summary of U.S. laws governing Cisco cryptographic products may be found?
at:??
[url]http://www.cisco.com/wwl/export/crypto/tool/stqrg.html[/url]??
?
If you require further assistance please contact us by sending email to??
[email]export@cisco.com[/email].??
?
cisco WS-C6509 (R7000) processor (revision 3.0) with 458752K/65536K bytes of?
memory.??
Processor board ID SAL0743NKW8??
SR71000 CPU at 600Mhz, Implementation 0x504, Rev 1.2, 512KB L2 Cache??
Last reset from power-on??
X.25 software, Version 3.0.0.??
Bridging software.??
1 Virtual Ethernet/IEEE 802.3? interface(s)??
48 FastEthernet/IEEE 802.3 interface(s)??
36 Gigabit Ethernet/IEEE 802.3 interface(s)??
1917K bytes of non-volatile configuration memory.??
8192K bytes of packet buffer memory.??
?
65536K bytes of Flash internal SIMM (Sector size 512K).??
Logging of %SNMP-3-AUTHFAIL is enabled????
Press RETURN to get started!??
--- System Configuration Dialog ---??
?? Would you like to enter the initial dialog? [yes]: no??
回答:NO,進入手工配置,在router>下,輸入enable??
回車,進入全局模式??
2.2. 遠程telnet連接??
當完成交換機配置,并起給交換機配置了管理地址,就可以直接采用遠程telnet登
陸進入交換機了,但是必須先配置 line vty的密碼和enable密碼才能允許遠程登陸。
配置telnet登陸命令如下:??
#conf t??
#line vty 0 4??
#login ;控制vty接口是否能夠telnet??
#password switch??
3. 基本信息配置??
3.1. 交換機軟件版本??
Cisco的65xx交換機支持兩種版本的系統軟件,分別稱為Natvie IOS版本和Cat OS
版本的系統軟件,CatOS版本的軟件是為了兼容之前的65xx系列交換機的命令而沿襲
下來的。Native IOS版本軟件是Cisco公司為了統一其交換機及路由器的軟件風格而
研發出來的新一代IOS系統軟件,Cisco所有的交換機版本都在整體向Native IOS
版本過渡,目前來說,Native IOS版本的軟件功能和CatOS版本的軟件功能相差不多,
但是今后都會向Native IOS版本軟件。??
本項目中所使用的6509交換機采用的是Native IOS版本。??
3.2. 查看交換機基本配置??
show version ;查看系統版本,內存配置,寄存器等基本信息??
show module all ;查看交換機配置模塊??
show catalyst6000 chassis-mac-address ;查看交換機MAC地址??
#show version輸出信息如下:??
Cisco Internetwork Operating System Software???
IOS (tm) s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
TAC Support:?[url]http://www.cisco.com/tac[/url]??
Copyright (c) 1986-2003 by cisco Systems, Inc.??
Compiled Wed 29-Oct-03 08:16 by cmong??
Image text-base: 0x40008FBC, data-base: 0x41E50000??
?
ROM: System Bootstrap, Version 12.2(14r)S9, RELEASE SOFTWARE (fc1)??
BOOTLDR: s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
?
Router uptime is 29 minutes??
Time since Router switched to active is 29 minutes??
System returned to ROM by power-on (SP by power-on)??
System restarted at 12:57:08 PST Sat Jan 31 2004??
System image file is "sup-bootflash:s72033-pk9s-mz.122-17a.SX1.bin"??
?
?
This product contains cryptographic features and is subject to United??
States and local country laws governing import, export, transfer and??
use. Delivery of Cisco cryptographic products does not imply??
third-party authority to import, export, distribute or use encryption.??
Importers, exporters, distributors and users are responsible for??
compliance with U.S. and local country laws. By using this product you??
agree to comply with applicable laws and regulations. If you are unable??
to comply with U.S. and local laws, return this product immediately.??
?
A summary of U.S. laws governing Cisco cryptographic products may be found?
at:??
[url]http://www.cisco.com/wwl/export/crypto/tool/stqrg.html[/url]??
?
If you require further assistance please contact us by sending email to??
[email]export@cisco.com[/email].??
?
cisco WS-C6509 (R7000) processor (revision 3.0) with 458752K/65536K bytes of?
memory.??
Processor board ID SAL0743NKW8??
SR71000 CPU at 600Mhz, Implementation 0x504, Rev 1.2, 512KB L2 Cache??
Last reset from power-on??
X.25 software , Version 3.0.0.??
Bridging software.??
1 Virtual Ethernet/IEEE 802.3? interface(s)??
48 FastEthernet/IEEE 802.3 interface(s)??
36 Gigabit Ethernet/IEEE 802.3 interface(s)??
1917K bytes of non-volatile configuration memory.??
8192K bytes of packet buffer memory.??
65536K bytes of Flash internal SIMM (Sector size 512K).??
Standby is up??
Standby has 458752K/65536K bytes of memory.??
?
Configuration register is 0x2102??
?
Router#sho module all??
Mod Ports Card Type????????????????????????????? Model????????????? Serial?
No.??
--- ----- -------------------------------------- ------------------?
-----------??
? 2?? 16? 16 port 1000mb GBIC?
ethernet?????????? WS-X6416-GBIC????? SAL0750QNJP??
? 3?? 16? 16 port 1000mb GBIC?
ethernet?????????? WS-X6416-GBIC????? SAL0750QNFV??
? 5??? 2? Supervisor Engine 720?
(Active)???????? WS-SUP720-BASE???? SAD075000YF??
? 6??? 2? Supervisor Engine 720?
(Warm)?????????? WS-SUP720-BASE???? SAD075109SZ??
? 7?? 48? 48 port 10/100 mb?
RJ45???????????????? WS-X6348-RJ-45???? SAL0752R3E6??
?
Mod MAC?
addresses?????????????????????? Hw??? Fw?????????? Sw?????????? Status??
--- ---------------------------------- ------ ------------ ------------?
-------??
? 2? 000e.8442.4850 to 000e.8442.485f?? 2.5?? 5.4(2)?????? 8.2(0.56)TET Ok??
? 3? 000e.8442.48f0 to 000e.8442.48ff?? 2.5?? 5.4(2)?????? 8.2(0.56)TET Ok??
? 5? 000d.290f.fd08 to 000d.290f.fd0b?? 3.0?? 7.7(1)?????? 12.2(17a)SX1 Ok??
? 6? 000e.3838.1a8c to 000e.3838.1a8f?? 3.0?? 7.7(1)?????? 12.2(17a)SX1 Ok??
? 7? 000e.84c8.54f0 to 000e.84c8.551f?? 6.8?? 5.4(2)?????? 8.2(0.56)TET Ok??
?
Mod?
Sub-Module????????????????? Model????????????? Serial??????? Hw???? Statu
s???
--- --------------------------- ------------------ ------------ -------?
-------??
? 5 Policy Feature Card 3?????? WS-F6K-PFC3A?????? SAD0752009D?? 2.0??? Ok??
? 5 MSFC3 Daughterboard???????? WS-SUP720????????? SAD075109HX?? 2.0??? Ok??
? 6 Policy Feature Card 3?????? WS-F6K-PFC3A?????? SAD0751085J?? 2.0??? Ok??
? 6 MSFC3 Daughterboard???????? WS-SUP720????????? SAD0751077C?? 2.0??? Ok??
? 7 Inline Power Module???????? WS-F6K-PWR?????????????????????? 0.0??? Ok??
?
Mod Online Diag Status???
--- -------------------??
? 2 Pass??
? 3 Pass??
? 5 Pass??
? 6 Pass??
? 7 Pass??
3.3. 配置機器名、telnet、密碼??
在全局模式下,用conf t,進入配置模式,進行以下配置:??
#conf t??
#clock timezone GMT 8 ;配置時區??
#clock set 13:30:21 31 JAN 2004 ;配置交換機時間??
#clock calendar-valid ;使能硬件時鐘同步??
#service timestamps debug datetime localtime ;配置系統debug記錄時間格式??
#service timestamps log datetime localtime ;配置系統日志記錄時間格式??
#service password-encryption ;配置使用加密服務,主要針對口令加密??
#hostname xxxx ;配置交換機名稱??
#enable secret? 0 xxxxx ;配置enable口令??
#copy run start ;將配置信息保存到NVRAM中,重啟動不會丟失??
#line vty 0 4 ;配置telnet??
#e xec-timeout 30 0??
#password 0? xxxx??
#login??
3.4. 配置snmp??
#conf t??
#snmp-server community cisco ro(只讀) ;配置只讀通信字符串??
#snmp-server community secret rw(讀寫) ;配置讀寫通信字符串??
#snmp-server enable traps? ;配置網關SNMP TRAP??
#snmp-server host 10.254.190.1 rw ;配置網關工作站地址??
?
3.5. 啟動三層功能??
#ip routing ;啟動路由功能??
3.6. 查看和配置系統環境變量??
使用show bootvar命令查看系統啟動環境變量,包括BOOT, BOOTLDR, and?
CONFIG_FILE參數:??
Router# show bootvar??
BOOT variable = slot0:c6sup22-jsv-mz.121-5c.EX.bin,1;??
CONFIG_FILE variable does not exist??
BOOTLDR variable = bootflash:c6msfc2-boot-mz.121-3a.E4??
Configu ration register is 0x2??
Router#??
改變BOOT,、BOOTLDR、CONFIG_FILE 這三個環境變量使用命令:??
BOOT? #boot system??
BOOTLDR? #boot bootldr??
CONFIG_FILE #boot config??
4. 端口設置??
4.1. 端口基本設置???
Cisco 65xx系列交換機的端口缺省都是路由模式,一般都會配置為交換端口使用,進
入端口配置模式:??
對于單一端口,在配置模式下輸入:interface Ethernet,Fast Ethernet,Gigabit?
Ethernet x/y, x為槽位號,y為端口號。??
對于一組端口,可以使用以下的命令進入,例如:??
Router(config)# interface range fastethernet 5/1 - 5???? 或:??
Router(config-if)# interface range gigabitethernet 2/1 - 2, gigabitethernet?
3/1 - 2??
進行端口配置模式后,可以shutdown,或no shutdown端口,并可以對端口進行配置,
快速以太端口有全雙工、半雙工和自動協商模式,如果知道對端連接的設備是采用何
種方式,最好采用手工設置方式固定端口的模式和速率。缺省是自動協商模式。??
快速以太端口的速率可以設置為100M,也可以設置為10M和自動協商。缺省是自動協
商方式。如:??
Router(config-if)#speed [10 | 100 | auto](速度)??
Router(config-if)# duplex [auto | full | half](雙工)??
或添加注釋,如:??
Router(config-if)# description Channel-group to "Marketing"??
4.2. 配置二層交換接口??
(以fastethernet為例,gigabitethernet一樣)??
Router(config)# interface fastethernet x/y???
Router(config-if)# shutdown???
Router(config-if)# switchport? ;6500上缺省端口為路由端口,需要寫switchport
將端口設置為交換端口??
Router(config-if)# switchport mode access???
Router(config-if)# switchport access vlan x???
Router(config-if)# no shutdown???
Router(config-if)# end??
?
清除二層接口配置??
(以fastethernet為例,gigabitethernet一樣)??
Router(config)# interface fastethernet x/y???
Router(config-if)# no switchport???
Router(config-if)# end??
注:使用default interface {ethernet | fastethernet | gigabitethernet}?
slot/port,使端口回到原來的缺省配置。??
4.3. 配置三層路由端口??
6500的端口缺省就是具有三層交換的端口,用來跟其他設備的連接,當將一個端口配
置成三層端口之后,就可以在此端口上分配IP地址了。??
Router(config)# interface fastethernet x/y??
Router(config)# ip add x.x.x.x x.x.x.x??
Router(config)# no shutdown??
4.4. 配置端口Trunk???
將一個二層端口配置為Trunk模式:??
Router(config)# interface fastethernet x/y (以fastethernet為例,
gigabitethernet一樣)??
Router(config-if)# shutdown???
Router(config-if)# switchport???
Router(config-if)# switchport trunk encapsulation dot1q???
Router(config-if)# switchport mode trunk??
Router(config-if)# no shutdown???
Router(config-if)# end???
Router# exit??
4.5. Ethernaet Channel??
Router(config)# interface range gigabitethernet1/1 - 2??
Router(config-if)#no ip address???
Router(config-if)#switchport??
Router(config-if)#switchport trunk encapsulation dot1q???
Router(config-if)#switchport mode trunk??
Router(config-if)#switchport trunk native vlan 1???
Router(config-if)#channel-group 1 mode on???
R>interface Port-channel1 ;自動產生,并且一定要如下所示,否則可能會有問題。??
switchport??
switchport trunk encapsulation dot1q??
switchport mode trunk??
!??
interface GigabitEthernet1/1???
? no ip address???
? switchport???
? switchport trunk encapsulation dot1q???
? switchport trunk native vlan 1???
? channel-group 1 mode on???
!???
interface GigabitEthernet1/2???
? no ip address???
? switchport???
? switchport trunk encapsulation dot1q???
? switchport trunk native vlan 1???
? channel-group 1 mode on???
如果有問題,使用命令#no int port-channel 1? ,#int g2/1 -2? ,#no switchport??
4.6. 查看端口配置??
Router# show running-config interface fastethernet 5/8??
Router# show interfaces fastethernet 5/8 switchport??
Router# show running-config interface port-channel 1??
Router# show spanning-tree interface fastethernet 4/4??
5. 配置VLAN??
5.1. 配置VTP??
VTP是一個2層信息協議,包括版本1和2。一個網絡設備只能屬于一個VTP domain。
缺省, Catalyst 6500交換機配置為VTP server mode,在沒有管理域的狀態。直到
在一個trunk鏈路上收到其他域的宣告或手工配置管理域。VTP并不是一定要配置,
但是配置可以簡化配置復雜度和易于管理。??
VTP pruning(VTP裁剪)增強了網絡帶寬利用率。結合VTP,使得沒有必要接收某個
vlan的廣播信息的交換機被裁剪,免于接收包括broadcast, multicast, unknown,?
and flooded unicast的包。??
Router(config)# vtp domain domain_name??
Router(config)# vtp mode {client | server | transparent}??
Router(config)# vtp version {1 | 2}??
Router(config)# vtp password password_string??
Router(config)# vtp pruning??
Router# show vtp status??
5.2. 配置VLAN端口??
5.3. 創建VLAN??
缺省狀態下,所有的二層端口均屬于vlan1,vlan的配置方法如下:??
命令 目的???
Step 1?? Router# vlan database 進入vlan配置方式.??
Step 2?? Router(vlan)# vlan vlan_ID? 加入一個VLAN.??
Step 3 Router(vlan)# vtp domain? name 設置vtp域名??
Step 3?? Router(vlan)# exit? 更新VLAN數據庫,并在管理域內廣播,退到全局模
式??
Step 4?? Router# show vlan name vlan_name? 驗證VLAN配置??
?
刪除配置好的vlan??
Router# vlan database??
Router(vlan)# no vlan x??
Deleting VLAN 3...??
Router(vlan)# exit??
5.4. 給vlan分配端口??
Router(config)# interface fastethernet x/y???
Router(config-if)# shutdown???
Router(config-if)# switchport???
Router(config-if)# switchport mode access???
Router(config-if)# switchport access vlan x??
Router(config-if)# no shutdown???
Router(config-if)# end???
Router# exit??
5.5. 配置vlan地址??
Router(config)# interface vlan x???
Router(config)# ip add x.x.x.x x.x.x.x??
6. 配置HSRP??
不同網段之間的通信都是通過在終端工作站上設定缺省網關來實現的,為了實現冗
余,每臺交換機上必然要配置相同的網段,那么就會在一個網段中出現2個不同地址
的路由 接口(對于工作站就是缺省網關),當1條上聯鏈路失效時,數據必然會從另
外1條鏈路傳輸到另外一臺交換機上進行處理,這時就存在缺省網關變更的問題。??
為了消除當一條鏈路失效導致的工作站缺省網關重新定義的問題,我們使用Cisco公
司專有HSRP(Hot Standby Redundant Protocol)技術來解決這個問題。??
HSRP技術就是將分布在2臺交換機上相同網段的不同路由接口IP地址映射為一個虛
擬IP地址來消除工作站缺省網關重新定義的問題。配置如下:??
在其中一臺65xx上按下面模版進行配置??
interface Vlan x???
? ip address x.x.x.x x.x.x.x??
? no ip redirects???
? no ip directed-broadcast???
? standby 1 ip y.y.y.y??
? standby 1 priority 100???
? standby 1 preempt??
standby 1 authentication secret??
?
在另一臺65xx上按下面模版進行配置??
interface Vlan x???
? ip address x.x.x.x x.x.x.x???
? no ip redirects???
? no ip directed-broadcast???
standby 1 ip y.y.y.y??
? standby 1 priority 110 ;這個優先級高,成為Master??
? standby 1 preempt??
standby 1 authentication secret??
?
7. 配置NTP??
NTP (Network Time Protocol) 為路由器、交換機和工作站之間提供了一種時間同步
的機制。時間同步了,多臺網絡設備上的相關事件記錄可以放在一起看,更為清晰,
方便了分析較復雜的故障和安全事件等。???
(1)本地時鐘設置:??
clock timezone Peking +8 ;定義時區??
clock calendar-valid ;允許使用硬件calendar作為時鐘源??
clock set hh:mm:ss month year ;如clock set 14:02:30 10 December 2003??
clock update-calendar ;更新硬件時鐘??
(2)ntp server??
ntp calendar-update ;允許NTP定期更新calendar??
ntp master 3 ;允許本機作為NTP協議的主時鐘,精度級別3,供其它對等體同步用。??
ntp source int vlan 7 ;設置ntp時鐘原的端口或IP地址??
(3)常用的調試命令有:??
show ntp status???
show ntp associations??
8. 配置鏡像端口??
在交換機上配置鏡像端口(Mirroring Port)用于建立內部網絡的監控端口,以便收
集相關被監測端口的數據流量,進行數據流監控及分析。我們這里配置鏡像端口用于
配置入侵檢測設備(鏡像端口)的檢測口檢測一級防火墻和二級防火墻的內網接口,
以探測是否有入侵行為發生。??
#monitor session 1 source interface Fa7/14 - 19 rx??
#monitor session 1 destination interface Fa7/22??
#monitor session 2 source interface Fa7/24??
#monitor session 2 destination interface Fa7/25??
9. 升級配置??
9.1. 交換機IOS保存和升級??
交換機的IOS保存和升級是采用TFTP協議完成,所以首先你必須要下載一個TFTP軟
件,然后按照下面的步驟來進行:??
1.在你的機器上啟動TFTP 。??
2.登陸到交換機,然后在enable狀態下輸入如下命令來完成IOS的保存:??
switch#copy? flash? tftp?????
Source IP address or hostname [171.68.206.171]????
Source filename []? cat6000-sup2k8.7-1-1.bin??
Destination filename [cat6000-sup2k8.7-1-1.binn]????
Loading cat6000-sup2k8.7-1-1.bin to 171.68.206.171 (via VLAN1):??? !!!!??
!!!!!!!!!!!??
[OK - 1125001 bytes]??
3.如果你要升級IOS文件,那么你首先要檢查flash空間是否夠,如果空間不夠的
話,則需要先刪除原來的IOS然后再升級。按照如下命令來完成IOS的升級:??
switch#copy? tftp? flash??
Source IP address or hostname []? 171.68.206.171??
Source filename []? cat6000-sup2k8.7-1-1.bin??
Destination filename [cat6000-sup2k8.7-1-1.bin]?? y??
Loading cat6000-sup2k8.7-1-1.bin from 171.68.206.171 (via VLAN1):??? !!!!??
!!!!!!!!!!!??
[OK - 1125001 bytes]??
9.2. 配置從另外一個版本的IOS啟動??
如果交換機FLASH容量允許的話,我們可以在不刪除原有交換機內部IOS軟件的情況
下配置交換機從另外一個版本的IOS啟動,這樣可以避免一定程度上由于刪除原有
IOS軟件帶來的風險。??
1.拷貝新的IOS到交換機的FLASH內。假設新的IOS軟件名稱為
cat6000-sup2k8.7-1-1.bin??
# copy tftp flash??
2.配置從新的IOS軟件引導??
# boot system flash [flash-fs:][partition-number:][filename]??
#boot system flash sup-bootflash: cat6000-sup2k8.7-1-1.bin
本文轉自 joysuny 51CTO博客,原文鏈接:http://blog.51cto.com/joysuny/30518,如需轉載請自行聯系原作者
Cisco Catalyst 6500系列交換機提供3插槽、6插槽、9插槽和13插槽的機箱,以
及多種集成式服務模塊,包括數千兆位網絡安全性、內容交換、語音和網絡分析模塊。?
Catalyst 6500系列中的所有型號都使用了統一的模塊和操作系統軟件,形成了能夠
適應未來發展的體系結構,由于能提供操作一致性,因而能提高IT基礎設施的利用
率,并增加投資回報。從48端口到576端口的10/100/1000以太網布線室到能夠支
持192個1Gbps或32個10Gbps骨干端口,提供每秒數億個數據包處理能力的網絡核
心,Cisco Catalyst 6500系列能夠借助冗余路由與轉發引擎之間的故障切換功能提
高網絡正常運行時間。??
提高網絡正常運行時間,提高網絡彈性。提供數據包丟失保護,能夠從網絡故障中快
速恢復。能夠在冗余控制引擎間實現快速的1~3秒狀態故障切換。??
提供可選的高性能Cisco Catalyst 6500系列Supervisor Engine 720、無源背板、
多引擎的冗余;并可利用Cisco EtherChannel?技術、IEEE 802.3ad鏈路匯聚、IEEE?
802.1s/w和熱備份路由器協議/虛擬路由器冗余協議(HSRP/VRRP)達到高可用性???
不需要部署外部設備,直接在6500機箱內部署集成式的千兆位的網絡服務模塊,以
簡化網絡管理,降低網絡的總體成本。這些網絡服務模塊包括:??
l 千兆位防火墻模塊--提供接入保護??
l 高性能入侵檢測系統(IDS)模塊--提供入侵檢測保護??
l 千兆位網絡分析模塊--提供可管理性更高的基礎設施和全面的遠程超級(RMON)支
持??
l 高性能SSL模塊--提供安全的高性能電子商務流量??
l 千兆位VPN和基于標準的IP Security(IPSec)模塊--降低的互聯網和內部專網的
連接成本。???
集成式內容交換模塊(CSM)能夠為Cisco Catalyst 6500系列提供功能豐富的高性
能的服務器和防火墻網絡負載平衡連接,以提高網絡基礎設施的安全性、可管理性和
強大控制??
基于網絡的應用識別(NBAR)等軟件特性可提供增強網絡管理和QoS控制機制。???
利用分布式Cisco Express Forwarding dCEF720平臺提供400Mpps交換性能。支持
多種Cisco Express Forwarding(CEF)實現方式和交換矩陣速率。??
多協議第3層路由支持滿足了傳統的網絡要求,并能夠為企業網絡提供平滑的過渡機
制。支持IPv6,并提供高性能的IPv6服務。提供MPLS及MPLS/VPN的支持,并具有
豐富的MPLS服務。增強的數據、語音和視頻服務??
提供10/100和10/100/1000接口模塊,借助在接口模塊內增加電源子卡就可讓這些
接口模塊提供在線的電源,提供IEEE 802.3af的支持,保護今天的投資。??
每臺設備可提供576個支持語音的,具有在線電源的10/100/1000M銅線接口。提供
192個GBIC千兆位以太網接口。可提供高密度的OC-3 POS接口的通道化的OC-48接
口。??
2. 連接設備??
2.1. 從console連接??
第一次對6000交換機進行配置,必須從console進入。 ??
首先先將機器上架,按要求接好電源,然后用隨機附帶的Console線和轉接頭將交換
機的console口與PC的串口相聯,如下:??
????
Com口設置如下:??
9600 baud???
8 data bits???
No parity???
1 stop bits??
檢查電源無誤后,開電,可能會出現類似下面的顯示,按黑粗體字回答:???
System Bo otstrap, Version 7.7(1)??
Copyright (c) 19 94-20 03 by cisco Systems, Inc.??
Cat6k-Sup720/SP processor with 524288 Kbytes of main memory??
?
Autoboot executing command: "boot bootflash:"??
?
Self decompressing the image :?
#########################################################################
#########################################################################
#########################################################################
# [OK]??
?
????????????? Restricted Rights Legend??
?
Use, duplication, or disclosure by the Government is??
subject to restrictions as set forth in subparagraph??
(c) of the Commercial Computer Software - Restricted??
Rights clause at FAR sec. 52.227-19 and subparagraph??
(c) (1) (ii) of the Rights in Technical Data and Computer??
Software clause at DFARS sec. 252.227-7013.??
?????????? cisco Systems, Inc.??
?????????? 170 West Tasman Drive??
?????????? San Jose, California 95134-1706??
?
Cisco Internetwork Operating System Software???
IOS (tm) s72033_sp Software (s72033_sp-SP-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
TAC Support:?[url]http://www.cisco.com/tac[/url]??
Copyright (c) 1986-2003 by cisco Systems, Inc.??
Compiled Wed 29-Oct-03 08:20 by cmong??
Image text-base: 0x40020FBC, data-base: 0x40D32000??
?
00:00:03: %PFREDUN-6-ACTIVE: Initializing as ACTIVE processor??
?
00:00:03: %OIR-6-CONSOLE: Changing console ownership to route processor??
?
System Bo otstrap, Version 12.2(14r)S9, RELEASE SOFTWARE (fc1)??
TAC Sup port: ht tp:/ /w w w.cisco.com/tac??
Copyright (c) 20 03 by cisco Systems, Inc.??
Cat6k-Sup720/RP platform with 524288 Kbytes of main memory??
?
Download Start??
?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
?! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !?
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !??
?
Download Completed! Booting the image.??
?
Self decompressing the image :?
#########################################################################
################################################################### [OK]??
?
?
????????????? Restricted Rights Legend??
?
Use, duplication, or disclosure by the Government is??
subject to restrictions as set forth in subparagraph??
(c) of the Commercial Computer Software - Restricted??
Rights clause at FAR sec. 52.227-19 and subparagraph??
(c) (1) (ii) of the Rights in Technical Data and Computer??
Software clause at DFARS sec. 252.227-7013.??
?
?????????? cisco Systems, Inc.??
?????????? 170 West Tasman Drive??
?????????? San Jose, California 95134-1706??
?
Cisco Internetwork Operating System Software???
IOS (tm) s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
TAC Support:?[url]http://www.cisco.com/tac[/url]??
Copyright (c) 1986-2003 by cisco Systems, Inc.??
Compiled Wed 29-Oct-03 08:16 by cmong??
Image text-base: 0x40008FBC, data-base: 0x41E50000??
?
This product contains cryptographic features and is subject to United??
States and local country laws governing import, export, transfer and??
use. Delivery of Cisco cryptographic products does not imply??
third-party authority to import, export, distribute or use encryption.??
Importers, exporters, distributors and users are responsible for??
compliance with U.S. and local country laws. By using this product you??
agree to comply with applicable laws and regulations. If you are unable??
to comply with U.S. and local laws, return this product immediately.??
?
A summary of U.S. laws governing Cisco cryptographic products may be found?
at:??
[url]http://www.cisco.com/wwl/export/crypto/tool/stqrg.html[/url]??
?
If you require further assistance please contact us by sending email to??
[email]export@cisco.com[/email].??
?
cisco WS-C6509 (R7000) processor (revision 3.0) with 458752K/65536K bytes of?
memory.??
Processor board ID SAL0743NKW8??
SR71000 CPU at 600Mhz, Implementation 0x504, Rev 1.2, 512KB L2 Cache??
Last reset from power-on??
X.25 software, Version 3.0.0.??
Bridging software.??
1 Virtual Ethernet/IEEE 802.3? interface(s)??
48 FastEthernet/IEEE 802.3 interface(s)??
36 Gigabit Ethernet/IEEE 802.3 interface(s)??
1917K bytes of non-volatile configuration memory.??
8192K bytes of packet buffer memory.??
?
65536K bytes of Flash internal SIMM (Sector size 512K).??
Logging of %SNMP-3-AUTHFAIL is enabled????
Press RETURN to get started!??
--- System Configuration Dialog ---??
?? Would you like to enter the initial dialog? [yes]: no??
回答:NO,進入手工配置,在router>下,輸入enable??
回車,進入全局模式??
2.2. 遠程telnet連接??
當完成交換機配置,并起給交換機配置了管理地址,就可以直接采用遠程telnet登
陸進入交換機了,但是必須先配置 line vty的密碼和enable密碼才能允許遠程登陸。
配置telnet登陸命令如下:??
#conf t??
#line vty 0 4??
#login ;控制vty接口是否能夠telnet??
#password switch??
3. 基本信息配置??
3.1. 交換機軟件版本??
Cisco的65xx交換機支持兩種版本的系統軟件,分別稱為Natvie IOS版本和Cat OS
版本的系統軟件,CatOS版本的軟件是為了兼容之前的65xx系列交換機的命令而沿襲
下來的。Native IOS版本軟件是Cisco公司為了統一其交換機及路由器的軟件風格而
研發出來的新一代IOS系統軟件,Cisco所有的交換機版本都在整體向Native IOS
版本過渡,目前來說,Native IOS版本的軟件功能和CatOS版本的軟件功能相差不多,
但是今后都會向Native IOS版本軟件。??
本項目中所使用的6509交換機采用的是Native IOS版本。??
3.2. 查看交換機基本配置??
show version ;查看系統版本,內存配置,寄存器等基本信息??
show module all ;查看交換機配置模塊??
show catalyst6000 chassis-mac-address ;查看交換機MAC地址??
#show version輸出信息如下:??
Cisco Internetwork Operating System Software???
IOS (tm) s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
TAC Support:?[url]http://www.cisco.com/tac[/url]??
Copyright (c) 1986-2003 by cisco Systems, Inc.??
Compiled Wed 29-Oct-03 08:16 by cmong??
Image text-base: 0x40008FBC, data-base: 0x41E50000??
?
ROM: System Bootstrap, Version 12.2(14r)S9, RELEASE SOFTWARE (fc1)??
BOOTLDR: s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY?
DEPLOYMENT RELEASE SOFTWARE (fc1)??
?
Router uptime is 29 minutes??
Time since Router switched to active is 29 minutes??
System returned to ROM by power-on (SP by power-on)??
System restarted at 12:57:08 PST Sat Jan 31 2004??
System image file is "sup-bootflash:s72033-pk9s-mz.122-17a.SX1.bin"??
?
?
This product contains cryptographic features and is subject to United??
States and local country laws governing import, export, transfer and??
use. Delivery of Cisco cryptographic products does not imply??
third-party authority to import, export, distribute or use encryption.??
Importers, exporters, distributors and users are responsible for??
compliance with U.S. and local country laws. By using this product you??
agree to comply with applicable laws and regulations. If you are unable??
to comply with U.S. and local laws, return this product immediately.??
?
A summary of U.S. laws governing Cisco cryptographic products may be found?
at:??
[url]http://www.cisco.com/wwl/export/crypto/tool/stqrg.html[/url]??
?
If you require further assistance please contact us by sending email to??
[email]export@cisco.com[/email].??
?
cisco WS-C6509 (R7000) processor (revision 3.0) with 458752K/65536K bytes of?
memory.??
Processor board ID SAL0743NKW8??
SR71000 CPU at 600Mhz, Implementation 0x504, Rev 1.2, 512KB L2 Cache??
Last reset from power-on??
X.25 software , Version 3.0.0.??
Bridging software.??
1 Virtual Ethernet/IEEE 802.3? interface(s)??
48 FastEthernet/IEEE 802.3 interface(s)??
36 Gigabit Ethernet/IEEE 802.3 interface(s)??
1917K bytes of non-volatile configuration memory.??
8192K bytes of packet buffer memory.??
65536K bytes of Flash internal SIMM (Sector size 512K).??
Standby is up??
Standby has 458752K/65536K bytes of memory.??
?
Configuration register is 0x2102??
?
Router#sho module all??
Mod Ports Card Type????????????????????????????? Model????????????? Serial?
No.??
--- ----- -------------------------------------- ------------------?
-----------??
? 2?? 16? 16 port 1000mb GBIC?
ethernet?????????? WS-X6416-GBIC????? SAL0750QNJP??
? 3?? 16? 16 port 1000mb GBIC?
ethernet?????????? WS-X6416-GBIC????? SAL0750QNFV??
? 5??? 2? Supervisor Engine 720?
(Active)???????? WS-SUP720-BASE???? SAD075000YF??
? 6??? 2? Supervisor Engine 720?
(Warm)?????????? WS-SUP720-BASE???? SAD075109SZ??
? 7?? 48? 48 port 10/100 mb?
RJ45???????????????? WS-X6348-RJ-45???? SAL0752R3E6??
?
Mod MAC?
addresses?????????????????????? Hw??? Fw?????????? Sw?????????? Status??
--- ---------------------------------- ------ ------------ ------------?
-------??
? 2? 000e.8442.4850 to 000e.8442.485f?? 2.5?? 5.4(2)?????? 8.2(0.56)TET Ok??
? 3? 000e.8442.48f0 to 000e.8442.48ff?? 2.5?? 5.4(2)?????? 8.2(0.56)TET Ok??
? 5? 000d.290f.fd08 to 000d.290f.fd0b?? 3.0?? 7.7(1)?????? 12.2(17a)SX1 Ok??
? 6? 000e.3838.1a8c to 000e.3838.1a8f?? 3.0?? 7.7(1)?????? 12.2(17a)SX1 Ok??
? 7? 000e.84c8.54f0 to 000e.84c8.551f?? 6.8?? 5.4(2)?????? 8.2(0.56)TET Ok??
?
Mod?
Sub-Module????????????????? Model????????????? Serial??????? Hw???? Statu
s???
--- --------------------------- ------------------ ------------ -------?
-------??
? 5 Policy Feature Card 3?????? WS-F6K-PFC3A?????? SAD0752009D?? 2.0??? Ok??
? 5 MSFC3 Daughterboard???????? WS-SUP720????????? SAD075109HX?? 2.0??? Ok??
? 6 Policy Feature Card 3?????? WS-F6K-PFC3A?????? SAD0751085J?? 2.0??? Ok??
? 6 MSFC3 Daughterboard???????? WS-SUP720????????? SAD0751077C?? 2.0??? Ok??
? 7 Inline Power Module???????? WS-F6K-PWR?????????????????????? 0.0??? Ok??
?
Mod Online Diag Status???
--- -------------------??
? 2 Pass??
? 3 Pass??
? 5 Pass??
? 6 Pass??
? 7 Pass??
3.3. 配置機器名、telnet、密碼??
在全局模式下,用conf t,進入配置模式,進行以下配置:??
#conf t??
#clock timezone GMT 8 ;配置時區??
#clock set 13:30:21 31 JAN 2004 ;配置交換機時間??
#clock calendar-valid ;使能硬件時鐘同步??
#service timestamps debug datetime localtime ;配置系統debug記錄時間格式??
#service timestamps log datetime localtime ;配置系統日志記錄時間格式??
#service password-encryption ;配置使用加密服務,主要針對口令加密??
#hostname xxxx ;配置交換機名稱??
#enable secret? 0 xxxxx ;配置enable口令??
#copy run start ;將配置信息保存到NVRAM中,重啟動不會丟失??
#line vty 0 4 ;配置telnet??
#e xec-timeout 30 0??
#password 0? xxxx??
#login??
3.4. 配置snmp??
#conf t??
#snmp-server community cisco ro(只讀) ;配置只讀通信字符串??
#snmp-server community secret rw(讀寫) ;配置讀寫通信字符串??
#snmp-server enable traps? ;配置網關SNMP TRAP??
#snmp-server host 10.254.190.1 rw ;配置網關工作站地址??
?
3.5. 啟動三層功能??
#ip routing ;啟動路由功能??
3.6. 查看和配置系統環境變量??
使用show bootvar命令查看系統啟動環境變量,包括BOOT, BOOTLDR, and?
CONFIG_FILE參數:??
Router# show bootvar??
BOOT variable = slot0:c6sup22-jsv-mz.121-5c.EX.bin,1;??
CONFIG_FILE variable does not exist??
BOOTLDR variable = bootflash:c6msfc2-boot-mz.121-3a.E4??
Configu ration register is 0x2??
Router#??
改變BOOT,、BOOTLDR、CONFIG_FILE 這三個環境變量使用命令:??
BOOT? #boot system??
BOOTLDR? #boot bootldr??
CONFIG_FILE #boot config??
4. 端口設置??
4.1. 端口基本設置???
Cisco 65xx系列交換機的端口缺省都是路由模式,一般都會配置為交換端口使用,進
入端口配置模式:??
對于單一端口,在配置模式下輸入:interface Ethernet,Fast Ethernet,Gigabit?
Ethernet x/y, x為槽位號,y為端口號。??
對于一組端口,可以使用以下的命令進入,例如:??
Router(config)# interface range fastethernet 5/1 - 5???? 或:??
Router(config-if)# interface range gigabitethernet 2/1 - 2, gigabitethernet?
3/1 - 2??
進行端口配置模式后,可以shutdown,或no shutdown端口,并可以對端口進行配置,
快速以太端口有全雙工、半雙工和自動協商模式,如果知道對端連接的設備是采用何
種方式,最好采用手工設置方式固定端口的模式和速率。缺省是自動協商模式。??
快速以太端口的速率可以設置為100M,也可以設置為10M和自動協商。缺省是自動協
商方式。如:??
Router(config-if)#speed [10 | 100 | auto](速度)??
Router(config-if)# duplex [auto | full | half](雙工)??
或添加注釋,如:??
Router(config-if)# description Channel-group to "Marketing"??
4.2. 配置二層交換接口??
(以fastethernet為例,gigabitethernet一樣)??
Router(config)# interface fastethernet x/y???
Router(config-if)# shutdown???
Router(config-if)# switchport? ;6500上缺省端口為路由端口,需要寫switchport
將端口設置為交換端口??
Router(config-if)# switchport mode access???
Router(config-if)# switchport access vlan x???
Router(config-if)# no shutdown???
Router(config-if)# end??
?
清除二層接口配置??
(以fastethernet為例,gigabitethernet一樣)??
Router(config)# interface fastethernet x/y???
Router(config-if)# no switchport???
Router(config-if)# end??
注:使用default interface {ethernet | fastethernet | gigabitethernet}?
slot/port,使端口回到原來的缺省配置。??
4.3. 配置三層路由端口??
6500的端口缺省就是具有三層交換的端口,用來跟其他設備的連接,當將一個端口配
置成三層端口之后,就可以在此端口上分配IP地址了。??
Router(config)# interface fastethernet x/y??
Router(config)# ip add x.x.x.x x.x.x.x??
Router(config)# no shutdown??
4.4. 配置端口Trunk???
將一個二層端口配置為Trunk模式:??
Router(config)# interface fastethernet x/y (以fastethernet為例,
gigabitethernet一樣)??
Router(config-if)# shutdown???
Router(config-if)# switchport???
Router(config-if)# switchport trunk encapsulation dot1q???
Router(config-if)# switchport mode trunk??
Router(config-if)# no shutdown???
Router(config-if)# end???
Router# exit??
4.5. Ethernaet Channel??
Router(config)# interface range gigabitethernet1/1 - 2??
Router(config-if)#no ip address???
Router(config-if)#switchport??
Router(config-if)#switchport trunk encapsulation dot1q???
Router(config-if)#switchport mode trunk??
Router(config-if)#switchport trunk native vlan 1???
Router(config-if)#channel-group 1 mode on???
R>interface Port-channel1 ;自動產生,并且一定要如下所示,否則可能會有問題。??
switchport??
switchport trunk encapsulation dot1q??
switchport mode trunk??
!??
interface GigabitEthernet1/1???
? no ip address???
? switchport???
? switchport trunk encapsulation dot1q???
? switchport trunk native vlan 1???
? channel-group 1 mode on???
!???
interface GigabitEthernet1/2???
? no ip address???
? switchport???
? switchport trunk encapsulation dot1q???
? switchport trunk native vlan 1???
? channel-group 1 mode on???
如果有問題,使用命令#no int port-channel 1? ,#int g2/1 -2? ,#no switchport??
4.6. 查看端口配置??
Router# show running-config interface fastethernet 5/8??
Router# show interfaces fastethernet 5/8 switchport??
Router# show running-config interface port-channel 1??
Router# show spanning-tree interface fastethernet 4/4??
5. 配置VLAN??
5.1. 配置VTP??
VTP是一個2層信息協議,包括版本1和2。一個網絡設備只能屬于一個VTP domain。
缺省, Catalyst 6500交換機配置為VTP server mode,在沒有管理域的狀態。直到
在一個trunk鏈路上收到其他域的宣告或手工配置管理域。VTP并不是一定要配置,
但是配置可以簡化配置復雜度和易于管理。??
VTP pruning(VTP裁剪)增強了網絡帶寬利用率。結合VTP,使得沒有必要接收某個
vlan的廣播信息的交換機被裁剪,免于接收包括broadcast, multicast, unknown,?
and flooded unicast的包。??
Router(config)# vtp domain domain_name??
Router(config)# vtp mode {client | server | transparent}??
Router(config)# vtp version {1 | 2}??
Router(config)# vtp password password_string??
Router(config)# vtp pruning??
Router# show vtp status??
5.2. 配置VLAN端口??
5.3. 創建VLAN??
缺省狀態下,所有的二層端口均屬于vlan1,vlan的配置方法如下:??
命令 目的???
Step 1?? Router# vlan database 進入vlan配置方式.??
Step 2?? Router(vlan)# vlan vlan_ID? 加入一個VLAN.??
Step 3 Router(vlan)# vtp domain? name 設置vtp域名??
Step 3?? Router(vlan)# exit? 更新VLAN數據庫,并在管理域內廣播,退到全局模
式??
Step 4?? Router# show vlan name vlan_name? 驗證VLAN配置??
?
刪除配置好的vlan??
Router# vlan database??
Router(vlan)# no vlan x??
Deleting VLAN 3...??
Router(vlan)# exit??
5.4. 給vlan分配端口??
Router(config)# interface fastethernet x/y???
Router(config-if)# shutdown???
Router(config-if)# switchport???
Router(config-if)# switchport mode access???
Router(config-if)# switchport access vlan x??
Router(config-if)# no shutdown???
Router(config-if)# end???
Router# exit??
5.5. 配置vlan地址??
Router(config)# interface vlan x???
Router(config)# ip add x.x.x.x x.x.x.x??
6. 配置HSRP??
不同網段之間的通信都是通過在終端工作站上設定缺省網關來實現的,為了實現冗
余,每臺交換機上必然要配置相同的網段,那么就會在一個網段中出現2個不同地址
的路由 接口(對于工作站就是缺省網關),當1條上聯鏈路失效時,數據必然會從另
外1條鏈路傳輸到另外一臺交換機上進行處理,這時就存在缺省網關變更的問題。??
為了消除當一條鏈路失效導致的工作站缺省網關重新定義的問題,我們使用Cisco公
司專有HSRP(Hot Standby Redundant Protocol)技術來解決這個問題。??
HSRP技術就是將分布在2臺交換機上相同網段的不同路由接口IP地址映射為一個虛
擬IP地址來消除工作站缺省網關重新定義的問題。配置如下:??
在其中一臺65xx上按下面模版進行配置??
interface Vlan x???
? ip address x.x.x.x x.x.x.x??
? no ip redirects???
? no ip directed-broadcast???
? standby 1 ip y.y.y.y??
? standby 1 priority 100???
? standby 1 preempt??
standby 1 authentication secret??
?
在另一臺65xx上按下面模版進行配置??
interface Vlan x???
? ip address x.x.x.x x.x.x.x???
? no ip redirects???
? no ip directed-broadcast???
standby 1 ip y.y.y.y??
? standby 1 priority 110 ;這個優先級高,成為Master??
? standby 1 preempt??
standby 1 authentication secret??
?
7. 配置NTP??
NTP (Network Time Protocol) 為路由器、交換機和工作站之間提供了一種時間同步
的機制。時間同步了,多臺網絡設備上的相關事件記錄可以放在一起看,更為清晰,
方便了分析較復雜的故障和安全事件等。???
(1)本地時鐘設置:??
clock timezone Peking +8 ;定義時區??
clock calendar-valid ;允許使用硬件calendar作為時鐘源??
clock set hh:mm:ss month year ;如clock set 14:02:30 10 December 2003??
clock update-calendar ;更新硬件時鐘??
(2)ntp server??
ntp calendar-update ;允許NTP定期更新calendar??
ntp master 3 ;允許本機作為NTP協議的主時鐘,精度級別3,供其它對等體同步用。??
ntp source int vlan 7 ;設置ntp時鐘原的端口或IP地址??
(3)常用的調試命令有:??
show ntp status???
show ntp associations??
8. 配置鏡像端口??
在交換機上配置鏡像端口(Mirroring Port)用于建立內部網絡的監控端口,以便收
集相關被監測端口的數據流量,進行數據流監控及分析。我們這里配置鏡像端口用于
配置入侵檢測設備(鏡像端口)的檢測口檢測一級防火墻和二級防火墻的內網接口,
以探測是否有入侵行為發生。??
#monitor session 1 source interface Fa7/14 - 19 rx??
#monitor session 1 destination interface Fa7/22??
#monitor session 2 source interface Fa7/24??
#monitor session 2 destination interface Fa7/25??
9. 升級配置??
9.1. 交換機IOS保存和升級??
交換機的IOS保存和升級是采用TFTP協議完成,所以首先你必須要下載一個TFTP軟
件,然后按照下面的步驟來進行:??
1.在你的機器上啟動TFTP 。??
2.登陸到交換機,然后在enable狀態下輸入如下命令來完成IOS的保存:??
switch#copy? flash? tftp?????
Source IP address or hostname [171.68.206.171]????
Source filename []? cat6000-sup2k8.7-1-1.bin??
Destination filename [cat6000-sup2k8.7-1-1.binn]????
Loading cat6000-sup2k8.7-1-1.bin to 171.68.206.171 (via VLAN1):??? !!!!??
!!!!!!!!!!!??
[OK - 1125001 bytes]??
3.如果你要升級IOS文件,那么你首先要檢查flash空間是否夠,如果空間不夠的
話,則需要先刪除原來的IOS然后再升級。按照如下命令來完成IOS的升級:??
switch#copy? tftp? flash??
Source IP address or hostname []? 171.68.206.171??
Source filename []? cat6000-sup2k8.7-1-1.bin??
Destination filename [cat6000-sup2k8.7-1-1.bin]?? y??
Loading cat6000-sup2k8.7-1-1.bin from 171.68.206.171 (via VLAN1):??? !!!!??
!!!!!!!!!!!??
[OK - 1125001 bytes]??
9.2. 配置從另外一個版本的IOS啟動??
如果交換機FLASH容量允許的話,我們可以在不刪除原有交換機內部IOS軟件的情況
下配置交換機從另外一個版本的IOS啟動,這樣可以避免一定程度上由于刪除原有
IOS軟件帶來的風險。??
1.拷貝新的IOS到交換機的FLASH內。假設新的IOS軟件名稱為
cat6000-sup2k8.7-1-1.bin??
# copy tftp flash??
2.配置從新的IOS軟件引導??
# boot system flash [flash-fs:][partition-number:][filename]??
#boot system flash sup-bootflash: cat6000-sup2k8.7-1-1.bin
本文轉自 joysuny 51CTO博客,原文鏈接:http://blog.51cto.com/joysuny/30518,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的cisco 6509交换配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: form上传文件以及跨域异步上传
- 下一篇: TL-410小路由静态路由问题