OSPF Lab Tips

  • When peering between a router and a switch, use ip/ipv6 ospf mtu-ignore under the interface otherwise adjacency may be stuck in the exstart state.
  • Good practice is to manually set the router ID e.g. 1.1.1.1 for R1.
  • Make the frame-relay hub the ip ospf priority 255 and the spokes ip ospf priority 0
  • Use neighbour statements on the HUB or point-to-multicast network type when dealing with OSPF over Frame-Relay. The latter will show the hub as the next-hop where as neighbour statements won’t.
  • Virtual-Links will be treated as area 0 so do not forget authentication for area 0 etc for the virtual links.
  • auto-cost reference-bandwidth is the command to use to change globally how OSPF allocate cost to various interface speed e.g. 10Mbps, 100 Mbps etc. Usually Auto-cost Reference-bandwidth / Interface bandwidth will EQUAL OSPF Cost This can be verified with show ip ospft interface and look at cost to see if it has been changed. This will need to be done on EVERY OSPF ROUTER.
  • Anything really to do with LSA can been seen with show ip ospf and configured at the router-process with timers lsa arrival and timers pacing
  • Use domain-id to connect two different OSPF processes to appear at inter-area routes rather than external routes.
Advertisements

OSPF Written Notes

These are my ‘crib notes’ that I’ve made to serve as a last minute refresher. Please forgive the grammer / spelling as I did not develop these notes with publishing in mind.

OSPF

*** Theory ***

  • OSPF hello Multicast address is 224.0.0.5
  • OSPF DR and BDR Multicast address is 224.0.0.6
  • DBD – Database Description – Packets used to exchange the link state database. Once done, SPF is performed.
  • Hello packet contains the following (bolded are ones that must match to form a relationship): Router ID, Area ID, Address of originating interface, Authentication Information, Hello Interval, Dead Interval, priority, DR & BDR ID, Neighbour router ID
  • OSPF Networks                – Hello timers etc are different for each network
    • Point to point: two routers, no DR or BDR election. All updates sent to 224.0.0.5.
      • Timers: Hello 10, Dead 40, Wait 40
  • Broadcast (default for Ethernet): Rather then form relationships with every router, each router forms relationship with DR and BDR to avoid insufficient full mesh. DR keeps topology upto date.
    • Timers: Hello 10, Dead 40, Wait 40
  • NBMA (default for point-to-multipoint): Statically define all neighbours using the neighbour ip command only on the hub router and send hello via unicast not multicast. DR must be connected to all neighbours so usually the hub not spokes. Relationships may take around 45 seconds to form!
    • Conf-if: ip ospf priority 255 to make sure hubs is the DR
    • Conf-if: ip ospf priority 0 to make sure spokes do not participate in elections
    • Timers: Hello 30, Dead 120, Wait 120
  • Point to Multipoint: No DR election and messages are multicasted. Treats each link as point to pont, sends hello down each dlci  – Preferred network type.
  • DR/BDR elections
    • Init: lists eachother as neighbours. Stays in init state if core fields don’t match
    • 2way: DR/BDR election
    • ExStart: Exchange of DBD
    • Full state: Proper relationship
      • Conf-if: ip ospf priority 255 to make sure hubs is the DR
      • Conf-if: ip ospf priority 0 to make sure spokes do not participate in elections
      • Area types
        • Area 0 (Back bone) – all areas connect to this
        • Stub area – blocks external routes e.g. RIP etc (blocks type 5 LSA)
        • Totally stub – blocks external routes and routes from other areas as ABR generates default route to all other internal routers (blocks Type 3,4,5 LSA) – blocks inter-area
          • Must only do area 3 stub no-summary on ABR only
  • routers and just only keep intra-area routes
  • NSSA – When a stub has a ASBR (e.g. acquired another company), uses Type 7 LSA
  • Totally stubby not so stubby area – same as NSSA?
  • Router types
    • Internal – inside an area
    • Backbone – Internal router in Area 0
    • Area Border – 2 or more interfaces connected to 2 more areas – Only router that can do summarisation!
    • Autonomous system boundary – 1 or more interfaces connected to external networks
    • LSA Types
      • LSA 1 – Routing update to DR
      • LSA 2 – routing update from DR to all internal in area
      • LSA 3 – Generated by ABR (Summarisation route)
      • LSA 4 – IP Address of ABR
      • LSA 5 – External routes generated by ASBR
      • LSA 7 – generated by NSSA to get to stub routers that generally block Type 5 LSA – Kind of like encapsulation as type 7 and then into type 5 when back in stub area, like a bandage
      • Route tables
        • IA – Inter-Area route
        • External type 1 – metric will increment per hop
        • External type 2 – metric will remain the same per hop
        • Best practice: Set router-id to router name for ease of logs etc
        • Summarisation: area 0 range 172.16.0.0 255.255.0.0  – do at ABR to summarise routes from one area to another
          • Summary-address – use this to summarise external routes
          • Tag – tag routes so for example in redistribution you can filter on another router based on tag!
          • Virtual Link
            • Create on the transit router e.g. R1-R6-R7. R6 is the transit area.
            • On the transit router do it on the area directly connected to area 0 e.g. area 1
            • Create with neighbour ID not the ip address
            • Partner virtual link is going to be with the router  connected in area 0 e.g. R1
            • Redistribution
              • Always set an access list with routes you want to redistribute and TAG them
              • Do it both ways or you might not be able to ping etc even if it shows in the routing table
              • When redistributing ospf into another protocol, it good to match it to internal routes only as this will prevent routing loops
              • Default-information redistribute always – advertises a default route to all ospf neighbours. Always will advertise even if that router looses it’s default route
              • Authentication
                • Config-router# Area 0 authentication message digest
                • Config-subif# ip ospf message-digest-key 1 (number of keys) md5 cisco (name)
                  • Becareful of spaces in password when hitting return
                  • Must do this for virtual links too if necessary

Route Redistribution Crib Notes

These are my ‘crib notes’ that I’ve made to serve as a last minute refresher. Please forgive the grammer / spelling as I did not develop these notes with publishing in mind.

Route Redistribution

***theory***

  • IGRP – Automatically redistributes with EIGRP under the same AS number
  • RIP – You must specify a seed metric other it takes it as 16 – invalid
    • E.g. Redistributed connected metric 2
    • OSPF – Default seed metric is 20 and type E 2, unless it BGP then the metric is 1
      • E.g. redistributed connected subnets
      • Must use subnets in order to get the subnets
      • Type 2 – fixed cost from ABR to destination (default)
      • Type 1 – Cost from local router
      • Default-Information Originate
        • Always – ASBR will always be Default route
        • Not always – ASBR will be default route only if default route is in routing table
        • EIGRP – When redistributing you must specify the 5 k or use default metric
        • Pitfalls – if you see a route in the table, it may not be able to reply if no 2-way redis
        • No seed metric on default for RIP, IGRP, EIGRP, ISIS is 0 – YOU MUST SPECIFY
        • Best Practice – redistribute connected
        • Sub optimal routing: Change AD, Route Metric and use distribute lists
        • Show IP protocols – best for route redistribution & verify on ASBR

  • Route Map: can be used for Policy Based Routing.  Andy DENY clause does not drop packets. If you want to drop it, match the IP address and set interface to null0
  • Passive Interfaces – Accepts routing updates but do not send them
    • OSPF – This will stop the interface from forming a relationship i.e. no hellos
  • Null0 – appear in routing table after manual route summarisation.
  • Distribute list – ACL used for route filtering