注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 [业内传闻]今天,7月25日..
 帮助

交换机端口安全---PVLAN


2007-11-09 10:10:12
 标签:VLAN安全   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://iisupport.blog.51cto.com/230129/49812
本人参阅CCNP旧版教材,总结个人工作经验所得。
PVLAN的作用:限制同一VLAN中各端口之间的访问
原因是默认情况下同一VLAN中各端口之间的访问是没有限制的。
一、概念
1、VLAN分类:(此处的分类只在PVLAN中具有意义)
1)、isolated vlan:隔离VLAN
特性:该VLAN中各端口之间不能相互通信,也不能和community vlan中的端口通信,但可以和primary  vlan中的端口通信。
2)、community vlan:公共VLAN
特性:该VLAN内部的各端口之间可以相互通信,也可以和primary vlan中的端口通信;但不能和isolated vlan中的端口通信。
3)、primary vlan:主VLAN
特性:该VLAN中的端口主要用于连接网关,作为网络的出口。可以分别与isolated vlan、community vlan通信。
注:isolated vlan与community pvlan只有作为primary vlan的secondary vlan才能与外界通信。
2、端口分类
1)、promiscuous
Promiscuous—The switch port connects to a router, firewall, or other common gateway
device. This port can communicate with anything else connected to the primary or any
secondary VLAN. In other words, the port is in promiscuous mode, in which the rules of
private VLANs are ignored.
功能最强大的端口类型,作为网络的出口;可以和其它任何端口通信,且不受任何限制。
2)、host
Host—The switch port connects to a regular host that resides on an isolated or community
VLAN. The port communicates only with a promiscuous port or ports on the same
community VLAN.
普通端口,连接PC;可以和promiscuous端口通信,也可以和处于同一个community vlan中的端口通信,但不可以和处于同一isolated vlan中的端口通信。
二、配置
1、定义secondary vlan
Switch(config)# vlan vlan-id
Switch(config-vlan)# private-vlan {isolated | community}
2、定义primary vlan以及它的secondary vlan
Switch(config)# vlan vlan-id
Switch(config-vlan)# private-vlan primary
Switch(config-vlan)# private-vlan association {secondary-vlan-list | add secondary-vlan-list
| remove secondary-vlan-list}
add 与remove的作用是用于在已经创建了secondary vlan的情况下增加或删除secondary vlan
3、将端口加入各种VLAN中
Switch(config)#interface fastethernet*/*
Switch(config-if)# switchport mode private-vlan {host | promiscuous}
###对于host模式,还要通过如下命令将其与primary vlan和secondary vlan建立关联。
Switch(config-if)# switchport private-vlan host-association primary-vlan-id secondary-vlan
-id
###对于promiscuous模式,也要通过如下命令将其与primary vlan和secondary vlan建立关联。
Switch(config-if)# switchport private-vlan mapping primary-vlan-id secondary-vlan-
list | {add secondary-vlan-list} | {remove secondary-vlan-list}
4、三层接口的关联
对于配置了三层接口的VLAN,可以能过以下命令将secondary vlan与SVI接口关联
Switch(config)# interface vlan x
Switch(config-if)# ip address a.a.a.a b.b.b.b
Switch(config-if)# private-vlan mapping {secondary-vlan-list | add secondaryvlan-
list | remove secondary-vlan-list}

本文出自 “中国农民” 博客,请务必保留此出处http://iisupport.blog.51cto.com/230129/49812







    文章评论
 
2007-11-09 23:11:31
先留下脚印
端口安全非常重要哦

2007-11-15 08:47:02
看了,顺便转到我的blog里了啊~~
谢谢了哈

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: