07-12-2012 05:17 AM - edited 03-07-2019 07:44 AM
I have a network with IP phones. The phones are connected to the switch and the computers are connected to the phones. How can I setup a vlan on the switch.to.route traffic comming from the phone to 1 router and the computer data through another router.
Solved! Go to Solution.
07-12-2012 06:39 AM
tipically configuration is:
for the phone:
interface FastEthernetXX
switchport trunk native vlan
switchport trunk allowed vlan
switchport mode trunk
switchport voice vlan
switchport trunk native vlan
and you can configure an access port with different vlan, one for the voice router and one for the data router.
example:
vlan 10
name voice
vlan 20
name data
int f0/1
desc to router voice
switchport mode access
switchport access vlan 10
int f0/2
desc to router data
switchport mode access
switchport access vlan 20
Regards
Vincent
07-12-2012 06:13 AM
Hi,
You just need to configure the gateway for phone on one router and gateway for PC on another.
I would suggest you go for HSRP for making your LAN redundant.
Please rate the helpful posts.
Warm Regards,
Ameya Oke
07-12-2012 09:17 AM
thanks for the reply but i want the voice router to assign dhcp to the phones and i want the workstations to grab ips from the server behind the data router. I plan on replacing the current switch (unmanaged) with this
WS-C3560-48TS-E . If i setup the VLans how do i prevent the phones from grabbing an ip from the server on the data network or will this be done automatically because the switch will know the difference between a phone and computer.
07-12-2012 09:30 AM
This should be taken care of by the VLAN. You are segmenting the traffic to two "logical" networks.
07-12-2012 06:23 AM
Depending on how it is set up but you could use the Voice vlan command on the ports.
Set the access VLan (switchport access Vlan) on the interface then add "switchport voice vlan #" to the interface.
Som reference material:
07-12-2012 06:39 AM
tipically configuration is:
for the phone:
interface FastEthernetXX
switchport trunk native vlan
switchport trunk allowed vlan
switchport mode trunk
switchport voice vlan
switchport trunk native vlan
and you can configure an access port with different vlan, one for the voice router and one for the data router.
example:
vlan 10
name voice
vlan 20
name data
int f0/1
desc to router voice
switchport mode access
switchport access vlan 10
int f0/2
desc to router data
switchport mode access
switchport access vlan 20
Regards
Vincent
07-12-2012 07:26 AM
Yup... I got your point.... If you are going to make that switch as to support ip phone and
vlan 10
!
vlan 20
!
interface FastEthernet0/2
description **User port**
switchport access vlan 20 === Data VLAN
switchport mode access
switchport voice vlan 10 == Voice VLAN
load-interval 60
ip dhcp snooping limit rate 10
!
int vlan 10
desc voice vlan
ip add 10.0.0.254 255.255.255.0
!
int vlan 20
desc data vlan
ip add 20.0.0.254 255.255.255.0
!
Just define your gateway as the router ip's in your phone or pc.....
10.0.0.1 for phone... 20.0.0.1 for pc.......
the traffic will go as per the dgw defined in your phone or pc.....
if you have many layers in your network befor tht router...... then it needs to be taken accordingly.....
07-12-2012 08:50 AM
is not necessary
int vlan 10
desc voice vlan
ip add 10.0.0.254 255.255.255.0
!
int vlan 20
desc data vlan
ip add 20.0.0.254 255.255.255.0
!
only if you want comunication between vlan data and voice or if you want ip management of the switch from vlan data and voice
07-12-2012 10:43 AM
Hi Vincent,
But switch mode trunk is not neccessary here in this scenario.... but you are right...so i updated in my earlier post considering the management IP for the Switch from both the vlans.... i suppose my scenario will definitely work for the raised query... Thanks.
Please do rate for the helpful posts!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide