Routing

 View Only
last person joined: 19 hours 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.

Advertise public prefixes using rib-groups

  • 1.  Advertise public prefixes using rib-groups

    Posted 07-20-2023 06:03

    Hello Juniper Community,

    We are currently experimenting with next-table and rib-groups. We have two pair of routing instances running on two MX routers (for redundancy). Instance 1 (which is called internet-global) is used for generating the default route, instance 2 (which is called internet-default) is used for aggregating our public prefixes to instance 1. These instances are currently connected to each other using the lt-interface (logical tunnel). We would like to replace this with next-table and rib-groups, because of the speed limitation. NOTE: instance 1 is a virtual router and instance 2 is a VRF. Changing the routing instance type is not an option for us.

    I already made some changes in the config. Here is the config of instance 1:

    show routing-instances internet-global     
    description "EDGE VR, Full table, not in MPLS";
    instance-type virtual-router;
    interface ae0.10;
    interface ae0.101;
    interface ae0.211;
    interface ae0.4002;
    interface ae0.4012;
    interface ae0.4013;
    interface ae0.4016;
    interface lo0.1000;
    routing-options {
        rib internet-global.inet6.0 {
            generate {
                route ::/0 discard;
            }
        }
        generate {
            route 0.0.0.0/0 discard;
        }
        autonomous-system xxxx22;
    } 

    Here is the config of instance 2, also a side note, the route are being currently aggregated so I replaced the aggregate with static routes discard for the prefixes and added a policy with the three prefixes exact then accept then reject:

    show routing-instances internet-default   
    description "Internet VRF - axxxx22 subnets only!";
    instance-type vrf;
    interface ae0.11;
    interface ae0.100;
    interface ae0.900;
    interface ae0.901;
    interface ae0.905;
    interface ae0.906;
    interface ae0.911;
    interface ae0.913;
    interface ae0.914;
    interface ae0.915;
    interface ae0.916;
    interface ae0.917;
    interface ae0.920;
    interface ae0.921;
    interface ae0.922;
    interface ae0.924;
    interface ae0.926;
    interface ae0.927;
    interface ae0.998;
    route-distinguisher xxxx76L:100;
    vrf-target target:xxxx76L:100;
    vrf-table-label;                        
    routing-options {
        rib internet-default.inet6.0 {
            aggregate {
                defaults {
                    as-path {
                        path 6xxx9;
                    }
                }
                route 2xxx:xxc0::/29;
                route 2xxx:xxx0::/29;
            }
        }
        static {
            rib-group default-to-global
            defaults {
                as-path {
                    path 6xxx9;
                }
            }
            route xxx.xx.32.0/22 discard;
            route xxx.xxx.56.0/23 discard;  
            route xxx.xxx.58.0/24 discard;
            route 0.0.0.0/0 next-table internet-global.inet.0
        }
        router-id xxx.xxx.58.252;
        autonomous-system 6xxx9 loops 2 independent-domain;
    }

    Here is the output of instance 1 routing table:

    run show route table internet-global.inet   
    
    internet-global.inet.0: 13 destinations, 14 routes (12 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both
    
    XXX.XX.32.0/22     *[Static/5] 00:07:52
                          Discard
    XXX.XXX.56.0/23    *[Static/5] 00:07:52
                          Discard
    XXX.XXX.58.0/24    *[Static/5] 00:07:52
                          Discard
    XXX.XXX.58.252/32  *[Direct/0] 02:49:55
                        > via ae0.10
                        [Local/0] 02:49:55
                          Local via ae0.10
    XXX.XXX.58.255/32  *[Direct/0] 3d 18:48:18
                        > via lo0.1000   

    Here is the output of instance 2 routing table:

    run show route table internet-default.inet              
    
    internet-default.inet.0: 76 destinations, 77 routes (76 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    0.0.0.0/0          *[Static/5] 00:09:17
                          to table internet-global.inet.0

    I have a couple of questions about this topic. The first is that the routes are being advertised as discard in the routing table of instance 1, how do I fix this? I want to be able to use them. When I export the prefixes using a policy without the static routes, I don't see them in the routing table and I get no traffic. When I use rib-groups without the import-policy all the routing entries of instance 2 get imported to instance 1 (which we absolutely don't want). Anyone who has experienced this before? One more thing, on  instance 1 I have generate routes with discard, do I need to delete those, since I'm using next-table default-route in instance 2?

    Thank in advance!

    Best regards,



    ------------------------------
    Mohammad Ayash
    ------------------------------