示例:使用 DHCP 本地服务器通过聚合以太网底层接口配置 IPv4 静态 VLAN 多路复用接口
此示例说明如何使用聚合以太网作为底层接口来配置静态 IPv4 VLAN 多路复用接口。DHCP 本地服务器配置可在 DHCP 本地服务器配置中列出聚合以太网接口,从而将订阅者与 VLAN 多路联用接口。
要配置 VLAN 多路复用接口上的动态订阅者:
在计划用于任何 VLAN 多路接口的底层接口上启用分层调度和 VLAN 标记。
interfaces { ae1 { hierarchical-scheduler; vlan-tagging; aggregated-ether-options { minimum-links 1; lacp { active; periodic slow; link-protection { non-revertive; } } } } }
定义属于聚合以太网接口的千兆以太网接口。
interfaces { ge-5/0/0 { gigether-options { 802.3ad ae1; } } ge-5/2/0 { gigether-options { 802.3ad ae1; } } }
定义多路复用接口。
interfaces { demux0 { unit 102 { proxy-arp; vlan-id 103; demux-options { underlying-interface ae1; } family inet { unnumbered-address lo0.0 preferred-source-address 173.16.1.1; } } } }
定义环路接口。
interfaces { lo0 { unit 0 { family inet { address 127.16.1.1/32; } } } }
为初始订阅者访问配置动态配置文件。
dynamic-profiles { user-profile { interfaces { "$junos-interface-ifd-name" { unit "$junos-underlying-interface-unit" { family inet; } } } protocols { igmp { interface "$junos-interface-name" { version 3; immediate-leave; promiscuous-mode; } } } } }
配置用于动态创建用户接口的访问方法。
以下部分指定用于动态创建的用户接口的聚合以太网接口 (
ae1.0
)。system { services { dhcp-local-server { group myDhcpGroup { authentication { password test; username-include { user-prefix igmp-user1; } } dynamic-profile user-profile; interface ae1.0; } } } }
您也可以将特定的多路复用接口 (
demux0.102
) 指定为用于用户接口的设备,如下所示,而不是使用聚合以太网接口:system { services { dhcp-local-server { group myDhcpGroup { authentication { password test; username-include { user-prefix igmp-user1; } } dynamic-profile user-profile; interface demux0.102; } } } }