配置VLAN,VTP,及交換機的端口安全性

配置VLAN,VTP,及交換機的端口安全性

 

實驗目的:1、掌握VLAN的配置方法,理解VLAN的含義。

2
、理解VTP的工做原理,會配置VTP


3
、會配置交換機端口安全性。

實驗設備:CISCO2950交換機三臺,PC兩臺,網線若干。
實驗內容:
一、按上圖將交換機和PC鏈接好。
Sw1 port1 ~ sw2 port1
Sw1 port2 ~ sw3 port1
Sw2 port2 ~ sw3 port2
PC1 ~sw1 port 3
PC2 ~sw3 port 3
將三臺交換機分別命名爲SW1SW2SW3Pc1:ip—192.168.1.4/24
Pc2:ip—192.168.3.5/24
二、查看端口轉發模式
Switch#show port system
三、將交換機間互聯的端口模式設置trunk.
語法爲:switch(config-if)#switchport mode trunk
四、配置三臺交換機的console vty密碼cisco.
五、配置vtp域名爲founder,sw1 的模式爲server,sw2sw3的模式爲client.配置修剪。
語法爲:switch#vlan database

Switch(vlan)#vtp domain domain-name


Switch(vlan)#vtp client|transparent|server


Switch(vlan)#vtp pruning

六、SW1上配置vlan2vlan3。並將Sw1Port3~port10加入Vlan2
語法爲:switch(config-if)#switchport mode access


Switch(config-if)#swtichport access vlan number

SW3上的port3~port5加入Vlan3
7、設置vlan 管理ip及網關 vlan1—192.168.2.2/24,網關:192.168.2.1
語法爲:switch(config)#interface vlan number

Switch(config-if)#ip address ip netmask


Switch(config-if)#no shutdown


Switch(config)#ip default-gateway ipaddress

八、驗證配置。
Switch#Show vtp status
Swtich#Show vlan
九、配置端口安全性。設置Sw1port3端口最大MAC地址數爲50
限制Sw1上的port三端口的Pc1 mac地址只有port1port2能夠訪問。設置sw3上的port3端口爲保護的。
配置語法:
Switch(config-if)#switchport port-security maxmum number
Switch(config)# mac-address-table restricted static
{mac-address type module/port src-if-list}

例如:switch(config)#mac-address-table restricted static 002d.0124.0254 f0/1 f0/2
//
限制f0/1端口的mac 002d.0124.0254只有f0/2端口能夠訪問。

Switch(config-if)#switchport port-security

violation protect|restrict|shutdown
十、
啓動http訪問
語法:switch(config)#ip http server//啓動http訪問

Switch(config)#ip http port number //
指定端口
相關文章
相關標籤/搜索