08-13-2012 09:23 PM - edited 03-03-2019 06:43 AM
Hi guys, I would like to know why the null0 route is eliminated by using "no discard-route external" if this route has been generated internally by my ospf process. I just was trying to respond a question from the CCIE exam and I came across with this thing. I have heard that you can remove the null route by issuing no "ip discard-route internal" command if the route was internally generated. Please have a look to those configurations and outputs and provide me your best answer. The topology that I have is like this, and it is supposed that I have to create a loop within R1 an R2 by summaring the 192.168.0.0/22 in the R1 side and 192.168.0.0/21 in R2 under each ospf process respectively:
R1
router ospf 200
log-adjacency-changes
summary-address 192.168.0.0 255.255.248.0
redistribute connected subnets
network 10.1.2.0 0.0.0.31 area 0
R1#
*Mar 1 02:55:42.907: %SYS-5-CONFIG_I: Configured from console by console
R1#sh ip route
Codes: C - connected, S - static, 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
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
10.0.0.0/27 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, Loopback0
O 192.168.0.0/22 is a summary, 00:00:04, Null0
O E2 192.168.0.0/21 [110/20] via 10.1.2.2, 00:00:07, Serial0/0
------------------------------------------------------------------------------------------------------------
R1 Again after the "no discard-route internal command:
router ospf 200
log-adjacency-changes
no discard-route internal
summary-address 192.168.0.0 255.255.252.0
redistribute connected subnets
network 10.1.2.0 0.0.0.31 area 0
R1#sh ip route
Codes: C - connected, S - static, 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
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
10.0.0.0/27 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, Loopback0
O 192.168.0.0/22 is a summary, 00:02:58, Null0 <----------- It's still there
O E2 192.168.0.0/21 [110/20] via 10.1.2.2, 00:01:01, Serial0/0
--------------------------------------------------------------------------------------------------------------
R1 after the "no discard-route external" command:
router ospf 200
log-adjacency-changes
no discard-route external
summary-address 192.168.0.0 255.255.252.0
redistribute connected subnets
network 10.1.2.0 0.0.0.31 area 0
R1#sh ip route (NO NULL ROUTE)
Codes: C - connected, S - static, 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
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
10.0.0.0/27 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, Loopback0
O E2 192.168.0.0/21 [110/20] via 10.1.2.2, 00:02:59, Serial0/0
Thank you in advance for any replies!!
Solved! Go to Solution.
08-13-2012 10:35 PM
Hi,
I think this is happening because the major route of 192.168.0.0/22 -- 192.168.0.0/21 is External one:
O E2 192.168.0.0/21 [110/20] via 10.1.2.2, 00:01:01, Serial0/0
Thus it's subnet also treated as external.
Nik
08-14-2012 04:26 AM
The summary address command is used only on ASBRs. Since you're redistributing the connected routes, the router installs the null0 as the discard route, but on the other router you'll notice that the route is an E2 route. When you enter the discard-route internal command, it doesn't do anything since it's being redistributed. Once you configure redistribution, the router is then seen as an ASBR.
The discard-route internal comes in play when the router is an ABR. Try advertising the 192.168.1.0/24 into area 1. Then you can do an "area 1 range 192.168.0.0 255.255.248.0" and you'll get an identical internal null0 route. Then you should be able to issue the "no discard-route internal" and the route should go away. This is internal to the OSPF domain which is why this works, whereas the redistribution is redistributing from outside the ospf domain and the discard-route external only works with those.
HTH,
John
*** Please rate all useful posts ***
08-13-2012 10:35 PM
Hi,
I think this is happening because the major route of 192.168.0.0/22 -- 192.168.0.0/21 is External one:
O E2 192.168.0.0/21 [110/20] via 10.1.2.2, 00:01:01, Serial0/0
Thus it's subnet also treated as external.
Nik
08-14-2012 04:26 AM
The summary address command is used only on ASBRs. Since you're redistributing the connected routes, the router installs the null0 as the discard route, but on the other router you'll notice that the route is an E2 route. When you enter the discard-route internal command, it doesn't do anything since it's being redistributed. Once you configure redistribution, the router is then seen as an ASBR.
The discard-route internal comes in play when the router is an ABR. Try advertising the 192.168.1.0/24 into area 1. Then you can do an "area 1 range 192.168.0.0 255.255.248.0" and you'll get an identical internal null0 route. Then you should be able to issue the "no discard-route internal" and the route should go away. This is internal to the OSPF domain which is why this works, whereas the redistribution is redistributing from outside the ospf domain and the discard-route external only works with those.
HTH,
John
*** Please rate all useful posts ***
08-14-2012 09:52 AM
Thanks every one for helping me! This is the result after following the instructions:
R1
router ospf 200
log-adjacency-changes
no discard-route internal
area 1 range 192.168.0.0 255.255.252.0
redistribute connected
network 10.1.2.0 0.0.0.31 area 0
network 192.168.1.0 0.0.0.255 area 1
R1#sh ip route (NO NULL ROUTE)
Codes: C - connected, S - static, 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
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
10.0.0.0/27 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, Loopback0
O E2 192.168.0.0/21 [110/20] via 10.1.2.2, 00:00:03, Serial0/0
R2#sh ip route (ROUTER #2 SHOW IP ROUTE OUTPUT COMMAND)
Codes: C - connected, S - static, 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
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
C 192.168.4.0/24 is directly connected, Loopback0
10.0.0.0/27 is subnetted, 1 subnets
C 10.1.2.0 is directly connected, Serial0/0
O IA 192.168.0.0/22 [110/65] via 10.1.2.1, 00:00:34, Serial0/0 <----- Here it is the thing, O IA
O 192.168.0.0/21 is a summary, 03:06:01, Null0
Thanks, now I have to go on with the next question!! 7 of 500 .
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