Zummey
Posts: 19
Joined: Mon Jul 06, 2020 4:14 pm

Find devices connected to switch

Thu Jun 24, 2021 12:10 pm

Hello, I'm trying to setup a network of raspberry pi's. I have a cisco 2960 poe 48 port switch and a couple of pi's.
The main device is a raspberry pi 3 and the other a raspberry pi zero with a rj45 to usb adapter.
They are both plugged into the switch with a poe splitter and are both powered.
I can access the main raspberry remotely over wifi and I'm currently trying to connect to the zero from the main pi.
How do I list the devices on this local network on the main raspberry pi?

User avatar
B.Goode
Posts: 12235
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Find devices connected to switch

Thu Jun 24, 2021 12:16 pm

Zummey wrote:
Thu Jun 24, 2021 12:10 pm
Hello, I'm trying to setup a network of raspberry pi's. I have a cisco 2960 poe 48 port switch and a couple of pi's.
The main device is a raspberry pi 3 and the other a raspberry pi zero with a rj45 to usb adapter.
They are both plugged into the switch with a poe splitter and are both powered.
I can access the main raspberry remotely over wifi and I'm currently trying to connect to the zero from the main pi.
How do I list the devices on this local network on the main raspberry pi?

There is some possibly relevant documentation from Raspberry Pi here - https://www.raspberrypi.org/documentati ... address.md

Zummey
Posts: 19
Joined: Mon Jul 06, 2020 4:14 pm

Re: Find devices connected to switch

Thu Jun 24, 2021 12:24 pm

I tried nmap and arp - a but it doesn't list the zero. Does that mean my zero is not configured correctly?
Image

User avatar
B.Goode
Posts: 12235
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Find devices connected to switch

Thu Jun 24, 2021 1:42 pm

Zummey wrote:
Thu Jun 24, 2021 12:24 pm
I tried nmap and arp - a but it doesn't list the zero. Does that mean my zero is not configured correctly?
Image


That's one possibility.

Or maybe it isn't running? (Does it have a local display/keyboard to verify this?)

What arrangements are in place for IP address configuration on your shared LAN? (Because a c2960 is only a switch, it probably won't be providing 'hub' services such as a dhcp server.)

Does your model of c2960 have an admin/management interface? Can you interrogate that for details of the devices connected to it?

Zummey
Posts: 19
Joined: Mon Jul 06, 2020 4:14 pm

Re: Find devices connected to switch

Thu Jun 24, 2021 2:44 pm

I can manage the switch through a browser and was able to verify both the raspberry's are connected:

Image

Now I need to assign static ip's to these ports I assume but I have no networking experience so I'll have to do some digging.

User avatar
B.Goode
Posts: 12235
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Find devices connected to switch

Thu Jun 24, 2021 5:47 pm

Zummey wrote:
Thu Jun 24, 2021 2:44 pm
I can manage the switch through a browser and was able to verify both the raspberry's are connected:

Image

Now I need to assign static ip's to these ports I assume but I have no networking experience so I'll have to do some digging.


I can't comment on the 18 hidden MAC addresses, but I only see ONE RPi board in the part of the list you have displayed.

Edit: to add - as pointed out by another poster - that would be because there is indeed only ONE device whose Ethernet MAC has an RPi OUI. All is as it should be. And yes, of course, a shared LAN infrastructure is a pre-requisite...
Last edited by B.Goode on Thu Jun 24, 2021 8:20 pm, edited 1 time in total.

pcmanbob
Posts: 11312
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Find devices connected to switch

Thu Jun 24, 2021 6:32 pm

As you are using a usb to RJ45 network adapter to connect your pi to the switch this the device the switch will list as connected , not the pi.

Your pi is not connected to the switch , it is connected to the usb adapter that is what is connected to the switch, the switch does not know about any devices , your pi zero , that are connected to the adaptor.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

epoch1970
Posts: 6685
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Find devices connected to switch

Thu Jun 24, 2021 6:40 pm

Zummey wrote:
Thu Jun 24, 2021 12:10 pm
How do I list the devices on this local network on the main raspberry pi?
By looking for IP addresses.
In particular between from your pi3 running Raspios you can reach your pi0 running Raspios with "ping <pi0-host-name>.local".
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Zummey
Posts: 19
Joined: Mon Jul 06, 2020 4:14 pm

Re: Find devices connected to switch

Thu Jun 24, 2021 7:36 pm

I managed to make it happen. In case anyone else comes across the same situation, here are the steps I took:

- access the management area of the switch
- create a vlan with a specific subnet
- assign all switch ports as static access ports to that vlan
- assign a static ip to the raspberry within the subdomain of the vlan in /etc/dhcpcd.conf

Image

Return to “Networking and servers”