Raspberry Pi Vlan

Hey,
Im trying to build a cctv cameras monitor.
the issue im having is all the cameras are not on the same vlan.
I have installed vlan on the raspberry pi and configured from what information i have been able to find.

I’m not able to ping cameras on different vlan
Setup as below

/etc/network/interfaces.d/lvan
auto eth0.20
iface eth0.20 inet manual
vlan-raw-device eth0

auto eth0.30
iface eth0.30 inet manual
vlan-raw-device eth0

/etc/dhcpcd.conf

Example static IP configuration:

interface eth0
static ip_address=128.100.1.50/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=128.100.1.1
static domain_name_servers=128.100.1.1 8.8.8.8 fd51:42f8:caae:d92e::1

interface eth0.20
static ip_address=128.100.2.50/24

interface eth0.30
static ip_address=128.100.3.50/24

1 Like

Hi Aaron,

Welcome to the forum!!

Since VLANs are typically used to isolate a networked device the issue you are running into is part of the VLAN design. Virtual LAN - Wikipedia

What were you looking for your setup to do?
If you put your CCTV and Pi on the same VLAN (usually done through your hardware or router software if you are able to) are you able to ping it?

Liam.

Basically its a CCTV monitor with live streams.

I have cameras on rages below
128.100.1.*
128.100.2.*
128.100.3.*

I can see the cameras in the 128.100.1.* range as the pi is sitting in this range also.

It looks like the switch does not have any vlans setup but the 3 ip ranges are all working on the swith at the current time

I cant ping anything in other ranges. unless i change my ip settings

1 Like

Hi Aaron,

That sounds as if the VLANs are behaving as they should, each range that you have set up will provide some isolation from the rest of your network. If you put all of the cameras and the Pi on the same VLAN then that will let you ping and communicate with all of them.
This video explains it pretty well: VLAN Explained - YouTube

Let us know how you go! I’m keen to see your setup :smiley:
Liam.