Changing a port from a vlan to another

Answered Question
Apr 19th, 2012
User Badges:

Hi everyone,


I have a 3560 switch with the following ports config


interface FastEthernet0/43
description : Link to PC + ShoreTel IP Phone
switchport access vlan 120
switchport trunk encapsulation dot1q
switchport trunk native vlan 120
switchport mode access
service-policy input VOICE

interface FastEthernet0/25
description : Link to PC + ShoreTel IP Phone
switchport trunk encapsulation dot1q
switchport mode trunk
service-policy input VOICE

interface FastEthernet0/28
description : Link to PC + ShoreTel IP Phone
switchport trunk encapsulation dot1q
switchport mode access
service-policy input VOICE

interface FastEthernet0/46
description : Link to PC + ShoreTel IP Phone
switchport trunk encapsulation dot1q
switchport mode trunk
service-policy input VOICE


I would like to use theses ports on a different vlan to connect 4 pc's to them. Can I just remove them from the vlan, remove the trunk switchport and set up on the vlan i want them on with no trunking?


Thanks

Wilfredo

Correct Answer by burleyman about 5 years 3 months ago

Here is how I do it when I re-provision ports


This part sets the interfaces to default config.


config t

default int fa0/43

default int fa0/25

default int fa0/28

default int fa0/46


Now you can configure the ports

interface faX/X  <---- substitute the X/X with the port number

description PC

switchport

switchport mode access

switchport access vlan XXX  <------ substitute the XXX with the Vlan you want to assign

spanning-tree portfast

no shut


then save the configuration by issuing the command     write mem


Hope this helps.

Mike

Correct Answer by glen.grant about 5 years 3 months ago

  Quick answer is yes.  Just do the following for each port


conf t

default interface Fx/x


interf fx/x

switchport

switchport access vlan X

switchport host

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
glen.grant Thu, 04/19/2012 - 08:41
User Badges:
  • Purple, 4500 points or more

  Quick answer is yes.  Just do the following for each port


conf t

default interface Fx/x


interf fx/x

switchport

switchport access vlan X

switchport host

waguilar71 Thu, 04/19/2012 - 08:46
User Badges:

Thanks for your reply Grant, what do you mean by default interface

glen.grant Thu, 04/19/2012 - 08:59
User Badges:
  • Purple, 4500 points or more

Default interface fx/x will set that port back to factory defaults without having to do a "no" command for each line in the port config.

Correct Answer
burleyman Thu, 04/19/2012 - 08:48
User Badges:
  • Blue, 1500 points or more

Here is how I do it when I re-provision ports


This part sets the interfaces to default config.


config t

default int fa0/43

default int fa0/25

default int fa0/28

default int fa0/46


Now you can configure the ports

interface faX/X  <---- substitute the X/X with the port number

description PC

switchport

switchport mode access

switchport access vlan XXX  <------ substitute the XXX with the Vlan you want to assign

spanning-tree portfast

no shut


then save the configuration by issuing the command     write mem


Hope this helps.

Mike

waguilar71 Thu, 04/19/2012 - 09:47
User Badges:

Thanks guys,


The instructions worked that both of you provided. One more detailed than the other but they worked. I did use the command


spanning-tree host and it setup the port at portfast by default. I will be making the connections tonight of the pc's and all should be well.


Wilfredo

Actions

This Discussion