This topic is to discuss the following lesson:
What is the use case for this…?
A good example would be a small network where one router has an Internet connection. You can advertise the default route to all routers in the network.
Great lesson I have a question in my lab I have 3 routers
R1---- 192.168 1.0---- R2
I am advertising default route on R2 but I can not ping 192.168.2.3 from R1.
R1 can see a default route O*E2 0.0.0.0/0 [110/1] via 192.168.1.2, 00:08:46, FastEthernet0/0.
Please let me know.
R1 knows the default route so we can assume that the packet makes it from R1 to R2. Since 192.168.2.0 is directly connected to R2, it knows how to reach R3 (192.168.2.3). What about the return traffic?
Does R3 also have the default route in its routing table or is there anything preventing it from responding to R1?
I have a couple of questions. Why this is sent as a Type 5 LSA even when the R1 and R2 routers are in same area. I guess since this is a Type 5 LSA it shows as an O*E2 ( External with Metric 2, so the actual cost of R1 to R2)
Type 5 – External LSA: also known as autonomous system external LSA: The external LSAs are generated by the ASBR.
When you generate a default route. You are advertising a route that looks like it from another network. In the example the default route could represent the ISP connection. R1 would represent the ASBR and generate type 5 LSAs (default route).
Hope this helped to answer your question.
Great, thanks Jeffrey. This is what I was looking for.
Why do we need to advertise a default route to all the routers ?
Let’s say you have a small network with a couple of routers. One router is connected to an ISP router for Internet access. On this router, you could advertise a default route in your OSPF network.
When there is no matching route in the routing table, the default route will be used and your traffic will be forwarded towards the ISP.
If you have a DMVPN network and a spoke is receiving a bunch of OSPF routes, along with default route (default-info originate), but don’t want a default route, but can’t change that default-information originate command on the hub, can you use some sort of route map or prefix list that you could configure on the spoke to block the default route being advertised?
I hope this makes sense…
Yes, you can do this, sort of
Remember that a requirement for OSPF is that all members in the same area must have identical databases (and I presume that your DMVPN hub and spokes are in the same area). So the best you are going to be able to do is keep that default route from getting installed in the routing table, even though it will still be present in the OSPF database. I recommend using a prefix-list to do it. Here’s a sample:
(config)#ip prefix-list PL_NODEFAULT deny 0.0.0.0/0 (config)#ip prefix-list PL_NODEFAULT permit 0.0.0.0/0 le 32 (config)#router ospf 1 (config-router)#distribute-list prefix PL_NODEFAULT in
Andrew, that worked perfectly. Thank you so much!
What if we have different area and core distribution access layer .
Where we have to put the default originate command
default information originate command must always be placed on a router that has a route that goes outside of the OSPF domain regardless of the area or of the core, distribution and access layers of the network. The criteria for this command is that the router must have a “way out” of the whole OSPF region.
I hope this has been helpful!
Suppose If you are using bgp and ospf in a network what is the need of using default route in ospf ? .BGP will take care of default route to isp.
It depends on the devices behind your BGP router. If you use iBGP everywhere then you won’t need OSPF. If you run OSPF on your internal routers and only BGP on the edge, then a default route in OSPF helps your devices to get to your BGP router.
Could you please explain the use case for using the metric attribute after the default-information originate command? Why would anyone need to use the metric and metric-types attributes.
Let’s say we have a small network with two OSPF routers that are both connected to an ISP. You configure both routers to advertise a default route.
The E2 type can be useful since the metric remains the same. You can set a low metric on R1 and a higher metric on R2 to ensure that all OSPF routers always use the default route through R1. When R1 fails, they’ll use R2. You can also use the same metric to ensure that both default routes are used.
With the E1 type, the metric changes so OSPF routers will route to the closest router…R1 or R2, you can play a bit with the metric to influence which routers select R1 or R2.
So, that’s why you might want to use the different E1/E2 types and why you might want to change the metric. Hope this helps!
I had a question.
- with Static default route we configure something like the following:
ip route 0.0.0.0 0.0.0.0 xxx.DestinationAddress.xxx.xxx
- If it was EIGRP and we had the following manually configured default route to advertise in EIGRP we would then use the following:
R2(config)#router eigrp AS#
with OSPF I did not see something similar is that because you just did not put in the full configuration or because OSPF just uses that statement:
default-information originate always
I would think it would need a manual entry for the default route to point where it is going to? such as add a default route statically after that and then this statement will advertise it. I am however, not positive because it was missing any type of manual default route in the configurations.
I guess you state here:
advertise a default route if you don’t already have it in your routing table. If you add the always keyword it will advertise the default route even if you don’t have it in the routing table
I would probably have used the word create instead of advertise but after studying the statement a bit closer I get what you meant.
This is like 4rth - 6th time I am going through the OSPF, and BGP lessons trying to drill down and get everything memorized since Sept 2017(though to be honest had a few breaks in there and forgot everything a couple times… lol) I just want to go play Total War Rome but I will keep studying as I have next two weeks off on vacation and want to put in about 40-48 hours study time each week and prep for my CCNP Route and my new job. I hope to take CCNP Route before End of 2018.