Wednesday, June 1, 2011

notes: OSPF Passive interfaces & Originating routes & transit areas

Passive Interface
- The passive-interface with OSPF will prevent hello packets from exiting an interface and prevent the device from forming any adjacencies out the specified interface.
- This work differently to distance vector protocols like RIP, where routes will still be received, but not sent.
- To get the same effect of a distance vector protocols passive interface in OSPF,(ie. receive routes but don’t send routes) use: "ip ospf database-filter all out" under the interface.

commands:

- Prevents hello sent out an interface,
- Prevents forming of adjacencies out that interface

router ospf {pid}
passive-interface {int} 

- Block the flooding of OSPF LSA packets out the interface
- Filtering the outbound updates breaks RFC standards

interface s0/0
ip ospf database-filter all out

verification:

- Indicates passive-interface by "no hello"

show ip ospf interface


Originating routes

- 3 ways to originate route with OSPF

1.  "network area" command under the ospf process.

      router ospf 1
      network 10.0.0.0 0.255.255.255 area 0
   
             note:  do i  use the actual mask or links (0.0.0.0) - generally doesnt make a difference. it only matters when interface is PPP or PPPoFR

   side note on PPP and PPPoFR behavior        

-  PPP links will by default inject a /32 routes locally of the neighbor connected to ( this is a function of PPP negotiation. ( even u use /24 mask) in OSPF will generate two routes /24 and /32 so it is confusing. so just use the /32 (0.0.0.0) to avoid the extra /24 routes appear in the ospf database.

- May cause OSPF demand circuit to flap if routes are redistributed anywhere.
- May cause extra LSAs to be generated as they are seen as "connected" routes.
- use "no peer neighbor-route" to remove.

   so for ppp interface: instead of using "10.1.1.0 0.0.0.255" area 0 use "10.1.1.1 0.0.0.0 area 0"

2.  "ip ospf area" command under the interfaces. (Switches do not support this command)

      interface fa0/0
      ip ospf 1 area 0 or (0.0.0.0)

3.  Redistribution from connected interfaces, statics or other protocols.
     - Displayed as 'O*E1' or 'O*E2' routes in the RIB
     - The default seed metric is 20. The default metric type for redistributed routes is External Type 2 (E2), meaning the metric reflects only the cost from the redistributing router to the destination regardless of the path cost within the OSPF network. Type 1 (e1) can be optionally used, which means the metric will be based on the total path to the destination. Subnets are not redistributed by default. Following is the command for redistribution into OSPF:

redistribute protocol [process-id] [metric metric-value] [metric-type type-value] [route-map map-tag]\[subnets] [tag tag-value]

The subnets keyword is critical in this command and specifies that subnets should indeed be redistributed. The
tag value enables the administrator to configure an optional tag value that can be used later to easily identify these routes.

Robinson(config-router)#redistribute ?
  bgp             Border Gateway Protocol (BGP)
  connected       Connected
  eigrp           Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis            ISO IS-IS
  iso-igrp        IGRP for OSI networks
  maximum-prefix  Maximum number of prefixes redistributed to protocol
  metric          Metric for redistributed routes
  metric-type     OSPF/IS-IS exterior metric type for redistributed routes
  mobile          Mobile routes
  odr             On Demand stub Routes
  ospf            Open Shortest Path First (OSPF)
  rip             Routing Information Protocol (RIP)
  route-map       Route map reference
  static          Static routes
  subnets         Consider subnets for redistribution into OSPF
  tag             Set tag for routes redistributed into OSPF


Transit Areas
- by default OSPF allows transit through areas for shortcuts.
- to change this behavior by forcing all packets must go back through area0 (sub-optimal)

command sets:

router ospf 1
no capability transit

 note:  OSPF v1 - all packets must go through area0.
          OSPF v2 - all LSAs must go to area 0.

No comments:

Post a Comment