Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - greensmith

#1
Hi,

just an update, I set up a separate server and a fresh database - however am still having the same issue.

According to the interface properties the port channels are using Peer Discovery Protocol STP where as the physical ports are using CDP, I don't know if that may be causing an issue?

I could possibly remove the port channels and use standard trunk ports as another test - however this is a live network so getting suitable downtime to do such a thing is difficult.
#2
Hi victor,
thanks for replying.

Those text files in the attached zip are the full mac address tables (show mac address-table) as csv.

is there another command i should be using?

thank you
#3
sorry for the delay in replying.

basically, when searching for switch ports, if a device is on Switch4 or Switch5, NetXMS is showing it as portchannel Po4 or Po5 rather than the actual port.

In the attached screen shot I searched all MAC address tables for B8AC.6FA2.39FA, it is plugged into port Gi0/23 on Switch4

When I search for the same MAC address in NetXMS it tells me that it is plugged into Switch0 port Po4.

Searching for the same MAC address using netdisco also give me the correct port (23)


I have attached the mac address tables and a diagram of the switch layout too.

Thank you
#4
Hi,

I am experiencing an issue with some servers and devices not displaying correct connection points.
The Cisco switches are connected to one "Aggregate" switch using two ports in a port channel, for redundancy.

However while some devices are showing as connected to the correct port (e.g. Switch 1 port g/12)...
Others are showing incorrectly as connected to the port-channel (e.g. AggSwitch port PoCh1)

I can verify the correct port by finding the device's mac address in the switch's mac address table (show mac-address-table)

Do you have any suggestions as to how I could tackle this issue?

#5
General Support / Re: Find switch ports in script
May 06, 2014, 07:10:54 PM
Thanks Alex, that works :)


for anyone else interested in this, here is the code i used.

it checks the ip address of each node - if it matches regex (i am only interested in nodes from one subnet) it prints the data in csv format...
NAME,IP,MAC,SWITCH,PORT,DIRECTLYCONNECTED




import re
import csv
import sys

w = csv.writer(sys.stdout, dialect='excel')
w.writerow(['NAME', 'IP', 'MAC', 'SWT', 'PORT', 'DIR'])

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
#set node information
#convert ip to string and remove slash
vnodeIp = str(node.getPrimaryIP())
vnodeIp = vnodeIp.replace("/","")
vnodeName = node.getObjectName()
vnodeMac = node.getPrimaryMAC()

#regex to match anything in .2. subnet
subnetRegex = re.match("^\d{1,3}\.\d{1,3}\.2\.\d{1,3}$",vnodeIp)

#if in this subnet run...
if subnetRegex:

#get connectionpoint
point = s.findConnectionPoint(node.ZONE0, node.getPrimaryIP())

#handle connectionpoint data exceptions
try:
vswitchID = s.getObjectName(point.nodeId)
except:
vswitchID = "null"
try:
vportID = s.getObjectName(point.interfaceId)
except:
vportID = "null"
try:
vdirCon = point.directlyConnected
except:
vdirCon = "False"

#print data
w.writerow([
vnodeName,
vnodeIp,
vnodeMac,
vswitchID,
vportID,
vdirCon
])



Again, thanks for the help!
#6
General Support / Find switch ports in script
May 06, 2014, 04:46:43 PM
Hello,

I have been attempting to use nxshell and a script to iterate through each object in my network and tell me switch port information.

However I am stuck at using the ConnectionPoint class and findConnectionPoint.
https://www.netxms.org/documentation/javadoc/latest/org/netxms/client/topology/class-use/ConnectionPoint.html


import org.netxms.client

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
NXCSession.findConnectionPoint(node.ZONE0, node.getPrimaryIP())


the code errors out with the following TypeError: findConnectionPoint(): self arg can't be coerced to org.netxms.client
.NXCSession

Trying to use macAddr or just ObjectId complains that it requires 2-3 arguments rather than just 1.

Has anyone else successfully used findConnectionPoint or have any tips to point me in the right direction?