在捆绑 VLAN 的逻辑接口上配置第 2 层 VPN 路由实例
本主题介绍如何在绑定到 VLAN ID 列表的逻辑接口上配置第 2 层 VPN 路由实例。
配置 VLAN 捆绑逻辑接口以支持第 2 层 VPN 路由实例
要配置 VLAN 捆绑逻辑接口,请通过在提供商边缘 (PE) 路由器上添加 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 {
vlan-id-list [vlan-id vlan-id–vlan-id]; # For single-tag
vlan-tags outer <tpid.>vlan-id inner-list [vlan-id vlan-id–vlan-id]; # For dual-tag
}
. . .
}
}
可以在以下层次结构级别包含语句:
[edit][edit logical-systems logical-system-name]
另请参阅
指定 VPN 流量传输到客户边缘路由器的接口
要在 PE 路由器上配置第 2 层 VPN 路由实例,请包含语句 instance-type 并指定值 l2vpn。要指定连接到路由器的接口,请包含 interface 语句并指定捆绑 VLAN 的逻辑接口:
instance-type l2vpn; interface logical-interface-name;
可以在以下层次结构级别包含语句:
[edit routing-instances routing-instance-name][edit logical-systems logical-system-name routing-instances routing-instance-name]
另请参阅
指定用于处理 CCC 流量的接口
要将 VLAN 捆绑逻辑接口配置为接口以处理连接到第 2 层 VPN 路由实例的电路的流量,请包含以下语句:
protocols {
l2vpn {
(control-word | no-control-word);
encapsulation-type (ethernet | ethernet-vlan);
site site-name {
site-identifier identifier;
interface logical-interface-name { # VLAN-bundled logical interface
. . . interface-options . . .
}
}
}
}
您可以将语句包含在包含 and interface logical-interface-name 语句的instance-type l2vpn同一层次结构级别:
[edit routing-instances routing-instance-name][edit logical-systems logical-system-name routing-instances routing-instance-name]
要在 PE 路由器上启用第 2 层 VPN 路由实例,请包含该 l2vpn 语句。有关详细信息,请参阅 适用于路由设备的 Junos OS VPN 库。
该 encapsulation-type 语句指定用于来自客户边缘 (客户边缘) 路由器的流量的第 2 层协议。如果第 2 层 VPN 路由实例连接到单标记第 2 层电路,请指定 ethernet 为封装类型。如果第 2 层 VPN 路由实例连接到双标记第 2 层电路,请指定 ethernet-vlan 为封装类型。
要指定接口以处理连接到第 2 层 VPN 路由实例的电路的流量,请包含该 interface 语句并指定 VLAN 捆绑逻辑接口。