当 MAC 地址经常出现在与所学习的物理接口不同的物理接口上时,将发生 MAC 移动。频繁的 MAC 移动表示存在环路。为避免虚拟专用 LAN 服务 (VPLS) 中跨接口的环路,您可以配置 MAC 固定。
本主题介绍如何在 VPLS 客户边缘 (CE) 中继接口上配置 MAC 固定。
- 配置中继接口并指定 VLAN ID 列表。
[edit interfaces]
user@host# set interfacetype-fpc/pic/port flexible-vlan-tagging
user@host# set interfacetype-fpc/pic/port encapsulation flexible-ethernet-services
user@host# set interfacetype-fpc/pic/port unit logical-unit-number encapsulation vlan-vpls;
user@host# set interfacetype-fpc/pic/port unit logical-unit-number family bridge interface-mode trunk
user@host# set interfacetype-fpc/pic/port unit logical-unit-number family bridge vlan-id-list vlan-id-numbers
- 配置 VPLS 路由实例并指定 CE 接口。
[edit routing-instances]
user@host# set routing-instance-name instance-type vpls;
user@host# set routing-instance-name interface interfacetype-fpc/pic/port
- 在 VPLS CE 接口上配置 MAC 固定。
[edit routing-instances]
user@host# set routing-instance-name protocols vpls interfacetype-fpc/pic/port mac-pinning
- 在配置模式下,验证配置。
user@host# show interfaces
interfaces {
interfacetype-fpc/pic/port {
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
unit logical-unit-number {
encapsulation vlan-vpls;
}
family bridge {
interface-mode trunk ;
vlan-id-list vlan-id-numbers;
}
}
}
}
user@host# show routing-instances
routing-instances{
routing-instance-name{
instance-type vpls;
interface interfacetype-fpc/pic/port;
protocols{
vpls {
interface interfacetype-fpc/pic/port {
mac-pinning;
}
}
}
}
}