Junos
Highlighted
Junos

Strange work ipv6 IA_NA + IA_PD over PPPoE

‎05-26-2020 07:22 AM

I'm trying to configure ipv6 via PPPoE but encountered some issues. Simply words: when the user log in, the radius returns the following AV-pairs:

 ERX-Virtual-Router-Name = "PPPOE_WHITE1"
 Framed-Pool = "POOLv4"
 Framed-IPv6-Pool = "POOLv6_IANA"
 ERX-IPv6-Delegated-Pool-Name = "POOLv6_IAPD"

The router then moves the user session to a separate routing instance and assigns addresses from the specified pools.
A significant part of the config:

[edit]
rom@core5# show routing-instances PPPOE_WHITE1 
instance-type virtual-router;
system {
    services {
        dhcp-local-server {
            dhcpv6 {
                group pppoe_white1_dhcpv6 {
                    interface pp0.0;
                }
            }
            pool-match-order {
                external-authority;
            }
        }
    }
}
access {
    address-assignment {
        pool POOLv4 {
            family inet {
                network XXX.XXX.XXX.0/24;
                range 2 {
                    low XXX.XXX.XXX.64;
                    high XXX.XXX.XXX.127;
                }
                inactive: range 3 {
                    low XXX.XXX.XXX.128;
                    high XXX.XXX.XXX.191;
                }
                inactive: range 4 {
                    low XXX.XXX.XXX.192;
                    high XXX.XXX.XXX.254;
                }
            }
        }
        pool POOLv6_IANA {
            family inet6 {
                prefix YYYY:YYYY:0020:0151:0:0:0:0/64;
                range 1 {
                    low YYYY:YYYY:0020:0151:0:0:0:10/128;
                    high YYYY:YYYY:0020:0151:0:0:0:ffff/128;
                }
            }
        }
        pool POOLv6_IAPD {
            family inet6 {
                prefix YYYY:YYYY:0170:0000:0:0:0:0/44;
                range 1 {
                    low YYYY:YYYY:0170:0100:0:0:0:0/60;
                    high YYYY:YYYY:017f:fff0:0:0:0:0/60;
                }
            }
        }
    }
}                                       
interface lo0.141;
routing-options {
    rib PPPOE_WHITE1.inet.0 {
        static {
            route 0.0.0.0/0 next-table inet.0;
        }
    }
    rib PPPOE_WHITE1.inet6.0 {
        static {
            route ::/0 next-table inet6.0;
        }
        aggregate {
            route YYYY:YYYY:0020:0151:0:0:0:0/64 discard;
        }
    }
    instance-export RI_export_from_PPPOE_WHITE1;
}


[edit]
rom@core5# show dynamic-profiles DP_PPPOEv46-iface 
routing-instances {
    "$junos-routing-instance" {
        interface "$junos-interface-name";
        routing-options {
            rib "$junos-ipv6-rib" {
                access {
                    route $junos-framed-route-ipv6-address-prefix {
                        qualified-next-hop "$junos-interface-name";
                    }
                }
            }
            access {
                route $junos-framed-route-ip-address-prefix {
                    qualified-next-hop "$junos-interface-name";
                }
            }
        }
    }
}
interfaces {
    pp0 {
        unit "$junos-interface-unit" {
            ppp-options {
                pap;
            }
            pppoe-options {
                underlying-interface "$junos-underlying-interface";
                server;
            }
            keepalives interval 15;
            family inet {
                unnumbered-address "$junos-loopback-interface";
            }
            family inet6 {
                unnumbered-address "$junos-loopback-interface";
            }
        }
    }
}


[edit]
rom@core5# show interfaces lo0 unit 141 
description Loopback_PPPOE_WHITE1;
family inet {
    filter {
        input RE_PPPOE_WHITE1_v4;
    }
    address XXX.XXX.XXX.250/32;
}
family inet6 {
    inactive: filter {
        input RE_PPPOE_WHITE1_v6;
    }
    address YYYY:YYYY:ff:0:0:0:1:5/128;
}

Everything seems good. Networks are assigned from pools and routes are added to the routing table.

rom@core5> show subscribers                                                                                        
Interface             IP Address/VLAN ID                      User Name                      LS:RI
demux0.3221225493      432                                                                              default:default      
pp0.3221225494        XXX.XXX.XXX.71                          ZZZZZZ_wifi               default:PPPOE_WHITE1 
*                                 YYYY:YYYY:20:151::17
*                                 YYYY:YYYY:170:120::/60
pp0.3221225494        YYYY:YYYY:20:151::17                                                     default:PPPOE_WHITE1 
*                                 YYYY:YYYY:170:120::/60

rom@core5> show network-access aaa statistics address-assignment pool POOLv6_IANA routing-instance PPPOE_WHITE1    
Address assignment statistics
  Pool Name: POOLv6_IANA
    Out of Memory: 0
    Out of Addresses: 0
    Address total: 65520
    Addresses in use: 1       <== ok
    Address Usage (percent): 0
    Pool drain configured: no

rom@core5> show network-access aaa statistics address-assignment pool POOLv6_IAPD routing-instance PPPOE_WHITE1    
Address assignment statistics
  Pool Name: POOLv6_IAPD
    Out of Memory: 0
    Out of Addresses: 0
    Address total: 65520
    Addresses in use: 1      <== ok
    Address Usage (percent): 0
    Pool drain configured: no

rom@core5> show route table PPPOE_WHITE1.inet6.0                                                                   

PPPOE_WHITE1.inet6.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

::/0               *[Static/5] 3d 14:16:11
                       to table inet6.0
YYYY:YYYY:20:151::/64
                   *[Aggregate/130] 00:00:38
                       Discard
YYYY:YYYY:20:151::17/128
                   *[Access-internal/12] 00:00:38
                       Private unicast
YYYY:YYYY:ff::1:5/128
                   *[Direct/0] 3d 14:16:10
                    >  via lo0.141
YYYY:YYYY:170:120::/60
                   *[Access/13] 00:00:38
                       Private unicast
fe80::56e0:320f:fcc9:a4ff/128
                   *[Direct/0] 3d 14:16:10
                    >  via lo0.141
ff02::2/128        *[INET6/0] 3d 14:16:15
                       MultiRecv

BUT, the client CPE does not receive a default gateway (or next hop). To overcome this I configured router-advertisement in dynamic-profiles using:

set dynamic-profiles DP_PPPOEv46-iface protocols router-advertisement interface $junos-interface-name

After that, I got the strange address assignment behavior.


When pppoe up I can see:

rom@core5> show subscribers                                                                                        
Interface             IP Address/VLAN ID                      User Name                      LS:RI
demux0.3221225496      432                                                                              default:default      
pp0.3221225497        XXX.XXX.XXX.72                          ZZZZZZ_wifi               default:PPPOE_WHITE1 
*                                 YYYY:YYYY:170:120::/60

rom@core5> show network-access aaa statistics address-assignment pool POOLv6_IANA routing-instance PPPOE_WHITE1    
Address assignment statistics
  Pool Name: POOLv6_IANA
    Out of Memory: 0
    Out of Addresses: 1     <== WHY? 
    Address total: 65520
    Addresses in use: 0     <== WHY?
    Address Usage (percent): 0
    Pool drain configured: no

rom@core5> show network-access aaa statistics address-assignment pool POOLv6_IAPD routing-instance PPPOE_WHITE1    
Address assignment statistics
  Pool Name: POOLv6_IAPD
    Out of Memory: 0
    Out of Addresses: 0
    Address total: 65520
    Addresses in use: 1    <== ok
    Address Usage (percent): 0
    Pool drain configured: no

rom@core5> show route table PPPOE_WHITE1.inet6.0                                                                   

PPPOE_WHITE1.inet6.0: 5 destinations, 5 routes (4 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

::/0               *[Static/5] 3d 14:26:18
                       to table inet6.0
YYY:YYYY:ff::1:5/128
                   *[Direct/0] 3d 14:26:17
                    >  via lo0.141
fe80::56e0:320f:fcc9:a4ff/128
                   *[Direct/0] 3d 14:26:17
                    >  via lo0.141
ff02::2/128        *[INET6/0] 3d 14:26:22
                       MultiRecv

 

When DHCPv6 Request arrived from subscriber CPE:

rom@core5> show subscribers                                                                                        
Interface             IP Address/VLAN ID                      User Name                      LS:RI
demux0.3221225496      432                                                                              default:default      
pp0.3221225497        XXX.XXX.XXX.72                          ZZZZZZ_wifi               default:PPPOE_WHITE1 
*                                 YYYY:YYYY:20:151::18
*                                 YYYY:YYYY:170:120::/60
pp0.3221225497        YYYY:YYYY:20:151::18                                                     default:PPPOE_WHITE1 
*                                 YYYY:YYYY:170:120::/60

rom@core5> show network-access aaa statistics address-assignment pool POOLv6_IANA routing-instance PPPOE_WHITE1    
Address assignment statistics
  Pool Name: POOLv6_IANA
    Out of Memory: 0
    Out of Addresses: 1       <== WHY?
    Address total: 65520
    Addresses in use: 1        <== ok
    Address Usage (percent): 0
    Pool drain configured: no

rom@core5> show network-access aaa statistics address-assignment pool POOLv6_IAPD routing-instance PPPOE_WHITE1    
Address assignment statistics
  Pool Name: POOLv6_IAPD
    Out of Memory: 0
    Out of Addresses: 0
    Address total: 65520
    Addresses in use: 0        <== WHY?
    Address Usage (percent): 0
    Pool drain configured: no

rom@core5> show route table PPPOE_WHITE1.inet6.0                                                                   

PPPOE_WHITE1.inet6.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

::/0               *[Static/5] 3d 14:28:28
                       to table inet6.0
YYYY:YYYY:20:151::/64
                   *[Aggregate/130] 00:00:41
                       Discard
YYYY:YYYY:20:151::18/128
                   *[Access-internal/12] 00:00:41
                       Private unicast
YYYY:YYYY:ff::1:5/128
                   *[Direct/0] 3d 14:28:27
                    >  via lo0.141
YYYY:YYYY:170:120::/60
                   *[Access/13] 00:00:41
                       Private unicast
fe80::56e0:320f:fcc9:a4ff/128
                   *[Direct/0] 3d 14:28:27
                    >  via lo0.141
ff02::2/128        *[INET6/0] 3d 14:28:32
                       MultiRecv

The router assigns the network from the pool, adds the route to the routing table but does not store this information in the pool and can assign the network to different clients at the same time.

Maybe I'm doing something wrong? How to correctly transfer the default gateway?

 

 

 

Feedback