If you plan to configure the Multi-Topology Routing (MTR) feature, you need to enter the
discard-routecommand in router address family topology configuration mode in order for this OSPF router
configuration command to become topology-aware.
Release 12.4(15)T
Prior to Cisco IOS Release 12.4(15)T, both external and internal discard routes were installed using the default
OSPF intra-area administrative distance 110. You can now modify this default distance for discard routes by
entering a new administrative distance for the distance argument of the discard-route command.
Examples
The following display shows the discard-route functionality installed by default. When external or
internal routes are summarized, a summary route to Null0 will appear in the router output from the
show ip route command. See the router output lines that refer to Null0:
Router# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
C 172.16.0.128/25 is directly connected, Loopback1
O 172.16.0.0/24 is a summary, 00:00:14, Null0
C 172.16.0.0/25 is directly connected, Loopback0
172.31.0.0/24 is variably subnetted, 3 subnets, 2 masks
C 172.31.0.128/25 is directly connected, Loopback3
O 172.31.0.0/24 is a summary, 00:00:02, Null0
C 172.31.0.0/25 is directly connected, Loopback2
C 192.168.0.0/24 is directly connected, Ethernet0/0
Router# show ip route ospf
172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
O 172.16.0.0/24 is a summary, 00:00:29, Null0
172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
O 172.16.0.0/24 is a summary, 00:00:17, Null0
When the no discard-route command with the internal keyword is entered, notice the following
route change, indicated by the router output lines that that refer to Null0:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# router ospf 1
Router(config-router)# no discard-route internal
Router(config-router)# end
Router# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
C 172.16.0.128/25 is directly connected, Loopback1
C 172.16.0.0/25 is directly connected, Loopback0
172.31.0.0/24 is variably subnetted, 3 subnets, 2 masks
C 172.31.0.128/25 is directly connected, Loopback3
Cisco IOS IP Routing: OSPF Command Reference
50
OSPF Commands: A through ip ospf demand-circuit
discard-route