Options

2 ways of assign vlan

poguypoguy Member Posts: 91 ■■□□□□□□□□
a) vlan-membership static 22
b) switchport access vlan 22

what are their differences and when to use each of them?
Thank you so much:)

Comments

  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    A is an older command that I don't believe is supported on any new IOS releases. Stick with B and you will be good to go.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    And the third way is:
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#vlan 25
    Switch(config-vlan)#name DATA
    Switch(config-vlan)#do show vlan brief
    
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
    1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                    Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                    Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                    Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                    Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                    Fa0/21, Fa0/22, Fa0/23, Fa0/24
    25   DATA                             active    
    1002 fddi-default                     active    
    1003 token-ring-default               active    
    1004 fddinet-default                  active    
    1005 trnet-default                    active    
    Switch(config-vlan)#
    
  • Options
    ncsugrad2002ncsugrad2002 Member Posts: 131
    A is an older command that I don't believe is supported on any new IOS releases. Stick with B and you will be good to go.

    This is correct.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    phoeneous wrote: »
    And the third way is:
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#vlan 25
    Switch(config-vlan)#name DATA
    Switch(config-vlan)#do show vlan brief
    
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
    1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                    Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                    Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                    Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                    Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                    Fa0/21, Fa0/22, Fa0/23, Fa0/24
    25   DATA                             active    
    1002 fddi-default                     active    
    1003 token-ring-default               active    
    1004 fddinet-default                  active    
    1005 trnet-default                    active    
    Switch(config-vlan)#
    

    I believe the OP was referring to ways to assign a switchport to a Vlan which your configuration does not accomplish.
    An expert is a man who has made all the mistakes which can be made.
Sign In or Register to comment.