#JNCIE-SP: Using "Show TED Database" to Troubleshoot CSPF

I’ve generally found the output of show TED database to be a bit cryptic. But I ran into an issue today which forced me to really buckle down and figure out what it means and I think I’ve got something worked out.

fluong@SPOCK-re0> show mpls lsp
10.0.0.110  0.0.0.0      Dn     0       -                SPOCK-to-SULU

It was a sad sight. The LSP was down and the log from show mpls lsp extensive only had one line:

     1 Jun 27 14:27:20.553 CSPF failed: no route toward 10.0.0.110[927 times]

I sanity checked my loopback addresses and made sure that family mpls was configured on all backbone interfaces and was included in protocols rsvp and mpls. Everything looked good on SPOCK.

So I started looking at “show ted database”.

fluong@SPOCK-re0> show ted database 10.0.0.110
TED database: 44 ISIS nodes 44 INET nodes
ID                            Type Age(s) LnkIn LnkOut Protocol
SULU.00(10.0.0.110) Rtr    475     1      2 IS-IS(1)
    To: KIRK-re0.00(10.0.0.5), Local: 10.0.0.170, Remote: 10.0.0.171
      Local interface index: 329, Remote interface index: 456
    To: SCOTTY.00(10.0.0.111), Local: 10.0.0.168, Remote: 10.0.0.169
      Local interface index: 327, Remote interface index: 3

Okay… looks like we’re getting to SULU via a couple of routers, KIRK and SCOTTY. So I logged into the next router down the line, KIRK, and I found that it’s LSP to SULU was also down. So I started sanity checking config.

fluong@KIRK-re0> show mpls lsp ingress 
10.0.0.110  0.0.0.0     Dn     0       -                KIRK-to-SULU

fluong@KIRK-re0> show interfaces descriptions ae1
Interface       Admin Link Description
ae1             up    up   To SULU, ae1

fluong@KIRK-re0> show interfaces terse ae1 | match mpls
                                   mpls    

fluong@KIRK-re0> show mpls interface       
Interface        State       Administrative groups (x: extended)
ae1.0            Up         <none>

fluong@KIRK-re0> show rsvp interface ae1
 <no output>

Bingo! Missing RSVP interface configuration.

It occurs to me that this could be very useful as a quick way to narrow down what interfaces may be missing MPLS configs. Here is my method:

If an LSP is down CSPF reports no route:

  • verify loopback address and router-id on the far end
  • use the output “show ted database” to trace through performing sanity checks on interface-specific MPLS configs.
    • show interface terse (check for family mpls)
    • show mpls interface (make sure backbone interfaces are present)
    • show rsvp interface (make sure backbone interfaces are present)
    • show ldp interface (if applicable, make sure relevant backbone interfaces are present)

Why is there only one car horn on the car? We need to add some horns for “friendly nudge” and maybe “thanks” and maybe “sorry about that, bro!”.

Word VBA Macro: Loop and Highlight Lines Matching Search Text

I’m starting to get more sophisticated vs. my previous attempt, which involved more duplication of code. This code is easier to debug than the version in my previous post because it doesn’t needlessly repeat any stretches of code.

Sub highlight_test_results()
'
' highlight_test_results Macro
' Find instances of "Test Result:" which are not highlighted and:
'  - extend selection to end of line`
'  - highlight it
'

Dim iCount As Integer
Dim searchDone As Boolean
Dim searchTextArray(0 To 0) As String
Dim searchText As Variant
searchTextArray(0) = "Test Result:"
Options.DefaultHighlightColorIndex = wdYellow

For Each searchText In searchTextArray

    Selection.HomeKey Unit:=wdStory

    searchDone = False
    iCount = 0

    Do While searchDone = False And iCount < 1000

        iCount = iCount + 1

        Selection.HomeKey Unit:=wdStory
        With Selection.Find
            .ClearFormatting
            .Forward = True
            .Wrap = wdFindContinue
            .Text = searchText
            .Highlight = False
        End With
        Selection.Find.Execute

        If Selection.Find.Found Then
            Selection.EndOf Unit:=wdLine, Extend:=wdExtend
            Selection.Range.HighlightColorIndex = wdYellow

        Else: searchDone = True
        End If
    Loop
Next searchText

End Sub

Because I Said So!
— What you should avoid saying to your kids unless you don’t mind them accepting ideas and beliefs based on some authority’s word rather than for valid reasons. If they accept the arbitrary, it’s all down hill from there. You’ve opened the door for them to believe anything no matter how silly. They’ll probably become Republicans or Democrats and it’ll be all your fault.

Word Macro - Find lines with "fluong" and underline to end-of-line

I wrote a Word VBA macro to do some stuff I was too lazy to do by hand. I wanted to underline lines which start with my username. Now finding and underlining text is not a big deal, but extending the selection after finding it complicates matters.

This is probably not the best way to do things but it’s a good start for me. If it helps you, send me a tweet and let me know @francisluong.

http://codetidy.com/paste/embed/5853

Sub underline_fluong()
'
' underline_fluong Macro
' Find instances of "fluong" which are not underlined and:
'  - extend selection to end of line`
'  - underline it
'

Dim iCount As Integer
Dim searchText As String
searchText = "fluong"

Selection.HomeKey Unit:=wdStory

With Selection.Find
    .ClearFormatting
    .Forward = True
    .Wrap = wdFindContinue
    .Text = searchText
    .Font.Underline = wdUnderlineNone
    .Execute
End With

Do While Selection.Find.Found = True And iCount &lt; 1000

    iCount = iCount + 1

    Selection.HomeKey Unit:=wdStory
    Selection.Find.Execute

    If Selection.Find.Found Then
        Selection.EndOf Unit:=wdLine, Extend:=wdExtend
        Selection.Font.Underline = wdUnderlineSingle

        With Selection.Find
            .ClearFormatting
            .Forward = True
            .Wrap = wdFindContinue
            .Text = searchText
            .Font.Underline = wdUnderlineNone
        End With
    End If
Loop

End Sub

New Practices and Habits

I have been playing with putting different things into practice in the routines of my weeks. Here’s some of what is going on.

Mornings

I no longer have breakfast first thing. I now require that I earn my breakfast through some sort of action: walk, workout, Egoscue E-cises, etc. I believe this is having a beneficial effect on the way my body deals with hunger and blood sugar.

Bass or Excercise

Each day, I will either practice the bass guitar or do a workout. This lets me work on both and ensures that I have time for both.

Clear Calendar Invites Daily

This one is not one I have put into practice yet. But I sometimes miss invites for meetings because they get lost in the mess of e-mail. The iPhone provides a nice feature of collecting calendar meeting invites in a special inbox so I have decided I will start a new morning routine of clearing out that inbox.

A Particularly Truthful Paragraph

> “Of course obstacles exist. But part of life’s purpose is removing obstacles, or at least minimizing their impact. The worst obstacles are not found in nature, but in the irrational or erroneous things human beings do to each other—and to themselves. (For evidence, read world history and examine today’s headlines.) This is one reason why we need a field of psychology, and (more fundamentally) philosophy, and is why human beings eschew these fields at their peril.” http://drhurd.com/index.php/Daily-Dose-of-Reason/Psychology-Self-Improvement/Got-Serenity.html

This one really hits home for me. I’ve been interested in psychology and philosophy a long time and I think I really didn’t notice why until I read this.

Node-sets and relational expressions | Workflow Sherpas

  • “if any of the nodes in the node-set have a value that causes the relational expression to evaluate to true then the answer is true”
    • “if there are no nodes, then there are no nodes that can cause the operator to evaluate to true, so the answer is always false!”