XMC Upgrade

Use the Appliance Upgrade files to update your XMC appliances such as EMC, NAC and Analytics.

SCP to the IP address of the appliance and transfer the upgrade .bin file to a location on the server.

Make the .bin executable using chmod 755 <bin file>.

Run the bin file

./<bin file>

Note:

You will need internet access to complete the upgrade so that Ubuntu packages can be updated.

Check release of Ubuntu by typing command lsb_release -a

Edit /etc/network/interfaces file with nano and add dns-nameservers <DNS server> if not present. The EMC and Analytics allow DNS entries in the interfaces file but NAC uses resolvconf package.

^O Write/Save

^X Exit

On NAC have to use the resolveconf package to setup DNS. Edit /etc/resolvconf/resolv.conf.d/base and enter nameserver <DNS server>.

Sudo resolvconf -u

Bounce the eth0 interface with… sudo ifdown eth0 && sudo ifup eth0

If necessary edit the default route…

ip route del default

ip route add default via <default GW>

 

Upgrading EMC

Upgrading Extreme Management Center Engine Software

Upgrades to the Extreme Management Center engine software are available on the Extreme Management Center (NetSight) web page.

Prior to performing an upgrade, you can create a snapshot of the engine that you can revert to in the event an upgrade fails. Refer to the vSphere client documentation for instructions on creating a snapshot.

1 On a system with an internet connection, go to the Extreme Management Center (NetSight) web page: http://extranet.extremenetworks.com/downloads/pages/NMS.aspx.

2 Enter your email address and password.

You will be on the Extreme Management Center page.

3 Click on the Software tab and select a version of Extreme Management Center.

4 Download the Extreme Management Center virtual engine image from the Extreme Management Center Virtual Appliance (engine) section. Choose the virtual appliance upgrade download option.

5 Use FTP, SCP, or a shared mount point, to copy the file to the Extreme Management Center virtual engine.

6 SSH to the engine.

7 Cd to the directory where you downloaded the file.

8 Change the permissions on the upgrade file by entering the following command:

chmod 755 NetSight_Suite_<version>_install.bin

9 Run the install program by entering the following command:

./NetSight_Suite_<version>_install.bin

The upgrade automatically begins.

The Extreme Management Center Server will be restarted automatically when the upgrade is complete.

Because your Extreme Management Center engine settings were migrated, you are not required to perform any configuration on the engine following the upgrade.

Add User to EMC

From the OS add a new user. In VMWare login as root into the console and use the useradd <name> command to create the new user. Set a password with the passwd <name> command. You also need to add the user in EMC under Administration>Users and specify the group access.

https://gtacknowledge.extremenetworks.com/articles/Solution/Unable-to-login-to-Netsight-Console-using-LDAP-or-OS-credentials?l=en_US&fs=RelatedArticle

Aside… to search for config files archived by EMC in the virtual appliance type…

find / -name *.cfg

Inventory Manager>Data Storage>Directory Path

Specify the base directory where data for Inventory Manager is stored. This data includes capacity reports, configuration templates, configurations, and property files.

/usr/local/Extreme_Networks/NetSight/appdata/InventoryMgr

ls -alg to see file attributes.

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxa500/lscmd.htm

Changing file attributes…

chmod -R 775 or 777 .

N   Description                      ls   binary    
0   No permissions at all            ---  000
1   Only execute                     --x  001
2   Only write                       -w-  010
3   Write and execute                -wx  011
4   Only read                        r--  100
5   Read and execute                 r-x  101
6   Read and write                   rw-  110
7   Read, write, and execute         rwx  111
  • First Number 7 – Read, write, and execute for user.
  • Second Number 5 – Read and execute for group.
  • Third Number 5 – Read and execute for other.

Which group user belongs…

id -Gn [user] or groups or id user

How to get configuration text file of a device

Objective

How to Get a Text File (*.txt) of a Device Configuration

Environment

Extreme Management Center v8.0 and above

Procedure

  1. Extreme Management Center -> “Network” -> “Archives” Tab
  2. Select the name of the Archive in which the desired Devices reside
  3. Under the Archive name, select the most recent date
  4. Under the most recent date, select the IP Address of the desired Device
  5. Right-click on the desired Device, and select “Download Configuration to Client”

Reading from EMC’s Database

Use the emc_vars dictionary API

myVar = emc_vars[‘<key>’]

Where <key> can be any of these:

serverIP    server IP address
serverVersion   server version
serverName    server host name
time     current date at server (yyyy-MM-dd)
date     current time at server (HH:mm:ss z)
username    EMC user name
userDomain    EMC user domain name
auditLogEnabled   true/false if audit log is supported
scriptTimeout   max script timeout in secs
scriptOwner    scripts owner
deviceName    DNS name of selected device
deviceIP    IP address of the selected device
deviceId    device DB ID
deviceLogin    login user for the selected device
devicePwd    logon password for the selected device
deviceSoftwareVer  software image version number on the device
deviceType    device type of the selected device
deviceSysOid   device system object id
deviceVR    device virtual router name
cliPort     telnet/ssh port
isExos     true/false. Is this device an EXOS device?
family     device family name
vendor     vendor name
deviceASN    AS number of the selected device port selected ports
vrName     selected port(s) VR name ports all device ports
accessPorts    all ports which have config role access
interSwitchPorts  all ports which have config role interswitch
managementPorts   all ports which have config role management

Lab4 EMC Python: Take Action

from jsonrpc import JsonRPC

def remote_cli(jsonrpc, cmd):
# ###################################################################
# Use the jsonrpc.cli() method to send CLI commands to an IP address
# cmd = a single CLI command string or a list of CLI command strings
# ###################################################################
response = jsonrpc.cli(cmd)

#print json.dumps(response, indent=2, sort_keys=True) # Uncomment for debugging

if isinstance(response, dict):
result = response.get(‘result’)
for entry in result:
#print “Debug: Entry = “, entry # Uncomment for debugging
if ‘status’ in entry and entry.get(‘status’) == ‘ERROR’:
raise RuntimeError(“Command generated error on switch”)

return result

def main():

familyType = emc_vars[‘family’]
switchIpaddress = emc_vars[‘deviceIP’]
switchUsername = emc_vars[‘deviceLogin’]
switchPassword = emc_vars[‘devicePwd’]

if familyType == ‘VSP Series’:
print “This script uses JSON and can only be used with XOS”
raise RuntimeError(“This script will only work on XOS switches”)

# create a JSONRPC interface object with any defaults
jsonrpcObj = JsonRPC(ipaddress=switchIpaddress, username=switchUsername, password=switchPassword)

cmd = ‘show ports description’
result = remote_cli(jsonrpcObj, cmd)

burnPorts = []
for entry in result:
#print “Debug: Entry = “, entry # Uncomment for debugging
if ‘show_ports_description’ in entry:
port = entry.get(‘show_ports_description’).get(‘port’)
name = entry.get(‘show_ports_description’).get(‘displayString’)
print “Debug: Got port {} with name = {}”.format(port, name)
if name == ‘Burn-now’:
burnPorts.append(port)

if burnPorts:
portList = ‘,’.join(str(x) for x in burnPorts)

cmd = ‘disable ports ‘ + portList
remote_cli(jsonrpcObj, cmd)

cmd = ‘unconfigure ports ‘ + portList + ‘ display-string’
remote_cli(jsonrpcObj, cmd)

cmd = ‘enable ports ‘ + portList
remote_cli(jsonrpcObj, cmd)

print “Successfully burned ports: “, portList

else:
print “No ports to burn!”

main()

Lab3 EMC Python: Edit Ports

#@MetaDataStart
#@VariableFieldLabel (description = “Name of action to perform on (s)Witch port ?”,
#                     type = string,
#                     required = yes,
#                     validValues = [Burn-now, Burn-today, Burn-tomorrow, Burn-anyway],
#                     readOnly = no
#                     )
set var witchPort Burn-tomorrow
#@MetaDataEnd

def main():

try:
selectedPorts = emc_vars[‘port’]
except:
selectedPorts = None

if selectedPorts == None:
print “Performed no action as no ports selected on this switch”
return

assignName = emc_vars[‘witchPort’]

familyType = emc_vars[‘family’]

if familyType == ‘VSP Series’:
emc_cli.send(‘enable’)
emc_cli.send(‘config term’)
cmd = ‘interface gigabitEthernet ‘+selectedPorts
emc_cli.send(cmd)
cmd = ‘name “‘+assignName+'”‘
emc_cli.send(cmd)

elif familyType == ‘Summit Series’:
cmd = ‘configure ports ‘+selectedPorts+’ display-string “‘+assignName+'”‘
emc_cli.send(cmd)

else:
raise RuntimeError(“Unexpected switch family type!!”)

print “Successfully configured ports {} with name ‘{}'”.format(selectedPorts, assignName)

main()

Lab2 EMC Python: Contact

import re

def main():

familyType = emc_vars[‘family’]

if familyType == ‘VSP Series’:
showCmd = ‘show sys-info’
result = emc_cli.send(showCmd)
output = result.getOutput()
match = re.search(‘SysLocation  : (.+)’, output)
location = match.group(1)

elif familyType == ‘Summit Series’:
showCmd = ‘show system’
result = emc_cli.send(showCmd)
output = result.getOutput()
match = re.search(‘SysLocation:      (.+)’, output)
location = match.group(1)
else:
raise RuntimeError(“Unexpected switch family type!!”)

print “Switch has location set to :”, location

if location == ‘Castle of Aarrgh’:
manager = ‘King Arthur’
elif location == ‘Bridge of Death’:
manager = ‘Lancelot’
elif location == ‘Castle Anthrax’:
manager = ‘Patsy’
elif location == ‘Swamp Castle’:
manager = ‘Sir Galahad’
else:
raise RuntimeError(“Unexpected location!!”)

if familyType == ‘VSP Series’:
emc_cli.send(‘enable’)
emc_cli.send(‘config term’)
cmd = ‘snmp-server contact “‘+manager+'”‘
elif familyType == ‘Summit Series’:
cmd = ‘configure snmp sysContact “‘+manager+'”‘
else:
raise RuntimeError(“Unexpected switch family type!!”)

emc_cli.send(cmd)

print “Successfully set switch manager to:”, manager

main()