Friday, March 20, 2015

CCIE OCG: OSPF (Chapter 9), Part III

OSPF Configuration

The example configuration has the following design goals in mind:
  • The OSPF process IDs do not have to match on separate routers, but best practice recommends using the same process IDs across the network.
  • Using the network command to match interfaces.
  • Configuring S1's RID as 1.1.1.1.
  • Setting priorities on the backbone LAN to favor S1 and S2 to become the DR/BDR.
  • Configuring a minimal dead interval of 1 second, with Hello multiplier of 4, yielding a 250-ms Hello interval on the backbone LAN.


R1#
interface FastEthernet0/0
  ip address 10.1.1.1 255.255.255.0
  ip ospf dead-interval minimal hello-multiplier 4
!
router ospf 1
  area 3 nssa no-summary
  area 4 stub no-summary
  area 5 stub
  network 10.1.0.0 0.0.255.255 area 0
  network 10.3.0.0 0.0.255.255 area 3
  network 10.4.0.0 0.0.255.255 area 4
  network 10.5.0.0 0.0.255.255 area 5

R2#
interface FastEthernet0/0
  ip address 10.1.1.2 255.255.255.0
  ip ospf dead-interval minimal hello-multiplier 4
  ip ospf 2 area 0
!
router ospf 2
  area 5 stub

R3#
router ospf 1
! R3 should omit the no-summary keyword, because R3 is not an ABR.
  area 3 nssa
  network 10.0.0.0 0.255.255.255 area 3

R4#
router ospf 1
  area 4 stub
  network 10.0.0.0 0.255.255.255 area 4

S1#
interface Vlan1
  ip address 10.1.1.3 255.255.255.0
  ip ospf dead-interval minimal hello-multiplier 4
  ip ospf priority 255
!
router ospf 1
  router-id 7.7.7.7
  network 10.1.0.0 0.0.255.255 area 0

S2#
interface Vlan1
  ip address 10.1.1.4 255.255.255.0
  ip ospf dead-interval minimal hello-multiplier 4
  ip ospf priority 254
!
router ospf 1
  network 10.0.0.0 0.255.255.255 area 0



OSPF Costs and Clearing the OSPF Process

How OSPF chooses OSPF interface costs:
  1. Set the cost per neighbor using the neighbor <ip-add> cost <value> command. This is only valid on OSPF point-to-multipoint non-broadcast network types.
  2. Set the cost per interface using the ip ospf cost <value> under the interface.
  3. Allow the cost to default based on interface bandwidth and the OSPF Reference Bandwidth (Ref-BW) (default 10^5 Kbps). The formula is Ref-BW / bandwidth (Kbps).
  4. Default based on bandwidth, but change Ref-BW using the auto-cost reference-bandwidth <value> command within the OSPF process.
  5. The IOS interface bandwidth is kept in Kbps and the auto-cost reference-bandwidth units are Mbps.
  6. When choosing the best routes to reach a subnet, OSPF also considers whether a route is intra-area route, inter-area route, E1/N1 route, or E2/N2 route.

Alternatives to the OSPF network Command

  • As of Cisco IOS Software Release 12.3(11)T, OSPF configuration can completely omit the network command, instead relying on the ip ospf <pid> area <area-id> interface subcommand.
  • With the network command, OSPF advertises stub networks for any secondary IP subnets that are matched by the command.
  • The ip ospf area interface subcommand causes any and all secondary subnets on the interface to be advertised as stub networks - unless the optional secondaries none parameter is included.
  • Regardless of the network or ip ospf area command, OSPF will always establish adjacencies over an interface only using the primary IP address. OSPF will never use secondary addresses to establish an adjacency.


OSPF Filtering

  • Intra-area route filtering presents some special challenges with link-state routing.
  • Link-state protocols do not advertise routes - they advertise topology information.
  • SPF loop prevention relies on each router in the same area having an identical copy of the LSDB for that area.
  • Only the router that has originated an LSA is ever allowed to modify its contents.
  • Three major types of OSPF filtering:
  1. Filtering routes, not LSAs: Using the distribute-list command, a router can filter the routes that its SPF process is attempting to add to its routing table, without affecting the LSDB.
  2. ABR Type 3 LSA filtering: A process of preventing an ABR from creating particular Type 3 summary LSAs.
  3. Using the area range no-advertise option: Another process to prevent an ABR from creating specific Type 3 summary LSAs.

Filtering Routes Using the distribute-list Command

  • For RIP and EIGRP, the distribute-list command can be used to filter incoming and outgoing routing updates.
  • With OSPF, the distribute-list in command filters what ends up in the IP routing table, and only on the router on which the command is configured.
  • Note that the redistribute command does control what enters and leaves the LSDB.
  • The following rules govern the use of distribute-lists for OSPF:
  1. The inbound direction applies to the results of SPF - the routes to be installed into the routing table.
  2. The outbound direction applies only to redistributed routes and only on an ASBR; it selected which redistributed routes shall be advertised.
  3. The inbound logic does not filter inbound LSAs; it instead filters the routes that SPF chooses to add to the routing table.
  4. If the distribute-list includes the incoming interface parameter, the incoming interface is checked as if it were the outgoing interface of the route.
  • The distribute-list route-map allows a much greater variety of matching parameters, and much more detailed logic.


OSPF ABR LSA Type 3 Filtering

  • ABRs do not forward Type 1 and 2 LSAs from one area into another, but instead create Type 3 LSAs for each subnet defined in Type 1 and 2 LSAs.
  • Type 3 LSAs do not contain detailed information about the topology of the originating area; instead, each Type 3 LSA represents a subnet, and a cost from the ABR to that subnet.
  • Type 3 LSAs can be filtered where they would normally be created.
  • By filtering at the ABR, before the Type 3 LSA is injected into another area, the requirement for identical LSDBs inside the area can be met, while still filtering LSAs.
  • Configured using the area <area-id> filter-list prefix <name> in|out command.
  • When in is configured, IOS filters prefixes going into the configured area.
  • When out is configured, IOS filters prefixes coming out of the configured area.


Filtering Type 3 LSAs with the area range Command

  • The area range command performs route summarization at ABRs, telling a router to cease advertising smaller subnets in a particular address range, instead creating a single type 3 LSA whose address and prefix encompass the smaller subnets.
  • When the area range command includes the not-advertise keyword, not only are the smaller component subnets not advertised as type 3 LSAs, but the summary route is also not advertised as a type 3 LSA either.
  • As a result, this command has the same effect as the area filter-list command with the out keyword, filtering the LSA from going out to any other areas.


Virtual Link Configuration

  • OSPF requires that each non-backbone area be connected to the backbone area (area 0).
  • OSPF virtual links overcome the limitation of needing a physical connection to the backbone.
  • A virtual link allows a pair of possibly remote routers to create a targeted OSPF session across the IP network.
  • A virtual link endpoint becomes an ABR, with a full copy of area 0's LSDB entries.
  • A virtual link is not a tunnel for data packets; rather, it is a targeted session that allows two remote routers within a single area to become fully adjacent and synchronize their LSDBs.
  • The virtual link is internally represented as an unnumbered point-to-point link between the two endpoint routers and exists in the backbone area, regardless of the area through which it is created.
  • The area through which the virtual link is created is called a transit area and it must be a regular area.
  • As no tunneling is involved, packets routed through this transit area are forwarded based on their true destination addresses, requiring the transit area to know all networks in the OSPF domain, intra-area, inter-area, and external.
  • The area virtual link commands point to the other router's RID, and the transit area over which the virtual link exists.
  • Timers and authentication can be set on the area virtual-link command.
  • It is important to remember that the virtual links themselves are in area 0.

R1#
router ospf 1
  router-id 1.1.1.1
  area 3 virtual-link 3.3.3.3

R3#
router ospf 1
  router-id 3.3.3.3
  area 3 virtual-link 1.1.1.1



Configuring Classic OSPF Authentication

  • Classically three authentication types: none, clear-text, and MD5.
  • SHA-1 recently added (new configuration).
  • Classic OSPF authentication differs significantly from RIPv2 and EIGRP.
  • The basic rules for configuring OSPF authentication are as follows:
  1. Three types available: type 0 (none), type 1 (clear text), and type 2 (MD5).
  2. Enabled per interface using the ip ospf authentication interface subcommand.
  3. The default authentication is type 0 (no authentication).
  4. The default can be redefined using the area authentication under the OSPF process.
  5. The keys are always configured as interface subcommands.
  6. Multiple MD5 keys with different key IDs are allowed per interface, which allows for graceful key migration where a new key can be added without disrupting the adjacencies. The method is simple: To sign sent packets, OSPF always uses the key that was added as the last one on the interface (regardless of the key number). To authenticate the received packets, it uses the key ID that is indicated in the packet.
  • The keys are stored in clear text in the configuration, unless the service password-encryption command is added.

Configuring Extended Cryptographic OSPF Authentication

  • Starting with IOS Release 15.4(1)T, OSPF also supports SHA-HMAC authentication.
  • SHA-HMAC uses key chains similarly to EIGRP or RIPv2.
  • In addition, the key chain definition has been enhanced to select a particular cryptographic algorithm for a particular key.
  • Each key in the key chain must have a cryptographic algorithm configured using a per-key cryptogprahic-algorithm command. Failure to do so will result in OSPF not using that key.
  • Each key in a key chain can be configured with the send-lifetime and accept-lifetime keywords to limit its usability to a particular timeframe. If multiple keys in the key chain are eligible to sign egress packets, the key with the highest key ID will be used. This is different from RIPv2 and EIGRP that select the key with the lowest key ID.
  • The key rollover procedure as used by classic OSPF is not used with key chains. To sign egress packets, OSPF will always use the valid key with the highest key ID in the key chain. To authenticate ingress packets, OSPF will try to use the key indicated in the received packet. There is no key migration pahse of sending multiple OSPF packets signed with different valid keys.
  • The extended cryptographic authentication is enabled per interface using the ip ospf authentication key-chain <name>. Configuring the extended cryptographic authentication using the area OSPF process level command is not supported.
  • Using the extended cryptographic authentication on virtual links is accomplished using the area <area-id> virtual-link <router-id> key-chain <name>.
  • MD5 authentication is one of the supported cryptographic algorithms in key chains. An OSPF router configured for MD5 authentication using the classic commands will be able to interoperate with a router configured using the new key chain style, provided the cryptographic algorithm for the keys in the key chain is MD5. When the new key chain style configuration is used, passwords configured with the ip ospf message-digest-key commands will be ignored.

key chain OSPF
 key 1
  cryptographic-algorithm hmac-sha-256
  key-string CC1E
!
interface GigabitEthernet0/0
 ip ospf authentication key-chain OSPF

R1# show ip ospf interface gi0/0
GigabitEthernet0/0 is up, line protocol is up
! Lines omitted for brevity.
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.0.12.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
Cryptographic authentication enabled
Sending SA: Key 1, Algorithm HMAC-SHA-256 - key chain OSPF

  • OSPF authentication is a good place for tricky CCIE lab questions - ones that can be solved in a few minutes if you know all the intricacies.

Protecting OSPF Routers with TTL Security Check

  • Protection against DoS attacks on the control plane.
  • Receiving an OSPF packet outside a virtual link or sham link with its TTL less than 255 is a possible indication of a malicious activity. Such packets can be dropped.
  • Activated either on a per-interface basis using the ip ospf ttl-security interface level command, or globally for all interfaces in a particular OSPF process using the ttl-security all-interfaces command.
  • If activated globally, individual interfaces can be exempted using the ip ospf ttl-security disable interface level command.
  • When active, all OSPF packets sourced by that interface have their TTL set to 255, and only packets received with a TTL of 255 are accepted.
  • Both commands have an optional hops <1-254> argument that allows relaxing the TTL Security Check.
  • Setting the hop-count to a particular value makes the TTL Security Check accept OSPF packets with their TTL in the range from 255 down to 255 - hop-count.
  • If ttl-security all-interface hops 100, OSPF accepts all packets with their TTL in the range from 255 down to 155, inclusive.
  • Setting the hop-count to 254 effectively disables the TTL Security check.
  • If the hop-count is not specified, the value of 1 is automatically assumed.
  • The hop-count influences what OSPF packets will be accepted; it has no impact on the TTL of OSPF packets originated by the router, which will remain at 255.
  • The minimum hop-count of 1 might be surprising, considering that OSPF packets sourced by directly connected neighbors will have their TTL set to 255, and there is no reason to allow OSPF packets with a TTL of 254.
  • However, IOS-based Cisco routers exhibit a peculiar behavior in that they appear to decrement the TTL received OSPF packets before handling them over to the OSPF process.
  • Whenever an OSPF packet is received by a router, its TTL is first decremented by 1 (this decrement is skipped if the packet's TTL is equal to 1), and the packet is then passed to OSPF and to TTL Security Check, which will act based on this decremented TTL value.
  • Neither the ttl-security all-interface nor the ip ospf ttl-security have any impact on configured virtual or sham links.
  • The protection is activated with the area virtual-link ttl-security hops or the area sham-link ttl-security hops command. The hop-count argument is mandatory.
  • The hop-count value should be based on the longest possible intra-area path (in terms of number of routers) between the link endpoints.
  • Interfaces toward routers that do not support TTL Security Check shall be configured with the ip ospf ttl-security disable command.

Tuning OSPF Performance

Apart from Hello and Dead timers, OSPF can be significantly tuned in many other ways.

Tuning the SPF Scheduling with SPF Throttling

  • After a router receives an updated LSA, it needs to schedule its SPF to process the update.
  • It is ideal to wait some time for more updated LSAs to arrive, and process multiple updates in a single run.
  • By default, Cisco routers will schedule an SPF run 5 seconds after receiving an updated LSA, and if an updated LSA arrives after this SPF run, the subsequent delay will grow up to 10 seconds.
  • The scheduling of SPF runs can be controlled by a feature called SPF Throttling.
  • SPF Throttling defines a variable-length wait interval between two consecutive SPF runs.
  • Three parameters: spf-start, spf-hold, and spf-max-wait.
  • spf-start defines the initial wait interval before an SPF computation.
  • spf-hold defines a wait time between subsequent SPF runs, and its value doubles for each consecutive SPF run.
  • spf-max-wait is the maximum time between two SPF runs (doubling the spf-hold value is capped at spf-max-wait), and also defines a period during which the network must be stable for the wait interval to be set back to spf-start and the spf-hold to its preconfigured value.
  • If the network has been stable for the last spf-hold period but not for the entire spf-max-wait since the last SPF run, the wait interval returns to the spf-start value but the subsequent wait will still be set to twice the previous spf-hold value.
  • Example (spf-start = 10 sec, spf-hold = 15 sec, and spf-max-wait = 100 sec):
  1. An updated LSA arrives at time T. The router schedules the nearest SPF run at T+10.
  2. Another updated LSA arrives at time T+2. The router stores it in its LSDB and continues waiting.
  3. At T+10, the router runs the SPF and sets the next wait interval to 15 secs (spf-hold). If another updated LSA arrives within 15 seconds since this SPF runs, the nearest SPF will be run at T+25.
  4. One or more updated LSAs indeed arrive between T+10 and T+25. At T+25, the router runs the SPF and sets the next wait interval to twice the previous spf-hold value, that is, 30 sec. If another updated were to arrive within 30 seconds since this SPF run, the nearest SPF will be run at T+55. The network is considered stable if no topology change is detected within 100 seconds since this SPF run, that is, until T+125.
  5. During the next 30 seconds, no updated LSAs arrive. The wait interval is reset back to spf-start, that is, 10 seconds. The nework is not considered stable, though, because 100 seconds since the last SPF has not elapsed yet; therefore, spf-hold remains at 30 seconds.
  6. At T+80, an updated LSA arrives. The router schedules the nearest SPF run at T+90 and waits until this period expires.
  7. At T+90, the router runs SPF and sets the next wait interval to twice the previous spf-hold value, that is, 60 seconds. If another updated LSA arrives within 60 seconds since thi SPF run, the nearest SPF will be run at T+150. The network wil be considered if no topology change is detected within 100 seconds since this SPF run, that is, until T+190.
  8. During the next 60 secs, no updated LSAs arrive. The wait interval is reset back to spf-start, that is, 10 sec. The nework is not considered stable, though, because 100 seconds since the last SPF has not elapsed yet; therefore, spf-hold remains at 60 secs.
  9. No updated LSA arrives till T+190. As a result, the network is considered stable and the spf-hold is set to its initial value of 15 secs. Any topology change detected after this moment will be handled like the beginning of this scenario.
  • Configuration: timers throttle spf <spf-start> <spf-hold> <spf-max-wait>.
  • All arguments are indicated in milliseconds.


Tuning the LSA Origination with LSA Throttling

  • Control the rate at which a particular LSA might be reoriginated by its originating router.
  • The same idea as with SPF Throttling.
  • Three parameters: start-interval, hold-interval, and max-interval.
  • The hold-time will be reset to its configured value only if the LSA was not required to be updated for the entire max-interval since its last update.
  • By defaul, Cisco routers are configured to originate an updated LSA immediately and delay its subsequent origination by 5 seconds and not to progressively increase this interval.
  • start-interval = 0, hold-interval and max-interval = 5000 milliseconds.
  • Configuration: timers throttle lsa all <start-interval> <hold-interval> <max-interval>.
  • The values are again expressed in milliseconds.
  • A router can also be configured to ignore the same LSA upon arrival if it appears to arrive too often.
  • Configuration: timers lsa arrival <msec>.
  • If two or more same LSAs arrive less than <msec> apart, only the first one is accepted an the remaining LSAs are dropped.
  • The default setting is 1000 milliseconds.
  • Obviously, the value of the minimum LSA arrival interval should be smaller than the neighbor's initial hold interval in LSA throttling.
  • Otherwise, a neighbor would be allowed to send an updated LSA sooner than this router would be willing to accept it.


Incremental SPF

  • The SPF calculation can be augmented so that after a topology change only the affected part of the shortest-path tree is recalculated.
  • Activated using the simple ispf command (no additional arguments or parameters).

router ospf 1
 ispf


OSPFv2 Prefix Suppression

  • Maintaining transit link prefixes in LSDBs and routing table is, at least from the connectivity standpoint, largely useless.
  • Not advertising these prefixes can possibly save a significant amount of memory and CPU cycles without impairing the network connectivity.
  • Suppressing transit link prefixes is different for Type 1 and Type 2 LSAs.
  • Keep in mind that the goal of this mechanism is to suppress transit link prefixes, that is, the IP network addresses used on these links, not the transit links themselves.
  • Transit links describe the connections between routers and must continue to be advertised; otherwise, SPF would be unable to construct the shortest-path tree.
  • Type 1 LSA describes a router and its adjacencies (links) to its neighboring objects.
  • There are four possible link types that can be described by a Type 1 LSA:
  1. Point-to-point link to another router: This is a transit link pointing toward the other router's RID. It contains no addressing information and will not be influenced by the prefix suppression mechanism.
  2. Link to a transit network: This is a transit link pointing toward the transit network's DR IP address. While it refers to an IP address of the DR, it contains no further addressing information such as network mask, and will not be influenced by the prefix suppression mechanism.
  3. Stub network: This entry describes the IP prefix used either in a true stub network or a prefix used on a point-to-point link to another router. A router can suppress all stub network entries in a Type 1 LSA that correspond to IP prefixes used on point-to-point links.
  4. Virtual router: This is a virtual transit point-to-point link pointing toward a virtually adjacent router's RID. It contains no addressing information and will not be influed by the prefix suppression mechanism.
  • Therefore, in Type 1 LSAs, suppressing the transit link prefixes is accomplished by omitting stub network entries that contain prefixes on point-to-point interfaces to other routers.
  • The IP prefix of the network can be computed by bitwise ANDing the Link State ID of the LSA and the netmask carried in its payload. Neither of these two fields can be removed from the type 2 LSA without making its format incompatible.
  • To routers that implement RFC 6860, a Type 2 LSA advertising the netmask of 255.255.255.255 is a signal that the LSA contains no IP prefix information. Routers not implementing this RFC will install a host route toward that network’s DR. While the advantage of saving routing table space is lost on such routers, no interoperability issues will be introduced.
  • Configuration: prefix-suppression under the OSPF process.
  • This command will cause the router to suppress all prefixes on all its OSPF-enabled interfaces except loopbacks, secondary IP addresses, and prefixes on passive interfaces.
  • Also possible to active on a per-interface basis: ip ospf prefix-suppression.
  • If the prefix suppression is activated globally, the interface is exempted by using the ip ospf prefix-suppression disable command.

OSPF Graceful Restart (GR)

  • Allows a router to restart while its neighbors continue to forward packets to the restarting router as if it was up and running.
  • "routing through a failure" vs. "routing around a failure"
  • Cisco implemented its own version of graceful restart before RFC 3623 that is called Non-Stop Forwarding (NSF).
  • Cisco supports both NSF and GR; both area configured using nfs commands.
  • Two classes of devices involved in GR/NSF.
  • restart mode = the router undergoing the graceful restart.
  • helper mode = its directly connected neighbors.
  • The neighbors must ignore the lack of Hellos for an indicated grace period, continue to consider the router fully adjacent and report it as fully adjacent in their Type 1 and 2 LSAs, and continue to consider the router a DR for the segment if it was elected as the DR before the graceful restart.
  • Neighbors pretend that the router undergoing a graceful restart is up and running.
  • Only routers with specific hardware can perform the graceful restart themselves because of the obvious need to have forwarding hardware autonomous and independent from the main CPU.
  • NSF-aware device can act only as a helper device.
  • NSF-capable device can act as a helper device and also perform a graceful restart themselves.
  • The following conditions must be true:
  1. The router's hardware construction allows the control plane to restart while the line cards continue to forward packets based on the last version of their forwarding database.
  2. The router whose OSPF process is restarting must notify its neighbors that the restart is happening by sending a "grace LSA", which is a Type 9 opaque LSA with link-local flooding scope, containing the estimated duration of restart (the grace period), the reason of the restart, and on multiaccess networks, the IP address of the restarting router.
  3. The LSA database remains stable during the restart.
  4. All the neighbors support, and are configured for, graceful restart helper mode.
  5. The restart takes place within a specific grace period.
  6. During restart, the neighboring fully adjacent routers must operate in helper mode.
  • Both Cisco and IETF NSF awareness are enabled by default in Cisco IOS.
  • Disable: nsf [cisco | ietf] helper disable under the routing process.


OSPF Graceful Shutdown

  • Allows the OSPF process to update the neighbors that the router is going down.
  • Using a simple shutdown command under the OSPF process, the router will immediately:
  1. Drop all OSPF adjacencies.
  2. Flush all LSAs it has originated (flood them with the MaxAge 3600 seconds).
  3. Send out Hello packets to its neighbors with the DR/BDR fields set to 0.0.0.0 and an empty neighbor list, prompting the neighbors' adjacency states to fall back to the Init state.
  4. Stop sending and receiving OSPF packets.
  • Also on a per-interface basis: ip ospf shutdown.
  • In that case, the router will immediately:
  1. Drop all OSPF adjacencies over that particular interface.
  2. Flood updated LSAs that no longer include that particular interface and adjacencies through other interfaces if any.
  3. Send the neighbors' adjacencies to the Init state.
  4. Stop sending and receiving OSPF packets over that particular interface.
  • Revert back by removing the shutdown or ip ospf shutdown command.

Monday, February 9, 2015

CCIE OCG: OSPF (Chapter 9), Part II

OSPF Design and LSAs

  • Most OSPF design choices directly impact the LSA types in a network and impose restrictions on which neighbors can exchange those LSAs.

OSPF Design Terms

  • Area Border Routers (ABRs) = Routers that connect to different areas.
  • ABRs must connect to area 0, the backbone area, and to one or more other areas.
  • Only a router that is actively attached to multiple areas, including the backbone area, considers itself an ABR and performs the appropriate functions.
  • A router actively attached to multiple areas but not to the backbone area does not consider itself an ABR and does not act like one.
  • Autonomous System Boundary Routers (ASBRs) inject external routes into the OSPF domain.
  • OSPF keeps an independent and separate LSDB for each area to which it is connected.
  • By default, the contents of per-area LSDBs are completely isolated. One LSDB does not leak into another.
  • Only the ABR can translate and carry information between the areas in a controlled way.
  • The SPF is run in each LSDB separately, and the results are combined into the routing table subject to the OSPF path preference rules.
  • Using OSPF areas provides the following benefits:
  1. Generally smaller per-area LSDBs, requiring less memory.
  2. Faster SPF computation.
  3. A link failure in one area only requires a partial SPF computation in other areas.
  4. Routes can be summarized and filtered only at ABRs.
  • The number of routers and subnet does not shrink in multiarea OSPF design, but the LSDB does.
  • An ABR does not pass denser and more detailed Type 1 and 2 LSAs between areas - instead, Type 3 LSAs are passed.

OSPF Path Selection Process

  • OSPF always chooses an intra-area route over an inter-area route for the same prefix, regardless of metric.
  • ABRs ignore Type 3 LSAs learned in a non-backbone area during SPF calculation.


LSA Types

  • Only a router that has originated a particular LSA is allowed to modify or withdraw it.
  • Other routers must process and flood this LSA, but they must never change its contents, block it, or drop it before its maximum lifetime has expired.
  • This makes sure that all routers in an area have the same LSDB contents and the same view of the network.
  • Summarization and route filtering can be done in very limited fashion vs. distance vector protocols where these functions can be performed at any point in the network.

Type 1 LSA - Router

  • One per router per area, listing the router's RID and all interface IP addresses in that area.
  • Represents stub networks as well.
  • Flooded only within its area of origin.

Type 2 LSA - Network

  • One per transit network.
  • Created by the DR on the subnet, and represents the subnet and the router interfaces connected to the subnet.
  • Flooded only within its area of origin.

Type 3 LSA - Net Summary

  • Created by ABRs to represent networks in one area when advertised into another area.
  • Defines the subnets in the origin area, and cost, but no topology data.
  • Flooded only within its area of origin; reoriginated on ABRs.

Type 4 LSA - ASBR Summary

  • Like Type 3 LSA, except it advertises a host route used to reach an ASBR.
  • Flooded only within its area of origin; reoriginated on ABRs.

Type 5 LSA - External

  • Created by ASBRs for external routes injected into OSPF.
  • Flooded to all regular areas.

Type 6 LSA - Group Membership

  • Defined for MOSPF.
  • Not supported by Cisco IOS.

Type 7 LSA - NSSA External

  • Created by ASBRs inside an NSSA, instead of a Type 5 LSA.
  • Flooded only within its area of origin; converted to Type 5 LSA on an ABR toward other areas.

Type 8 - External Attributes

  • Created by ASBRs during BGP-to-OSPF redistribution to preserve BGP attributes of redistributed networks.
  • Not implemented in Cisco routers.

Type 9-11 LSAs - Opaque

  • Used as generic LSAs to allow for easy future extension of OSPF. For example, Type 10 LSA has been adapted for MPLS traffic engineering.
  • These LSAs have different flooding scope: Type 9 has link-local flooding scope, Type 10 has area-local flooding scope, and Type 11 has autonomous system flooding scope equivalent to the flooding scope of Type 5 LSAs (not flooded into stubby areas or NSSAs).

  • Transit network: A network over which two or more OSPF routers have become
    neighbors and elected a DR so that traffic can transit from one to the other.
  • Stub network: A subnet on which a router has not formed any neighbor relationships.


LSA Types 1 and 2

  • Each router creates and floods a Type 1 LSA for itself.
  • These LSAs describe the router, its interfaces (in that area), and a list of neighboring routers (in that area) on each interface.
  • Identified by a link-state ID (LSID) equal to that router's RID
  • Type 2 LSA represents a transit subnet for which a DR has been elected.
  • The LSID is the interface IP address on that subnet.
  • Type 2 LSAs are not created for subnets on which no DR has been elected.
  • Armed with an LSDB with all the Type 1 and 2 LSAs inside an area, the SPF algorithm is able to create a topological graph of the network, calculate the possible routes, and finally choose the best routes.
  • The Type 2 LSA includes references to the RIDs of all routers that are currently neighbors of the DR on that subnet. That information, combined with the Type 1 LSAs for each router connected to the subnet represented by the Type 2 LSA, allows SPF to construct an accurate picture of the network.
  • Be aware of a long-term glitch in the show ip ospf database output: the Link ID column should say Link State ID.
  • While Link State ID is a unique identifier for an entire LSA, a Link ID is a particular entry specifically in a Type 1 LSA body that describes an adjacency to a neighboring object of a router.
  • A single Type 1 LSA identified by a single Link State ID can describe several adjacencies represented by several Link ID entries.
  • These two terms are not interchangeable.
  • The show ip ospf database command lists the LSAs in that router's LSDB in sequential order.
  • To signify a network that is down, the appropriate Type 1 or 2 LSA is either reoriginated and the disconnected network is removed from that LSA, or the entire LSA is prematurely aged by setting its age to 3600 seconds and flooding it, causing it to immediately expire from all LSDBs.


LSA Type 3 and Inter-Area Costs

  • ABRs do not forward Type 1 and 2 LSAs from one area to another.
  • ABRs advertise Type 3 LSAs, which represent subnets described in both Type 1 and 2 LSAs in another area.
  • Describe a simple inter-area destination: the subnet, the mask, and the ABR's cost to reach that subnet.

S2# show ip ospf database
! Lines omitted for brevity
Summary Net Link States (Area 0)
Link ID    ADV Router  Age   Seq#        Checksum
10.3.0.0   1.1.1.1     257   0x80000001  0x00A63C
10.3.2.0   1.1.1.1     257   0x80000001  0x009A45
10.3.13.0  1.1.1.1     261   0x80000021  0x007747

S2# show ip ospf database summary 10.3.0.0
OSPF Router with ID (8.8.8.8) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 341
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.3.0.0 (summary Network Number)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0xA63C
Length: 28
Network Mask: /23
        TOS: 0 Metric: 74


  • Next, S2's routes to all three subnets are listed. S2 calculates its cost based on its cost to reach R1, plus the cost listed in the type 3 LSA.

S2# show ip route ospf
O IA 10.3.0.0/23 [110/75] via 10.1.1.1, 00:05:08, Vlan1

S2# show ip ospf border-routers
OSPF Process 1 internal Routing Table
Codes: i – Intra-area route, I – Inter-area route


i 1.1.1.1 [1] via 10.1.1.1, Vlan1, ABR, Area 0, SPF 18


  • Routers calculate the cost for a Typer 3 LSA route by adding the following:
  1. The calculated cost to reach the ABR that created and advertised the Type 3 LSA. (show ip ospf database summary <link-id>).
  2. The cost as listed in the Type 3 LSA. (show ip ospf border-routers)
  • When a Type 1 or 2 LSA changes in some way, each router in the area runs SPF, but routers inside other areas do not. They only run minor modications - a process called a partial run, partial SPF, or partial route calculation.
  • Type 3 summary LSAs are flooded only within the are into which they were originated by ABRs.
  • An ABR uses only Type 3 LSAs received over a backbone area in its calculation. Type 3 LSAs received over non-backbone areas will be skipped during the ABR's SPF computation, though they are stored in the ABR's LSDB and flooded within that non-backbone area as usual.
  • Only intra-area routes from non-backbone areas are advertised into the backbone; both intra-area and inter-area routes are advertised from the backbone into non-backbone areas.

LSA Types 4 and 5, and External Route Types 1 and 2

  • OSPF allows for two types of external routes, aptly named types 1 and 2.
  • The type determines whether only the external metric is considered by SPF when picking the best routes (external type 2, or E2), or whether both the external and internal metrics are added together to compute the metric (external type 1, or E1).
  • By default, Cisco routers use the E2 metric type in redistribution.
  • When an ASBR injects an external route, it creates a Type 5 LSA for the subnet.
  • The LSA lists the metric and the metric type.
  • The ASBR then floods the Type 5 LSA throughout all regular areas.
  • If the LSA contains the E1 metric, the total cost of the external network is the cost of reaching the ASBR + the E1 cost carried in the LSA.
  • If the LSA contains the E2 metric, this metric is used exactly as it is indicated in the LSA.
  • If there are multiple paths, the path with the least total cost is used. Otherwise, all of them will be used.
  • No additional costs are ever summed with the E2 metric.
  • If there are multiple paths, the path with the lowest E2 metric is used.
  • If there are still multiple paths, the path through the closest ASBR is used.
  • If there ara still multiple paths, all of them will be used.
  • If there are both E1 and E2 routes to the same network, the E1 is always preferred to E2.
  • With both E1 and E2 metric types, it is necessary to compute the metric to the ASBR.
  • Within the area where the ASBR resides, this is simply the least-cost path from the computing router to the ASBR as computed using Type 1 and 2 LSAs.
  • When an ABR floods the Type 5 LSA into another area, it creates a Type 4 LSA, containing the ASBR's RID and the ABR's metric to reach the ASBR.
  • Routers in other areas use the Type 4 LSA to know what ASBRs in other areas exist, what ABRs can be used to reach them, and what is the distance of each ABR to a particular ASBR.
  • For a router in a different area, the total cost of reaching the ASBR = the cost to the ABR + the cost between the ABR and ASBR (as indicated in the Type 4 LSA).
  • Type 4 LSA is not required in the area where the ASBR resides.

R3# show ip ospf database | begin Type-5
Type-5 AS External Link States
Link ID       ADV Router  Age    Seq#          Checksum    Tag 

192.168.1.0   7.7.7.7     1916   0x8000002B    0x0080EF    0
192.168.2.0   7.7.7.7     1916   0x80000028    0x00FEF2    0


R3# show ip ospf database external 192.168.2.0
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 1969
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 192.168.2.0 (External Network Number)
Advertising Router: 7.7.7.7
LS Seq Number: 80000028
Checksum: 0xFEF2
Length: 36

Network Mask: /24
      Metric Type: 2 (Larger than any link state path)
      TOS: 0
      Metric: 20
      Forward Address: 0.0.0.0
      External Route Tag: 0


  • Note about the usage of summary in OSPF:
  1. Type 3 and 4 LSAs are called summary LSAs.
  2. The term LSA summary refers to the LSA headers that identify LSAs and are sent inside DD packets.
  3. The term summary can also be used to refer to summary routes created with the area range and summary-address commands.


Stubby Areas

  • Areas that do not perform any automatic filtering on the type of accepted information are called regular areas.
  • Stubby areas take advantage of the fact that not all areas need to have knowledge about individual external networks.
  • The advantage of knowing the external networks is only visible if there were multiple ABRs in the current area and multiple ASBRs in other areas, so the least-cost paths could be chosen individually.
  • The connectivity to external networks can be equivalently provided to a stubby area by replacing the list of external networks with a simple default route injected by the area's ABRs.
  • If an area is configured as a stubby area, ABRs will stop advertising Type 4 and 5 LSAs into this area.
  • In addition, the ABRs will automatically inject a default route into the area as Type 3 LSA.
  • The connectivity to external networks is still guaranteed but the LSDBs will be sparser.
  • The visibility of intra-area and inter-area networks is not affected in any way.
  • OSPF defines several different types of stubby areas.
  • By definition, all stubby areas stop Type 4 (ASBR summary) and Type 5 (external) LSAs.
  • However, a stubby area might also prevent Type 3 LSAs from being injected, causing the area to stop seeing individual inter-area routes as well.
  • Another variation includes whether a router inside the stubby area can redistribute routes into OSPF, thereby injected an external route.
  • When the name includes "totally", Type 3 LSAs are not passed into the area, except the Type 3 LSA carrying the default route.
  • If the name includes "NSSA", it means that external routes can be redistributed into OSPF by routers inside the stubby area (in Type 7 LSAs, because Type 5 LSAs are prohibited).
  • To configure stubby areas, all routers attached to the area must be configured with the exact same command for each stubby area type.
  • However, in totally stubby areas, non-ABRs should omit the no-summary keyword because the additional Type 3 LSA filtering is performed only by the ABR.
  • An NSSA is still a stubby area in the sense that external routes from other areas are not advertised to it.
  • However, an NSSA can hold an ASBR and perform external route injection.
  • This external information is carried in Type 7 LSAs to distinguish it from normal external routes in Type 5 LSAs, which are still prohibited even in NSSAs.
  • A default route is not advertised into the NSSA automatically.
  • ABRs must be configured with the area <area-id> nssa default-information-originate command.
  • All other non-regular area types will inject a default route automatically, including totally NSSA (NSSA-TS).
  • ABRs convert Type 7 LSAs to Type 5 LSAs before forwarding them into another area.
  • If using NSSAs, N1 refers to NSSA-external Type 1 routes and N2 to NSSA-external Type 2. The differences are equivalent to differences between E1 and E2 routes.


OSPF Path Choices That Do Not Use Cost

  • Under most circumstances, when an OSPF router runs the SPF algorithm and finds more than one possible route to reach a particular subnet, the router chooses the route with the least cost.
  • However, OSPF does considers a few conditions other than cost when making this best-path decision.
  • It is possible for a router to find multiple routes to reach a given subnet where the type of route (intra-area, inter-area, E1/N1, or E2/N2) is different.
  • In these cases, the router should ignore the costs and instead choose the best route based on the following order of preference:
    1. Intra-area routes.
    2. Inter-area routes.
    3. E1/N1 routes (equivalent).
    4. E2/N2 routes (equivalent).
  • When an ABR originates type 3 LSAs on behalf of known routes, it translates only intra-area routes from a nonbackbone area into type 3 LSAs and floods them into the backbone, and it translates both intra-area and inter-area routes from the backbone area into type 3 LSAs and floods them into nonbackbone areas.
  • When an ABR runs the SPF algorithm, it ignores all type 3 LSAs received over nonbackbone areas.
  • The first rule essentially makes sure that the only valid way of one area learning about
    routes in another area is through the backbone, and that the backbone is never fed a
    route that must have already traversed the backbone.
  • The second rule makes sure that an ABR does not traverse a nonbackbone area to reach
    a network that is located in the backbone or in some other nonbackbone area.

Tuesday, February 3, 2015

CCIE OCG: OSPF (Chapter 9), Part I

  • OSPF is a link-state routing protocol.
  • "Link state" refers to the fact that the topology includes information about each data link and their current operational state.
  • All topological data comprises the link-state database (LSDB).
  • Each router applies the Dijkstra algorithm to the database to calculate the current best routes to each subnet.

OSPF Database Exchange

  • Five different messages to establish adjacencies and exchange routing information.
  • The LSA exchange process is the same in single and multi-area designs.

OSPF Router IDs

  • A unique 32-bit identifier.
  • Chosen in the following sequence:
  1. Use the configured router ID (router-id <rid>).
  2. Use the highest non-shutdown loopback interface IP address that is not reserved by another OSPF process.
  3. Use any other highest non-shutdown interface IP address that is not allocated by another OSPF process.
  • Valid interfaces do not have to be matched by a network statement.
  • The down/down state is sufficient.
  • OSPF does not have to advertise to reach the RID subnet.
  • The RID does not have to be reachable per the IP routing table.
  • The RID can change if the OSPF process is restarted or the RID is manually configured.
  • If the RID changes, the routers in the same area will have to perform a new SPF calculation.

Becoming Neighbors, Exchanging Databases, and Becoming Adjacent

  • Five different message types are encapsulated inside IP packets, using IP protocol 89.
  • Hello: Used to discover neighbors, bring a neighbor relationship to a 2-Way state, and monitor a neighbor's continuous liveliness.
  • Database Description (DD or DBD): Used to exchange LSA headers during the initial topology change.
  • Link-State Request (LSR): A packet that identifies one or more LSAs about which the sending router would like the neighbor to supply full details about.
  • Link-State Update (LSU): A packet that contains fully detailed LSAs, sent in response to an LSR message or in the event of a topological change.
  • Link-State Acknowledgement (LSAck): Sent to confirm the receipt of an LSU message.
  • The LSAs themselves are not OSPF messages.
  • An LSA is a data structure, held inside a router's LSDB and exchanged inside LSU messages.
  • An OSPF router keeps a state machine for each neighbor (show ip ospf neighbor).
  • These neighbor states change as the neighbors progress through their messaging.



OSPF Neighbor States

  • OSPF routers go through a series of adjacency states.
  • Some of these states are transitory, and some are stable states.
  • Neighbor states, not adjacency states.
  • Routers can temporarily consider each other in different states, but ultimately both routers must arrive at the same state.
  • Down: The initial state for a neighbor. Implies that the router already knows about its neighbor's IP address.
  • Attempt: Valid only in NBMA networks. A neighbor is immediately placed into the this state and contacted by Hello packets. If no reply within the Dead interval, go back to Down state.
  • Init: If a valid Hello packet has been received but the list of seen routers in this Hello packet does not contain the receiving router's RID.
  • 2-Way: If a valid Hello packet has been received and the list of seen routers in this Hello packet includes the receiving router's RID. Confirms bidirectional visibility, and is a stable state between routers that do not intend to become fully adjacent.
  • ExStart: The purpose is to establish the Master/Slave relationship. The routers exchange empty DBD packets to compare their RIDs, determine the Master/Slave roles, and agree on a common starting sequence number used to acknowledge subsequent DBD packets.
  • Exchange: DBD packets are exchanged. Each router builds a list of LSAs to be subsequently downloaded from the other router.
  • Loading: After the neighbor has advertised the complete list of LSAs and downloads the LSAs.
  • Full: All required LSAs have been downloaded, so all missing or outdated LSAs have been acquired. The state is stable and neighbors are fully adjacent.

Becoming Neighbors: The Hello Process

  • Hello messages perform four major functions:
  1. Discover other OSPF routers on common subnets.
  2. Check for agreement on selected configuration parameters.
  3. Verify bidirectional visibility between routers.
  4. Monitor the health of the neighbors to react if the neighbor fails.
  • Listen for multicast Hellos messages sent to 224.0.0.5 (All OSPF Routers).
  • Hellos are sourced from the router's primary IP address on the interface.
  • Routers will advertise secondary IP addresses but never send Hellos or form neighborships using secondary IP addresses.
  • OSPF neighbors will become fully adjacent if one or both of the neighbors are using unnumbered interfaces for the connection between them.
  • Perform the following parameter check based on the received Hellos:
  1. Must pass the authentication process (if configured).
  2. Must be in the same primary subnet, including the same subnet mask.
  3. Must be in the same OSPF area.
  4. Must be of the same area type.
  5. Must not have duplicate RIDs.
  6. OSPF Hello and Dead timers must match.
  • If any of these items do not match, the routers do not form a neighborship.
  • The OSPF process ID does not have to match.
  • The MTU must be equal for the DBD packets to be successfully processed.
  • The MTU mismatch would negatively affect the database synchronization process in the ExStart and Exchange process.
  • Each Hello contains a list of neighbors from whom the sending router received valid and acceptable Hellos.
  • The Hello contains RIDs of routers whose Hellos were seen and accepted by the router originating this Hello.
  • If a router finds its own RID in the list of seen routers in a Hello received from a neighbor, it can be sure that they can hear each other.
  • Heartbeat: The neighbors send Hellos every hello interval. If a Hello is not received within the dead interval, the router has failed.
  • Hello interval: 10 seconds for broadcast and point-to-point, 30 seconds for nonbroadcast and point-to-multipoint.
  • Dead interval: 4 x Hello interval.

R1# debug ip ospf hello
OSPF hello events debugging is on
Jan 12 06:41:20.940: OSPF: Mismatched hello parameters from 10.1.111.4
Jan 12 06:41:20.940: OSPF: Dead R 40 C 120, Hello R 10 C 30 Mask R 255.255.255.0 C
255.255.255.0


C = Configured, R = Received

Transmitting LSA Headers to Neighbors

  • After Hellos and parameter checks, neighbors do not immediately send LSAs.
  • First, each router creates and sends Database Description (DD or DBD) packets, which contain the headers of each LSA.
  • Essentially, the DBD is an index list of all the LSAs each router knows about (including revisions).
  • Next, a router requests a new copy of only those LSAs it does not have or which are less recent.
  • DD messages have an OSPF-defined simple error recovery process: each DD packet has a sequence number assigned, the receiver acknowledges a received DD packet by sending a DD packet with the identical sequence number to the sender.

Database Description Exchange: Master/Slave Relationship

  • In ExStart, the routers determine the master and slave roles.
  • Only the master is allowed to send DD packets on its own accord and to set and increase their sequence numbers.
  • A slave is allowed to send a DD packet only as a response to a master's DD, and must use the same sequence number.
  • In effect, a slave is polled by the master and only responds to it.
  • DD packet contains three flags:
  1. Master (MS) flag: Set in all DD packets sent by the master, and cleared in all packets sent by the slave.
  2. More (M) flag: Set when a router intends to send an additional DD packet after this one.
  3. Init (I) flag: Indicates the initial DD packet that starts the exchange. Subsequent DD packets, either from master or slave, have the I flag cleared.

  • During the DD packet exchange, one router might need to send many DD packets while the other might only require a single DD packet.
  • Two rules to sending DD packets:
  1. Each DD packet sent from the master must be replied to by the slave (i.e. the number of DD packets sent from master to slave must match the number of DD packets sent from slave to master).
  2. A slave can send a DD packet only as a response to receiving a master's DD packet.

  • If a router has no more LSA headers to advertise but its peer requires it to send more DD packets, the router will simply send empty DD packets.
  • If the slave has more DD packets to send, the master must continue polling the slave, even if it has no more LSAs to advertise itself.
  • The slave sets the M flag in its DD packet sent in response to the master's DD packet.
  • A master will stop sending DD packets to a slave when it has no more LSA headers to advertise, and the slave's last received DD packet has the M flag cleared.
  • In the beginning of ExStart, both routers consider themselves to be the master, and send an empty DD packet, containing a randomly chosen sequence number, and MS (Master), M (More), and I (Init) flags set to 1.
  • After receiving the neighbor's DD packet, the router with the lower RID will change its role to slave, and it will respond with a DD packet with the MS and I flags cleared and the sequence number set to the sequence number of the master's DD packet.
  • The routers move into the Exchange state.
  • The master will then a DD packet with the sequence incremented by 1, and the slave will respond with the same sequence number, optinally advertising its own LSA headers.
  • The exchange continues in the same fashion, until both routers have advertised all known LSA headers.
  • The master will stop sending DD packets when it has advertised all LSA headers itself and the last DD response from the slave has the M flag cleared.

Requesting, Getting, and Acknowledging LSAs

  • After the DD packets, the router needs to request a full copy of each LSA that is missing from its own LSDB.
  • To know whether a neighbor has a more recent copy of a particular LSA, a router looks at the sequence number of the LSA in its LSDB and compares it to the sequence number of that same LSA learned from the DD packet.
  • Each LSA's sequence number is incremented every time the LSA changes or is reoriginated.
  • For example, R1 sent R2 an LSA header for the type 1 LSA that describes R1 itself, with sequence number 0x80000004. If R2’s database already held that LSA, but with a sequence number of 0x80000003, R2 would know that it needs to ask R1 to send the latest copy (sequence number 0x80000004) of that LSA.
  • LSA sequence numbers start with 0x80000001; increase through 0xFFFFFFFF, 0x00000000, and 0x00000001, and finish at 0x7FFFFFFF.
  • Routers use Link-State Request (LSR) packets to request one or more LSAs from a neighbor.
  • The neighboring router replies with Link-State Update (LSU) packets, which hold one or more full LSAs.
  • The LSR/LSA process uses a reliable protocol with two acknowledgement options: 1) send back the same LSU to the sender, and 2) send back an LSAck, which contains a list of acknowledged LSA headers.
  • At the end of the process, the neighbors have exchanged their LSDBs, and the LSDBs are identical.

Designated Routers on LANs

  • OSPF uses a DR (and a backup DR, or BDR) on a multiaccess network. 
  • The LSA flooding occurs through the DR, reducing the unncessary exchange of redundant LSAs.
  • The presence of a DR/BDR allows the routers to synchronize only to a DR and BDR, alleviating the need of synchronizing to each other, possibly flooding the same set of LSAs multiple times.
  • In reality, DRs have a different crucial and the only truly irreplaceable function: They create a Type 2 LSA that represents the multiaccess network segment.
  • Only routers in the Full state are allowed to exchange LSAs.
  • On a multiaccess network, every router is in the Full state only with the DR and BDR.
  • The DR and BDR are also in the Full state with each other.
  • The DR and BDR send LSUs to the multicast IP address 224.0.0.5, All OSPF Routers group.
  • Other OSPF routers will acknowledge the receipt of the LSU by sending an unicast LSAck back to the originating router.
  • All other non-DR/BDR send updates to the multicast IP address 224.0.0.6, the All OSPF DR Routers group that contains only the DR and BDR.
  • Both the DR and BDR will store the updated LSA from the LSU in their LSDB.
  • The DR then floods the new LSU to all OSPF routers (224.0.0.5).
  • Other routers on the segment including the BDR, except the original router, will acknowledge the DR's LSU with a unicast LSAck sent to the DR.
  • A router that is neither a DR or BDR is called a DROther.
  • Routers that are DROthers do not become fully adjacent; they stop at the 2-WAY state.
  • The 2-WAY simply means that the Hello parameters match and bidirectional visibility check worked, but the neighbors do not synchronize their LSDBs directly with each other.
  • Neighbors: Two routers that share a common data link and that exchange Hello messages, and the Hellos must match for certain parameters.
  • Adjacent (fully adjacent): Two neighbors that have completed the process of fully exchanging DD and LSU packets directly between each other.
  • DROthers still end up with an identical copy of the LSDB by exchanging them with the DR.

DR Election on LANs

  • The election occurs after the routers have become neighbors, but before they send DD packets and reach the ExStart neighbor state.
  • If the DR has not been elected (a DR of 0.0.0.0 in the Hello message), the router waits before attempting to elect a DR.
  • The wait period is called the OSPF wait time, which is set to the same value as the Dead timer.
  • If the received Hellos already list the DR's RID, the router does not have to wait before beginning the election process.
  • A router with its OSPF priority set to 1-255 inclusive is eligible to become a DR or BDR. 
  • If the priority is set to 0, the router is ignored in DR/BDR elections.
  • Each router performs the elections locally, but the algorithm makes sure that all routers ultimately arrive at the same conclusion.
  • During the wait interval, each router collects the priorities and RIDs of other neighbors on the segment. The routers do not assert themselves as the DR or BDR during this phase.
  • If, during the wait interval, a Hello packet arrives from a neighbor that claims itself as the DR or BDR, the router immediately proceeds to the DR/BDR election process. Otherwise, the full wait time on the interface needs to expire.
  • The election is performed only for those roles that are not yet claimed in neighbor Hellos.
  • The router with the highest priority becomes the DR, and the router with the second-highest priority becomes the BDR.
  • If there are routers with the same priority, the higher RID is used to break the tie.
  • After the election has completed, if a new router arrives on an existing router improves its priority, it cannot preempt and take over the existing DR (or BDR).
  • When a DR is elected and the DR fails, the BDR becomes the DR, and a new election is held for a new BDR.
  • If two routers arrive at different DR/BDR elections (perhaps due to STP convergence), they enter the election phase again.

Designated Routers on WANs and OSPF Network Types

  • Routers can be configured to use, or not to use, a DR and a couple of other key behaviors, based on the OSPF network type.
  • The OSPF network type determines the following:
  1. Whether the router tries to elect a DR.
  2. Whether the router uses unicast (the neighbor command) or multicast to find neighbors.
  3. Whether two or more neighbors should be allowed on the same subnet.
  • The OSPF network type is set with the ip ospf network <type> under the interface.
  • The table lists the network types and their exact keywords for the command.

Caveats Regarding OSPF Network Type over NBMA Networks

  • Make sure that the default Hello/Dead timers do not cause the Hello parameter check to fail.
  • Ensure that all routers in the same NBMA network use an OSPF network type that either uses a DR or does not.
  • If a DR is used, the DR and BDR must have a PVC to every other router in the subnet. Routers that do not have a PVC to every other router must not be permitted to become a DR/BDR.
  • The neighbor command on a single router is sufficient to bring up the OSPF adjacency with the configured neighbor. For clarity and stability, it is better to configure the neighbor command on both routers.

Example of OSPF Network Types and NBMA

  • With partial meshes, the DR/BDR election should be influenced by configuring the routers' priorities and RIDs so that the hub of a hub-and-spoke design becomes the DR.
  • The priority specified in the neighbor command is never used in DR/BDR elections.
  • If there are multiple neighbor statemets and at least one of them has a non-zero value, the router will first send Hello packets only to those neighbors.
  • Only after the DR/BDR elections have completed between these routers, the router will start sending Hello packets to all remaining neighbors.
  • This optimization increases the chances that the DR and BDR roles will be taken up by appropriate routers, and prevents routers from competing in DR/BDR elections with neighbors that are not entitled to these roles.
  • The priorities specified in the neighbor commands do not need to match the real priorities of these neighbors, but if they differ, the router can engage in DR/BDR elections with neighbors not entitled to become a DR/BDR.
  • In any case, the real priorities, as seen in the Hello packes, will be used to complete the DR/BDR elections.
  • If all neighbor statements omit the priority setting, this optimization is not used, and all neighbors are contacted immediately.

SPF Calculation

  • After a router has new or different information in its LSDB, it uses the Dijkstra SPF algorithm to examine the LSAs in the LSDB and derive the new tree of shortest paths to available networks.
  • SPF on a router constructs least-cost paths from this router to all possible destinations, summing the costs for each outgoing interface along the path and picking the path with the lowest total cost.
  • Found destinations and their least-cost paths are placed into the routing table.


Steady-State Operation

  • Even after the network has stabilized and the LSDBs are synchronized, the routers perform the following operations:
  1. Send Hellos, based on per-interface Hello intervals.
  2. Expect to receive Hellos from neighbors within the Dead interval on each interface; if not, the neighbor is considered to have failed.
  3. Reflood self-originated LSAs (incrementing the Sequence Number by 1) based on the LSRefresh interval (default 30 minutes) even if no change has occurred.
  4. Expect to have its LSAs refreshed within each LSA's MaxAge timer (default 60 minutes).

Sunday, January 25, 2015

CCIE OCG: EIGRP (Chapter 8), Part V

Router ID

  • A single 4-byte number representing a particular router instance.
  • Each address family instance has its own independent RID. The same RID can be used.
  • Originally, the primary use of the RID was to prevent routing loops in EIGRP environments using redistribution.
  • If an external route is received with the same RID as the local router, the route is discarded.
  • The RID was not originally advertised with internal routes.
  • In recent IOS releases, both internal and external routes carry the RID of the router that injected it into EIGRP.
  • A router will discard every received route carrying the router's own RID.
  • The rules of RID value selection:
  1. Manual configuration by eigrp router-id.
  2. The highest IP address among non-shutdown loopback interfaces.
  3. The highest IP address among all other non-shutdown interfaces.
  • After chosen, the RID will not be reinitialized until the EIGRP process is removed, the RID manually configured or a manually configured RID is removed.
  • For manual configuration, the values 0.0.0.0 and 255.255.255.255 are disallowed.
  • If a router's RID changes, it drops and reestablishes its adjacencies.
  • When interface IP addresses of a running router are changed without restarting it, the EIGRP RID will remain unchanged.
  • This can cause issues when a new router is introduced into the network, retaking the other router's addresses and tasks, while the old router is renumbered without restarting it.
  • As a result, it is possible that these two routers have the same EIGRP RID and they will not learn routes injected into EIGRP by each other.
  • There is no logging message to point to this phenomenon.
  • Before only show ip eigrp topology and show ipv6 eigrp topology showed the RID.
  • Now show eigrp protocols and show ip protocols will also display the RID.

Unequal-Cost Load Balancing

  • Distributing traffic load across multiple unequal-cost paths.
  • The key element is the presence of Feasible Successors.
  • Feasible Successors provide a guaranteed loop-free path to the destination, although not necessarily the shortest one.
  • Enabled through the variance <multiplier> command.
  • The multiplier essentially defines how many times worse than the best path a route through a Feasible Successor can be to be still used by EIGRP.
  • For multiplier V, the router checks whether a Feasible Successor meets the following condition:
    CD via Successor < CD via Feasible Successor < V x CD via Successor
  • If the route passes the condition, it is installed into the routing table.
  • A multiplier of 1, the default, implies that no unequal-cost load balancing is performed.
  • If multiple unequal-cost paths are installed into the routing table, the router will forward proportionally less traffic over the worse paths, and vice versa.
  • The traffic flow over a particular path can be computed as this ratio: Highest Installed Path Metric / Path Metric.
  • For paths with metrics 1100, 1100, 2000, and 4000, the traffic amount over these paths would be 4000/1100 = 3, 4000/1100 = 3, 4000/2000 = 2, and 4000/4000 = 1.
  • The true traffic share ration would be 3:3:2:1 (recall that IOS routers perform integer division).
  • Routers that do not meet the Feasibility Condition, i.e. non-Feasible Successors, are not considered in unequal-cost load balancing.
  • The unequal-cost paths installed into the routing table also count toward the maximum number of parallel paths (maximum-paths).

Add-Path Support

  • Allows a hub router to advertise multiple equal-cost routes to the same destination.
  • The routes must first be installed in the hub's routing table.
  • Might require tuning the metrics and the maximum-paths value.
  • The hub router must have the Split Horizon feature deactivated.
  • Can be configured only in named mode, and is controlled on a per-interface basis using the add-paths <path-count> command.
  • The add-paths command allows advertising additional path-count equal-cost routes in addition to the route that would be advertised nonetheless.
  • The path-count is a mandatory argument in the range of 1 to 4.
  • In total, the spokes can learn about five different equal paths to a particular destination.
  • Spokes routers do not need to be specifically configured for the Add-Path feature, apart from possible tuning of the maximum-paths command to be able to insert multiple equal-cost paths into their routing tables.
  • The Variance and Add-Path features are not compatible with each other.
  • When using Add-Path, always be sure to set the variance to 1.

router eigrp CCIE
  address-family ipv4 unicast autonomous-system 1
    topology base
      variance 1
      maximum-paths 6
      exit
    af-interface Tunnel0
      no split-horizon
      no next-hop-self
      add-paths 4


  • The no-ecmp-mode command deactivates EIGRP's internal optimization and forces EIGRP to always walk over all equal-cost paths to a destination recorded in the topology table, making sure that if any of these routes' Successors can be reached over the interface on which the route is going to be readvertised, the no next-hop-self command will be honored and the Successor's address will be retained in the advertisement.
  • The use of no-ecmp-mode is recommended with the Add-Path feature if the hub uses multiple tunnel interfaces to reach the spoke sites.

Stub Routing

  • Primarily designed to improve network scalability and stability.
  • Most commonly used in hub-and-spoke networks.
  • Only configured on spoke routers.
  • When configured on a spoke router, the router announces its stub router status using and additional TLV in its EIGRP Hello messages.
  • The results of a stub router are multifold:
  1. A stub router does not propagate routes learned through EIGRP to its neighbors, with the exception of EIGRP-learned routes that are explicitly selected using a so-called leak-map construct. The router cannot be considered as a Feasible Successor and cannot become a transit router.
  2. A stub router advertises only a subset of its own EIGRP-enabled networks to its neighbors. Defined in the eigrp stub command with summary, connected, static, redistributed, and receive-only keywords.
  3. Neighbors will never send a Query packet to a stub router. The neighbors cannot converge through a stub router to reach networks that are remote to the stub router.
  • How a stub router handles Query packets:
  1. Originating Query packets is not modified in any way. Rules for entering the Active state and sending Queries are precisely the same.
  2. Processing received Query packets depends on what network was queried for. If the network is a network that the stub router is allowed to advertise (summary, connected, static, or redistributed), the route will process the Query normally. The same is valid for an EIGRP-learned network that is allowed to be further advertised using a leak-map. If the Query contains a network that the stub router knows about but is not allowed to advertise, it will be processed in the usual way as described earlier, but the Reply will always indicate infinite distance, regardless of what the stub router truly knows about the network.
  3. Receiving a Query for an unknown network will immediately cause the router to respond with a Reply and an infinite distance; however, this is regular EIGRP behavior not related to the stub feature.
  • There are two primary reasons why a stub router might receive a Query: 1) The neighbor might run an old IOS that does not recognize the stub TLV, and 2) if there are multiple stub routers on a common segment and if any of these stub routers need to send a Query, it will also send it to all its stub neighbors.
  • On a common segment with all routers configured as stubs, Queries are sent as usual.
  • In multiaccess segments with mixed neighbors, EIGRP solves the problem of sending Queries only non-stub neighbors in two ways: 1) send the Queries as unicasts, or 2) use the Conditional Receive mode.
  • While mixing stub and non-stub routers on a common segment is not a recommended practice, it is inevitable, for example, when the hubs and spokes are interconnected by a DMVPN or a VPLS service.
  • Benefits of stub routing in hub-and-spoke networks:
  1. Prevents suboptimal routing.
  2. Prevents stub routers with low-speed links from being used as transit routers.
  3. Significantly limits the number of Query packets and the depth of their propagation, allowing EIGRP to converge faster and avoid the SIA states.

  • receive-only: The stub router does not advertise any prefixes. It only receives prefixes advertised to it by its neighbors. This keyword cannot be used with any other keywords.
  • leak-map <name>: The stub router can advertise selected EIGRP-learned routes that would not be ordinarily advertised. The <name> references a route-map that matches one or more access-lists or prefix-lists that permit the matched subnets or addresses to be leaked.
  • connected: The stub router will advertise directly connected networks. The interfaces must still be added to EIGRP using the network command.
  • static: The stub router will advertised static routes. The static routes must be redistributed into EIGRP to be advertised.
  • summary: The stub router will advertise summary routes if configured on interfaces.

  • By default, when the eigrp stub command is enabled without additional keywords, both connected and summary are assumed.
  • Use show ip protocols and show ip eigrp neighbors details for information about stub routers.
  • Activating, deactivating, or modifying the stub feature settings will cause the router to drop and reestablish adjacencies with its neighbors.
  • The stub router feature has no impact on what the hub router will advertise. Therefore, the stub feature is usually combined with route filtering and summarization on the hub router. The hub router can be configured to advertise only a default route to the spoke router(s).

Route Summarization

  • Reduces the amount of routing information that routers must exchange, process, and maintain.
  • Faster convergence and less router load within the network.
  • Restricts the size of an area that is affected by network changes by hiding details behind a single advertised summary route.
  • Creates a boundary for Query propagation.
  • If a router receives a Query for a network it does not have in its topology table, it will immediately send back a Reply indicating an unreachable destination, without itself going active and propagating the Query further.
  • When a Query asking for a particular component route is forwarded to the summarizing router's neighbor, this neighbor has no knowledge of the component, so it immediately responds with a Reply containing an infinite distance.
  • Two types of summarization: automatic summarization and manual summarization.
  • Automatic Summarization: A subnet of a particular major network is advertised as the major network itself if the subnet is to be advertised out an interface that lies in a different major network.
  • Automatic summarization does not apply to external routes unless there is also an internal network that belongs to the same major network.
  • Automatic summarization is practically unusable in today's networks, and in fact, starting with IOS Release 15.0(1)M, it is deactivated by default.
  • Manual summarization allows summarizing routes at any chosen router and its interface in the network.
  • As opposed to RIP that does not allow supernetting in summarization, EIGRP poses no limitations on the summary address/netmask combination.
  • You can summarize even into a default route.
  • Configuring multiple overlapping summary address on an interface is also supported. EIGRP will advertise each configured summary address for which at least one component route exists.
  • Manual summarization is configured on a per-interface basis.
  • The optional leak-map allows more specific components of the summary route to be selectively advertised as unsummarized along with the summary route.
  • The router generating the summary route installs a so-called discard route for the summary route into its routing table.
  • The network and netmask in this discard route are identical to the network and netmask of the advertised summary, and the outgoing interface is set to Null0.
  • For presently unknown destinations within an advertised summary, the discard route makes sure that the traffic is dropped rather than routed over a possibly unrelated route.
  • A discard route's AD is 5 by default.
  • For example, when summarizing into the default route, the router will attempt to install a discard route to 0.0.0.0/0 into its routing table. If there already is a default route with an AD higher than 5, the discard route will replace it.
  • In EIGRP named, the AD for a discard route can be changed only in the topology base section.
  • In recent IOS releases, setting the AD of a discard route to 255 not only prevents the router from installing the discard route into its routing table, but it also causes it to stop advertising the summary route altogether.
  • By default, EIGRP uses the lowest metric of a component route as the metric of the summary route itself.
  • EIGRP summary route must adapt to metric changes.
  • The summary-metric command can be used to define a static metric for a particular summary route.

! The 172.20.63.0/24 prefix is leaked unsummarized.
!
ip prefix-list LEAK-PREFIX permit 172.20.63.0/24
!
route-map EIGRP-LEAK permit 10
  match ip address prefix-list LEAK-PREFIX

!
! The prefix is advertised unsummarized along with the summary route.
!
router eigrp CCIE
  address-family ipv4 unicast autonomous-system 1
    af-interface FastEthernet0/0
      summary-address 172.20.32.0/19 leak-map EIGRP-LEAK

!
! The metric of the summary route is manually defined.
! The administrative distance of the summary route is set to 10.
!
router eigrp CCIE
  address-family ipv4 unicast autonomous-system 1
    topology base
      summary-metric 172.20.32.0/19 1000000 1 255 1 1500 distance 10
      exit-af-topology



R2# do show ip protocols | section Summarization
Automatic Summarization: disabled
Address Summarization:
172.20.32.0/19 for Fa0/0
Summarizing 32 components with metric 1310720

R2#show ip route eigrp | i Null
D 172.20.32.0/19 is a summary, 00:31:34, Null0

R2#show eigrp address-family ipv4 topology 172.20.32.0/19
EIGRP-IPv4 VR(CCIE) Topology Entry for AS(1)/ID(10.255.255.2) for 172.20.32.0/19
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 1310720, RIB is
10240
Descriptor Blocks:
0.0.0.0 (Null0), from 0.0.0.0, Send flag is 0x0
Composite metric is (1310720/0), route is Internal
Vector metric:
Minimum bandwidth is 1000000 Kbit
Total delay is 10000000 picoseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 0
Originating router is 10.255.255.2



Passive Interfaces

  • When EIGRP is enabled for a network, the router begins to send out Hello packets and process incoming EIGRP packets on all interfaces that fall within the specified network range.
  • This default behavior is unnecessary, even dangerous for loopback interfaces and interfaces connected to end hosts.
  • A passive interface does not send or process EIGRP packets, but the network configured on the interface is still advertised.
  • Two options: 1) use passive-interface default and no passive-interface on selected interfaces or 2) passive-interface only on selected interfaces.

Graceful Shutdown

  • A long-implemented feature that cannot, in fact, be controlled - it is only used, mostly not even knowing it is there.
  • Allows a router to advertise that it is being deactivated, thereby allowing its neighbors to react immediately, rather than wait for the Hold timer to expire.
  • Accomplished by a Goodbye message = a normal Hello packet with all K values set to 255.
  • In classic mode for IPv6: shutdown command.
  • In classic mode for IPv4: the Goodbye message was usually sent when shutting down interfaces, configuring them as passive, removing related network or IPv6 EIGRP commands, or removing the entire EIGRP process or restarting the router.
  • In named mode, the shutdown command can be used in various places:
  1. Directly in the router eigrp mode, causing all configured address family instances under that process name to be deactivated.
  2. In the address family mode, causing the entire address family instance to be deactivated.
  3. In the af-interface section, causing the EIGRP to cease all operations on that interface.

Securing EIGRP with Authentication

  • MD5 hashing to ensure the integrity of EIGRP messages and to prevent the injection of false routing information has always been supported.
  • Since 15.1(2)S and 15.2(1)T, SHA-256 has been supported.
  • MD5 can be configured in both classic and named mode; SHA can only be configured in named mode.
  • Essentially, a two-part configuration:
  1. Define a key chain to hold the key IDs, key strings, and optional time ranges.
  2. Activate the authentication on selected interfaces.
  • The key ID and key string must match between two neighbors.
  • The key chain names are locally significant.
  • With SHA authentication, the password can be configured directly in the interface, without creating key chains.
  • Simpler but makes a seamless rollover to a new key impossible, as there can always be only a single per-interface key configured.
  • In classic mode, there is no way to configure EIGRP authentication for all interfaces at once; each EIGRP-enabled interface must be configured individually.
  • In named mode, the af-interface default settings apply automatically to all EIGRP-enabled interfaces; these can be overridden later on selected interfaces using the appropriate af-interfac section.

key chain EIGRP-KEYS
  key 1
    key-string EIGRPRocks
!
router eigrp CCIE
  address-family ipv4 autonomous-system 1
    af-interface default
      authentication mode md5
      authentication key-chain EIGRP-KEYS
    af-interface FastEthernet0/0
      authentication mode hmac-sha-256 PhonyPassword
    af-interface FastEthernet0/1
      authentication mode hmac-sha-256 BigPASSword
      no authentication key-chain
    af-interface Serial1/0
      no authentication mode

R1#show eigrp address-family ipv4 int detail fa0/0
! Lines omitted for brevity
Authentication mode is HMAC-SHA-256, key-chain is "EIGRP-KEYS"

R1#show eigrp address-family ipv4 int detail fa0/1
! Lines omitted for brevity
Authentication mode is HMAC-SHA-256, key-chain is not set

R1#show eigrp address-family ipv4 int detail s1/1
! Lines omitted for brevity
Authentication mode is md5, key-chain is "EIGRP-KEYS"

R1#show eigrp address-family ipv4 int detail s1/0
! Lines omitted for brevity
Authentication mode is not set


  • Each key can be time limited in its usability to sign sent packets (send-lifetime) and to authenticate received packets (accept-lifetime).
  • If multiple keys are eligible to sign egress packets, the key with the lowest key ID is used.
  • To authenticate received packets, EIGRP will try to use the key indicated by its ID in the received packet if the key is still valid.
  • A seamless key rollover procedure:
  1. On all routers, add a new key with a higher key ID into the key chain.
  2. Configure the old key on all routers with a send-lifetime that is already in the past. The routers will start using the new key. Neighbors will accept either key because the key ID is carried in the packet, and both old and new keys are still valid.
  3. Remove the old key completely from the key chains, completing the migration.

Default Routing Using EIGRP.

  • No dedicated command to inject a default route.
  • Other techniques:
  1. Redistributing the default route from another routing source into EIGRP.
  2. Using manual summarization to summarize all advertised routes into a default route.
  • If a static route is pointing only to the egress interface, IOS treats it as being directly connected. As a result, the network command can be used to advertise such a directly connected static route. If a default route is pointing to an exit interface, it can be advertised in EIGRP with network 0.0.0.0.
  • Configuring network 0.0.0.0 is almost never a good idea:
  1. It will cause all IPv4 interfaces on the router to be enabled for EIGRP. EIGRP will start advertising all directly connected IPv4 networks, and try to establish adjacencies on those interfaces.
  2. If the default route is not a directly connected static route, the network 0.0.0.0 command has no effect, defeating the entire purpose of configure it to advertise a default route.

Split Horizon

  • A route must not be advertised over an interface used to reach it.
  • EIGRP uses Split Horizon with Poisoned Reverse, advertising each learned network out the interface towards its Successor with an infinite metric.
  • Sometimes necessary to deactivate, specifically for hub-and-spoke topologies.
  • If possible, better to advertise a default route from the hub to all spokes.
  • Deactivated on a per-interface basis.

EIGRP Over the ToP

  • aka OTP
  • Allows creating ovelay multipoint VPNs between customer edge routers running EIGRP without any special cooperation with the service provider.
  • The key: Locator/Identifier Separation Protocol, or LISP.
  • IP address consists of the network prefix and the host suffix, where the network ID identifies the location and the host ID identifies the host itself. If a host moves to a different network, its entire IP address changes.
  • LISP aims at decoupling the location of a host from its identity. LISP represents each of them as a complete address, and provides a mapping service so that the address representing the identity of a host can be resolved into the address that represents its location.
  • Tunneling is used to encapsulate packets to end hosts with the addresses representing the end host locations.
  • In LISP, a host has an Endpoint ID (EID) that identifies its identity that never needs to change.
  • This EID can be an IPv4/IPv6 address.
  • To reach the end hosts, the packets must be tunneled to the router behind which the host is currently located.
  • The outside address of the router effectively represents the location of the EID and is denoted as Routing Locator, or RLOC.
  • Many EIDs can be located behind a single RLOC.


  • LISP has both a control and a data plane.
  • LISP control plane: registration protocol and procedures to map EIDs into RLOCs.
  • LISP data plane: the actual tunnel encapsulation between routers.
  • In OTP, EIGRP serves as the replacement for LISP control plane.
  • EIGRP OTP routers create targeted sessions, use the public IP addresses as RLOCs, and exchange routes as EIDs.
  • R2 would learn R1's network 10.0.1.0/24 through EIGRP, treat the network as an EID prefix, and take the advertising next hop 192.0.2.31 as the RLOC for this EID prefix.
  • The LISP data plane is reused in OTP and does not change; however, the native LISP mapping and resolving mechanisms are replaced by EIGRP.
  • OTP is based on fully customer-controlled targeted EIGRP sessions.
  • Closely resembles Dynamic Multipoint VPN (DMVPN).
  • The key differences are:
  1. DMVPN uses multipoint GRE tunnels, encapsulating both data and control plane traffic. As a result, certain priming in DMVPN is necessary for it to start (for example, creating the tunnel interfaces and manual mappings). In LISP, no tunnel interface configuration is required, and the only mandatory static configuration is specifying the remote static neighbor. Optionally, the entire OTP traffic can be protected using GETVPN.
  2. DMVPN also depends on running the Next Hop Resolution Protocol (NHRP) to provide mappings between multipoint tunnel interfaces and real router addresses.

! Changing the LISP interface bandwidth from its default of 56 kbps.
!
interface LISP0
  bandwidth 1000000
!
interface GigabitEthernet0/0
  ip address 192.0.2.31 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.0.2.2
!
! The neighbor command refers to the remote neighbor reachable through GigabitEthernet0/0
! The lisp-encap command activates LISP-based OTP functionality.
! The network command is required to form static neighbors over the interface.
!
router eigrp CCIE
  address-family ipv4 unicast autonomous-system 64512
    neighbor 198.51.100.62 GigabitEthernet0/0 remote 100 list-encap
    network 10.0.1.0 0.0.0.255
    network 192.0.2.31 0.0.0.0


  • Running OTP does not require a route toward the remote neighbor.
  • Because the neighbor command specifies the interface toward the remote neighbor, EIGRP in fact places its packets on the interface queue directly, bypassing the routing table.
  • For large implementations, OTP has a special router role, a so-called route reflector.
  • The route reflector allows collapsing the full mesh of OTP neighbors to a hub-and-spoke model of neighbor configuration, with the route reflector collecting learned networks from its clients and readvertising them back to individual clients, optionally maintaining the original next-hop value.

R1#
router eigrp CCIE
 !
 address-family ipv4 unicast autonomous-system 64512
  !
  af-interface GigabitEthernet0/0
   no next-hop-self
   no split horizon
  exit-af-interface
  !
  topology base
  exit-af-topology
  remote-neighbors source GigabitEthernet0/0 unicast-listen lisp-encap
  network 10.0.1.1 0.0.0.0
  network 192.0.2.31 0.0.0



EIGRP Logging and Reporting

  • The eigrp event-logging configuration is the default, and enables the router to store a log of EIGRP events.
  • Viewed by show eigrp address-family {ipv4 | ipv6} events.
  • By default, the EIGRP event log stores up to 500 lines of events.
  • The eigrp log-neighbor-changes and eigrp log-neighbor warnings are also enabled by default.

EIGRP Route Filtering

  • EIGRP updates can be filtered at any interface or for the entire EIGRP address family instance in either direction.
  • By the distribute-list command.
  • In classic mode, the command is applied directly in the EIGRP process.
  • In named mode, the command is configured under the topology base.
  • EIGRP allows ACLs, prefix-lists, and route-maps to be used for route filtering in the distribute-list command.
  • In general, the use of prefix-lists is recommended, as they are specifically designed to match ranges of networks and netmasks.
  • For distribute-lists in the out direction: All outgoing Updates, Queries, Replies, SIA-Queries, and SIA-Replies will indicate the correct metric for permitted prefixes and infinite metric for denied prefixes.
  • For distribute-lists in the in direction: In all incoming Updates, Replies, and SIA-Replies, permitted prefixes are processed normally while denied prefixes are ignored. Receive Queries and SIA-Queries are not influenced by the distribute-list and are processed without modification.

EIGRP Offset-Lists

  • Allows EIGRP to add to a route's metric, either before sending an update or for routes received in an update.
  • Refers to an access-list to match the routes; any matched routes have the specified offset, or extra metric, added to their Delay metric component.
  • Any routes not matched by the offset-list are unchanged.
  • Also specify a in or out direction and optionally an interface.
  • If the interface is omitted, all updates for the chosen direction will be examined.

Clearing the IP Routing Table

  • clear ip route *
  • Does not cause EIGRP to send any messages or learn any new topology information.
  • The router simply refills the IP routing table with the best routes from the existing topology table.
  • The clear eigrp address-family {ipv4 | ipv6} neighbors command clears all neighbor relationships and has the router establish them from scratch.
  • A soft keyword allows for a graceful restart, the databases are resynchronized but the adjacencies are not torn down.