Switch 1(config-if)# switchport mode trunk
Switch 1(config)# interface fastEthernet 0/1 Switch 1(config-if)# switchport access vlan 3 Switch 1(config)# interface fastEthernet 0/4 Switch 1(config)# interface fastEthernet 0/3 Switch 1(config-if)# switchport access vlan 2 Switch 1(config-if)# switchport mode access Switch 1(config)# interface fastEthernet 0/2 Laslty, we will set the allowed VLANs with “ switchport trunk allowed vlan” command on this trunk and save our configuration.Then we will also set this port with “ no negotiate” command to prevent negotiation about the port role.After that, we will set the trunk port that will carry multiple VLANs with “ swithcport mode trunk” command.We will also set the VLAN, that this port will access.We will do this with “ switchport mode access” command under these interfaces. We will set access ports that will access specific VLANs.These ip addresses will be required at the end of this configuration example to test our configuration.Īfter PC IP configurations, now, we can start our VLAN Packet Tracer Configuration steps. For all Packet Tracer Examples and Files, you can check Packet Tracer Labs Page.įor our VLAN Configuration example, we will set our PC IPaddresses as below.