Showing posts with label OSPF. Show all posts
Showing posts with label OSPF. Show all posts

Sunday, June 4, 2017

NSSA Translator Election & Forwarding Address

OSPF NSSA Translator Election & Forwarding Address 


  • RFC 3101
  • With OSPF NSSA, Type 7 NSSA External LSAs are translated to Type-5 External LSAs by the ABR connecting the NSA to Area 0.
  • When multiple ABRs connect the NSSA to area 0, the ABR with the highest router-id is elected as the Type7 to Type 5 translator.
CONFIGURATION

  • - Before changing anything, R5 has two ABRs routers which are R1 and R2 translated to Type 7 to Type 5,
  • Translator selection is based on router-id. In this network design, R2's router-id is higher than Rotuer 1. In fact, R2 elected as Type 7 to Type 5 translator.





OSPF Stub Router Advertisement

OSPF Stub Router Advertisement

  • This feature apply only stub areas routers which have  many forwarding routers to forward route to back bone or non-back bone areas
  • This feature causes the router to advertise a maximum metric for non-stub destinations, making it the worst cost path to all destinations
  • The result is that upon initializing the OSPF process, transit traffic will not flow through that stub router unless it is the only possible path.
  • The "max-metric router-lsa" synatx unconditionally withdraw forwarding route to other areas
  • Route from R5 must forward through R3 to R6.
  • R1 will drop the route from R5 when " max-metric router-lsa" feature apply to specific router
      
    • R1 apply this feature
      

    • R5 route forward through R3 to R6

    REFERENCE
    1. INE_WORKBOOK_OSPF_STUB_ROUTE_ADVERTISEMENT 
    2. CISCO_DOC_GUIDE_STUB_ROUTE_ADVERTISEMENT 


Monday, May 29, 2017

OSPF Layer 3

OSPF LSA Type-3 Filtering

  • LSA Type-3 Filtering extends the ability of an ABR that is running the OSPF protocol to filter type-3 link state advertisement (LSAs) that are sent between different OSPF areas
  • It allows only packets with specific prefixes to be sent from one area to another area and restricts all packets with other prefixes. 
  • It can be applied in or out of a specific OSPF area

GOAL

  • R1's loopback address 150.1.1.1 must not access from area 1' devices except ABR.
  • R1's other ip addresses must access from area's devices
  • Step- 1 Create prefix-list
  • Step- 2 Apply prefix-list to " under ospf routing process"

CONFIGURATION
Router2 (config) # ip prefix-list TEST seq 15 deny 150.1.1.1/32
Router2 (config) # ip prefix-list TEST seq 16 permit 0.0.0.0/0 le 32
Router2 (config) # router ospf 1
Router2 (config-router) # area 1 filter-list prefix TEST in

 Configuration at R2

 Verification R6 and R4 (Tried to ping 150.1.1.1)



Reference
Cisco OSPF Type3 LSA Filtering
INE_OSPF_Type3 Filtering





Sunday, May 28, 2017

OSPF Path Selection

OSPF Path Selection

  1. OSPF Cost Calculation ( RFC 2328 - section 16)
    1. Route LSAs include cost attribute for each link ( value 0 to 65535)
    2.  Lowest end-to-end cost
    3. Uses bandwidth based cost but per RFC ( arbitrary) 
      • OSPF uses bandwidth based cost
        • cost = Reference_BW/Interface_BW
        • Cost can be changed by
          • interface bandwidth ( under interface mode)
          • interface ip ospf cost ( under interface mode)
          • Process auto-cost ( under router ospf mode)
          • Process neighbor x.x.x.x cost xx ( under router ospf mode)
    4. Virtual links inherit their cost from SPT cost between the virtual link endpoints
      1. may exceed maximum link cost
  2. OSPF Path Selection Order
    1. Intra Area Routes (O)
    2. Inter Area Routes (OIA)
    3. External Type 1 ( E1)
    4. NSSA Type 1 ( N1)
    5. External Type 2 (E2)
    6. NSSA Type 2 ( N2) 
  3. Traffic Engineering OSPF Path Selection

Reference
IETF-RFC 2328
INE-OSPF-Path Selection




Sunday, May 14, 2017

OSPF DEMAND CIRCUIT

OSPF DEMAND CIRCUIT
  • IOS software release 11.2 ( RFC 1793)
  • This function maintain neighbor relationships and ensure that the link-state databases are accurate and use far less bandwidth 
  • OSPF Hellos and refresh of OSPF routing routing are suppressed on demand circuits
  • This feature allows low-speed internet services such as analog dial and ISDN, to run OSPF without the need of periodic hellos and LSA flooding
  • When a demand circuit is established a unique option bit (the DC bit) is exchanged between neighboring routers. If two routers negotiate the DC bit successfully they make a note of it and set a specific bit in LSA Age called the DoNotAge(DN).
  • This feature is enabled with the interface-level-command "ip ospf demand-circuit
How is OSPF Demand Circuit and Normal Circuit?
  • Two features of OSPF over demand circuit makes different from a normal circuit
    • Suppressed periodic hellos
    • Suppressed periodic LSA refresh 
      • In the demand circuit, the periodic LSA refresh occurs 
        • if change in network topology
        • if a router in the OSPF domain that can not understand demand circuits
 CONFIGURATION
Router (config) # interface xxx
Router (config-if) # ip ospf demand-circuit

Network Design


Configuration


Verification




Reference

Cisco OSPF Demand Circuit Configuration Guide
INE Lab Work Book - OSPF Demand Circuit





Saturday, May 13, 2017

OSPF Path Selection With Non Backbone Transit Areas

OSPF Path Selection with Non-Backbone Transit Areas
Transit Capability
  • OSPF area transit capability as the ability of the area to carry data traffic that neither originates nor terminates in the area itself.
  • OSPF ABR to discover shorter path from the transit area then forward traffic along those paths prefer over other paths
  • Usually routers always prefer the route transit through area 0 even though other shortest paths available without transiting through  area 0. By enabling transit capability which is default feature, it choose the shortest path through non backhone area.

Enable Transit Capability




CONFIGURATION
R1 (config) # router ospf 1
R1 (config-router) # area 1 virtual-link 150.1.6.6
R1 (config-router) # no capability transit

R6 (config) # router ospf 1
R6 (config-router) # area 1 virtual-link 150.1.1.1
R6 (config-router) # no capability transit


Disable Transit Capability 
After applying configuration, R6 choose R1,

  
Reference 




 



Wednesday, May 10, 2017

OSPF Route Filtering

OSPF ROUTE FILTERING

OSPF is a Link State IGP
  • Filter will apply very specific points within the OSPF topology
  •  It should filter mostly at area border router
  •  Some cases, can apply to routing table itself 
 Filter between Areas
  • Filtering within Summarization
    • When generating an area range, can set "do not advertise flag "
  • LSA Type-3 Filtering
    • Apply to ABR, taking Type 1 and 2 LSAs, summarizing the topology info 
    • And then select permit or deny them... "area filter list"
  • NSSA ABR External Prefix filtering
    • Do not set to P-bit, so will not able to translate Type7 to 5 
    • Multiple ABRs of the NSSA connecting to Area 0, need to check translator election
    • Based on Router ID, or configure "translate always" manual set for election
  • Transit prefix suppression
    •  Especially for MPLS vpn core, can suppress the transit prefixes in type 1 LSAs
Filter with OSPF RIB
  • Distribute-list with ACL
  • Distribute-list with Route-Map
  • Administrative Distance 

Useful Links

  1. Filtering With Route Map and Distribute List
  2. ABR Type 3 LSA Filtering 
  3. Forwarding Address Suppression in Translated Type-5 LSAs 
  4. Inbound Filtering Using Route Maps With A Distribute List 

 




PEN TESTING USEFUL TOOLS - FOCA

PEN TESTING USEFUL TOOLS FOCA ( Fingerprinting Organizations with Collected Achieves) FOCA is a tool used mainly to find leak information in...