02-25-2003 01:06 AM - edited 03-02-2019 05:20 AM
I have a pair of routers which have large routing tables. I want to be able to look at subsets of this routing info (e.g all 192.168.*.* subnets). Can someone tell me how I can do this. I belive Regular Expressions are the answer but cannot figure one out.
Thanks,
Matt
02-25-2003 01:45 AM
Hi Matt
What ist your routing protocol i got in place? (EIGRP/BGP/OSPF...)
Regards
Roger
02-25-2003 01:53 AM
Currently RIP although some of the subnets I want to filter out are Static Routes and Directly Connected routes. All are in the 192.168.*.* range.
Matt
02-25-2003 02:22 AM
Hi Matt
The RIP Routes you can filter with a distribute-list in the routing process.
Like the sample below:
router rip
network 10.0.0.0
distribute-list 10 out
!
access-list 10 permit 10.10.10.0 0.0.0.255
Only the 10.10.10.0 net will be propagated by rip.
The static routes you can filter with ther redistribution command and a route map. Here a sample:
ip route 10.10.10.0 255.255.255.0 192.168.1.1 tag 100
ip route 10.10.11.0 255.255.255.0 192.168.1.1
!
Route-map static2rip permit 10
match tag 100
!
Router rip
network 192.168.1.0
redistribute route-map static2rip metric 2
!
That means only the static route with the tag will be redistributed into the rip.
In rip there is nothing like regex. Regex can only be in place with bgp.
Hope that helps you
Roger
02-25-2003 03:09 AM
Roger,
thanks for the reply. Unfortunately what I was actually asking for was a way to filter the output of a "Show IP Route" command to only show routes to 192.168.*.* subnets, no a way to filter routing updates.
If you could help here, I would be grateful,
thanks,
Matt
02-25-2003 04:01 AM
You could try using the Include keyword under the pipe function (|):
SHOW IP ROUTE | INCLUDE 192.168
02-25-2003 04:04 AM
sorry
Thats sh ip route | include 10.90*
Ciao
Roger
02-25-2003 06:32 AM
Thanks,
I was able to use your responses to help me find my solution,
Many thanks,
Matt
02-25-2003 07:27 AM
Matt,
If you issue the following command you can will only see the routing information for 192.168.*.*:
router#show ip route | include 192.168
There is a certain level of IOS that supports this command(I think the 12.x and above).
Hope this helps.
Dave
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide