How to Read route from RIB

Document created by cdnadmin on Jan 25, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Bharathan Tm on 20-12-2012 11:41:53 AM
I configured routing information on the switch and then I try to display the routing information using onep_routing_rib_get_route_list API using the attached c file application. But the API does not returns any output. Please find the details below: i Have attached my app code.
 
API OUTPUT:
 
onep_routing_get_instance is success
 
onep_routing_get_rib is success
 
onep_routing_l3_ucast_rib_filter_new is success
 
onep_routing_l3_ucast_scope_new is success
 
onep_routing_l3_ucast_scope_to_string is success, \ROUTING_AFI_IPV4\ROUTING_SAFI_UNICAST\
 
onep_prefix_new is success
 
onep_routing_l3_ucast_route_range_new is success
Start of RIB Bulk Walk.
RIB Bulk Walk failed after reading 0 routes.
 
Printed all routes
 
CONFIGURATION IN DEVICE:
 
TB2-lower# show ip route
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
 
128.0.0.0/24, ubest/mbest: 1/0, attached
    *via 128.0.0.1, Lo0, [0/0], 01:56:00, direct
128.0.0.1/32, ubest/mbest: 1/0, attached
    *via 128.0.0.1, Lo0, [0/0], 01:56:00, local
Thanks,
Bharathan.TM

Subject: RE: How to Read route from RIB
Replied by: Karen Cadora on 07-02-2013 03:45:43 PM
Hi, Bharathan.

What platform and version are you testing against?  Have you tested the same script against the IOL emulator?

Thanks,
Shelly

Subject: RE: How to Read route from RIB
Replied by: Joseph Clarke on 13-02-2013 12:35:15 PM
I think you need to change your start range:
OLD:
rc = onep_routing_l3_ucast_route_range_new(start_prefix,
                                                   ROUTING_ROUTE_RANGE_EQUAL_OR_LARGER,
                                                   10, &range);
NEW:
rc = onep_routing_l3_ucast_route_range_new(start_prefix,
                                                   ROUTING_ROUTE_RANGE_EQUAL_OR_LARGER,
                                                   0, &range);
 
 

Attachments

    Outcomes