I do not understand your post. When you have a layer 2 VLAN it is running completely at layer 2 and there is no IP address at layer 2. When you say that your layer 2 VLAN is running 10.1.1.0 then you have added layer 3 to that VLAN.
If the switch can sometimes not ping the router address then it would help us if you would provide details about the configuration of the switch and about its connection to the router. On which switch port is the router connected? How is that port configured?
Also some other details about the problem would be helpful:
- when the problem happens can you do show arp on the switch and see if the MAC address for the router is in the ARP table?
- when the problem happens can you do show interface of the affected ports and post the output?
HTH
Rick
HTH
Rick