question

asavas avatar image
asavas asked asavas posted

How to create a Table RM for "show route vrf all sum" output

Hi all,

 

I have an output as below:

 

Thu Sep  1 19:33:06.333 UTC

VRF: vrf1


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected        1         0         0          136         
local            1         0         0          136         
dagr            0         0         0          0           
bgp 65000       3000      0         0          408000      
Total           3002      0         0          408272     

VRF: vrf1006


Route Source    Routes    Backup    Deleted    Memory (bytes)
local           1         0         0          136         
connected       1         0         0          136         
static          1         0         0          136         
dagr            0         0         0          0           
bgp 65000       0         0         0          0           
Total           3         0         0          408        

 As you can see, the two tables are in different format. One of that starts with local, the other one with connected. One of them has static, the other one doesn't...

 

However all I care is the VRF# and BGP routes. So I want to use VRF as key and get the BGP routes for each table and it should handle both syntax.

 

I have attached the ffrm that I have created as well as a sample output but it is not working and not sure how to fix it. Any help would be appreciated.

 

Thanks,

 

Alper 

 
iTestresponse map
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
sreenath avatar image
sreenath answered sreenath posted

Hi,

 

I have modified your response map based on your requirement. PFA

 

Please let me know if I have missed something.

 

Hope it help!

 

Thanks,

 


4 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

msalkeld avatar image msalkeld commented ·

Hi,

 

 We actually have an output that is not always the same. So we need the response map to be able to find the line that "BGP 65000" exists. Please see new attached output. As below, lines like static, local, BGP are never consistently on the same lines every time.

 

Wed Sep  7 18:37:14.583 UTC

VRF: vrf1


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf2


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf3


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf4


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf5


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf6


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf7


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf8


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf9


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf10


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       1         0         0          136        
local           1         0         0          136        
bgp 65000       4000      0         0          544000     
dagr            0         0         0          0          
static          0         0         0          0          
Total           4002      0         0          544272    


VRF: vrf1010


Route Source    Routes    Backup    Deleted    Memory (bytes)
connected       0         0         0          0          
local           0         0         0          0          
static          0         0         0          0          
bgp 65000       0         0         0          0          
dagr            0         0         0          0          
Total           0         0         0          0         



0 Likes 0 ·
msandeep avatar image msandeep msalkeld commented ·

I have created a response map for the above output. Please find the attached response map and let me know if you have any queries.

0 Likes 0 ·
asavas avatar image asavas msandeep commented ·

Hey Sandeep,

 

Thanks for the response map but it is still not exactly what we were looking for. I have attached the exact output in the txt file.

 

The problem is, we need to have 2 keys.

 

Key#1 - VRF#

Key#2 - route_source (BGP 65000)

 

The issue is BGP 65000 moves around so we can't just get the 4th from top as the BGP.

 

Please let me know if there is a way to do it.

 

Thanks,

 

Alper

0 Likes 0 ·
asavas avatar image asavas asavas commented ·

Hey Sandeep,

 

Here is the ffrm that I have with all the examples where we have issues.

 

Thanks,

 

Alper 

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.