使用第 2 层互连接口将第 2 层 VPN 连接到第 2 层 VPN
第 2 层互连接口使用 Junos OS 将两个第 2 层 VPN 路由拼接在一起,而不是使用物理隧道 PIC 将从第 2 层 VPN 接收的数据包循环到另一个第 2 层 VPN。
要配置互连接口,请包含该 iw0 语句。该 iw0 语句在层次结构级别上 [edit interfaces] 配置。
[edit interfaces]
iw0 {
unit 0 {
peer 1;
}
unit 1 {
peer 0;
}
}
注意:
您必须始终成对创建和删除(或停用)互连 (iw) 接口,例如:
set interfaces iw0 unit 0 peer-unit 1 set interfaces iw0 unit 1 peer-unit 0
如果仅删除或停用其中一个互连接口,则会显示错误消息。要成功停用接口并避免任何配置错误,必须同时停用两者。
互连 (iw) 接口的配置类似于逻辑隧道 (lt) 接口的配置。在此示例中,逻辑接口必须与在此路由器上终止的两个第 2 层 VPN 连接的端点相关联。要进行关联,请包含 interfaces 该语句并指定 iw0 为接口名称。在每个路由实例的层次结构级别上 [edit routing-instances routing-instances-name protocols l2vpn site site-name] 包含该语句。该 routing-instances 语句在层次结构级别上 [edit routing-instances] 配置。
[edit routing-instances]
L2VPN-PE1 {
instance-type l2vpn;
interface iw0.0;
route-distinguisher 65000:3;
vrf-target target:65000:2;
protocols {
l2vpn {
encapsulation-type ethernet;
site CE3 {
site-identifier 3;
interface iw0.0 {
remote-site-id 1;
}
}
}
}
}
L2VPN-PE5 {
instance-type l2vpn;
interface iw0.1;
route-distinguisher 65000:33;
vrf-target target:65000:2;
protocols {
l2vpn {
encapsulation-type ethernet;
site CE3 {
site-identifier 3;
interface iw0.1 {
remote-site-id 5;
}
}
}
}
}
除了接口配置, iw0 还需要配置第 2 层互连 l2iw 协议。如果不进行配置 l2iw , l2iw 无论是否存在任何 iw 接口,都不会形成路由。L2IW 协议中只能配置标准追踪选项。该功能工作所需的最低配置如下所示:
[edit]
protocols {
l2iw;
}