Nortel Internet Telephones – Network Loops

404029_6094 A Tek-Tips forum member recently reported that one of his technicians improperly cabled a Nortel i2002/i2004 Internet Telephone (plugging both the ports on the back of the Internet Telephone into the network switch) causing a loop which took down their entire network. The member was curious about how to configure Spanning Tree to help prevent this problem. I went digging and found the following information in the current phone firmware release notes;

Network Loop (Applies to IP Phone 2002, 2004, 2007, 1120E, 1140E)
These firmware releases include a fix to help prevent network loop scenarios from being introduced into the network, and the resultant network outages that can occur. The network loop avoidance fix was first introduced in 0604D9H, 0621C2B, 0624C1E and 0625C1E. One important note when upgrading to 0604DBN, 0621C4T, 0624C4L or 0625C4L from any load previous to 0604D9H, 0621C2B, 0624C1E or 0625C1E respectively, is that IP Phones that were inadvertently mis-wired during initial installation will not be allowed to work until the cabling problem is corrected. This fix is only an issue if the installer, when installing the Nortel IP Phone 2002, 2004, 2007, 1120E or 1140E, inadvertently connected the network Ethernet cable to the PC Ethernet port on the back of the phone, instead of connecting it to the network Ethernet port on the back of the phone. Phase II IP Phones (2002 and 2004) running firmware previous to 0604D9H, IP Phones 2007 running firmware previous to 0621C2B and IP Phone 1120E and 1140E running firmware previous to 0624C1C and 0625C1C respectively will work when incorrectly connected, but this does introduce the potential for network degradation. These new firmware loads will try and safe guard the network by trying to prevent phones that are mis-cabled to function. This means that the IP Phones that are working on a previous release of firmware may stop working if they are not correctly wired.

But realize that a mis-cabled phone may still work, even with the new firmware, if the network infrastructure supports Auto MDIX. If the network infrastructure supports Auto MDIX, network loop can still occur if the network is not running the Spanning Tree Protocol (STP) or a similar loop avoidance protocol.

As a preventative measure to reduce the potential for network degradation, and to prevent mis-cabled phones from ceasing to work when their firmware is upgraded, please consider taking the necessary steps to ensure your Nortel IP phones network cables are plugged into the correct ports on the back of the phone – network cable into the network Ethernet port, and the PC Ethernet cable (if connecting a PC) to the PC Ethernet port (little computer icon) on the back of the phone.

I’ve highlight a very important caveat above in RED. While this was and is a great feature of the new phone firmware the important piece to realize here is that if the network switch supports Auto MDIX, which the Nortel Ethernet Routing Switch 5520 and Ethernet Switch 470 PWR do you can’t rely on this feature alone to protect your network.

Ever since the release of the Nortel Ethernet Switch 470 we now configure Spanning Tree on every port with the exception of the core MLT/SMLT uplinks. Prior to the availability of the “Auto MDIX” feature a technician would need a crossover cable to physically put a loop between two switch ports. We made sure there were never any crossover cables left lying around. With the arrival of the “Auto MDIX” feature technicians could now put a loop in the switch with a standard straight-thru cable, which happened on a number of occasions. In order to prevent this problem we reconfigured every closet to run Spanning Tree locally on that switch. We would not run it on the uplinks but we would run it on all other ports in the switch/stack.

Here are some of the commands to enable Spanning Tree with Fast Learning on ports 1-46 of an ERS 5520 switch;

5520-48T-PWR> enable
5520-48T-PWR# configure terminal
5520-48T-PWR (config)# interface fastEthernet 1-46
5520-48T-PWR (config-if)# spanning-tree learning fast
5520-48T-PWR (config-if)# exit
5520-48T-PWR (config)#

Cheers!

Perl Script to poll ARP Table

I’ve written a lot of Perl scripts to help make managing the network easier and more efficient. One of the scripts I’ve written allows me to dump the IP ARP table of the Nortel Ethernet Routing Switch 8600 to a file for later/additional processing. While the script was original written for the ERS 8600 switch it will also work on just about any router (Layer 3 device) that supports the RFC1213 (ipNetToMediaNetAddress).

The script has been tested and works on Nortel’s BayRS routers (ARN, ASN, BLN, BCN). You just obviously need to be careful of how the script interprets the ipNetToMediaIfIndex value depending on the device you are polling.

The script get8600arp.pl is a very straight forward script. It simply polls various SNMP OIDs and then stores the results in a file. It does this for every switch (FQDN/IP Address) that is listed in the input file.

#!/usr/bin/perl
#
# Filename: /root/get8600arp.pl
#
# Purpose:  Query Nortel Ethernet Routing Switch 8600 for the IP ARP
#           table via SNMP. This script will poll a list of devices
#           (input file) and dump the contents of the IP ARP table to
#           and outputfile.
#
# Author:   Michael McNamara
#
# Date:     December 5, 2002
#
# Support Switches:
#           - Nortel ERS 8600
#           - Nortel ERS 1600
#           - Nortel ERS 5500
#           - Nortel BayRS Routers
#
# Requirements:
#           - Net-SNMP
#           - Net-SNMP Perl Module
#           - SNMP-MIBS
#
# Changes:
#
#           - May  5, 2007 (M.McNamara)
#           clean up code and documentation for release to public
#           - Oct 10, 2006 (M.McNamara)
#           went back to SNMP v1 to support BayRS legacy routers
#           - Sep 04, 2003 (M.McNamara)
#           migrated from vendor specific MIB to RFC1213 (ipNetToMediaNetAddress)
#

# Load Modules
use strict;
use SNMP;
use Net::Ping;

# Declare constants
#use constant DEBUG      => 0;           # DEBUG settings
use constant RETRIES    => 3;           # SNMP retries
use constant TIMEOUT    => 1000000;     # SNMP timeout, in microseconds
use constant SNMPVER    => 1;           # SNMP version

# SNMP Settings
$SNMP::verbose = 0;
$SNMP::use_enums = 1;
$SNMP::use_sprint_value = 0;
&SNMP::initMib();
&SNMP::loadModules('RAPID-CITY');

# Declaration Variables
my ($sess, @vals);
my @devices;
my ($card, $port);
my $snmphost;
my $comm = "public";        # SNMP ReadOnly Community String
my %array;
my $switchfile;
my $datafile;

our $DEBUG;                     # DEBUG flag

undef @devices;

# Program and help information
my $program = "get8600arp.pl";
my $version = "v1.3";
my $author = "Michael McNamara";
my $purpose = "This Perl script is retreieve the IP ARP table from the ERS8600 Layer 3 switch/router and store it in file for later use.";
my $usage = "Usage: $program \[input\] \[output\] \[-help\] \[debug\]\n    <input>  = filename listing each switch to poll\n    <output> = filename where to store output\n";

if (($#ARGV +1) <= 2) {
 print "Program: $program \nVersion: $version \nWritten by: $author \n$purpose\n\n$usage\n";
 print "DEBUG: ARGV =  $#ARGV\n";
 print "DEBUG: ARGV =  $ARGV[0] $ARGV[1] $ARGV[2] $ARGV[3]\n";
 exit;
}

my $arg1 = shift @ARGV;
my $arg2 = shift @ARGV;
my $arg3 = shift @ARGV;

if ($arg1 =~ /help/) {
 print "Program: $program \nVersion: $version \nWritten by: $author \n$purpose\n\n$usage\n";
 print "DEBUG: ARGV =  @ARGV\n";
 print "DEBUG: ARGV =  $ARGV[0] $ARGV[1] $ARGV[2] $ARGV[3]\n";
 exit;
}

$switchfile = $arg1;
$datafile = $arg2;
$DEBUG = $arg3;

# Test to see if inputifle exists
if (!-e $switchfile) {
 die "ERROR: Unable to locate and/or open inputfile $switchfile...";
}

############################################################################
##### B E G I N   M A I N ##################################################
############################################################################

&load_switches;

&collect_arp;

exit 0;

############################################################################
#### E N D   M A I N #######################################################
############################################################################

############################################################################
# Subroutine collect_arp
#
# Purpose: collect ARP information from layer 3 switches/routers
############################################################################
sub collect_arp {

 # Open output datafile for appending
 open(DATAFILE, ">>$datafile");

 # Loop over each Passport 8600 switch
 foreach $snmphost (@devices) {

    my $packet = Net::Ping->new('icmp');

    $snmphost =~ s/\n//g;        # remove CRLF

    if ($packet->ping($snmphost)) {

       $sess = new SNMP::Session (    DestHost   =>  $snmphost,
                              Community  =>  $comm,
                              Retry      =>  RETRIES,
                              Timeout    =>  TIMEOUT,
                              Version    =>  SNMPVER );

       my $vars = new SNMP::VarList(
                              ['ipNetToMediaIfIndex', 0],
                              ['ipNetToMediaPhysAddress', 0],
                              ['ipNetToMediaNetAddress', 0],
                              ['ipNetToMediaType', 0] );

       while (1) {

          @vals = $sess->getnext($vars);  # retreive SNMP information

          last unless ($vars->[0]->tag eq 'ipNetToMediaIfIndex');

          $vals[1] = unpack('H12', $vals[1]);
          $vals[1] =~ tr/a-z/A-Z/;

          $card = (($vals[0] & 62914560) / 4194304);
          $port = (($vals[0] & 4128768) / 65536) + 1;

          print "$snmphost, $vals[0], ($card/$port), $vals[1], $vals[2], $vals[3]\n" if ($DEBUG);
          print DATAFILE "$snmphost, $vals[0], $card, $port, $vals[1], $vals[2]\n";

          $array{$snmphost}[$card][$port] = $vals[2];

       } # end while

    } else {

       print ("ERROR: $snmphost not responding to ICMP ping skipping...\n");

    } #end if $packet

 } #end foreach

 close(DATAFILE);

} #end sub collect_arp

############################################################################
# Subroutine load_switches
#
# Purpose: load list of switches
############################################################################
sub load_switches {

 open(SWITCHLIST, "<$switchfile");

 # Walk through data file
 while (<SWITCHLIST>) {

    # Skip blank lines
    next if (/^\n$/);
    # Skip comments
    next if (/^#/);

    #print "DEBUG: adding $_ to our list of devices \n" if ($DEBUG);

    push (@devices, $_);

 }

 close(SWITCHLIST);

 return 1;

} # end sub load_switches
############################################################################

The real magic that folks have always been searching for is the binary formula to turn the ipNetToMediaIfIndex into a location that denotes the card and port where that specific device is connected to.

$card = (($vals[0] & 62914560) / 4194304);
$port = (($vals[0] & 4128768) / 65536) + 1;

While I still use flat files you could certainly adopt this code to dump the output into a database. I just haven’t had the time although I’ve been playing with MySQL quite a bit lately.

Cheers!

Nortel WLAN 221x Handset Configuration

wlan_handset_2211_600x400 The purpose of this post is to outline how to properly configure a Nortel WLAN 2210/2211 Wireless Handset to connect over a wireless LAN to a Nortel Succession Call Server.

There is a cradle and software available to ease/speed the configuration but for this post we’ll assume that we only have the phone itself and not the configuration cradle or additional software.

Note: If you are going to be supporting and/or installing dozens of these phones I would strongly suggest that you purchase the configuration cradle (you can download the software from Nortel’s site).

In this example the Nortel 2211 WLAN phone will be configured to connect to a TN on a Nortel Succession 1000 v4.5 Call Server over a Motorola 5100 Wireless LAN Switch using WEP encryption. A Nortel 2245 Wireless Gateway is needed in order to connect to a Succession Call Server. Within the DHCP server a scope has been setup with the vendor class of “Nortel-221x-A” which will return the vendor specific DHCP options required by the Nortel WLAN phones.

With the wireless handset powered OFF, simultaneously press and hold the Power On / Start Call and Power Off / End Call keys.Release the Power On / Start Call key, then release the Power Off / End Call key. The first option on the Admin Menu displays.

Press the Up, Down, and Select side buttons, and the softkeys on the wireless handset to scroll through the menu options.

An asterisk (*) next to an option indicates that it is selected.

— Press the Up/Down buttons to display the previous/next menu items.
— Press the Select button to select the menu option or item.
Alternatively, press the OK softkey to select the menu option or item.
— Press the Save softkey to save the entry.
— Press the Bksp key to backspace when editing the entry.
— Press the Up softkey to return to the previous menu level.
— Press Cncl to cancel the entry and return to the previous menu level.
— Press the Exit softkey to exit the menus.

The Admin menu should open with the following options below:

I.P. Addresses
0=Edit, FCN=Up

Scroll down the menu to the ESS ID option:

ESS ID
0=Edit, FCN=Up

Select “0” from this option to configure the ESSID value.

Current ESS ID:
Not learned yet

Scroll down this menu until the select displays “Static Entry” and select “0” to enter a value.

Enter the value proper ESSID of the WLAN you’ll be trying to connect to, when finished select the Power Off/End Call button to SAVE

Select the “FCN” button to move back up a menu level.

Scroll down to the “License Mgmt” option

License Mgmt
0=Edit, FCN=Up

Select “0” to edit the license mgmt option and scroll through the option until you reach “010”.

Set Current [010]
0=Select, FCN=Up

Select the “FCN” button to move back up the a menu level.

Scroll down the menu to the “Security” options:

Security
0=Select, FCN=Up

Select “0” to enter the Security options and then scroll down until the following option appears;

WEP
0=Select, FCN=Up

Select WEP by entering “0” into the phone;

Authentication
0=Edit, FCN=Up

Select Authentication by entering “0” into the phone;

Open System
0=Select, FCN=Up

Scroll down until your reach the “Open System” option and select it by entering “0” into the phone. Proceed back up the menu be hitting the “FCN” button then scroll down the menu until you reach the “WEP On/Off” option, select “0”;

WEP On/Off
0=Select, FCN=Up

Scroll down the menu until the “WEP On” option appears as below and enter “0” to select this option;

WEP On
0=Select, FCN=UP

Key Information
0=Edit, FCN=Up

Default Key     1
Current Key:

Key Length
0=Edit, FCN=Up

128 bit
0=Select, FCN=Up

Key #1
Key #2
Key #3
Key #4

Enter the Default Key number and actual WEP key for the ESSID you’re trying to connect to. After this initial configuration the phone should connect to the WLAN and pull additional DHCP configuration options and should perform any firmware uploads if any are required.

***DO NOT POWER OFF THE PHONE WHILE THE FIRMWARE IS BEING UPDATED ***

Once the phone completes the upgrade it will reboot and should present a display similar to below;

Connect Svc
Node: _ _ _ _
TN: _ _ _ . _ _ . _ _ . _ _

OK  BKSp  Cler  Cncl

From here you’ll need to configure the node and TN information for this specific phone.

Cheers!