Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to use redistribution of static-to-ospf in order to create an external OSPF route other than the type E2? Does this process only create a type 5 LSA and can any other LSA types be created with the redistribution command?

EDIT: I am trying to see if it is at all possible to create OSPF LSAs between two routers alone via any Cisco IOS commands without a host machine creating the traffic. If so, which LSAs are possible? The redistribution command is the only method I have come across so far.

share|improve this question
    
Are External Type 1 routes ok, or are you looking for Type3 Network LSAs? What problem are you trying to solve? –  Mike Pennington Jul 26 '12 at 16:17
    
I updated my question with an edit to convey what I am looking for. –  THE DOCTOR Jul 26 '12 at 18:39

3 Answers 3

up vote 2 down vote accepted

Sure - in addition to redistributing as LSA type 5 E2 routes, you could also have the routes injected as LSA type 5 E1 routes.

router ospf 1
 redistribute static subnets metric-type 1

Also, you could redistribute the routes as type 7 LSAs (within the area) if the area is an NSSA area. Of course these type 7 LSAs will be converted to type 5 by the ABRs

router ospf 1
 area 2 nssa
 redistribute static subnets metric-type 1

So again, YES you can redistribute statics as either:

Type 5 LSA, Type 1

Type 5 LSA, Type 2 (the default)

Type 7 LSA, Type 1

Type 7 LSA, Type 2

share|improve this answer

In response to the edited question:

Hosts don't generate LSAs; routers do!

If you want to see all the types of LSAs (via show ip ospf database) you could do something like the following:

Type 1 LSA - Router LSA - Simple - enable the OSPF process and include at least one interface!

router ospf 1
 network 0.0.0.0 255.255.255.255 area 0

Type 2 LSA - Network LSA - Enable OSPF on a network interface that is multiaccess (most easily - ethernet) (note this command is simply an alternate way of enabling OSPF on an interface as compared to the above)

int fa0/0
 ip ospf 1 area 0

Type 3 LSA - Summary LSA

You'll need a type 1 LSA to cross an area boundary. Imagine R1 and R2 connected via an ethernet link.

R1:

int l0
 ip addr 1.1.1.1 255.255.255.255
 ip ospf 1 area 0

int fa0/0
 ip addr 10.12.1.1 255.255.255.0
 ip ospf 1 area 0

router ospf 1


R2:

int l0
 ip addr 2.2.2.2 255.255.255.255
 ip ospf 1 area 2

int fa0/0
 ip addr 10.12.1.2 255.255.255.0
 ip ospf 1 area 0

router ospf 1

Now sho ip ospf database on R1 - and you'll see the LSA for 2.2.2.2/32 as a Type 3 LSA!

I could go on with the rest of the types, not sure if this is helpful or not.

share|improve this answer

Sorry this is off the top of my head as I don't have any devices near my right now, but I think you can do this with a route map;

router ospf 123
 redistribute static subnets route-map RM-OSPF-REDIST
!
ip prefix-list PF-STATIC-AS-E1 seq 10 permit 192.168.0.0/24
!
ip route 192.168.0.0 0.0.0.255 1.1.1.1 name StaticRoute
!
route-map RM-OSPF-REDIST permit 10
 match ip address prefix-list PF-STATIC-AS-E1
 set metric-type type-1

If your version of IOS supports is (again, off the top of my head, so I can't remember which versions are supporting which features) you can just use;

router ospf 123
 redistribute static subnets metric-type 1

These (I believe) will both be LSA type 5 still.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.