Different VLANs connect to FREEPBX

I have set up around 10 VLANS for different area.

i have my freepbx in one of the vlans 192.168.10.x and everything works with my phone on the same vlan but other phones cannot ping or phone cannot register my sip account from my different vlans 192.168.20-100.x

i have added my local network to settings-asterisk sip settings but not working.

Is there anything that i could do

i am curious to know why you would put some phones on one vlan and some on another. why would you not put all phones on a single vlan? it makes your life easier management wise and walls the phone off from other stuff on the network.

Including, apparently, the server. :smile:

well with some work he can get it to function but it just seems strange that he would put the phones on different vlans. there may be a good reason that he has not stated, but i run into this often where someone does not think through the vlan issue and creates vlans that mao to physical locations, i.e. a vlan for HR, a vlan for accounting and then include the phones as part of those vlans when in fact they should have a single vlan for all the phones. but who knows - perhaps he has a very good reason for this rather complex setup.

All this have started due to deadlines.
And i needed to aggregat around 12 fiber cables with around 3 VLANS
DATA,VOICE and Cameras and security and a 24 fiber switch port was not the right choice so until the next fiber switch i need to do this different ares with this switch and every area using the same vlan for data , voice etc.
but this not complex. Just need the right answer. Right now im trying to creat vlans on freepbx admin->system admin->network setting

i have tried this but its now working. cannot register my sip phones

you simply need to make sure that a) there is a route to all the phones from the pbx and b) that the switch is passing untagged vlan traffic to the pbx and c) that the phones themselves have the appropriate vlan info in them and d) that the switch is tagging the outgoing traffic properly

i still don’t understand why you don’t use the same vlan id for all the phones. .

If the phones haven’t had the sip server (ala asterisk) set as a static entry in their configs, they are probably trying to do an autodiscover for it. You’ll need to add an entry to your dhcp/bootp server. Look into option 66, it’ll probably need to look something like tftp://asterisk.domain. If you can’t ping a phone from a different vlan, then its a network routing issue and not sip.

as i mention for now this is how it will go after a month or two i will seperate all these.
With network connection everything works but if i want to ping my pgx from a differrent vlans i cannot.
all the phones have their sip server info. I tryed to create vlans on network settings but without success.

i think this has a easy solution but just need to figure it out

This is a network issue not an Asterisk or FreePBX issue. So fix your routes and then try to register again. google will help you a lot to fix the routes between your vlans depending on your hardware.

I currently run a setup where phones are on 3 different VLANs and it works perfectly well with all these phones connected to a single Asterisk box on a 4th VLAN.

You just need to correctly set the “Local Networks” field and setup routing (generally this is done outside your FreePBX box).

When you say you manage a network with 10 VLANs I tend to think you are a network expert and would have tested routing before seeking for help here. But then if you were a network expert you would have provided more information on your initial post, provide meaningful log data, show that routing is working despite the “cannot ping” symptom you described, etc. So now I am thinking you are not a network expert and may actually be way out of your league with that 10 VLAN network.

Please, if you want help show to us that routing is working as it should. And remember that the routing must work both ways to and from every VLAN involved.

If you need more help with routing issues please give more detail of your network topology, specially inform how your gateways are setup and what is the routing device routing to and from each VLAN.

Good luck!

Im not an network expert but need to manages those thing with 10 VLANS. The topology is that big.
More then 12 fiber cables needed to be aggregated in cisco fiber switch. After this every branch supposed to have 3 vlans
CAMERAS AND ACCESS CONTROLL. However after this due to lack of
equipment for 12 points we have created a vlan and assige an ip address.

ip routing
vlan 10
int xg1/0/1
switchport access vlan 10
no shut
int vlan 10
ip address

same for other vlans and in the end ip route to the internet.

my freepbx has 2 network card one connected to the switch with vlan 10 and one connected in one of the isp router port
if i want to access freepbx from gui i connect from 192.168.10.x and
the second nic card has the ip address that my sip provider has given
to me. But everything works inside vlan 10 , however i went to freepbx
local network and added other network like /24 etc but no
success my phone still shoes no register. befor 2 days , i managed to
call that phone on different vlan and also i called that phone from a
cellular line and after 1 hour all that gone and not working again

This is strictly a network problem. There are many things that can be wrong from ACL, to routing to gateways on the VLANs. You need to either do some research on the networking or contact someone who can help. Networking is one of our specialties if you need a hand.

You could/need to connect the PBX to a port on the switch that trunks all the vlans you need the phones on, and add virtual interfaces like ethx.y to your NIC, that would be doing the ‘untrunking’. and yes, your PBX will need to have (at least) one address in EVERY subnet that comes in through VLAN, and asterisk will need to know about ALL of them. otherwise you need your router to properly route between the subnets (or have the routing fixed on the cisco switch).