pingz писал(а):У джунос отличная официальная дока с кучей примеров.
Но вся на англиканском и и ее реально много.
Вы реализовали создав под каждый полисер свой динамический профайл и динамически вешаете на на основной профаил правило верно?
Нет, не так, есть динамические профили, а уже на них вешаются полисеры, пример профиля PPPoE:
Код: Выделить всё
dynamic-profiles {
ppp-profile {
interfaces {
pp0 {
unit "$junos-interface-unit" {
ppp-options {
chap;
pap;
}
pppoe-options {
underlying-interface "$junos-underlying-interface";
server;
}
keepalives interval 60;
family inet {
unnumbered-address lo0.0;
}
}
}
}
}
Auto-VLAN-Demux {
interfaces {
demux0 {
unit "$junos-interface-unit" {
vlan-id "$junos-vlan-id";
demux-options {
underlying-interface "$junos-interface-ifd-name";
}
family pppoe {
duplicate-protection;
dynamic-profile ppp-profile;
}
}
}
}
}
Пример профиля IPoE
Код: Выделить всё
dhcp-user-profile {
interfaces {
"$junos-interface-ifd-name" {
unit "$junos-underlying-interface-unit" {
proxy-arp;
family inet;
}
}
}
}
Auto-DHCP-Demux {
interfaces {
demux0 {
unit "$junos-interface-unit" {
demux-source inet;
proxy-arp;
vlan-id "$junos-vlan-id";
demux-options {
underlying-interface "$junos-interface-ifd-name";
}
family inet {
unnumbered-address lo0.0 preferred-source-address XXX.XXX.XXX.128;
}
}
}
}
}
На самих интерфейсах вешаются так:
PPPoE
Код: Выделить всё
xe-1/3/0 {
description -=PPPoE=-;
flexible-vlan-tagging;
auto-configure {
vlan-ranges {
dynamic-profile Auto-VLAN-Demux {
accept pppoe;
ranges {
200-230;
}
}
}
remove-when-no-subscribers;
}
encapsulation flexible-ethernet-services;
}
Для IPoE не выкладываю у меня там жесткий QinQ плюс куча костылей, только запутаю.
PPPoE юзер с навешанным полисером выглядит так:
Код: Выделить всё
Type: PPPoE
User Name: usertest
IP Address: ХХХ.ХХХ.114.207
IP Netmask: 255.255.248.0
Primary DNS Address: ХХХ.ХХХ.6.38
Secondary DNS Address: ХХХ.ХХХ.52.193
Logical System: default
Routing Instance: default
Interface: pp0.1073863975
Interface type: Dynamic
Underlying Interface: demux0.1073743714
Dynamic Profile Name: ppp-profile
Dynamic Profile Version: 1
MAC Address: 54:e6:fc:e5:61:7b
Session Timeout (seconds): 86400
Idle Timeout (seconds): 600
State: Active
Radius Accounting ID: 2854271
Session ID: 2854271
VLAN Id: 204
Login Time: 2016-02-08 21:40:12 GMT-3
Service Sessions: 1
IP Address Pool: POOL4
Service Session ID: 2854272
Service Session Name: svc-pppoe-policer-50m
Service Session Version: 1
State: Active
Family: inet
IPv4 Input Filter Name: policer-50m-pp0.1073863975-in
IPv4 Output Filter Name: policer-50m-pp0.1073863975-out
IPoE юзер с навешанным полисером, похоже, но есть отличия, вот пример:
Код: Выделить всё
Type: DHCP
User Name: Opt82.FCFAF7C57A3E
IP Address: ХХХ.ХХХ.233.238
IP Netmask: 255.255.252.0
Primary DNS Address: ХХХ.ХХХ.6.38
Secondary DNS Address: ХХХ.ХХХ.52.193
Logical System: default
Routing Instance: default
Interface: demux0.250
Interface type: Static
Underlying Interface: demux0.250
Dynamic Profile Name: dhcp-user-profile
Dynamic Profile Version: 1
MAC Address: 90:f6:52:bc:9a:77
Idle Timeout (seconds): 600
State: Active
Radius Accounting ID: 2445077
Session ID: 2445077
VLAN Id: 250
Agent Circuit ID: len 5
00 fa 00 0a 03
Agent Remote ID: len 6
fc fa f7 c5 7a 3e
Login Time: 2016-01-25 17:54:25 GMT-3
Service Sessions: 1
DHCP Options: len 96
35 01 01 39 02 04 00 3d 07 01 90 f6 52 bc 9a 77 0c 0a 54 4c
2d 57 52 37 34 31 4e 44 3c 08 4d 53 46 54 20 35 2e 30 32 04
5f d7 71 61 37 0b 01 03 06 0f 21 2b 2c 2e 2f 79 f9 52 25 01
05 00 fa 00 0a 03 02 06 fc fa f7 c5 7a 3e 09 14 00 00 0c f8
0f 01 0d 4f 4c 54 5f 41 76 74 6f 64 65 6c 5f 33
IP Address Pool: POOL1
Service Session ID: 2445213
Service Session Name: svc-pppoe-policer-100m
Service Session Version: 1
State: Active
Family: inet
IPv4 Input Filter Name: policer-100m-pp0.1073967263-in
IPv4 Output Filter Name: policer-100m-pp0.1073967263-out
Если что не понятно пишите, а то и так не ответ а простыня выходит.