cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10424
Views
0
Helpful
3
Replies

Null0 route in OSPF

                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:

Topology.PNG

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!!

2 Accepted Solutions

Accepted Solutions

nkarpysh
Cisco Employee
Cisco Employee

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

HTH,
Niko

View solution in original post

John Blakley
VIP Alumni
VIP Alumni

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 ***

HTH, John *** Please rate all useful posts ***

View solution in original post

3 Replies 3

nkarpysh
Cisco Employee
Cisco Employee

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

HTH,
Niko

John Blakley
VIP Alumni
VIP Alumni

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 ***

HTH, John *** Please rate all useful posts ***

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 .

Review Cisco Networking for a $25 gift card