# Redistribution in ospf

**URL:** <https://forum.networklessons.com/t/redistribution-in-ospf/14671>\
**Category:** OSPF\
**Created:** [June 15, 2021, 5:25pm UTC](https://forum.networklessons.com/t/redistribution-in-ospf/14671 "2021-06-15T17:25:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [June 17, 2021, 4:57am UTC](https://forum.networklessons.com/t/redistribution-in-ospf/14671/2 "2021-06-17T04:57:22Z")

</div>

Hello Manish

> [@mksoni4ccie](#):
>
> In ospf , what is difference between  
> under the router ospf  
> redistribute connected and redistribute connected subnets ?

Without the `subnets` keyword, only routes that are in the routing table **with the default classful mask** will be redistributed. When you use the subnets keyword, the subnets from the connected interfaces are redistributed with their appropriate prefixes. A detailed explanation can be found at this Cisco documentation:

> **[Redistribute Connected Networks into OSPF with Subnet Keyword](https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/113339-ospf-connected-net.html)**
>
> This document describes the behavior of redistributing connected routes into Open Shortest Path First (OSPF). There are two behaviors depending on whether the subnet key word is given or not while redistributing the connected networks. In general...

> [@mksoni4ccie](#):
>
> 1. In which scenario/use case E1 metric will be used. Is there any lesson/lab on this.

The following lab may be of help for this question:

> **[OSPF Path Selection explained](https://networklessons.com/ospf/ospf-path-selection-explained)**
>
> OSPF will select a path based on the origin BEFORE looking at the cost of the path. In this lesson, I'll explain to you how it works.

You may also find this post useful:

> [@OSPF Path Selection explained](https://forum.networklessons.com/t/ospf-path-selection-explained/969/35):
>
> Hello Rahul E1 and E2 are two different ways of calculating an external route. An external route is one that has been introduced into OSPF from a different autonomous system. This external autonomous system could be running a different routing protocol, static routing or even another OSPF instance completely independent of the one in question. When a route is defined as E1, it includes the cost from the ASBR to the particular router that we are looking at. An E2 route does not include this …

If you have any further questions, please let us know!

I hope this has been helpful!

Laz

---

_[View the full topic](https://forum.networklessons.com/t/redistribution-in-ospf/14671)._
