BGP Attribute Checker Template File

Top  Previous  Next

# Copyright 2002 NetSense Inc.

# www.net-sense.com

# Author: Allan Silverstein

 

# Define BGP route prefixes to be tested

 

# Scenario: Normal Steady State

 

###############################################################################################

# Note, the yes/no field is whether or not the BGP best route should be present in the routing

# table.  This is good for failure scenarios where you may want to confirm that a route is not

# reachable after a failure of some type.

 

#########################################################################################################

# For router: BR1

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_1 [list "10.134.134.0" "255.255.255.0" "yes" "0.0.0.0" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_1 [list "10.45.45.1" "255.255.255.255" "yes" "0.0.0.0" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_1 [list "10.25.25.1" "255.255.255.255" "yes" "172.100.20.2" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_1 [list "10.40.40.1" "255.255.255.255" "yes" "172.16.20.5" "N/A" "100" "IGP" "  13979  13979 65101"]

lappend PREFIX_LIST_1 [list "10.30.30.1" "255.255.255.255" "yes" "192.158.10.21" "N/A" "100" "IGP" "13979 21302 65001 65501"]

lappend PREFIX_LIST_1 [list "10.60.60.1" "255.255.255.255" "yes" "192.158.10.21" "N/A" "100" "IGP" "13979 21302 65001 65501"]

lappend PREFIX_LIST_1 [list "10.50.50.1" "255.255.255.255" "no" "192.158.10.21" "N/A" "100" "IGP" ""]

 

#########################################################################################################

# For router: SJ2

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_2 [list "10.134.134.0" "255.255.255.0" "yes" "0.0.0.0" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_2 [list "10.45.45.1" "255.255.255.255" "yes" "172.100.20.1" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_2 [list "10.25.25.1" "255.255.255.255" "yes" "0.0.0.0" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_2 [list "10.40.40.1" "255.255.255.255" "yes" "172.100.20.1" "N/A" "100" "IGP" "13979 13979 65101"]

lappend PREFIX_LIST_2 [list "10.30.30.1" "255.255.255.255" "yes" "172.100.20.1" "N/A" "100" "IGP" "13979 21302 65001 65501"]

lappend PREFIX_LIST_2 [list "10.60.60.1" "255.255.255.255" "yes" "172.100.20.1" "N/A" "100" "IGP" "13979 21302 65001 65501"]

lappend PREFIX_LIST_2 [list "10.50.50.1" "255.255.255.255" "no" "192.158.10.2" "N/A" "100" "IGP" ""]

 

#########################################################################################################

# For router: 192.168.1.40 (3745)

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_3 [list "10.134.134.0" "255.255.255.0" "yes" "192.158.10.101" "N/A" "100" "IGP" "21302 13979 65000 65500 65100

"]

lappend PREFIX_LIST_3 [list "10.45.45.1" "255.255.255.255" "yes" "192.158.10.101" "N/A" "100" "IGP" "21302 13979 65000 65500 65100

"]

lappend PREFIX_LIST_3 [list "10.25.25.1" "255.255.255.255" "yes" "192.158.10.101" "N/A" "100" "IGP" "21302 13979 65000 65500 65100

"]

lappend PREFIX_LIST_3 [list "10.40.40.1" "255.255.255.255" "no" "192.158.10.101" "N/A" "100" "IGP" ""]

lappend PREFIX_LIST_3 [list "10.30.30.1" "255.255.255.255" "yes" "0.0.0.0" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_3 [list "10.60.60.1" "255.255.255.255" "yes" "192.158.10.26" "N/A" "100" "IGP" "21302 21302"]

lappend PREFIX_LIST_3 [list "10.50.50.1" "255.255.255.255" "yes" "192.158.10.26" "N/A" "100" "IGP" "21302 21302"]

lappend PREFIX_LIST_3 [list "10.70.70.1" "255.255.255.255" "yes" "192.158.10.101" "N/A" "100" "IGP" "21302 21302"]

 

#########################################################################################################

# For router: 192.168.1.27

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_4 [list "10.134.134.0" "255.255.255.0" "yes" "192.158.10.42" "N/A" "100" "IGP" "21302 13979 65000 65500 65100"

]

lappend PREFIX_LIST_4 [list "10.45.45.1" "255.255.255.255" "yes" "192.158.10.42" "N/A" "100" "IGP" "21302 13979 65000 65500 65100"

]

lappend PREFIX_LIST_4 [list "10.25.25.1" "255.255.255.255" "yes" "192.158.10.42" "N/A" "100" "IGP" "21302 13979 65000 65500 65100"

]

lappend PREFIX_LIST_4 [list "10.40.40.1" "255.255.255.255" "no" "192.158.10.42" "N/A" "100" "IGP" ""]

lappend PREFIX_LIST_4 [list "10.30.30.1" "255.255.255.255" "yes" "192.158.10.34" "N/A" "100" "IGP" "21302 21302"]

lappend PREFIX_LIST_4 [list "10.60.60.1" "255.255.255.255" "yes" "0.0.0.0" "N/A" "100" "IGP" "local"]

lappend PREFIX_LIST_4 [list "10.50.50.1" "255.255.255.255" "yes" "192.158.10.34" "N/A" "100" "IGP" "21302 21302"]

 

#########################################################################################################

# For router: Stuper (VPN_A)

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_5 [list "10.134.134.0" "255.255.255.0" "yes" "172.16.20.6" "N/A" "100" "IGP" "65000 65100"]

lappend PREFIX_LIST_5 [list "10.45.45.1" "255.255.255.255" "yes" "172.16.20.6" "N/A" "100" "IGP" "65000 65100"]

lappend PREFIX_LIST_5 [list "10.25.25.1" "255.255.255.255" "yes" "175.20.20.5" "N/A" "100" "IGP" "65000 65100"]

lappend PREFIX_LIST_5 [list "10.40.40.1" "255.255.255.255" "yes" "175.20.20.5" "N/A" "100" "IGP" "65000 65101"]

 

#########################################################################################################

# For router: Stuper (VPN_BB)

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_6 [list "10.30.30.1" "255.255.255.255" "yes" "182.30.30.65" "N/A" "100" "IGP" "21302 65001 65501"]

lappend PREFIX_LIST_6 [list "10.60.60.1" "255.255.255.255" "yes" "182.30.30.65" "N/A" "100" "IGP" "21302 65001 65501"]

lappend PREFIX_LIST_6 [list "10.50.50.1" "255.255.255.255" "no" "182.30.30.65" "N/A" "100" "IGP" "21302 65001 65501"]

lappend PREFIX_LIST_6 [list "10.70.70.1" "255.255.255.255" "yes" "182.30.30.65" "N/A" "100" "IGP" "21302 65001"]

 

#########################################################################################################

# For router: Paulper (VPN_A)

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_7 [list "10.134.134.0" "255.255.255.0" "yes" "175.20.20.6" "N/A" "100" "IGP" "65000 65100"]

lappend PREFIX_LIST_7 [list "10.45.45.1" "255.255.255.255" "yes" "175.20.20.6" "N/A" "100" "IGP" "65000 65100"]

lappend PREFIX_LIST_7 [list "10.25.25.1" "255.255.255.255" "yes" "182.30.30.101" "N/A" "100" "IGP" "65000 65100"]

lappend PREFIX_LIST_7 [list "10.40.40.1" "255.255.255.255" "yes" "182.30.30.41" "N/A" "100" "IGP" "65000 65101"]

 

#########################################################################################################

# For router: Paulper (VPN_BB)

# Variables                  subnet       mask         yes/no next_hop     metric pref origin as_path

#########################################################################################################

lappend PREFIX_LIST_8 [list "10.30.30.1" "255.255.255.255" "yes" "175.20.20.6" "N/A" "100" "IGP" "21302 65001 65501"]

lappend PREFIX_LIST_8 [list "10.60.60.1" "255.255.255.255" "yes" "175.20.20.6" "N/A" "100" "IGP" "21302 65001 65501"]

lappend PREFIX_LIST_8 [list "10.50.50.1" "255.255.255.255" "no" "175.20.20.6" "N/A" "100" "IGP" "21302 65001 65501"]

 

################################################################################

# The list of routers to telnet to and confirm the BGP routes

# Field Definitions:

# 1. rtr: Router to telnet to and check bgp routes

# 2. Does this router have a vrfs?  yes for PERs. No for CE routers.

#       This basically states whether the script needs to enter

#       "show ip bgp" or "show ip v v vpn_name bgp"

# 3. VPN name on PER router.  This is only relevant if the 2nd field is "yes"

# 4. The associated Prefixs to check on this router

#                       rtr  vrf?  vpn_name prefix list

################################################################################

lappend RTR_LIST [list "br1" "no" "VPN_A" "$PREFIX_LIST_1"]

lappend RTR_LIST [list "sj2" "no" "VPN_A" "$PREFIX_LIST_2"]

lappend RTR_LIST [list "192.168.1.40" "no" "VPN_A" "$PREFIX_LIST_3"]

lappend RTR_LIST [list "192.168.1.27" "no" "VPN_A" "$PREFIX_LIST_4"]

lappend RTR_LIST [list "stuper" "yes" "VPN_A" "$PREFIX_LIST_5"]

lappend RTR_LIST [list "stuper" "yes" "VPN_BB" "$PREFIX_LIST_6"]

lappend RTR_LIST [list "paulper" "yes" "VPN_A" "$PREFIX_LIST_7"]

lappend RTR_LIST [list "paulper" "yes" "VPN_BB" "$PREFIX_LIST_8"]