Please see the attachment topology which is in Packet tracer in this topology I have configured Ip address to all the equipment except Switches.
Both the switch are server and client,
In the switch I have configured VLAN,
VLAN 2 and VLAN 3 are getting ping on there vlan 2 and vlan 3 PCs but when we are trying to ping router 192.168.1.254 is not getting response i have configured trunk port as well but those PC are in the vlan they are not able to ping router so please suggest what command i have to add on the switch so that our VLAN's pc are getting ping from the router
don't have PK to see your topology but a common problem that can cause this is the DF , have you set correct default gateways on the switch and the end user pcs
As per my understanding you have 2 vlans (vlan 2 & Vlan 3) and PC’s in both vlans can reach their own gateway.
Now my question is that PC in Vlan 2 can communicate with PC in Vlan 3 or not?
From Router to Switch you configure the port as an access port of trunk and what vlan you configure?
What routes you configure on both Router & Switch?
Please also share more information like, switch & router model no?
Thanks & Best regards;
on PC2(that is connected to Switch0 Fa0/22 that is in VLAN 3) has IP address 192.168.1.3 with a subnet mask 255.255.255.0.
PC1(is in VLAN2) has IP address 192.168.1.1 with a subnet mask 255.255.255.0.
The different VLAN needs to have different IP subnets to be able to communicate as well as a layer3 device between them.
You need enable Router-on-a-stick on the router or change the Switch0 to a layer3 switch as well as create a new IP subnet for the VLANs.
I hope it helps.