Routing

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Forwarding type routing instance does not forward traffic

    Posted 09-25-2023 10:07
    Hello,

    I have a forwarding type routing instance which i leak all routes from a BGP group and even though the routes are in the table when i ping using the instance i get the error: "ping: sendto: Can't assign requested address"

    Here is the issue with more details :

    > ping 80.249.209.0
    PING 80.249.209.0 (80.249.209.0): 56 data bytes
    64 bytes from 80.249.209.0: icmp_seq=0 ttl=64 time=1.415 ms
    --- 80.249.209.0 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 1.415/1.415/1.415/0.000 ms

    > ping 80.249.209.0 routing-instance r2
    PING 80.249.209.0 (80.249.209.0): 56 data bytes
    ping: sendto: Can't assign requested address
    ping: sendto: Can't assign requested address

    >show route table r2.inet.0 80.249.209.0
    r2.inet.0: 31455 destinations, 62823 routes (31455 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    80.249.208.0/21 *[Direct/0] 1w2d 14:46:40
    > via xe-0/2/0.0

    I am running Junos 22.2R3.15 and the exact same configuration used to work fine with Junos 15.1R6.7

    Is this a bug?

    Here is my config for this:

    routing-options {
    interface-routes {
    rib-group inet direct;
    }
    rib-groups {
    direct {
    import-rib [ inet.0 r2.inet.0 ];
    }
    bgp-r2 {
    export-rib inet.0;
    import-rib [ inet.0 r2.inet.0 ];
    }
    }
    }
    protocols {
    bgp {
    group R2 {
    type external;
    family inet {
    unicast {
    rib-group bgp-r2;
    }
    }
    }
    }
    routing-instances {
    r2 {
    instance-type forwarding;
    }
    }

    Thanks


    ------------------------------
    KOSTAS MATSOUKAS
    ------------------------------


  • 2.  RE: Forwarding type routing instance does not forward traffic

    Posted 09-27-2023 02:08

    Hi,

    The ping can't be sourced from a forwarding type routing instance, as the interfaces still belong to the default instance. 

    What is it that you are trying to achieve with this configuration? Forwarding-type instances are most commonly used for filter-based forwarding of traffic.

    Regards



    ------------------------------
    Sheetanshu Shekhar
    ------------------------------



  • 3.  RE: Forwarding type routing instance does not forward traffic

    Posted 09-27-2023 02:35

    Thanks for the reply,

    As you said, i am using policy based routing to route packets, sourced from a specific IP address to that routing-instance.

    The real problem is that the routes from the BGP neighbours that i am injecting through a rib-group to that routing-instance are disappearing even though they exist in the default table inet.0

    If i clear the BGP session with that neighbour, once the new session is established, the routes are going to appear again in the routing-instance table but after a while they are going to disappear again for some reason.

    Any ideas why?



    ------------------------------
    Kostas Matsoukas
    ------------------------------



  • 4.  RE: Forwarding type routing instance does not forward traffic

    Posted 09-27-2023 06:30

    I replicated your config in lab, and don't really see any such issue.

    Can you kindly share the outputs of the following? (in both cases, when the route remains and vanishes the r2 routing instance)

    • "show route protocol bgp table inet.0 detail"
    • "show route protocol bgp table r2.inet.0 detail"
    • "show route table r2.inet.0"

    Regards



    ------------------------------
    Sheetanshu Shekhar
    ------------------------------



  • 5.  RE: Forwarding type routing instance does not forward traffic

    Posted 09-27-2023 07:43

    I am just going to paste the first few lines of the commands since pasting a full BGP table would be impossible here.

    > show route protocol bgp table inet.0 detail

    inet.0: 921942 destinations, 4155324 routes (921932 active, 0 holddown, 156 hidden)
    1.0.0.0/24 (6 entries, 1 announced)
            *BGP    Preference: 170/-121
                    Next hop type: Router, Next hop index: 1216
                    Address: 0x77b029dc
                    Next-hop reference count: 7395, key opaque handle: 0x0, non-key opaque handle: 0x0
                    Source: 80.249.211.140
                    Next hop: 80.249.211.140 via xe-0/2/0.0, selected
                    Session Id: 38604
                    State: <Active Ext>
                    Age: 6d 23:49:13
                    Validation State: unverified
                    Task: BGP_13335.80.249.211.140
                    Announcement bits (3): 0-KRT 4-BGP_RT_Background 5-Resolve tree 1
                    AS path: 13335 I
                    Aggregator: 13335 10.34.6.80
                    Communities: 13335:10020 13335:19020 13335:20050 13335:20500 13335:20530
                    Accepted
                    Localpref: 120
                    Router ID: 141.101.65.1
                    Thread: junos-main

    > show route protocol bgp table r2.inet.0 detail

    r2.inet.0: 472 destinations, 925 routes (472 active, 0 holddown, 0 hidden)
    1.34.0.0/16 (2 entries, 1 announced)
            *BGP    Preference: 170/-121
                    Next hop type: Router, Next hop index: 2690
                    Address: 0x2c4ffc9c
                    Next-hop reference count: 325, key opaque handle: 0x0, non-key opaque handle: 0x0
                    Source: 80.249.209.0
                    Next hop: 80.249.214.132 via xe-0/2/0.0, selected
                    Session Id: 40065
                    State: <Secondary Active Ext>
                    Age: 1:44
                    Validation State: unverified
                    Task: BGP_6777.80.249.209.0
                    Announcement bits (1): 1-KRT
                    AS path: 3462 3462 I
                    Aggregator: 3462 220.128.0.55
                    Accepted
                    Localpref: 120
                    Router ID: 80.249.209.0
                    Primary Routing Table: inet.0
                    Thread: junos-main

    > show route table r2.inet.0

    r2.inet.0: 472 destinations, 925 routes (472 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    1.34.0.0/16        *[BGP/170] 00:01:52, localpref 120, from 80.249.209.0
                          AS path: 3462 3462 I, validation-state: unverified
                        >  to 80.249.214.132 via xe-0/2/0.0
                        [BGP/170] 00:01:52, localpref 120, from 80.249.208.255
                          AS path: 3462 3462 I, validation-state: unverified
                        >  to 80.249.214.132 via xe-0/2/0.0

    And after i restart the BGP sessions from the BGP group the routing instance has now 200k routes instead of 925 that had before:

    > show route protocol bgp table r2.inet.0 detail

    r2.inet.0: 199845 destinations, 200346 routes (199845 active, 0 holddown, 0 hidden)
    1.0.0.0/24 (1 entry, 1 announced)
            *BGP    Preference: 170/-121
                    Next hop type: Router, Next hop index: 1216
                    Address: 0x77b029dc
                    Next-hop reference count: 7637, key opaque handle: 0x0, non-key opaque handle: 0x0
                    Source: 80.249.211.140
                    Next hop: 80.249.211.140 via xe-0/2/0.0, selected
                    Session Id: 38604
                    State: <Secondary Active Ext>
                    Age: 0
                    Validation State: unverified
                    Task: BGP_13335.80.249.211.140
                    Announcement bits (1): 1-KRT
                    AS path: 13335 I
                    Aggregator: 13335 10.34.6.80
                    Communities: 13335:10020 13335:19020 13335:20050 13335:20500 13335:20530
                    Accepted
                    Localpref: 120
                    Router ID: 141.101.65.1
                    Primary Routing Table: inet.0
                    Thread: junos-main

    I am not sure how long it took to remove the routes, but i checked half an hours later and the routes went down to 1335 again:

    > show route protocol bgp table r2.inet.0 detail

    r2.inet.0: 681 destinations, 1335 routes (681 active, 0 holddown, 0 hidden)
    23.149.152.0/24 (2 entries, 1 announced)
            *BGP    Preference: 170/-121
                    Next hop type: Router, Next hop index: 1009
                    Address: 0x7678f79c
                    Next-hop reference count: 185, key opaque handle: 0x0, non-key opaque handle: 0x0
                    Source: 80.249.209.0
                    Next hop: 80.249.213.37 via xe-0/2/0.0, selected
                    Session Id: 38400
                    State: <Secondary Active Ext>
                    Age: 14:29
                    Validation State: unverified
                    Task: BGP_6777.80.249.209.0
                    Announcement bits (1): 1-KRT
                    AS path: 56655 212895 I
                    Communities: 56655:1003
                    Accepted
                    Localpref: 120
                    Router ID: 80.249.209.0
                    Primary Routing Table: inet.0
                    Thread: junos-main

    I am not sure why it's removing the routes from the routing instance, since the route clearly exist in the inet.0 table.

    Does local preference or any attribute matter to the rib group when it's importing the routes?

    Regards,



    ------------------------------
    Kostas Matsoukas
    ------------------------------