I will be really grateful if anyone can help me
This is just a simple setup...VLAN between router and switch and switch with another VLAN and needs routing from the VLAN on the switch..that is all
Don't know why its so tough to get help
Well, to be honest, it looks like you have gotten in over your head and technical abilities. Because every router and switch manufacturers have different interfaces, unless someone happens to be using DD-WRT and a Cisco 300 series switch, then they are not going to be able to tell you the exact commands or fields to fill out in your device interface. Most people (including me) that look at your question and try to help are very familiar with VLAN and routing and can tell you generally what you need to do, but you have to know how to do it. Also you want someone to tell you how to do it your way, which makes it even more difficult. You want to do some of your routing on the Buffalo and some on the Cisco Switch. Thus for someone to be able to tell you the exact steps, they would have to be familiar with routing on both pieces of equipment and not just one. Not saying that person does not exist, I am just saying you really narrow down the pool of available people that can help. I see you posted over on the Cisco forum. Even they are having trouble as they may know the Cisco switch you have but not necessarily DD-WRT.
Now I do understand your frustration. And I am willing to help. Since you have multiple devices I would start with one of them first, the Cisco Switch. This will make it easier so you are not having to work against multiple problems at once (for instance, the problem of having the 192.168.10 subnet defined as VLAN1 on the switch but you have it defined as VLAN10 on the Buffalo). Now it is also my understanding that the Cisco 300 series switches cannot hand out DHCP addresses. If you need DHCP on the 172.16.0 subnet then the Buffalo will have to hand them out. This is where it gets tricky and why it would be much easier to put the Cisco switch in layer2 mode and let your Buffalo do all the routing. But there are instances where you would want the Cisco to route and I take it for your instance, this is what you need.
I would do this on the Cisco:
It is best practice to not use the default VLAN (VLAN1) when using multiple VLANs on a switch. For this reason I would create a VLAN10 on the switch and make it 192.168.10.35. Now if you wanted to manage your switch using a 192.168.10 address you need to make sure to set your switches VLAN management to VLAN10 (some switches allow for multiple management IP's and VLANs). Or you could leave VLAN1 as the management VLAN and give it another IP subnet (that would only be used for management). If you did this, though, I would at least temporarily assign a port to VLAN1 that is access and untagged. That way if for some reason the Cisco would not route between the other VLANs and VLAN1, you have not locked yourself out of the management interface.
Ok then I would create VLAN20 and make it 172.16.0.254 (I am just using the numbers you chose on your screenshots).
Now assign your ports, like ports 9 and 10 to VLAN20 (access ports untagged).
I would also assign at least one port as an access port untagged in VLAN10 and plug in something you can assign a 192.168.10 address to test with. Also you will need to put the port you are going to uplink to the Buffalo router with in VLAN10 as a Tagged, Trunked port.
Now I am not familiar with the Cisco 300 routing, but I assume it will build its own routing table between those VLANs. If so you should be able to ping between them. If not we may have to manually build the routes. Do that and see if it works. If so we can move on to the Buffalo.
Note: If you do not want to redo your VLAN's and you want to keep them as VLAN1 and VLAN2, we can still make it work, but this setup can cause you trouble down the road. Anyway if you do keep them the same then apply what I said above to those VLAN's and test.