Archive

Archive for the ‘Routing’ Category

GNS3Vault.com

October 9th, 2010 No comments

I came across GNS3Vault by accident and thought I would pass it along. I’ve been doing these labs for fun at lunch or in the afternoon on a slow day and have been enjoying them. I’ve learned some new commands and have been turning up the debug output to see how everything interacts. It’s nice because there aren’t many routers involved so you can usually isolate the communication of whatever process you are configuring.

The only complaint I have for some of the labs is that there is so much of what I consider pre-configuration. I don’t want to have to play with adding IP addresses to interfaces. If you’re going to make me, at least give me some random subnet masks to make it interesting.

My hat is off to Rene for such a great resource.

Categories: CCNP ONT, CCNP TSHOOT, Musings, Routing Tags:

Even More TestLab Scripts

October 6th, 2010 No comments

I doubt many home labs match hardware exactly with whatever the vendor has recommended. As a result most of us must script around or manually edit vendor configuration files. Here are some of my earlier scripts that I have shared that have been updated and a couple of new ones.

tl-checklist — TestLab CheckList
So that others will be able to understand the process, I have decided to walk you through the use of these scripts. The first one started out as a checklist of changes to make to each different device for every lab, but that was quickly replaced with a script. Funny thing about scripts like this, it should have probably been written in Perl but I did not expect it to grow to this size.

Each lab has its own directory of configuration files and this script works its way through each configuration file making changes as it goes. Here is an output of the usage example.

Usage: tl-checklist LAB-X
   tl-checklist LAB-1

I have tried to make the script idiot proof for my own sake. The first thing it does is make a copy of the directory so that a backup of the original exists. Then it puts a marker in the directory so that the script knows whether it has updated those configuration files before. If you have run the script on that directory it will fail gracefully.

if [[ $# -ne 1 ]]
then
        echo -e "Usage: ${0} LAB-X\n ${0} LAB-1\n"
        exit 1
elif [[ -e "/tftpboot/VOL-1/${LAB}/check-list" ]]
then
    echo -e "\n${0} has been run on this directory before."
    echo -e "Please remove /tftpboot/VOL-1/${LAB}/check-list."
    echo -e "And run the script again."
    exit 1
else
    touch "/tftpboot/VOL-1/${LAB}/check-list"

    if [[ ! (-d /tftpboot/VOL-1/${LAB}.0) ]]
    then
        cp -r "/tftpboot/VOL-1/${LAB}" "/tftpboot/VOL-1/${LAB}.0"
    fi
fi

Finally it loops through each device and makes changes that are need for each device to work properly with the other scripts and for the configuration to actually match my hardware connections.

for I in R1 R2 R4 R5 R6 R7 R9 Cat1 Cat2 Cat3 Cat4 BB1 BB2 BB3
do
    CONF="/tftpboot/VOL-1/${LAB}/INITIAL/${I}.txt"
    # The $$ on the end is just in case you run this script multiple times
    # the oldest file in an ls -tlr will be the true original.
    SAVE="/tftpboot/VOL-1/${LAB}/INITIAL/${I}.txt.$$"
   
    if [ -e $CONF ]
    then
        mv $CONF $SAVE

        echo $I
   
        case $I in
        R1 )
            sed 's/^boot.*//g
            s/^warm.*//g
            s/clock rate 2000000/clock rate 128000/g' $SAVE >$CONF
        ;;
The rest is removed for brevity.

The long term reader will recognize that this script dovetails nicely with the previous testlab scripts. For instance, the backbone routers and catalyst switches are renamed to match the hostname expected in the upgrade scripts. It also uses the same command line switches so that it integrates with some of the earlier scripts.

tl-update-router — TestLab Update Router
The next script draws on tlue (testlab update expect) to go through and upgrade any number of switches or routers.

Usage: tl-update-router -l LAB-X -r Rx [dtn]
 -r Rx is required.
     If -r equals all, then the entire lab will have the specified configuration loaded.
     If -r equals routers, then the routers in the lab will have the specified configuration loaded.
     If -r equals switches, the switches in the lab will have the specified configuration loaded.
 -d load flash:def first.
 -t load flash:new from tftp
 -l LAB-X is required if tftp or new is specified.
 -n run configure replace flash:new
 -c configure the router from the console
tl-update-router -l LAB-1 -r all -dc

The final line of the usage example is how I normally run this script. This particular example tells the script to upgrade all of the switches and routers to the initial configuration for LAB-1.

tl-update-router -l LAB-1 -r all -dc

In doing so it will first run a configure replace command loading the flash:def file, then it will load the LAB-1 configuration file from the console. The reason I moved from configure replace of a tftp copied file onto flash was because I was not getting consistent results. If, however, I went back and pasted the switch or router configuration over the console input the configuration would take and as a result I just switched to having the script input the configuration over the console session.

tlue — TestLab Update Expect
The tlue script handles the interaction of the switches and routers through expect. A friend gave me a more thorough example but it seemed overkill for my purposes. By this time I know where I usually have problems, the serial interface of R2, but other than that this script works well.

This procedure in the tlue script is the one that sends the configuration over the console cable.

proc send_config {lab router} {

    puts "send_config"
    puts $lab
    puts $router
    global spawn_telnet
    set spawn_id $spawn_telnet
    expect "$router\#" {send "conf t\r\r"}
    expect -re ".*Enter configuration.*" {send "\r"}

        set file [open /tftpboot/VOL-1/$lab/INITIAL/$router.txt r]
        foreach line [ split [read $file] "\n"] {
        expect -re "$router.*" {send "$line \r"}
        }
        close $file
}

If your hardware matches that of your vendor I would recommend running tl-update-route with the configure replace option, otherwise it is porbably best to configure it from the console.

tl — TestLab
Finally, this is the last script I run which logs me into each every router or switch. It uses tlr for each terminal instance to log into the correct device, then changes the title accordingly. I do not use a “&” at the end of the command to execute in a subshell because it will not automatically log out of every session when terminating the window. Regardless, control of the terminal will be returned to you.

Categories: Code, Routing Tags:

ASA VPN NAT

September 17th, 2010 No comments

I spent the last week fighting our ASA. We have an old VPN 3000 Concentrator and I am slowly moving all of the tunnels to our ASA. But I needed to to do some NAT over a few VPN tunnels and eventually had to call for help. Since I am not the only person trying to do this, and I had little luck finding instructions, I am writing this post. Ironically, once you know how to do it, it’s simple and makes sense. Probably why I could never find someone who had taken the time to document the process.

Here are the basic steps:
1. Enable IPSec on the Outside interface.
2. Run the IPSec VPN wizard.
3. Create the static policy NAT.
4. Create a static route if needed.
5. Add a firewall rule if needed.

Here is a diagram of what we are trying to do:
VPN-NAT

Notice that we are NAT’ing from 192.168.181.2 to 192.168.81.2, there is only one digit different, but it makes a big difference.

1. Enable IPSec
First we enable IPSec on the Outside interface:
Enable IPSec on Outside Interface

Code to enable IPSec:

crypto isakmp enable Outside
crypto isakmp policy 10 authen pre-share
crypto isakmp policy 10 encrypt des
crypto isakmp policy 10 hash sha
crypto isakmp policy 10 group 2
crypto isakmp policy 10 lifetime 86400
crypto isakmp policy 5 authen pre-share
crypto isakmp policy 5 encrypt 3des
crypto isakmp policy 5 hash sha
crypto isakmp policy 5 group 2
crypto isakmp policy 5 lifetime 86400

2. IPSec VPN Wizard
Second we fire up the IPSec VPN Wizard:
VPN Wizard Step 1

VPN Wizard Step 2

VPN Wizard Step 3

VPN Wizard Step 4

Notice the pointer in this screenshot. If you are going to NAT over the VPN tunnel, make sure this is not checked. You can delete it later, all it does is make a NAT for you, we will make our own policy NAT instead. Also please take note that the interesting traffic defined is the NAT’ed addresses not the actual IP address of the host.
VPN Wizard Step 5

VPN Wizard Step 6

The resulting code from the VPN Wizard:

object-group network DM_INLINE_NETWORK_1
  network-object host 192.168.81.2
  network-object host 192.168.81.3
access-list Outside_1_cryptomap line 1 extended permit ip object-group DM_INLINE_NETWORK_1 host 172.22.108.201
tunnel-group 198.136.146.10 type ipsec-l2l
tunnel-group 198.136.146.10 ipsec-attributes
  pre-shared-key TESTING
  isakmp keepalive threshold 10 retry 2
crypto isakmp policy 30 authen pre-share
crypto isakmp policy 30 encrypt aes-256
crypto isakmp policy 30 hash sha
crypto isakmp policy 30 group 5
crypto isakmp policy 30 lifetime 86400
crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto map Outside_map 1 match address Outside_1_cryptomap
crypto map Outside_map 1 set  peer  198.136.146.10
crypto map Outside_map 1 set  transform-set  ESP-AES-256-SHA
crypto map Outside_map interface  Outside

3. Static Policy NAT
Although it is not on the diagram, I am adding two NAT rules to the ASA:
192.168.181.2 –> 192.168.81.2 if going to 172.22.108.201
192.168.181.3 –> 192.168.81.3 if going to 172.22.108.201

Static Policy NAT

The code to add a policy NAT.

access-list Inside_nat_static extended permit ip host 192.168.181.2 host 172.22.108.201
static (Inside,Outside)  192.168.81.2 access-list Inside_nat_static tcp 0 0 udp 0

Static Policy NAT

The code to add another policy NAT.

access-list Inside_nat_static_1 line 1 extended permit ip host 192.168.181.3 host 172.22.108.201
static (Inside,Outside)  192.168.81.3 access-list Inside_nat_static_1 tcp 0 0 udp 0

4. Add a Static Route
This step depends upon your routing table.

Static Route

The code to add a static route:

route Outside 172.22.108.201 255.255.255.255 198.136.146.10 1

5. Add a firewall rule.
Once again, this step depends upon the rules in our firewall. This rule is very permissive, we are testing.

Firewall Rule

The code to add a firewall rule:

object-group network DM_INLINE_NETWORK_2
  network-object host 172.22.81.2
  network-object host 172.22.81.3
access-list Inside_access_in line 5 extended permit ip object-group DM_INLINE_NETWORK_2 host 172.22.108.201  log disable

And finally, the test ping from 192.168.181.2 to 172.22.108.201:
Ping 172.22.108.201

Categories: Routing Tags:

The Doc CD

July 23rd, 2010 2 comments

Cisco documentation is expansive, it is both broad and has great depth, as a result finding what you need is not easy. When you watch a CCIE navigate the “Doc CD” or documentation website you realize how deeply they understand the documentation website.

I watched the free Doc CD lecture the other day at INE, I wish I could find the link sorry, then I watched the IPE documentation tutorial and have been forcing myself to use the site hierarchy rather than searching. I thought I would share some notes.

For instance, today I wanted to look at VACLs so I went:

  • Cisco.com
    • Documentation
      • Products
        • Switches
          • LAN Switches Access
            • Catalyst 3560-E
              • Configuration Guides
                • Catalyst 3750-E and 3560-E Switch Configuration Guide

Then clicked around on different VLAN topics. Nothing.

So I fell back to the standard Google search:

VACL site:cisco.com

Clicked I’m Feeling Lucky. But I wanted to learn where it was really located, so I backtracked by looking at the navigation bar on the left side.
cisc.com screenshot

But to really learn the documentation it doesn’t end there. I go back through the Doc CD:

  • Cisco.com
    • Documentation
      • Technology
        • LAN Switching
          • LAN Security
            • VACLs
              • Securing Networks with Private VLANs and VLAN Access Control Lists

General Notes
Below are my notes on where to find different documentation on the Cisco website. I actually have this written long hand in a notebook that I still refer to when navigating around. I believe the key is repetition so I try and force myself to navigate “properly.”

This is the site I have bookmarked for the DocCD.

  • Cisco.com
    • Documentation
      • Cisco IOS and NX-OS Software
        • Cisco IOS
          • Cisco IOS Software Release 12.4 Family
            • Cisco IOS Software Releases 12.4 T

You can tell from the purple links where I surf.
IOS 12.4T Documentation Screenshot
The links that are the most useful.

  • Master Index
  • Command References
  • Configuration Guides

Master Index
This is useful if you know the command but just want to confirm what it does.  The other day I looked up:

spanning-tree mst configuration

Just click the on the Master Index and the correct alphabetical range, then use find in your browser to find the command you need to reference. It provides a different interface into the Command References.

Command References
Gives a short description of the command and what it does.  Then it breaks out the syntax and the options involved.  Finally it explains when the feature was added and a revision history.  I always wondered how people knew when what command had been implemented and was amazed at their recall.  Now I know, just look at the command reference.  Duh.

Configuration Guides
These are the more in depth guides. They usually start with a technology overview and provide a simple scenario and configuration. Then they get into the details of different commands and option and often include more examples with multiple routers or switches using some of the more advanced configuration options of the technology discussed. This is where I spend most of my time now, however, in the future I hope to be referencing the Master Index more than the Configuration Guides.

Below is an outline of where to find some of the technologies I reference most often.

  • Dial Technologies
    • PPP
  • IP
    • IP Addressing Services
      • IP Addressing
      • ARP
      • DHCP
      • DNS
      • NAT
    • Application Services
      • SLA
      • Enhanced Object Tracking
      • First Hop Redundancy Protocols
      • UDP
    • Multicast
    • IP Routing: X Protocol
    • IP Switching
      • CEF
    • IPv6
    • OER
  • Long Reach Ethernet
    • Broadband Access
      • PPPOE
  • MPLS
  • Network Management
    • Network Management
      • EEM
  • QoS
  • Security and VPN
    • Securing the Control Plane
      • Control Plane Policing
    • Securing the Data Plane
      • ACLs
      • CBAC
      • IPS
  • System Management
  • WAN
    • Frame Relay
    • Layer 2 Tunneling Protocol Version 3
  • Additional Legacy Protocols
    • Terminal Services
      • Appendix
        • Regular Expressions
Categories: Routing Tags:

More TestLab Scripts

June 25th, 2010 No comments

I wrote a couple more scripts this week. These two little gems update my entire lab by running one command from the testlab tftp server. I pass the main script a lab name and it proceeds to update every router and switch in the testlab to the new initial lab configuration. I have tested it on at least one 1841, 2611, 3640, 3550 and 3560. I probably spent more time writing the scripts than it would have taken me to upgrade the testlab by hand for each lab, but I guess I’ll never know. You can download the scripts here.

Let me explain how it is done. Every router and switch has a configuration file named flash:def. When the whole lab has flash:def loaded they can all get to the tftp server for the lab. First side note: it was named flash:default but default is a reserved word in expect so I had to change the name, def is short for default.

In the first round of interaction the script saves every running-config to flash:new and then does a configure replace flash:def. If you just wanted to reset your lab each time, you could stop the script there. You should make sure that the switches all get changed to a VTP mode transparent and set to a new VTP domain, oddly enough I used def as my VTP domain. By making all of the switches transparent if the new config loads any VLANs or changes the domain your VTP domain will be reset. Second side note: I was going to save the original running-config as flash:save, that would still be a trivial change to make and then you could go back and review the config if you needed, but some labs build on top of the next, so I didn’t.

After each router and switch has the def configuration file loaded the script does an ls of the correct lab directory on the tftp server and proceeds to tftp the new configuration file as flash:new, overwriting the previously saved running-config. The tftp server is hooked to the switch named Cat4 which is the last host upgraded by the script so all devices can get to the tftp server.

Finally the script goes back through each device doing a round of configure replace:new. The best part of this is that there is no reload. The 2611 can take nearly 10 minutes to reload so I did not want to have to reload any devices.

In summary this is the process:
1. Save every running-config as flash:new.
2. Load the default configuration flash:def that allows for tftp access for the entire lab.
3. Copy the initial configuration for the new lab to flash:new on the routers that need it, overwriting the saved flash:new.
4. Run configure replace flash:new on ever device, bringing up the newest lab.

Here is a listing of the files on R2.

R2#dir flash:
Directory of flash:/

    1  -rw-    32632600                    <no date>  c3640-a3js-mz.124-25b.bin
    2  -rw-        1132                    <no date>  r2-basic-ios.cfg
    3  -rw-        1200                    <no date>  r2-gre.cfg
    4  -rw-        6446  May 28 2002 02:23:57 +00:00  ipbasic.cfg
   13  -rw-         883                    <no date>  save
   15  -rw-        1061                    <no date>  def
   18  -rw-        1226                    <no date>  new

33030140 bytes total (372576 bytes free)
R2#

This is the tlu script. It is just the simple front end to the tlue script.

#!/bin/bash
# 2010-05-25 Jud Bishop
# tlu (testlab update)
# One of two scripts that updates the entire testlab to the current lab.
# This script calls tlue (testlab update expect) that does the heavy lifting.

if [ $# -ne 1 ]
then
        echo -e "Usage: ${0} LAB-X\n ${0} LAB-1\n"
        exit 1
fi

LAB=${1}

# First go through and set every router or switch to the default configuration.
# Calling tlue (testlab update expect) with the def command, the def
# configuration sets every router to clean confiuration that allows access to
# the tftp server.  
# R3 is the frame switch so it is not included.
config_replace ()
{
        LAB=${1}
        CONFIG=${2}
        for ROUTER in R1 R2 R4 R5 R6 R7 R8 R9 BB1 BB2 BB3 Cat1 Cat2 Cat3 Cat4
        do
                echo $ROUTER $LAB $CONFIG
                tlue $ROUTER $LAB $CONFIG
                sleep 10
        done
}

#
## Main
#
config_replace $LAB "def"

for CONFIG in `ls /tftpboot/VOL-1/${LAB}/INITIAL/`
do
        ROUTER=`basename $CONFIG .txt`
        echo $ROUTER
        tlue $ROUTER ${1} tftp
        sleep 10
done

config_replace $LAB "new"

The expect script is the one that does all of the work and took the most time to write.

#!/usr/bin/expect -f
# 2010-06-25 Jud Bishop
# tlue (testlab update expect)
# This script does the heavy lifting of updating the testlab.
# If you use this script you will have to change the IP address
# in the procedure copy_tftp.

set host "testlab.chainringcircus.org"
set pass "CHANGEME"
set ctrlz \032
set timeout 100
set spawn_telnet 0

# Sent in from the command line.
set router [lindex $argv 0]
set lab [lindex $argv 1]
set config [lindex $argv 2]

proc login {router} {
        puts "login"
        global host pass ctrlz spawn_telnet
        spawn telnet $host
        expect "Password:" {
                send "$pass\r"
        }

        expect "testlab>" {
                send "telnet $router\r"
        }
        sleep 2

        expect "Open" {
                send "\r"
        }
        sleep 2

        # Just in case we are in configure mode.
        send "$ctrlz"
        send "\r"
        set spawn_telnet $spawn_id
}

proc save_config {router} {
        puts "save_config"
        global spawn_telnet
        set spawn_id $spawn_telnet
        # Saving the current config in case I want it for some reason.
        expect "$router#" {
        send "copy run flash\:new\r"
        }

        # Destination filename [new]?
        expect {
                 "\[new\]" {send "\r"}
        }

        #Do you want to over write? [confirm]
        expect {
                -re ".*Do you want to over write.*" {send "y\r"}
                "$router#" {send "\r"}
        }
        sleep 2

        # No, do not erase flash:.
        # Erase flash: before copying? [confirm]
        expect  {
                 -re "Erase flash\:" {send "n"}
                "$router#" {send "\r"}
        }
        sleep 2
}

# Pass in the file to load from flash, for me it's either "new" or "def".
proc configure_replace {config router} {
        puts "configure_replace"
        global spawn_telnet
        set spawn_id $spawn_telnet
        # This gets the router/switch to a known configuration that can reach the ftp server.
        expect "$router#" {
                send "configure replace flash\:$config\r"
        }

        #configure replace flash:default
        #This will apply all necessary additions and deletions
        #to replace the current running configuration with the
        #contents of the specified configuration file, which is
        #assumed to be a complete configuration, not a partial
        #configuration. Enter Y if you are sure you want to proceed. ? [no]:
        expect -re "(.*)(no)(.*)" {
                send "y\r"
        }
        sleep 5
}

proc copy_tftp {lab router} {
        puts "copy_tftp"
        global spawn_telnet
        set spawn_id $spawn_telnet
        #R1#copy tftp://192.168.1.234/R1.txt flash:new
        expect "$router\#" {
                send "copy tftp://192.168.1.234/VOL-1/$lab/INITIAL/$router.txt flash:new\r"
        }

        #Destination filename [new]?
        expect {
                -re "Destination filename" {send "\r"}
        }

        #Erase flash: before copying? [confirm]n
        #OR
        #Do you want to over write? [confirm]y
        #expect -re {
        #       "(.*)(before copying)(.*)" {send "n\r"}
        #       "(.*)(over.write)(.*)" {send "y\r"}
        #}
        #Do you want to over write? [confirm]
        expect {
                -re ".*Do you want to over write.*" {send "y\r"}
                "$router#" {send "\r"}
        }
        sleep 2

        #If it was over write above, now it might ask for erase flash or
        #return the router prompt.
        #Erase flash: before copying? [confirm]
        expect {
                -re "Erase flash" {send "n\r"}
                "$router#" {send "\r"}
        }

        #Loading R1.txt from 192.168.1.234 (via FastEthernet0/0): !
        #[OK - 902 bytes]
        #Verifying checksum...  OK (0xFBC4)
        #902 bytes copied in 0.232 secs (3888 bytes/sec)
        #R1#

        expect "$router#" {
                send "\r"
        }
}

#
## Main
#
# Oh the irony.  If only I had known how many problems calling my "default"
# configuration flash:default would cause me.  As a result I changed it to def.
# However instead of a nice switch statement I'm using an if block, default is a
# reserved word in Tcl switch statements.  I did not take the time to go back and
# change it.
puts "router $router"
puts "lab $lab"
puts "config $config"

if {[ string compare $config tftp ] == 0}  {
        login $router
        copy_tftp $lab $router
} elseif {[ string compare $config new ] == 0}  {
        login $router
        configure_replace new $router
} elseif {[ string compare $config def ] == 0} {
        login $router
        save_config $router
        configure_replace def $router
} else {
        puts "tlue router lab \[def new tftp\]"
        puts "Example:"
        puts "tlue R1 LAB-1 def"
        puts "default saves the running-config to flash:new and runs configure replace:flash:default"
        puts "tftp loads the correct configuration for the lab from the tftp server as flash:new"
        puts "new runs configure replace flash:new, replacing the running config with new"
        exit
}

exit
Categories: Code, Routing Tags:

TestLab Scripts

June 18th, 2010 2 comments

I wrote a couple of scripts for the testlab this week and figured I would share them. You can download them here. These could be modified for a GNS3 lab setup easily as well. Not wanting to reinvent the wheel I googled around and started hacking another script. It started off with something like this:

#!/bin/sh
# Usage: $0 [command]
pgrep -u "$USER" gnome-terminal | grep -qvx "$$"
if [ "$?" -eq 0 ]; then
  WID=`xdotool search --class "gnome-terminal" | head -1`
  xdotool windowactivate $WID
  #xdotool key ctrl+shift+t
  xdotool key ctrl+t

But gnome-terminal sets the environmental variable WINDOWID so I began by changing it to:

#!/bin/sh
# Usage: $0 [command]

xdotool windowactivate $WINDOWID
xdotool key ctrl+t

But then I read the gnome-terminal manpage to see what other environmental variables it set and decided all the xdotool commands were too much for what I needed. So I simplified into two main scripts, one to handle the gnome-terminal interactions and one to handle the router interactions.

#!/bin/bash
# 2010-06-14 Jud Bishop
# tlr
# This script opens a single gnome-terminal tab and log into a router in
# the testlab.

if [ $# -ne 1 ]
then
    echo -e "Usage: ${0} router_id\n tlr R1\n"
    exit 1
fi

gnome-terminal --tab -e "tle ${1}" -t "${1}"

The expect script to handle the interaction with the 2511-RJ getting logged into the router.

#!/usr/bin/expect
# 2010-06-14 Jud Bishop
# tle
# A short script to handle logging into a router in the lab.

set host "testlab.chainringcircus.org"
set pass "CHANGEME"

##############################
# Should not need any more changes.
set router [lindex $argv 0]

spawn telnet $host
expect "Password:"
send "$pass\r"
expect "testlab>"
send "telnet $router\r"
sleep 1
send "\r"
sleep 1
send "\r"
interact
exit

And finally the script that logs into every router in the lab, renaming the tab title to match the router name.

#!/bin/bash
# 2010-06-14 Jud Bishop
# tl
# This script fires up gnome-terminal with a bunch of tabs each executing
# the tle script and naming the tab with the router name.

gnome-terminal --tab -e "tle R1" -t "R1" \
--tab -e "tle R2" -t "R2" \
--tab -e "tle R3" -t "R3" \
--tab -e "tle R4" -t "R4" \
--tab -e "tle R5" -t "R5" \
--tab -e "tle R6" -t "R6" \
--tab -e "tle R7" -t "R7" \
--tab -e "tle R8" -t "R8" \
--tab -e "tle R9" -t "R9" \
--tab -e "tle Cat1" -t "Cat1" \
--tab -e "tle Cat2" -t "Cat2" \
--tab -e "tle Cat3" -t "Cat3" \
--tab -e "tle Cat4" -t "Cat4" \
--tab -e "tle BB1" -t "BB1" \
--tab -e "tle BB2" -t "BB2" \
--tab -e "tle BB3" -t "BB3"
Categories: Code, Routing Tags:

IPv6 Troubleshooting

May 30th, 2010 1 comment

IPV6 Addressing
• 128 bit addresses.
• Simplified header with fewer fields; IPv4 has 12 fields, IPv6 has 5 fields;
• No checksum in the header. This results in more efficient process because in IPv4 the TTL is decremented at each hop, the checksum had to be recalculated at each hop, that is not the case with IPv6.
• No packet fragmentation done by the router, instead an ICMP “packet too big” message is sent to the client. Fragmentation information has been moved to an extension header.

Types of IPv6 Addresses
• Unicast — Send to one interface.
• Multicast — Send to many hosts in a group in the FF00::/8 address range.
• Anycast — Send to the nearest host in a group.

Abbreviate IPv6 Addresses
• Leading zeros in a field can be omitted.
• Contiguous fields containing zeros can be abbreviated with “::”.
• eui-64 addresses use the MAC address for the lower 64 bits of an IPv6 address. The MAC address is split in half and FFFE is placed between the two halves to make the 48 bit MAC into 64 bits, universal/local (U/L) flag (bit 7) in the OUI portion of the address is flipped as well.

Troubleshoot IPv6
sh ipv6 int — Validates the IPv6 and status of interfaces.
sh ipv6 routers — Displays IPv6 router advertisements.
sh ipv6 route — Shows the routing table. DUH.
sh ipv6 protocols — Shows parameters and state of the active IPv6 protocols.
debug ipv6 nd — Debug IPv6 neighbor discovery.
debug ipv6 routing — Display debugging messages for IPv6 routing table and route cache updates.
debug ipv6 packet — Displays the debugging messages for IPv6 packets.

IPv6 Configuration
ipv6 cef
ipv6 unicast-routing
ipv6 address xxxx::xxxx/xxx

OSPFv3
Configure OSPFv3
ipv6 router ospf 6
router-id 10.1.1.10
log-adjacency-changes

interface Tunnel0
no ip address
ipv6 address 2026::34:2/122
ipv6 ospf 6 area 34

Troubleshoot OSPFv3
sh ipv ospf neigh
sh ipv ospf
sh ipv ospf int

sh ipv ospf neigh

R4#sh ipv osp neigh

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
10.1.1.9          1   FULL/  -        00:00:35    14              Tunnel0

sh ipv ospf

R4#sh ipv ospf
 Routing Process "ospfv3 6" with ID 10.1.1.10
 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 Reference bandwidth unit is 100 mbps
    Area 34
    Number of interfaces in this area is 1
    SPF algorithm executed 3 times
    Number of LSA 8. Checksum Sum 0x03A4B8
    Number of DCbitless LSA 0
    Number of indication LSA 0
    Number of DoNotAge LSA 0
    Flood list length 0

sh ipv ospf int

R4#sh ipv ospf int
Tunnel0 is up, line protocol is up
  Link Local Address FE80::A01:10A, Interface ID 11
  Area 34, Process ID 6, Instance ID 0, Router ID 10.1.1.10
  Network Type POINT_TO_POINT, Cost: 11111
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:04
  Index 1/1/1, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.1.1.9
  Suppress hello for 0 neighbor(s)

RIPng
• IPv6 multicast address FF02::9 is the destination address for RIPng update messages.
• Link-local addresses used for next-hop addresses
• Metric is hop count and 15 is still the maximum, 16 is unreachable.
• Distance-vector

Configure RIPng
To set up a 3560 switch for IPv6 you must first configure the switch database management (SDM) template to one that supprts IPV6. The rest of the configuration is the same on a router and a layer 3 switch.

DSW1(config)#sdm prefer dual-ipv4-and-ipv6 routing
DSW1(config)#^Z
DSW1#wri mem
DSW1#reload
DSW1(config)#ipv6 cef
DSW1(config)#ipv6 unicast-routing
DSW1(config)#ipv6 router rip RIP_ZONE
DSW1(config-rtr)#int fa0/1
DSW1(config-if)#ipv6 address 2026::2:2/122
DSW1(config-if)#ipv6 rip RIP_ZONE enable

Troubleshoot RIPng
sh ipv6 protocols — What protocols are running on what interfaces.
sh ipv6 rip RIP_ZONE — Show general RIPng information concerning the specific RIP_ZONE.
sh ipv6 rip database — Shows the routes in the RIB.
sh ipv6 rip next-hops — Next hops out of this router as seen by RIPng.

sh ipv6 protocols

R4#sh ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "ospf 6"
  Interfaces (Area 34):
    Tunnel0
  Redistribution:
    None
IPv6 Routing Protocol is "rip RIP_ZONE"
  Interfaces:
    FastEthernet0/1
    FastEthernet0/0
  Redistribution:
    Redistributing protocol ospf 6 with metric 5

sh ipv6 rip RIP_ZONE

R4#sh ipv6 rip RIP_ZONE
RIP process "RIP_ZONE", port 521, multicast-group FF02::9, pid 195
     Administrative distance is 120. Maximum paths is 16
     Updates every 30 seconds, expire after 180
     Holddown lasts 0 seconds, garbage collect after 120
     Split horizon is on; poison reverse is off
     Default routes are not generated
     Periodic updates 15471, trigger updates 7
  Interfaces:
    FastEthernet0/1
    FastEthernet0/0
  Redistribution:
    Redistributing protocol ospf 6 with metric 5

sh ipv6 rip database

R4#sh ipv6 rip database
RIP process "RIP_ZONE", local RIB
 2026::2:0/122, metric 2
     FastEthernet0/0/FE80::212:D9FF:FEA5:1541, expires in 166 secs

<strong>sh ipv6 rip next-hops</strong>
<code>    
R4#sh ipv6 rip next-hops
 RIP process "RIP_ZONE", Next Hops
  FE80::212:D9FF:FEA5:1541/FastEthernet0/0 [1 paths]
Categories: CCNP TSHOOT, Routing Tags:

The rest of the story.

May 30th, 2010 No comments

In short, I returned my e-book to Narbik. I would recommend Micronicstraining to anyone. In fact I am now even more likely to go to Narbik’s class then I was before this incident.

The long version.
Later that day I called Micronicstraining to discuss my misgivings with them and actually spoke with Narbik. He was very helpful and understood my concerns saying that there would be no problem giving me licenses for more than one computer. With that I got off the phone placated to some extent. I tried to install LockLizard onto Wine and figured I would just deal with the inconvenience. But the installation onto Wine failed and I did not install LockLizard on Windows nor did I try to open the e-book. I didn’t even unrar the files.

That night I tossed and turned, woke up in the middle of the night and pondered my predicament. I figured I had nothing to loose by asking for my money back. That next morning I sent an email to Narbik explaining my dilemma. It is below.

Sir,

Regretfully I am writing to you to request a refund. I have not
activated my LockLizard license and am requesting that you have it
deactivated.

I would like to thank you for taking the time with me on the phone
yesterday. I had fewer misgivings concerning the number of computers
I would be allowed to study on after our conversation, however, I have
developed a study routine over the past 18 months and shoehorning
Windows into that process would not be beneficial at this time. I do
realize the lab PC runs Windows but I had already decided the last few
months of lab practice would be done in a Windows environment, not the
core of my studies.

I am truly disappointed. I downloaded the free workbook and have done
a number of labs from it. Because of that previous experience with
Micronics I did not expect the type of copy protection used in the
workbook as there is no mention of LockLizard on the Micronics
website. Over the past few months I have frequently visited the table
of contents for your workbook to map out my studies. My work
environment is based upon Linux, I do not have a Windows PC at home,
and I would be forced to change my study process in order to use the
workbook.

If you decide to change your copy protection to something more along
the lines of O’Reilly Media or Internetwork Expert please contact me,
I will be the first to purchase your workbook in a more portable
format. If you need to speak with me directly, my office phone number
is (xxx) xxx-xxxx and my cell phone number is (xxx) xxx-xxxx.

Sincerely,

Jud Bishop

Categories: Linux, Musings, Routing Tags:

I feel like I got ripped off.

May 25th, 2010 4 comments

Yesterday I ordered the Advanced CCIE Routing & Switching 2.0 Work Book from Narbik and figured I would share my experience.

If you have read my post on the TSHOOT book you have an understanding of my disdain for DRM and the reasons for it. It boils down to the fact that I use Linux as my primary environment at work and home, we don’t even have a Windows PC at home, and most of the DRM out there requires Windows. So then I have to load whatever I need on my work laptop, but if I am studying at home I have to make sure I bring my laptop home.

Imagine my disappointment when I got the following email from Micronics after I spent $350 on an e-book. I could not find anything on the Micronics website that says the DRM is this draconian.

If you follow the link inside the quote, it says you must use either Windows or a Mac. I am going to say this again, get SafariBooksOnline, O’Reilly is a company that understands technical people and caters to them. I am sure that Narbik is a great teacher and I hope these books are as good as they say, otherwise I will know I got ripped off.

Dear Student,

You will receive three separate emails.
1. Locklizard License
2. Vol. I & II
3. Vol. III

Since you will have only one license, choose a PC or Laptop that your Secured File will reside.

Please follow these procedures before you open the attached file:
1. First you need to open, Download and Install Lizard Safeguard Secure PDF Viewer Email (sometimes this email is considered a SPAM and if you have Gmail it goes to “7 or More” section of your Gmail).

2. Once you completed this step, you need to scroll down the page and double click on the .llv file and download.

3. After installing your PDF Viewer, open the Secured PDF Files that you have received as an attachment.

You can check the operating systems requirement on the following link:

http://www.locklizard.com/LockLizard_Secure_PDF_Viewer_v25.pdf

If you have difficulty opening your files you contact me as soon as possible so we can walk you through this process.

Thank you for your business – we appreciate it very much.

Janet Kocharians
Director of Marketing & Sales
Micronics Inc.
Mobile: (818) 331-2419
Fax: (818) 249-8388

Categories: Musings, Routing Tags:

Troubleshoot Voice, Video and Multicast

May 10th, 2010 No comments

I have had a hard time figuring out how they are going to test us for voice troubleshooting when the only real command they cover is auto qos and and the MQC. As a result I’m going to concentrate on the definitions.

Voice Definitions
Gatekeeper — provides bandwidth management through call admission control (CAC).
Gateway — ensures interoperability between VOIP and the public switched telephone network (PSTN).
Jitter (delay variation) — When consecutive packets experience different amounts of delay. Data applications tend to be much more forgiving of jitter than voice and video.
Delay — There are multiple types of delay in a network. Some are standard or fixed and some are variable in their affects, the TSHOOT book describes delay as propagation delay, the time it takes to get a bit from one end of a link to the other.
Drops — Congested packets overflow a buffer.

Cisco Phone Boot Process
1. Power, PoE
2. Load firmware from flash.
3. Catalyst switch informs the phone it’s voice VLAN.
4. DHCP for ip address and TFTP server.
5. Downloads configuration using TFTP.
6. Registers with call agent or Call Manager.

QoS Metrics for Video

QoS Metric HQ Audio & Video PC Video Conference Video Surveillance VOIP
One-Way Delay 150 ms 200 ms max 500 ms 150-200 ms1, 2
Jitter4 10 ms 10 ms 10 ms 30 ms
Loss 0.05 % max 0.05 % max 0.5 % max 1.0 % max 3

Sources:
1 — ONT Certification Guide p.62
2 — Cisco DocWiki
3 — Enabling VOIP
4 — TSHOOT Book

Multicasting
Class D IP address in the range 224.0.0.0 through 239.255.255.255. Source sends one packet stream to the multicast address and all hosts that have joined that group receive that packet.

Internet Group Management Protocol (IGMP)
Hosts join a multicast group by sending an IGMP join message to router, which then knows to send multicast messages out that interface. IGMP snooping allows a switch to learn which interfaces desire multicast traffic by listening for IGMP traffic between routers and hosts. This stops the switch from flooding multicast traffic out all ports.

IGMP Version 1 — Hosts join a multicast group by sending a membership report to its local router. Every 60 seconds the querier router sends a messages to all-hosts 224.0.0.1 to ensure that there is a host on that network segment that is still in the group. IGMPv1 does not have a mechanism for hosts to leave a group, and it takes three query intervals (3 minutes) to stop sending multicast traffic to a segment.

IGMP Version 2 — Adds the ability for routers to query a specific multicast group, elect a querier for a segment and allows a host to send a leave group message to the all routers address 224.0.0.2. All routers start as queriers, however, if a router hears a query from another router, the router with the highest IP address on the segment becomes the querier for that segment.

Reverse Path Forwarding (RPF) — Verifies that multicast traffic flows away from the source or root and is flowing toward the branch or host.

Protocol Independent Multicast (PIM) — Allows multicast to build distribution trees regardless of the unicast routing protocol which is running such as EIGRP or OSPF.

PIM Dense Mode (PIM-DM) — Uses a source distribution tree. At first all routers receive traffic for the group, but if no host joins using IGMP the router sends a prune message so that unnecessary traffic does not continue. Most often used when recipients are on every subnet, densely populated.

PIM Sparse Mode (PIM-SM) — Uses a shared tree with a root router or rendezvous point (RP) that is not necessarily the multicast source but is usually centrally located on the network. All multicast streams go through this router, hence the name share tree or shared distribution tree. A router only joins the tree when a host has joined the multicast group. It is built opposite of dense mode, the tree is built from the leaves to the root, it is only when a host joins a multicast group that the router forwards the membership report to the RP.

PIM Sparse-Dense Mode — Allows a router to use sparse or dense-mode or both at the same time. Dense mode is used to flood RP discovery and announcement messages so that the client can find the RP and use the RP to find the multicast server.

Multicast Configuration

switch(config)# ip igmp snooping
switch(config)# ip igmp snooping vlan x

router(config)# ip multicast-routing
router(config)# ip pim {dense-mode | sparse-mode | sparse-dense-mode}
router(config)# ip pim version {1 | 2}

Multicast Troubleshooting
ip igmp join-group — Let’s a router join a group in order to test.
sh ip igmp group — Shows the groups a router has joined.
sh ip igmp interface — Shows IGMP information for each interface.

sh ip mroute
ping multicast address
sh ip pim rp
sh ip rpf

sh ip igmp group

R1#sh ip igmp groups
IGMP Connected Group Membership
Group Address    Interface                Uptime    Expires   Last Reporter   Group Accounted
232.32.32.32     Loopback1                00:06:35  00:02:18  192.168.1.1    
224.0.1.40       Loopback1                00:06:35  00:02:16  192.168.1.1

sh ip igmp interface

R1#sh ip igmp interface
Loopback1 is up, line protocol is up
  Internet address is 192.168.1.1/24
  IGMP is enabled on interface
  Current IGMP host version is 2
  Current IGMP router version is 2
  IGMP query interval is 60 seconds
  IGMP querier timeout is 120 seconds
  IGMP max query response time is 10 seconds
  Last member query count is 2
  Last member query response interval is 1000 ms
  Inbound IGMP access group is not set
  IGMP activity: 2 joins, 0 leaves
  Multicast routing is enabled on interface
  Multicast TTL threshold is 0
  Multicast designated router (DR) is 192.168.1.1 (this system)
  IGMP querying router is 192.168.1.1 (this system)
  Multicast groups joined by this system (number of users):
      224.0.1.40(1)  232.32.32.32(1)

sh ip mroute

R1#sh ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 232.32.32.32), 00:21:25/stopped, RP 0.0.0.0, flags: DCL
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Serial1/1, Forward/Dense, 00:21:25/00:00:00
    Serial1/0, Forward/Dense, 00:21:25/00:00:00
    Loopback1, Forward/Dense, 00:21:25/00:00:00

ping multicast address

R1#ping 232.32.32.32    

Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 232.32.32.32, timeout is 2 seconds:

Reply to request 0 from 172.16.102.2, 12 ms
Reply to request 0 from 172.16.103.3, 16 ms
Reply to request 0 from 192.168.1.1, 16 ms
Categories: CCNP TSHOOT, Routing Tags: