Junos OS

Expand all | Collapse all

IPv6 - Next-hop-self

Jump to Best Answer
  • 1.  IPv6 - Next-hop-self

     
    Posted 02-01-2019 03:23

    Hi,

     

    I have next-hop-self configured in IPv4 as follows:

    set policy-options policy-statement ebgp-default-route term 1 from route-filter 0.0.0.0/0 exact
    set policy-options policy-statement ebgp-default-route term 1 then next-hop self
    set policy-options policy-statement ebgp-default-route term 1 then accept
    set policy-options policy-statement ebgp-default-route term reject then reject

     

    I am trying to get the equivalent in IPv6 but failing thus far.... anyone know how to configure next-hop-self for IPv6 please?



  • 2.  RE: IPv6 - Next-hop-self

    Posted 02-01-2019 04:03

    next-hop-self working is same for ipv6 also. Are you peering with ipv6 address or advertising ipv6 routes over ipv4 peering?

    What is the error you are getting and please share ipv6 policy. For ipv6 default route should be ::/0

     

     



  • 3.  RE: IPv6 - Next-hop-self

     
    Posted 02-01-2019 05:12

    I'm not getting any errors. I just wanted to confirm the workings to ensure I got it correct.... so, it's basically the following (if it's the same)

     

    set policy-options policy-statement ipv6-default-route term 1 from route-filter ::/0 exact
    set policy-options policy-statement ipv6-default-route term 1 then next-hop self
    set policy-options policy-statement ipv6-default-route term 1 then accept
    set policy-options policy-statement ipv6-default-route term reject then reject

     

    All the peering is IPv6..... I am already peered with the upstream ISPs and all IP Dual Stack is working great.... I just needed to ensure that the the routes were available across the 2 data centres because 1 of our upstream ISPs is not advertising the full IPv6 Routing tables (for example, google will not allow them to advertise their IPv6 DNS addressing).....



  • 4.  RE: IPv6 - Next-hop-self
    Best Answer

    Posted 02-01-2019 05:38

    The policy should work. I tested in my lab. 

     

    R1---ebgp----R2-----ibgp----R3

     

    R1 is originating default route to R2 and it is advertising to R3. policy is applied on R2. Outputs with and without next-hop self policy on R2 is given below:

    Before:

    +++++++++

    root@R3# run show route protocol bgp hidden

    inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)

    inet6.0: 19 destinations, 23 routes (18 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both

    ::/0 [BGP/170] 00:00:09, localpref 100, from 2001:db8:2::15
    AS path: 100 I, validation-state: unverified
    Unusable

    [edit]
    root@R3# run show route protocol bgp hidden extensive

    inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)

    inet6.0: 19 destinations, 23 routes (18 active, 0 holddown, 1 hidden)
    ::/0 (1 entry, 0 announced)
    BGP Preference: 170/-101
    Next hop type: Unusable
    Address: 0x903c184
    Next-hop reference count: 1
    State: <Hidden Int Ext>
    Local AS: 200 Peer AS: 200
    Age: 15
    Validation State: unverified
    Task: BGP_200.2001:db8:2::15+179
    AS path: 100 I
    Accepted
    Localpref: 100
    Router ID: 2.2.2.2
    Indirect next hops: 1
    Protocol next hop: 2001:db8:2::d <---------- R1's IP
    Indirect next hop: 0 - INH Session ID: 0x0

     

    After applying policy:-

    +++++++++++++++++++
    root@R3# run show route protocol bgp

    inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)

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

    ::/0 *[BGP/170] 00:00:18, localpref 100
    AS path: 100 I, validation-state: unverified
    > to 2001:db8:2::15 via ge-0/0/5.0 <----------

    [edit]
    root@R3# run show route protocol bgp extensive

    inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)

    inet6.0: 19 destinations, 23 routes (19 active, 0 holddown, 0 hidden)
    ::/0 (1 entry, 1 announced)
    TSI:
    KRT in-kernel ::/0 -> {indirect(262142)}
    *BGP Preference: 170/-101
    Next hop type: Indirect
    Address: 0x92a8a28
    Next-hop reference count: 3
    Source: 2001:db8:2::15
    Next hop type: Router, Next hop index: 618
    Next hop: 2001:db8:2::15 via ge-0/0/5.0, selected
    Session Id: 0x2
    Protocol next hop: 2001:db8:2::15
    Indirect next hop: 9124d00 262142 INH Session ID: 0x3
    State: <Active Int Ext>
    Local AS: 200 Peer AS: 200
    Age: 40 Metric2: 0
    Validation State: unverified
    Task: BGP_200.2001:db8:2::15+179
    Announcement bits (2): 0-KRT 2-Resolve tree 1
    AS path: 100 I
    Accepted
    Localpref: 100
    Router ID: 2.2.2.2
    Indirect next hops: 1
    Protocol next hop: 2001:db8:2::15 <------------- R2 peeing IP to R3
    Indirect next hop: 9124d00 262142 INH Session ID: 0x3
    Indirect path forwarding next hops: 1
    Next hop type: Router
    Next hop: 2001:db8:2::15 via ge-0/0/5.0
    Session Id: 0x2
    2001:db8:2::14/126 Originating RIB: inet6.0
    Node path count: 1
    Forwarding nexthops: 1
    Next hop type: Interface
    Nexthop: via ge-0/0/5.0

    [edit]
    root@R3#