配置 VLAN 捆绑逻辑接口以支持第 2 层电路
要配置 VLAN 捆绑逻辑接口,请通过包含 vlan-id-list 语句或 vlan-tags 语句来指定 VLAN ID 列表:
interfaces {
ethernet-interface-name {
vlan-tagging; # Support single- or dual-tag logical interfaces
flexible-vlan-tagging; # Support mixed tagging
encapsulation (extended-vlan-ccc | flexible-ethernet-services);
unit logical-unit-number {
encapsulation vlan–ccc; # Required for single-tag
vlan-id-list [vlan-id vlan-id–vlan-id]; # For single-tag
vlan-id-range vlan-id-range; # For single-tag with outer VLAN as a range of VLANs
vlan-tags outer tpid.vlan-id inner-list [vlan-id vlan-id–vlan-id]; # For dual-tag
vlan-tags outer vlan-id inner-range vlan-id-range # For dual-tag with outer VLAN and inner VLAN as a range of VLANs
}
. . .
}
}
可以在以下层次结构级别包含语句:
[edit][edit logical-systems logical-system-name]
对于单标记逻辑接口,请包含 encapsulation 语句并指定 vlan-ccc ,以便在第 2 层电路内部使用 CCC 电路封装。
对于支持 vlan-id-range 配置的平台,您可以通过两种方式配置范围:
-
已标记的单个 VLAN:外部标记是 VLAN 范围。
-
双 VLAN 标记:外部标记是单个 VLAN ID,内部标记配置为 VLAN 范围。
注:
对于双标记逻辑接口,Junos OS 会自动使用 vlan-ccc 封装类型。