Options

Question about assigning ports to vlan

nice343nice343 Member Posts: 391
when I type "switchport voice vlan 20" under interface f0/1 is that interface going to be assigned to that vlan just like "switchport access vlan 20" when I do a show vlan?
Is that particular port going to be placed next to vlan 20?
My daily blog about IT and tech stuff
http://techintuition.com/

Comments

  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    No, the voice vlan and access vlans are seperate and you can configure both on a switchport. That way you can hook a phone into the port and a computer into the phone. The switchport voice vlan 20 command tells the switchport how to handle the special 802.1q trunk that will be formed between the switchport and phone. When you use the switchport voice vlan 20 command it tells the switch to use the access vlan as native and then tags the voice vlan to keep the voice and data traffic seperate.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    larkspurlarkspur Member Posts: 235
    That makes sense, but if you have two different subnets how do you get the PC to obtain an address in it's respected vlan?
    just trying to keep it all in perspective!
  • Options
    dtlokeedtlokee Member Posts: 2,378 ■■■■□□□□□□
    You would need a DHCP server to assign IP addresses to each VLAN. It could be a Cisco rotuer, or some other type, but you will need a DHCP address pool for each subnet, and if the DHCP server is on a remote subnet you would need to configure a helper address to forward the bootp broadcasts.
    The only easy day was yesterday!
  • Options
    larkspurlarkspur Member Posts: 235
    You would need a DHCP server to assign IP addresses to each VLAN. It could be a Cisco rotuer, or some other type, but you will need a DHCP address pool for each subnet, and if the DHCP server is on a remote subnet you would need to configure a helper address to forward the bootp broadcasts.


    yep, got all that going, not a problem.

    PC is jacked into ip phone 2nd ip phone ethernet port. phone works but pc get's an address from the voice vlan. if I move it back to vlan 20 then it gets an address from that vlan.


    sh int gig 1/0/15
    interface GigabitEthernet2/0/15
    description ip phone and pc
    switchport access vlan 128
    switchport access vlan 20
    switchport mode access
    spanning-tree portfast
    just trying to keep it all in perspective!
  • Options
    APAAPA Member Posts: 959
    yep, got all that going, not a problem.

    PC is jacked into ip phone 2nd ip phone ethernet port. phone works but pc get's an address from the voice vlan. if I move it back to vlan 20 then it gets an address from that vlan.


    sh int gig 1/0/15
    interface GigabitEthernet2/0/15
    description ip phone and pc
    switchport access vlan 128
    switchport access vlan 20
    switchport mode access
    spanning-tree portfast

    Config on ports needs to be as follows.. (Well this is how I just configured a 2960 for the new NEC IP phones we just placed at a site....... Minus the QoS configuration though) We have cascaded the phones and PCs as well so only one port is needed on the switch..... Phone to wall port... PC into phone.....

    interface GigabitEthernet2/0/15
    description ip phone and pc
    switchport voice vlan 128 (thats if 128 is your voice vlan.....)
    switchport access vlan 20 (Data\PC Vlan)
    spanning-tree portfast
    no cdp enable

    Make sure your router has ip-helper addresses on the default-gateway interfaces...... and that the DHCP server has the correct DHCP scopes for each subnet........

    Once you fix the config up you should be cooking like mumma.... :p

    CCNA | CCNA:Security | CCNP | CCIP
    JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
    JNCIS:SP | JNCIP:SP
  • Options
    dtlokeedtlokee Member Posts: 2,378 ■■■■□□□□□□
    CDP is required for the switch to tell the phone about the voice VLAN, if it's not on the phone will use the same VLAN for both (just like not setting a voice VLAN)
    The only easy day was yesterday!
  • Options
    APAAPA Member Posts: 959
    That's if your using a Cisco VOIP phone......I've been switching off CDP for IP phones that are not Cisco (eg NEC, ALcatel...... )They don't talk CDP so why have it switched on.... The Vlan is set within the phone settings hence why it knows which vlan to use........

    Haven't had any issues with devices picking up the wrong vlan settings.... and this is with cascading the phone and PC....

    CCNA | CCNA:Security | CCNP | CCIP
    JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
    JNCIS:SP | JNCIP:SP
  • Options
    dtlokeedtlokee Member Posts: 2,378 ■■■■□□□□□□
    A.P.A wrote:
    That's if your using a Cisco VOIP phone......I've been switching off CDP for IP phones that are not Cisco (eg NEC, ALcatel...... )They don't talk CDP so why have it switched on.... The Vlan is set within the phone settings hence why it knows which vlan to use........

    Haven't had any issues with devices picking up the wrong vlan settings.... and this is with cascading the phone and PC....

    I've had some NEC phones show up in a show CDP neighbors, but I know what you're reffering to in the configuration of those phones. I was suggesting somthing to for larkspur to check, I didn't even notice you had it off in your config example. He is using a Cisco phone, that is why I threw it out there.
    The only easy day was yesterday!
  • Options
    larkspurlarkspur Member Posts: 235
    ahh the good old typo got me. Made the switchport voice vlan change and presto!!!

    left cdp enabled btw.

    thanks for the replies and sorry for hi jacking your post nice343 icon_redface.gificon_redface.gif
    just trying to keep it all in perspective!
  • Options
    APAAPA Member Posts: 959
    dtlokee wrote:
    A.P.A wrote:
    That's if your using a Cisco VOIP phone......I've been switching off CDP for IP phones that are not Cisco (eg NEC, ALcatel...... )They don't talk CDP so why have it switched on.... The Vlan is set within the phone settings hence why it knows which vlan to use........

    Haven't had any issues with devices picking up the wrong vlan settings.... and this is with cascading the phone and PC....

    I've had some NEC phones show up in a show CDP neighbors, but I know what you're reffering to in the configuration of those phones. I was suggesting somthing to for larkspur to check, I didn't even notice you had it off in your config example. He is using a Cisco phone, that is why I threw it out there.

    sorry mate didn't mean to sound like a cranky BI@#H :p

    CCNA | CCNA:Security | CCNP | CCIP
    JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
    JNCIS:SP | JNCIP:SP
Sign In or Register to comment.