Junos OS

Expand all | Collapse all

LNS Loopback Interface issue on CPE

Jump to Best Answer
  • 1.  LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 02:00

    For our testing purposes we have some colleagues who are using CPEs at home on subscriber circuits. 

     

    One of the issues we have come across is that our loopback address on the LNS can be seen in the routing table on the CPE. Is there a way to ensure this does not happen?

     

    The dynamic configuration includes the following statements:

    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface"
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet6 unnumbered-address "$junos-loopback-interface"

     

    Can I assign an unnumbered address to the loopback and call a donor interface? Will this address then be seen on the CPE?

     

     



  • 2.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 02:18

    This is expected. You will see default route installing at CPE end. How traffic will forwarding without route?



  • 3.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 03:51

    Hi Rahul,

     

    Yes. I understand that. 

     

    Let me put it a slightly different way...... Can I use any IP address on this loopback interface?

     

    Thanks



  • 4.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 04:15

    Hi Clive,

     

    Yes you can 🙂

     

    Regards,

    Rahul



  • 5.  RE: LNS Loopback Interface issue on CPE

    Posted 07-04-2018 04:20

    Hello,

    You can use multiple IPv4/IPv6 addresses on the same lo0 unit and if You want the CPEs to see only one of them (usually private, to prevent attacking this address from internet) then use this code:

    set interfaces lo0.0 family inet address 10.10.20.20/32 ## private IPv4@ in addition to public IPv4@
    set interfaces lo0.0 family inet address fc00::20/128   ## local/globally unroutable IPv6@ in addition to global unicast IPv6@
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface" preferred-source-address 10.10.20.20
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet6 unnumbered-address "$junos-loopback-interface" preferred-source-address fc00::20  

    HTH

    Thx

    Alex



  • 6.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 05:18

    Hi Alex,

     

    Thanks for that. It won't accept the command unfortunately... as follows:

     

    error: preferred source address should be a variable in profile dyn-lns-profile
    error: foreign file propagation (ffp) failed

     

    It actually states "$junos-preferred-source-address" but no actual address option after. Could you let me know the command please for the dynamic subscriber?

     

    I guess it needs including somewhere. Here's the whole dynamic configuration:

    set dynamic-profiles dyn-lns-profile routing-instances "$junos-routing-instance" interface "$junos-interface-name"
    set dynamic-profiles dyn-lns-profile routing-instances "$junos-routing-instance" routing-options access route $junos-framed-route-ip-address-prefix next-hop "$junos-framed-route-nexthop"
    set dynamic-profiles dyn-lns-profile routing-instances "$junos-routing-instance" routing-options access route $junos-framed-route-ip-address-prefix metric "$junos-framed-route-cost"
    set dynamic-profiles dyn-lns-profile routing-instances "$junos-routing-instance" routing-options access route $junos-framed-route-ip-address-prefix preference "$junos-framed-route-distance"
    set dynamic-profiles dyn-lns-profile routing-instances "$junos-routing-instance" routing-options access route $junos-framed-route-ip-address-prefix tag "$junos-framed-route-tag"
    set dynamic-profiles dyn-lns-profile routing-instances "$junos-routing-instance" routing-options access-internal route $junos-subscriber-ip-address qualified-next-hop "$junos-interface-name"
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" dial-options l2tp-interface-id l2tp-encapsulation
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" dial-options dedicated
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" keepalives interval 30
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface"
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet6 unnumbered-address "$junos-loopback-interface"
    set dynamic-profiles dyn-lns-profile protocols router-advertisement interface "$junos-interface-name" managed-configuration
    set dynamic-profiles dyn-lns-profile protocols router-advertisement interface "$junos-interface-name" other-stateful-configuration
    set dynamic-profiles dyn-lns-profile protocols router-advertisement interface "$junos-interface-name" prefix $junos-ipv6-ndra-prefix

     



  • 7.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 05:39

    I can put the "Junos-preferred-source-address" in there, but there is no option after that. How does it know which address to use?

     

    Thanks



  • 8.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 05:44
    set interfaces lo0 unit X family inet address X.X.X.X/32 preferred

    Variable $junos-preferred-source-address will fetch the preferred address from loopback. You need to add preferred under the loopback.


  • 9.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 06:16

    Hi Rahul / Alex,

     

    Thank you very much for your help. I have configured as stated and it works as expected.

     

    I noticed from another ISP of ours that we get the Gateway address as expected from them, but when we traceroute the next hop address is completely different. How have they managed to do that?

     

    Thanks

     



  • 10.  RE: LNS Loopback Interface issue on CPE

    Posted 07-04-2018 07:05

    Hello,

    Several possibilities here:

    1/ traceroute ingress interface is an unnumbered interface with the IP(v6) address borrowed from loopback

    2/ two or more IP(v6) addresses on traceroute ingress interface

    3/ some vendors routers can be set to reply to traceroute with IP(v6) address from any other interface configured on a router, not only with IP(v6) address from traceroute ingress interface

    HTH

    Thx
    Alex



  • 11.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-05-2018 01:24

    Hi Alex,

     

    Thanks for the response.

    Not quite sure why IPv6 would be involved. The example could be seen as follows:

     

    Dynamic Gateway for Subscribers: 192.168.1.1

    On CPE Admin screen for WAN, Gateway shows as 192.168.1.1  ---- This is as expected.

     

    Traceroute from Laptop connected to the LAN of the CPE:

     

    First hop = Gateway of LAN on CPE.

    Second hop should equal 192.168.1.1 but it doesn't, it comes back with 192.168.50.50 for example.

     

    Would what you have stated also apply to IPv4? Also, how can I achieve those results please?



  • 12.  RE: LNS Loopback Interface issue on CPE

     
    Posted 07-04-2018 05:41
    Example below.

    set dynamic-profiles DYN_DEMUX interfaces demux0 unit "$junos-interface-unit" family inet unnumbered-address preferred-source-address $junos-preferred-source-address


  • 13.  RE: LNS Loopback Interface issue on CPE
    Best Answer

    Posted 07-04-2018 05:50

    Hello,

    here is the improved code:

    set interfaces lo0.0 family inet address 10.10.20.20/32 preferred
    set interfaces lo0.0 family inet6 address fc00::20/128 preferred  
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface" preferred-source-address $junos-preferred-source-address
    set dynamic-profiles dyn-lns-profile interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet6 unnumbered-address "$junos-loopback-interface" preferred-source-address $junos-preferred-source-ipv6-address

    HTH

    Thx

    Alex