Well we can create a trunk link between a switch and a pc and allow vlans on the trunk link as well.However in ideal scenarios an access link is always created between the two.
anywayz it would be better if u post ur configuration and what exactly ur trying to achieve.
just a simple config.i was checking whether it'd work.
l3 switch 3650
switchport trunk allowed vlan 1-2
switchport trunk encapsulation dot1q
switchport mode trunk
ip address 192.168.1.1 255.255.255.0
ip address 192.168.2.1 255.255.255.0
ip address 192.168.3.1 255.255.255.0
i have created vlan 2 already but still doesnt ping.When i kept vlan 1 ip as 192.168.2.1/24 and tried in trunk mode then it pinged but when in vlan 2 ,,it wouldnt ping.
As said rightly by Florian,your pc should be capable of working with IEEE 802.1q trunks which i don't think the packet tracer pc is...
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Sure you can. Of course for it to work correctly, the PC would need to be able to process VLAN tagged frames.
BTW, take anything you do with Packet Tracer with a very large grain of salt.
You sure can do that, but it will only work, if your PC is capeable of working with IEEE 802.1q trunks.
The fact that you are able to Ping the PC in VLAN1 and not an VLAN2 is because of the native-vlan configuration of the Switch, which should be by default vlan1.
So the PC receives the Frames for vlan1 untagged as standard Ethernet-Frames and can handle them. The frames for vlan2 however are tagges with a IEEE 802.1q-type tag, so the PC can't recognize them, until you configure him to work with IEEE802.1q
I don't know if Ciscos Packet-Tracers PC is capable of working with the Tags. I think the Servers in Packettracer can.
Best Regards and all the best,