Network switch detection?

Hello I’m working on a arduino project that I wanted to see if it’s possible to detect and tell what kind of network switch it is on, Is there a way to do that with arduino and the wiznet 5200?

I searched online but the only thing I found is for telling me my wan ip and lan ip as well as the max address of the wiznet and dns, gateway and subnetmask.

Joseph

SWITCHES are basically transparent to the connected hosts,
However, if it’s a MANAGED switch, you could use the management interfaces to interrogate the switch controller.

1 Like

That is true you are right. Burn I’m wondering how my router knows there is a switch there? It can tell the difference between a pc, laptop.

Edit: what I mean is I can look into my router and it knows there is a network switch on it.

Then it must have an interface of some sort.
If it’s not documented, maybe try using Wireshark to find the ports & data being pushed around.

Maybe a generic network discovery tool can help…

I will take a SWAG and say It gets multiple IPs from a single source.

Hello, Nothing special about the switch. It is just a neargear siwtch. However the router itself is a optumium router. That is where I can see all information That shows hostnames. That is what I see the neatgear name at.

Okay. That my be my mistake there. It is the hostnames I see that shows the neatgear switch name.

The router doesn't know there is a switch, it doesn't need to know. The router determines whether data should go to the local network or out on the LAN port or ports or a VPN or whatever. It provides network address translation and (usually) DHCP. None of this requires it to have any knowledge of the switching activities on the equipment around it on the network.

yes that is correct. I was mistaking. I understood that wrong my fault there. I was reading the hostnames and mac addresses of the whole network and it showed up in the hostname of netgear with the mac address and ip address I was reading. I was trying to figure out if that is possible to the same thing on arduino with a ethernet shield doing the same thing.

Hello, this is just an update. I need to rethink What I would like to do with this project. At the moment I place it on hold. I have an idea but i need a few days to figure it all out. I will do a reply soon with an update. Thank you all for the help and Getting me to understand what I can and can not do with seeing my network.

Joseph

I discussed this with a friend who knows about networks. He suggests that if you ping every IP address on the subnet you will get information back from those IP addresses that have a devices on them, including the MAC address. You can use the MAC address to look up which manufacturer that MAC address belongs to.

To ping every device on the subnet either go thorough every possible IP address on the subnet or ping the broadcast address. To get the broadcast address you can use a bitwise OR on the devices IP address and the compliment of subnet mask. For example, if the device has IP address 192.168.2.51 and the subnet mask is 255.255.255.0
192.168.2.51 in binary is 11000000.10101000.00000010.00110011
Subnet mask in binary is 11111111.11111111.11111111.00000000
Complement the subnet mask 00000000.00000000.00000000.11111111
Bitwise OR gives 11000000.10101000.00000010.11111111
Convert to decimal for easy reading and you have 192.168.2.255, which is the broadcast IP address.

See TCP/IP addressing and subnetting - Windows Client | Microsoft Learn for more about IP addressing.

1 Like

Hello, That is interesting. I never through of pinging the whole network. I was thinking of something a long the lines of it yesturday. Thank you I will think about it some more. I wonder if there is a way when pinging the addresses to see the hostnames of the devices as well?

I don't know. I guess you have to ping a device and see what comes back in the reply. Maybe do some searching for what information is in a ping response.

This will give me my start thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.