文档库 最新最全的文档下载
当前位置:文档库 › PVLAN 私有VLAN配置技术

PVLAN 私有VLAN配置技术

PVLAN 私有VLAN配置技术

PVLAN 只能在VTP transparent模式配置PVLAN 在一个primary vlan下可以有多个secondary vlan,主vlan 可设置成promiscuous port模式。PVLAN 只有在主vlan 下才可以配置地址(SVI),辅助vlan 是不让配置svi的。并且主vlan 的地址应该在同一网段。PVLAN 只能在VTP transparent模式配置

PVLAN 在一个primary vlan下可以有多个secondary vlan,主vlan 可设置成promiscuous port 模式。

PVLAN 只有在主vlan 下才可以配置地址(SVI),辅助vlan 是不让配置svi的。并且主vlan 的地址应该在同一网段。

secondary vlan 下:可以有island port 、community port 。

island port 仅可以和promiscuous port 相互通信。community port 可以和community port 、promiscuous port 相互通信。

Unicast Reverse Path Forwarding (uRPF) does not work well with PVLAN host ports, so uRPF must not be used in combiNation with PVLAN.(uRPF 端口不可以用在PVLAN host port上,不能与PVLAN结合使用)。

可通信的端口主VLAN端口公共VLAN端口孤立VLAN端口

与主VLAN通信是是是

与同一从VLAN通信N/A 是否

与其他从VLAN通信N/A 否否

配置命令:

第一步:定义主vlan

switch(config)# vlan (vlan-id)

switch(config-vlan)# private-vlan primary

switch(config-vlan)# exit

第二步:设置辅助vlan,将主/辅助vlan 帮定在一起

switch(config)# vlan (primary-vlan-id)

switch(config-vlan)# private-vlan association {add|remove}(aue-vlan)

第三步:

switch(config)# interface vlan (primary-vlan-id)

switch(config-if)# privst-vlan mapping (辅助vlan-id)

第四步:

Switch config-vlan # private-vlan [primary | isolated | community] 定义vlan类型

Config-if# switchport mode private-vlan {host | promiscuous}

配置从vlan的接口模式

host表示团体模式或隔离模式

promiscuous是混杂模式

Config-if# switchport private-vlan host-association primary_vlan_id secondary_vlan_id

把团体端口和隔离端口划分到私有vlan中

例如:

Vlan 202

Private-vlan primary

Private-vlan association 440

Vtp mode transpoarent 必须设置成透明模式

Vlan 440

Private-vlan isolated

int fast 5/2

switchport mode private-vlan promiscuous 设置混杂模式

switchport private-vlan mapping 202 440 把这个端口放到主vlan中,可以和从vlan 440的端口通信

int fast 5/1

switchport mode private-vlan host 定义为host端口,此端口可是隔离或团体模式,具体视它加入的vlan模式而定

switchport private-vlan host –association 202 440 定义它属于的主vlan 202中的隔离vlan440 int vlan 202

private-vlan mapping add 440 定义三层的虚拟端口vlan202 为私有vlan 440对外的通信端口

第五步:校验命令

show interfaces private_vlan mapping 查看私有vlan的配置信息

show vlan private-vlan type 显示私有vlan的配置信息

PVLAN即私有VLAN(Private VLAN),PVLAN采用两层VLAN隔离技术,只有上层VLAN 全局可见,下层VLAN相互隔离。如果将交换机或IP DSLAM设备的每个端口化为一个(下层)VLAN,则实现了所有端口的隔离。

pVLAN通常用于企业内部网,用来防止连接到某些接口或接口组的网络设备之间的相互通信,但却允许与默认网关进行通信。尽管各设备处于不同的pVLAN中,它们可以使用相同的IP子网。

每个pVLAN 包含2种VLAN :主VLAN(primary VLAN)和辅助VLAN(Secondary VLAN)。

辅助VLAN(Secondary VLAN)包含两种类型:隔离VLAN(isolated VLAN)和团体VLAN(community VLAN)。

pVLAN中的两种接口类型:处在pVLAN中的交换机物理端口,有两种接口类型。

①混杂端口(Promiscuous Port)

②主机端口(Host Port)

其中“混杂端口”是隶属于“Primary VLAN”的;“主机端口”是隶属于“Secondary VLAN”的。因为“Secondary VLAN”是具有两种属性的,那么,处于“Secondary VLAN”当中的“主机端口”依“Secondary VLAN”属性的不同而不同,也就是说“主机端口”会继承“Secondary VLAN”的属性。那么由此可知,“主机端口”也分为两类——“isolated端口”和“community端口”。

处于pVLAN中交换机上的一个物理端口要么是“混杂端口”要么是“isolated”端口,要么就是“community”端口。

pVLAN通信范围:

primary VLAN:可以和所有他所关联的isolated VLAN,community VLAN通信。

community VLAN:可以同那些处于相同community VLAN内的community port通信,也可以与pVLAN中的promiscuous端口通信。(每个pVLAN可以有多个community VLAN)isolated VLAN:不可以和处于相同isolated VLAN内的其它isolated port通信,只可以与promisuous端口通信。(每个pVLAN中只能有一个isolated VLAN)

pVLAN当中使用的一些规则:

1.一个“Primary VLAN”当中至少有1个“Secondary VLAN”,没有上限。

2.一个“Primary VLAN”当中只能有1个“Isolated VLAN”,可以有多个“Community VLAN”。

3.不同“Primary VLAN”之间的任何端口都不能互相通信(这里“互相通信”是指二层连通性)。

4.“Isolated端口”只能与“混杂端口”通信,除此之外不能与任何其他端口通信。

5.“Community端口”可以和“混杂端口”通信,也可以和同一“Community VLAN”当中的其它物理端口进行通信,除此之外不能和其他端口通信。

⊙该文章转自[大赛人网站(技能大赛技术资源网)https://www.wendangku.net/doc/dc12923555.html,] 原文链接:https://www.wendangku.net/doc/dc12923555.html,/ruijie/0913*******.html

相关文档