第二单元配置本征vlan
第二单元配置本征vlan
本征vlan是为了哪些没有标签滴而作准备的
管理vlan可以给交换机配地址的
默认vlan1(可以当所有使用)
数据vlan
打开交换机
Switch>enable
Switch#conf t
Switch(config)#hostname S1
S1(config)#do show vlan
S1(config)#no vlan 1
S1(config)#vlan 10
S1(config-vlan)#name student
S1(config-vlan)#vlan 20
S1(config-vlan)#name teacher
S1(config-vlan)#vlan 88
S1(config-vlan)#name guanli
S1(config-vlan)#vlan 99
S1(config-vlan)#name native
S1(config-vlan)#end
S1#show vlan brief
S1#conf t
S1(config)#interface range fastEthernet 0/1-10
S1(config-range)#switchport mode accesss
S1(config-range)#switchport access vlan 10
Exit
S1(config)#interface range fastEthernet 0/11-15
S1(config-range)#switchport mode access
S1(config-range)#switchport access vlan 20
Exit
端口安全功能设置
Switch(config-if)#description pc1 //设置端口描述
Switch(config-if)#duplex full //设置端口工作模式(全双工)
Switch(config-if)#speed 100 //设置端口速度 (为100MbPS)
Switch(config-if)#switchport mode access //端口连接模式(用户或接入)
Switch(config-if)#switchport port-security //开启端口安全功能
Switch(config-if)#switchport port-security mac-address ?
H.H.H 48 bit mac address //具体MAC地址 //静态绑定
sticky Configure dynamic secure addresses as sticky //通过交换机学习的MAC地址
Switch(config-if)#switchport port-security mac-address sticky //绑定MAC地址
Switch(config-if)#switchport port-security maximum 1 //设置最大的MAC地址数
Switch(config-if)#switchport port-security violation ? //设置违例事件
protect Security violation protect mode //保护
restrict Security violation restrict mode //限制
shutdown Security violation shutdown mode //关闭
Switch(config-if)#switchport port-security violation shutdown //违规后直接关闭端口
配置动态端口安全
S1(config)#interface fastethernet 0/18//指定要为端口安全配置的接口
S1(config-if)#switchport mode access//将接口模式设置为访问
S1(config-if)#switchport port-security//在接口上启用端口安全
配置端口安全粘滞
S1(config)#interface fastethernet 0/19//指定要为端口安全配置的接口
S1(config-if)#switchport mode access//将接口模式设置为访问
S1(config-if)#switchport port-secuity//在接口上启用端口安全
S1(config-if)#switchport port-security maximum 10//设置端口上允许的最大安全地址数
S1(config-if)#switchport port-security mac-address sticky//启用粘性学习
端口速度的配置
Switch>enble
Switch#conf t
Switch(config)#hostname s1//修改主机名称
S1(config)#interface(range组) fastEthernet 0/2(0/1-10,fastEthernet 0/5)//
S1(config-if)#speed ?//
S1(config-if)#speed 100//
S1(config-if)#duplex full//公共模式(full全,half半)
回车,去点击电脑config,FastEthernet0,修改Duplex
专升本:两边的接口的速度与功能协议是否一致的问题?肯定
S1(config-if)#description (link to pc3)是描述内容//端口描述
端口安全
S1(config-if)#switchport mode access//改模式,设置为自己使用,开启安全功能
S1(config-if)#switchport port-security//交换机端口安全功能
S1(config-if)#switchport port-security ?//安全功能选项
mac-address绑定mac地址
maximum绑定mac数量
violation违规处理
S1(config-if)#switchport port-secuity mac-address sticky自主学习//绑定mac地址
S1(config-if)#switchport port-security maximum 1//绑定mac数量
S1(config-if)#switchport port-security//设置违规处理办法
protect保护
restrict限制
shutdown禁用(最策底)
S1(config-if)#switchport port-security violation shutdown
验证:鼠标-放大镜-路由器鼠标右键-mac table for s1-空表(没有发数据)-在连接一台主机-左下角(fast forward time加快时间)-通信(放大器下面滴三个)-通了-再去看mac信息-完成
S1(config)#banner motd”xinan22-2”//登录提示语内容(单词是英文的)
退exit
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
