本文介绍什么是一般交换机端口模式以及如何在Dell Networking PowerConnect交换机上实施它。
命令 |
描述 |
switchport mode general |
将端口类型设置为802.1Q VLAN。 802.1Q VLAN端口将允许多个标记的VLAN。 |
switchport general allowed vlan add 101, 102, 310 tagged |
将端口设置为在VLAN 101、102、310中仅允许标记的流量。 带有非101、102、310的标记的流量将丢弃。 |
switchport general allowed vlan add 200 |
将端口设置为允许VLAN 200流量以未标记形式从端口中输出。 进入端口的任何未标记的流量将推至在端口上设置的本地PVID。 |
switchport general pvid 1 |
将端口设置为将进入端口的任何未标记的数据包放入VLAN 1。 |
switchport general allowed vlan remove 1 |
用于从VLAN“1”删除端口成员身份。 默认情况下,交换机上的所有端口都是VLAN“1”的成员。 |
switchport general pvid 4095 |
将端口设置为将进入端口的任何未标记的数据包放入VLAN 4095(4095是丢弃VLAN。 将PVID设置为4095意味着此端口上不允许未标记的数据包)。 |
switchport general acceptable-frame-type tagged-only |
在入口处丢弃未标记的帧。 |
console# configure
console(config)# interface ethernet e11
console(config-if)# switchport mode general
console(config-if)# switchport general allowed vlan add 100 tagged
console(config-if)# switchport general allowed vlan add 200 untagged
console(config-if-1/g1)#switchport general pvid 1
console(config-if)# end
图 1:VLAN 端口设置页面
Ports(端口)- 指定VLAN中包括的设备和端口。
Port VLAN Mode(端口VLAN模式)- 包括端口模式。可能的值包括:
- General(常规)- 端口属于VLAN,每个VLAN都由用户定义为标记的或未标记的(完整802.1Q模式)。
- Access(访问)- 端口属于单个未标记的VLAN。如果端口处于Access(访问)模式,则无法指定在端口上接受的数据包类型。也无法在访问端口上启用/禁用入口过滤。
- Trunk(干线)- 端口属于多个VLAN,所有端口均为已标记(可选单个本地VLAN除外)。
PVID (1-4093) | 4095 - 将VLAN ID分配给未标记的数据包。可能的值为1-4093或4095。
Frame Type(帧类型)- 指定端口上接受的帧类型。默认为Admit All(接受全部)。可能的值包括:
- Admit Tag Only(仅接受标记)- 指明端口上仅接受标记的帧。
- Admit All(接受全部)- 指明端口上同时接受标记和未标记帧。
Ingress Filtering(入口过滤)- 启用或禁用端口上的入口过滤。入口过滤丢弃VLAN标记与端口VLAN成员身份不匹配的帧。
打开VLAN Port Settings(VLAN端口设置)页面。
选择您想从Unit and Port(设备和端口)下拉菜单中为其指定设置的端口。
完成此页面上的剩余字段。
单击 应用更改 。
现在定义了VLAN端口设置,也更新了设备。