14.3.5 Checking routes resulting from learned route filtering
Routes permitted by learned route filtering are entered into the routing table. You can check the results of learned route filtering by viewing the routes in the routing table.
To display every route in the routing table including invalid routes, execute the show ip route operation command with the all-routes parameter specified.
> show ip route all-routes Date 20XX/07/14 12:00:00 UTC Status Codes: * valid, > active, r RIB failure Total: 12 routes Destination Next Hop Interface Metric Protocol Age *> 127/8 ---- localhost 0/0 Connected 1h 32s- *> 127.0.0.1/32 127.0.0.1 localhost 0/0 Connected 1h 32s| *> 172.10.1/24 192.168.1.145 VLAN0007 2/0 RIP 12s | *> 192.168.1/24 192.168.1.1 VLAN0007 0/0 Connected 2s | 192.168.1/24 192.168.1.1 VLAN0007 1/- OSPF intra 48m 3s| *> 192.168.1.1/32 192.168.1.1 VLAN0007 0/0 Connected 1h 31s # *> 200.1/24 192.168.1.145 VLAN0007 -/- BGP 11m 26s| *> 201.110/24 192.168.1.145 VLAN0007 1/1 OSPF ext2 52s | *> 200.200.1/24 192.168.1.145 VLAN0007 0/0 Static 46m 58s| * 200.200.1/24 192.168.1.145 VLAN0007 -/- BGP 50m 14s| * 200.200.1/24 192.168.1.145 VLAN0007 1/1 OSPF ext2 48m 52s| * 200.200.1/24 192.168.1.145 VLAN0007 2/0 RIP 12s - |
- #
-
The characters * and > at the beginning of an entry signify the following:
*: Signifies a valid route. Its absence indicates an invalid route.
>: Signifies a prioritized route. Only prioritized routes are used for packet transfer.
To check only those routes that were learned by a specific protocol, execute the show ip route operation command with the all-routes parameter and the protocol specified.
> show ip route all-routes rip Date 20XX/07/14 12:00:00 UTC Status Codes: * valid, > active, r RIB failure Total: 2 routes Destination Next Hop Interface Metric Protocol Age *> 172.10.1/24 192.168.1.145 VLAN0007 2/0 RIP 12s * 200.200.1/24 192.168.1.145 VLAN0007 2/0 RIP 12s |
If the various protocols generate more than one route to the same destination network, you will need to check which protocol supplied the prioritized route, and the priority of each route. The priority of each route is determined by its distance value.
To display distance values, execute the show ip route operation command with the all-routes and -P parameters specified. The distance is the first value in the Distance column at the end of each line.
> show ip route all-routes -P Date 20XX/07/14 12:00:00 UTC Status Codes: * valid, > active, r RIB failure Total: 12 routes Destination Next Hop Interface Metric Protocol Age *> 127/8 ---- localhost 0/0 Connected 1h 36m, Distance: 0/0/0 *> 127.0.0.1/32 127.0.0.1 localhost 0/0 Connected 1h 36m, Distance: 0/0/0 *> 172.10.1/24 192.168.1.145 VLAN0007 2/0 RIP 12s, Distance: 120/0/0 *> 192.168.1/24 192.168.1.1 VLAN0007 0/0 Connected 0s, Distance: 0/0/0 192.168.1/24 192.168.1.1 VLAN0007 1/- OSPF intra 52m 32s, Distance: -110/1/0 *> 192.168.1.1/32 192.168.1.1 VLAN0007 0/0 Connected 1h 35m, Distance: 0/0/0 *> 200.1/24 192.168.1.145 VLAN0007 -/- BGP 12m 37s, Distance: 20/0/0 *> 201.110/24 192.168.1.145 VLAN0007 1/1 OSPF ext2 6m 11s, Distance: 110/1/0 *> 200.200.1/24 192.168.1.145 VLAN0007 0/0 Static 50m 27s, Distance: 2/0/0 * 200.200.1/24 192.168.1.145 VLAN0007 -/- BGP 54m 43s, Distance: 20/0/0 * 200.200.1/24 192.168.1.145 VLAN0007 1/1 OSPF ext2 52m 21s, Distance: 110/1/0 * 200.200.1/24 192.168.1.145 VLAN0007 2/0 RIP 12s, Distance: 120/0/0 |
To display the distance values for routes to a specific destination, execute the show ip route operation command with the all-routes parameter and the destination network specified. The route's distance is the first value on the Distance line in the detailed routing information.
> show ip route all-routes 200.200.1/24 Date 20XX/07/14 12:00:00 UTC Route codes: * = active, + = changed to active recently ' ' = inactive, - = changed to inactive recently r = RIB failure Route 200.200.1/24 Entries 4 Announced 1 Depth 0 <> * NextHop 192.168.1.145 , Interface : VLAN0007 Protocol <Static> Source Gateway ---- Metric/2 : 0/0 Distance/2/3: 2/0/0 Tag : 0, Age : 58m 29s AS Path : IGP (Id 1) Communities: - LocalPref : - RT State: <Remote Int Active Gateway> NextHop 192.168.1.145 , Interface : VLAN0007 Protocol <BGP> Source Gateway 192.168.1.145 Metric/2 : -/- Distance/2/3: 20/0/0 Tag : 0, Age : 1h 2m AS Path : 1000 IGP (Id 2) Communities: - LocalPref : 100 RT State: <Ext Gateway> |
To check detailed attribute information for routes, use the show ip route operation command with the all-routes and -F parameters specified.
> show ip route all-routes -F Date 20XX/07/14 12:00:00 UTC Status Codes: * valid, > active, r RIB failure Total: 12 routes Destination Next Hop Interface Metric Protocol Age *> 127/8 ---- localhost 0/0 Connected 1h 46m, Distance: 0/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <NoAdvise Active Retain Reject> *> 127.0.0.1/32 127.0.0.1 localhost 0/0 Connected 1h 46m, Distance: 0/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <NoAdvise Active Retain> *> 172.10.1/24 192.168.1.145 VLAN0007 2/0 RIP 19s, Distance: 120/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -,<Int Active Gateway> *> 192.168.1/24 192.168.1.1 VLAN0007 0/0 Connected 7s, Distance: 0/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <Active Retain> 192.168.1/24 192.168.1.1 VLAN0007 1/- OSPF intra 1h 2m, Distance: -110/1/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <NotInstall NoAdvise Int Hidden Gateway> *> 177.7.7.1/32 192.168.1.1 VLAN0007 0/0 Connected 1h 45m, Distance: 0/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <NoAdvise Active Retain> *> 200.1/24 192.168.1.145 VLAN0007 -/- BGP 12m 57s, Distance: 20/0/0, Tag: 0, AS-Path: 1000 IGP (Id 3), Communities: 120:200, LocalPref: 100, <Ext Active Gateway> *> 201.110.1/24 192.168.1.145 VLAN0007 1/1 OSPF ext2 3m 34s, Distance: 110/1/0, Tag: 10, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <Int Ext Active Gateway> *> 200.200.1/24 192.168.1.145 VLAN0007 0/0 Static 1h 0m, Distance: 2/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -, <Remote Int Active Gateway> * 200.200.1/24 192.168.1.145 VLAN0007 -/- BGP 1h 5m, Distance: 20/0/0, Tag: 0, AS-Path: 1000 IGP (Id 2), Communities: -, LocalPref: 100, <Ext Gateway> * 200.200.1/24 192.168.1.145 VLAN0007 1/1 OSPF ext2 1h 2m, Distance: 110/1/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -,<Int Ext Gateway> * 200.200.1/24 192.168.1.145 VLAN0007 2/0 RIP 19s, Distance: 120/0/0, Tag: 0, AS-Path: IGP (Id 1), Communities: -, LocalPref: -,<Int Gateway> |