[j-nsp] Martian RIB filter not working for rib-groups

Daniel Roesen dr at cluenet.de
Sun Aug 8 11:10:15 EDT 2004


Hi,

it looks like JunOS doesn't check the martians list for routes
replicated to RIBs via rib-group:

interfaces {
    lo0 {
        unit 0 {
            family inet {
                address 127.0.0.1/32;
            }
        }
    }
}

routing-options {
    interface-routes {
        rib-group {
            inet unicast-multicast-grp-v4;
            inet6 unicast-multicast-grp-v6;
        }
    }
    rib-groups {
        unicast-multicast-grp-v4 {
            export-rib inet.0;
            import-rib [ inet.0 inet.2 ];
        }
        unicast-multicast-grp-v6 {
            export-rib inet6.0;
            import-rib [ inet6.0 inet6.2 ];
        }
}

root at A1> show route 127.0.0.1/32 exact extensive

inet.0: 4 destinations, 4 routes (3 active, 0 holddown, 1 hidden)

inet.2: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
127.0.0.1/32 (1 entry, 0 announced)
        *Direct Preference: 0
                Next hop type: Interface
                Next-hop reference count: 2
                Next hop: via lo0.0, selected
                State: <Secondary Active Int>
                Local AS:  1
                Age: 21:53:14
                Task: IF
                AS path: I
                Primary Routing Table inet.0

127/8 is included in both inet.0 and inet.2 martians list:

root at A1> show route martians table inet.0 | match 127
             127.0.0.0/8 orlonger -- disallowed
root at A1> show route martians table inet.2 | match 127
             127.0.0.0/8 orlonger -- disallowed

The same happens when setting a static route into rib inet.0 which has
rib-group unicast-multicast-grp-v4 applied as well:

routing-options {
    rib inet.0 {
        static {
            rib-group unicast-multicast-grp-v4;
            route 127.1.1.1/32 reject;
        }
    }
}

root at A1> show route 127.1.1.1/32 extensive all

inet.0: 5 destinations, 5 routes (3 active, 0 holddown, 2 hidden)
127.1.1.1/32 (1 entry, 0 announced)
         Static Preference: 5
                Next hop type: Reject
                Next-hop reference count: 20
 >>>>>>>        State: <Hidden Martian Int Ext>
                Local AS:  1
                Age: 1:33
                Task: RT
                AS path: I
                Secondary Tables: inet.2

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

127.1.1.1/32 (1 entry, 0 announced)
        *Static Preference: 5
                Next hop type: Reject
                Next-hop reference count: 20
 >>>>>>>        State: <Secondary Active Int Ext>
                Local AS:  1
                Age: 1:33
                Task: RT
                AS path: I
                Primary Routing Table inet.0


Setting the route directly in RIB inet.2, the martians filter works:

routing-options {
    rib inet.2 {
        static {
            route 127.1.1.1/32 reject;
        }
    }
}

root at A1> show route 127.1.1.1/32 extensive all

inet.2: 4 destinations, 4 routes (3 active, 0 holddown, 1 hidden)
127.1.1.1/32 (1 entry, 0 announced)
         Static Preference: 5
                Next hop type: Reject
                Next-hop reference count: 17
                State: <Hidden Martian Int Ext>
                Local AS:  1
                Age: 2:16
                Task: RT
                AS path: I


Known bug?


Best regards,
Daniel


More information about the juniper-nsp mailing list