示例:在静态千兆以太网 VLAN 接口上配置动态 PPPoE 用户接口
此示例说明如何在静态配置的千兆以太网 VLAN 底层接口上配置动态 PPPoE 用户接口。当 PPPoE 订阅者在底层接口上登录时,路由器会使用动态配置文件中指定的属性创建动态 PPPoE 订阅者接口。
在此示例中,动态 PPPoE 配置文件pppoe-profile-east
为访问网络的 PPPoE 订阅者定义了选项,并包括预定义的动态变量$junos-interface-unit
,它表示动态 PPPoE 逻辑接口的逻辑单元号,以及$junos-underlying-interface
表示底层以太网接口的名称。动态pppoe-profile-east
配置文件被分配给使用 PPPoE (ppp-over-ether
) 封装配置的底层以太网 VLAN 接口ge-2/0/3.1
。
当路由器在响应订阅者登录时ge-2/0/3.1
动态创建 PPPoE 订阅者接口时,PPPoE 订阅者登录时,将分别使用网络提供的实际逻辑单元编号和接口名称来动态替换这些值$junos-interface-unit
$junos-underlying-interface
。
要配置动态 PPPoE 用户接口:
配置动态配置文件以定义动态 PPPoE 用户接口的属性。
[edit] dynamic-profiles { pppoe-profile-east { interfaces { pp0 { unit "$junos-interface-unit" { ppp-options { chap; } pppoe-options { underlying-interface "$junos-underlying-interface"; server; } keepalives interval 30; family inet { filter { input pppoe-input-filter-east; output pppoe-output-filter-east precedence 20; } service { input { service-set inputService-east; post-service-filter postService-east; } output { service-set outputService-east; } } address 127.0.1.2/32; unnumbered-address lo0.0; } } } } } }
将动态 PPPoE 配置文件分配给静态底层以太网接口,并为底层接口定义特定于 PPPoE 的属性。
[edit] interfaces { ge-2/0/3 { vlan-tagging; unit 1 { encapsulation ppp-over-ether; vlan-id 100; pppoe-underlying-options { access-concentrator server-east; duplicate-protection; dynamic-profile pppoe-profile-east; max-sessions 10; } } } }