从 Junos OS 14.1 版开始,您可以配置动态配置文件来创建堆叠 802.1Q VLAN。
要配置动态 VLAN 配置文件:
- 创建动态配置文件。
user@host# set dynamic-profile STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"
- (可选)要支持动态多路分离接口,请为 IPv4 或 IPv6 启用。
-
对于 IPv4 多路分离接口:
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set demux-source inet
-
对于 IPv6 多路分离接口:
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set demux-source inet6
- (可选)要将路由器配置为响应任何 ARP 请求,请指定
proxy-arp该语句。
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set proxy-arp
- 指定外部 VLAN ID 变量。
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set vlan-tags outer $junos-stacked-vlan-id
该变量将动态替换为在层次结构级别指定的 [interfaces] VLAN 范围内的外部 VLAN ID。
- 指定内部 VLAN ID 变量。
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set vlan-tags inner $junos-vlan-id
该变量将动态替换为在层次结构级别指定的 [interfaces] VLAN 范围内的内部 VLAN ID。
- 定义单元族类型。
- 对于 IPv4 接口:
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set family inet
- 对于 IPv6 接口:
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit"]
user@host# set family inet6
- (可选)为动态配置文件中的动态多路分离接口启用 IP 和 MAC 地址验证。
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet]
user@host# set mac-validate loose
- 指定未编号的地址和首选源地址。
[edit dynamic-profiles STACKED-VLAN-PROF1 interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet]
user@host# set unnumbered-address lo.0 preferred-source-address 192.0.2.16
变更历史表
是否支持某项功能取决于您使用的平台和版本。使用 功能资源管理器 确定您的平台是否支持某个功能。
14.1
从 Junos OS 14.1 版开始,您可以配置动态配置文件来创建堆叠 802.1Q VLAN。