|
|
|
|
|
Cisco 2950 實例配置 一、環境條件 1、需要了解的,上聯3550配置情況:
VTP mode: server VTP domain:CHJ- ShengDa vlan ID: 700 ip range: 210.51.30.0/24 Default-Gateway: 210.51.30.1
二、2950配置
1、開機 A、如是新設備,開機需跳過系統默認配置模式,進入手動配置模式 B、進入用戶模式,系統提示符爲 > ,此模式只能查看統計信息,無配置功能,進入特權模式的唯一跳板 C、用戶模式下,輸入 enable ,進入特權模式,系統提示符爲 #
2、創建VLAN 700 (vlan 1,1002-1005,設備自動生成,不能更改、刪除) 方法1: # vlan database (vlan)# vlan 700 name XXX (vlan)#apple
方法2: #configure terminal (config)#vlan 700 (config-vlan)#name XXX (config-vlan)#exit
3、VLAN 配置 # configure terminal (config-if)#interface vlan 700 (config-if)#ip address 210.51.30.7 255.255.255.0 (config-if)#no shutdown (config-if)#description XXX (config-if)#exit
4、添加端口 (系統默認端口都屬於vlan 1) 方法1: #configure terminal (config)#interface fastehernet 0/1 (config-if)#no shutdown (config-if)#switchport mode access (config-if)#switchport access vlan 700 (config-if)#description XXX (config-if)#exit (config)#interface fastehernet 0/2 . . . (config)#interface fastehernet 0/24
方法2: #configure terminal (config)#interface rang fastehernet 0/1 - 24 (config-if-rang)#no shutdown (config-if-rang)#switchport mode access (config-if-rang)#switchport access vlan 700 (config-if-rang)#exit
5、添加默認網關地址 (config)#ip default-gateway 210.51.30.1
6、添加snmp管理字段 (config)#snmp-server community XXX ro 1 (只允許ACL 1中指定IP訪問)
7、配置VTP (config)#vtp mode transparent (config)#vtp domain DHJ-ShengDa
8、安全性配置
A、設置enable密碼 (config)#enable secret XXX
B、設置主機名 (config)#hostname XXX
C、關閉http訪問 (config)#no httpserver
D、關閉密碼明文顯示 (config)#service password-encryption
E、配置consol口密碼 (config)#line con 0 (config-line)#password XXX (config-line)#login (config-line)#exit
F、關閉telnet訪問 (config)#line vty 0 4 (config-line)#no password (config-line)#exit
G、關閉VLAN 1 (config)#interface vlan 1 (config-if)#shutdown (config-if)#exit
9、建立安全的telnet訪問 (安全部要求關閉telnet,這裏僅做技術討論) (config)#access-list 1 permit host 210.51.28.4 (建立標準型訪問控制列表,ID號1,只允許主機210.51.28.4訪問) (config)#access-list 1 deny any any (禁止其他地址訪問,此語句爲默認語句,所有建立的ACL,都會在最後添加此命令語句,不輸入也可以) (config)#line vty 0 4 (config-line)#password XXX (config-line)#login (config-line)#access-class 1 in (綁定已建立的ACL ID:1 至telnet端口) (config-line)#exit
10、保存配置 #copy run-configure start-configure
三、相關名詞說明 1、VLAN VLAN是連接到定義好了的switch的端口的網絡用戶和資源的邏輯分組.給不同的子網分配不同的端口,就可以創建更小的廣播域.默認情況下,在某個VLAN中的主機是不可以與其他VLAN通信的,除非你使用router來創建VLAN間的通信
2、VLAN的一些特點: A.網絡的增加,移動和改變,只需要在適當的VLAN中配置合適的端口 B.安全,因爲不同VLAN的用戶不能互相通信,除非依*router來做VLAN間的通信 C.因爲VLAN可以被認爲是按功能劃分的邏輯分組,所以VLAN和物理位置,地理位置無關 D.VLAN增加安全性 E.VLAN增加廣播域的數量,而減小廣播域的大小
3、VLAN Trunking Protocol(VTP) VTP 也是Cisco創建的,但是現在已經不爲Cisco所私有.VTP的主要目的是在1個交換性的環境中管理所有配置好的VLAN使所有的VLAN保持一致性 VTP允許增加,刪除和重命名VLAN,然後這些修改後的信息傳播到整個VTP域裏的所有switches上
4、在VTP域裏操作的3種模式: A.服務器模式(server mode):所有Catalyst switches的默認設置,1個VTP域裏必須至少要有1個服務器用來傳播VLAN信息,對VTP信息的改變必須在服務器模式下操作.配置保存在NVRAM裏 B.客戶機模式(client mode):在這種模式下,switches從VTP服務器接受信息,而且它們也發送和接收更新,但是它們不能做任何改變.在VTP服務器通知客戶switches說增加了新的VLAN之前,你不能在客戶switch的端口上增加新的VLAN. C.透明模式(transparent mode):該模式下的switch能增加和刪除VLAN,因爲它們保持的有自己的數據庫,不和其他的共享.
|
|
http://net.chinaunix.net/1/2008/03/04/1148564.shtml