A vlan configuration on a router is slightly different than on a switch. On a switch, you would create the vlan and then the routed vlan interface.
On a router you tie a vlan to a subinterface. You need to create the subinterface and then do the encapsulation dot1q <vlan ID> command. This command basically assigned the vlan to the subinterface. In this example, there are 2 vlans, vlan 100 and 201. On the eth 0/0 interface, I created two subinterfaces. fastethernet0/0.100 and f0/0.201. Notice that I matched the subinterface number with the vlan ID. You do not have to do this, but it is a best practice and really helps you as the administrator keep things organized. So, under f0/0.100, there is the encapsulation dot1q 100, which basically binds vlan 100 to subinterface f0/0.100, then I assigned the IP. The same is for the other subinterface. So the router is trunking two vlans on its f0/0 interface, vlan's 100 and 201.
interface FastEthernet0/0 no ip address speed 100 full-duplex ! interface FastEthernet0/0.100 description test Network encapsulation dot1Q 100 ip address 192.168.102.1 255.255.255.128 no snmp trap link-status ! interface FastEthernet0/0.201 description Office encapsulation dot1Q 201 ip address 220.127.116.11 255.255.255.128 no snmp trap link-status