计算机网络实验六vtp配置,实验十三配置VLAN,vtp,及端口安全性.doc

配置VLAN,VTP,及交换机的端口安全性

d2d3d51b6b4f916a42e5c8d89ee3337c.png

实验目的:1、掌握VLAN的配置方法,理解VLAN的含义。

2、理解VTP的工作原理,会配置VTP。

3、会配置交换机的端口安全性。

实验设备:CISCO2950交换机三台,PC两台,网线若干。

实验内容:

1、按上图将交换机和PC连接好。

Sw1 port1 ~ sw2 port1

Sw1 port2 ~ sw3 port1

Sw2 port2 ~ sw3 port2

PC1 ~sw1 port 3

PC2 ~sw3 port 3

将三台交换机分别命名为SW1、SW2、SW3。Pc1:ip—192.168.1.4/24

Pc2:ip—192.168.3.5/24

2、查看端口转发模式:

Switch#show port system

3、将交换机间互联的端口模式设置为trunk.

语法为:switch(config-if)#switchport mode trunk

4、配置三台交换机的console 和vty密码为cisco.

5、配置vtp域名为founder,sw1 的模式为server,sw2和sw3的模式为client.配置修剪。

语法为:switch#vlan database

Switch(vlan)#vtp domain domain-name

Switch(vlan)#vtp client|transparent|server

Switch(vlan)#vtp pruning

6、在SW1上配置vlan2,vlan3。并将Sw1的Port3~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

8、验证配置。

Switch#Show vtp status

Swtich#Show vlan

9、配置端口安全性。设置Sw1的port3端口最大MAC地址数为50。

限制Sw1上的port三端口的Pc1 的mac地址只有port1,port2可以访问。设置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

10、 启动http访问

语法:switch(config)#ip http server//启动http访问

Switch(config)#ip http port number //指定端口

11、配置VLAN

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值