Imagine I have:
client1: IP=10.0.0.1/12, default-gateway=10.15.255.254
connected to switch1, port fa0/2.
client2: IP=10.31.255.1/12, default-gateway=10.31.255.254
connected to switch1, port fa0/3.
From client1 and client2, I can ping respective default-gateways OK.
However, neither client1 nor client2 can ping each other.
It seems this router on a stick config is not working. Based on the output of the show tech for both rotuer and switch, do you have any idea why this does not work?
Once I powered on devices and client machines in the rack to work on this again, everything worked fine.
One thing that I learned though:
I thought that placing an IP address (which belongs to vlan 298 network range) under vlan 1 for example could let me establish IP communications. I see that I had to place it under vlan 298. Interesting.
Thanks everyone for all your help.
Glad you got it working.
The reason you need to use an SVI for vlan 298 is because the connection between the switch and the router is an 802.1q trunk so the vlan packets will be tagged. And the router expects to see vlan tags for vlans 298, 442, 503 and 550. So if it receives a packet with a vlan 1 tag it doesn't know what to do. And if the native vlan is vlan 1 and so the packet is sent untagged it still doesn't know what to do as you have not explicitly configured any of the subinterfaces as the native vlan.
From the router, ping to each PC times out.
When I added an IP address to SVI on the switch int vlan 1 (only did this for a ping test), I can't ping the router default-gateways either from the switch.
From the switch, I can't ping the PC's either.
For a ping test you would need to configure the vlan interface on the switch to be in vlan 298 not vlan 1 ie.
int vlan 298
ip address 10.15.255.253 255.240.0.0
Can you do this and then ping router from switch and switch from router.