2016年3月24日 星期四

Cisco VLAN設定

靜態VLAN
1.設定VLAN名稱
Switch(config)#vlan 2 name sales
Switch(config)#vlan 3 name marketing
Switch(config)#exit

Switch(config)#vlan 2
Switch(config-vlan)#name sales
Switch(config-vlan)#vlan 3
Switch(config-valn)#namae marketing
Switch(config-vlan)#^z
P.S. VLAN 1為預設的,不能修改,刪除,或是重新命名
2.指定交換port給VLAN
Switch(config)#int E0/2
Switch(config)#vlan-membership static 2  //指定介面2給vlan2
Switch(config)#int E0/4
Switch(config)#vlan-membership static 3  //指定介面4給vlan3

Switch(config-if)#int f0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#int f0/3
Switch(config-if)#switchport access vlan 3
3.設定主幹port
Switch(config)#int f0/26
Switch(config-if)#trunk {auto|desirable|nonegoniate|off|on}
                                 //自動|想要的  |不協商        |關閉|開啟

Switch(config)#int f0/12
Switch(config-if)#switchport mode trunk
Switch(config-if)#^z
4.設定跨VLAN遶送
必須要有router或是layer 3的交換器(1)ISL遶送
Switch(config)#int f0/0.1
Switch(config-if)#encapsulation isl vlan#  //vlan#表示他在哪個區塊
(2)802.1Q遶送
Switch(config)#int f0/0.1
Switch(config-if)#encapsulation dot1q vlan#
P.S.當產生主幹鏈路時,預設上所有VLAN都可以讓資料通過
5.設定VTP
Switch(config)#vtp ?
Switch(config)#vtp client    //設成客戶端模式,無法新增,修改,刪除
Switch(config)#vtp server   //設成伺服器模式(預設為伺服器模式)Switch(config)#vtp domain 伺服器名稱 //相同的domain才會分享VTP資訊Switch(config)#vtp password 密碼     //VTP密碼
====================================================================
Switch config部分
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#int f0/2
Switch(config-if)#switchport access vlan 1
Switch(config-if)#int f0/3
Switch(config-if)#switchport access vlan 1
Switch(config-if)#int f0/4
Switch(config-if)#switchport access vlan 3
Switch(config-if)#int f0/5
Switch(config-if)#switchport access vlan 3
Switch(config-if)#int f0/6
Switch(config-if)#switchport access vlan 2
VLAN1:192.168.10.16/28
VLAN2:192.168.10.32/28
VLAN3:192.168.10.48/28
Router(config)#int f0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#int f0/0.1
Router(config-subif)#encapsulation dot1q 1
Router(config-subif)#ip address 192.168.10.17 255.255.255.240  //使用範圍中的任一個IP做VLAN都可以Router(config-subif)#int f0/0.2
Router(config-subif)#encapsulation dot1q 2
Router(config-subif)#ip address 192.168.10.33 255.255.255.240
Router(config-subif)#int f0/0.3
Router(config-subif)#encapsulation dot1q 3
Router(config-subif)#ip address 192.168.10.49 255.255.255.240

Switch#show vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                              active    Fa0/46, Fa0/48
2    VLAN0002                         active    
4    VLAN0004                         active    Fa0/38, Fa0/39
5    VLAN0005                         active   
1002 fddi-default                     active    
1003 token-ring-default           active    
1004 fddinet-default                active    
1005 trnet-default                    active   
VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0   
4    enet  100004     1500  -      -      -        -    -        0      0   
5    enet  100005     1500  -      -      -        -    -        0      0  
1002 fddi    101002     1500  -          -      -        -        -        1      1003
1003 tr       101003     1500 1005 3276   -        -      srb      1      1002
1004 fdnet 101004     1500  -           -      1       ibm    -        0      0   
1005 trnet  101005    1500  -           -      15      ibm    -        0      0 
Switch#show vlan brief
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                              active    Fa0/46, Fa0/48
2    VLAN0002                         active    
4    VLAN0004                         active    Fa0/38, Fa0/39
5    VLAN0005                         active   
1002 fddi-default                      active    
1003 token-ring-default            active    
1004 fddinet-default                 active    
1005 trnet-default                    active
Switch#sh vtp status
VTP Version                     : 2
Configuration Revision          : 343
Maximum VLANs supported locally : 254
Number of existing VLANs        : 199
VTP Operating Mode                : Client                //VTP模式VTP Domain Name                   : SwitchTPA         //甲乙兩端設定需一樣VTP Pruning Mode                   : Disabled
VTP V2 Mode                           : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x02 0xD1 0x35 0x8E 0x0A 0xF3 0x9E 0x40 
Configuration last modified by 123.123.123.2 at 6-23-10 08:48:52

沒有留言:

如何在Windows的事件檢視器event viewer,查詢開機關機的紀錄

Windows 如何 事件檢視器 查詢開機關機紀錄 Step1: 打開windows的 「 事件檢視器 」,開啟「 建立自訂檢視… 」視窗,在「事件記錄檔」選項,將「Windows 紀錄」內勾選「系統」選項。 Step2: 內含/排除事件識別碼: 」排除事件識別碼打「6005,6...