cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
924
Views
25
Helpful
8
Replies

Configuring a Vlan

valcon5455
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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 is if you want to get access whitout ip phone

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

View solution in original post

8 Replies 8

ameya_oke
Level 1
Level 1

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

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.

This should be taken care of by the VLAN. You are segmenting the traffic to two "logical" networks.

fredareid
Level 1
Level 1

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:

http://www.cisco.com/en/US/docs/switches/lan/catalyst3550/software/release/12.1_19_ea1/configuration/guide/swvoip.html
 

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 is if you want to get access whitout ip phone

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

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.....

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

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!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card