Configure Switch VLANs and Trunk

Switch>enable

Switch#show vlan

Switch#configure terminal

Switch(config)#vlan 50

Switch(config-vlan)#name student

Switch(config-vlan)#vlan 99

Switch(config-vlan)#name mgt

Switch(config-vlan)#exit

Switch(config)#interface fastEthernet 0/10

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 50

Switch(config-if)#end

Switch#show vlan

Switch#show running-config

Switch>en

Switch#config t

Switch(config)#int fa0/24

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 99

Switch(config-if)#end

Switch#conf t

Switch(config)#int vlan 99

Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan99, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up

Switch(config-if)#ip address 192.168.99.2 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#end

Switch>en

Password:

Switch#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#int fa0/1

Switch(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch(config-if)#switchport trunk allowed vlan 1-99

Switch(config-if)#end

Switch#sh running-config

Switch#sh int trunk

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on                    802.1q         trunking      1

 

Port        Vlans allowed on trunk

Fa0/1       1-99

 

Port        Vlans allowed and active in management domain

Fa0/1       1,50

 

Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,50

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s