当某个 MAC 地址经常出现在与获知地址的物理接口不同的物理接口上时,就会发生 MAC 移动。频繁的 MAC 移动表明存在环路。为避免虚拟专用 LAN 服务 (VPLS) 中的接口间环路,可以配置 MAC 固定。
本主题介绍如何在 VPLS 客户边缘 (客户边缘) 中继接口上配置 MAC 固定。
要在 VPLS 客户边缘接口上配置 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 路由实例并指定客户边缘接口。
[edit routing-instances]
user@host# set routing-instance-name instance-type vpls;
user@host# set routing-instance-name interface interfacetype-fpc/pic/port
- 在 VPLS 客户边缘接口上配置 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;
}
}
}
}
}